mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
1589 lines
52 KiB
Go
1589 lines
52 KiB
Go
// 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 PostUsersSignInDataServerList = []string{
|
||
"https://plex.tv/api/v2/",
|
||
}
|
||
|
||
type PostUsersSignInDataGlobals struct {
|
||
// The unique identifier for the client application
|
||
// This is used to track the client application and its usage
|
||
// (UUID, serial number, or other number unique per device)
|
||
//
|
||
ClientID *string `queryParam:"style=form,explode=true,name=X-Plex-Client-Identifier"`
|
||
}
|
||
|
||
func (o *PostUsersSignInDataGlobals) GetClientID() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.ClientID
|
||
}
|
||
|
||
// PostUsersSignInDataRequestBody - Login credentials
|
||
type PostUsersSignInDataRequestBody struct {
|
||
Login string `form:"name=login"`
|
||
Password string `form:"name=password"`
|
||
RememberMe *bool `default:"false" form:"name=rememberMe"`
|
||
VerificationCode *string `form:"name=verificationCode"`
|
||
}
|
||
|
||
func (p PostUsersSignInDataRequestBody) MarshalJSON() ([]byte, error) {
|
||
return utils.MarshalJSON(p, "", false)
|
||
}
|
||
|
||
func (p *PostUsersSignInDataRequestBody) UnmarshalJSON(data []byte) error {
|
||
if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil {
|
||
return err
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (o *PostUsersSignInDataRequestBody) GetLogin() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Login
|
||
}
|
||
|
||
func (o *PostUsersSignInDataRequestBody) GetPassword() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Password
|
||
}
|
||
|
||
func (o *PostUsersSignInDataRequestBody) GetRememberMe() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.RememberMe
|
||
}
|
||
|
||
func (o *PostUsersSignInDataRequestBody) GetVerificationCode() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.VerificationCode
|
||
}
|
||
|
||
type PostUsersSignInDataRequest struct {
|
||
// The unique identifier for the client application
|
||
// This is used to track the client application and its usage
|
||
// (UUID, serial number, or other number unique per device)
|
||
//
|
||
ClientID *string `queryParam:"style=form,explode=true,name=X-Plex-Client-Identifier"`
|
||
// Login credentials
|
||
RequestBody *PostUsersSignInDataRequestBody `request:"mediaType=application/x-www-form-urlencoded"`
|
||
}
|
||
|
||
func (o *PostUsersSignInDataRequest) GetClientID() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.ClientID
|
||
}
|
||
|
||
func (o *PostUsersSignInDataRequest) GetRequestBody() *PostUsersSignInDataRequestBody {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.RequestBody
|
||
}
|
||
|
||
// PostUsersSignInDataMailingListStatus - Your current mailing list status
|
||
type PostUsersSignInDataMailingListStatus string
|
||
|
||
const (
|
||
PostUsersSignInDataMailingListStatusActive PostUsersSignInDataMailingListStatus = "active"
|
||
PostUsersSignInDataMailingListStatusUnsubscribed PostUsersSignInDataMailingListStatus = "unsubscribed"
|
||
)
|
||
|
||
func (e PostUsersSignInDataMailingListStatus) ToPointer() *PostUsersSignInDataMailingListStatus {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataMailingListStatus) 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 = PostUsersSignInDataMailingListStatus(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataMailingListStatus: %v", v)
|
||
}
|
||
}
|
||
|
||
// PostUsersSignInDataAutoSelectSubtitle - The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||
type PostUsersSignInDataAutoSelectSubtitle string
|
||
|
||
const (
|
||
PostUsersSignInDataAutoSelectSubtitleZero PostUsersSignInDataAutoSelectSubtitle = "0"
|
||
PostUsersSignInDataAutoSelectSubtitleOne PostUsersSignInDataAutoSelectSubtitle = "1"
|
||
)
|
||
|
||
func (e PostUsersSignInDataAutoSelectSubtitle) ToPointer() *PostUsersSignInDataAutoSelectSubtitle {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataAutoSelectSubtitle) UnmarshalJSON(data []byte) error {
|
||
var v string
|
||
if err := json.Unmarshal(data, &v); err != nil {
|
||
return err
|
||
}
|
||
switch v {
|
||
case "0":
|
||
fallthrough
|
||
case "1":
|
||
*e = PostUsersSignInDataAutoSelectSubtitle(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataAutoSelectSubtitle: %v", v)
|
||
}
|
||
}
|
||
|
||
// PostUsersSignInDataDefaultSubtitleAccessibility - 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 shown non-SDH subtitles)
|
||
type PostUsersSignInDataDefaultSubtitleAccessibility string
|
||
|
||
const (
|
||
PostUsersSignInDataDefaultSubtitleAccessibilityZero PostUsersSignInDataDefaultSubtitleAccessibility = "0"
|
||
PostUsersSignInDataDefaultSubtitleAccessibilityOne PostUsersSignInDataDefaultSubtitleAccessibility = "1"
|
||
)
|
||
|
||
func (e PostUsersSignInDataDefaultSubtitleAccessibility) ToPointer() *PostUsersSignInDataDefaultSubtitleAccessibility {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataDefaultSubtitleAccessibility) UnmarshalJSON(data []byte) error {
|
||
var v string
|
||
if err := json.Unmarshal(data, &v); err != nil {
|
||
return err
|
||
}
|
||
switch v {
|
||
case "0":
|
||
fallthrough
|
||
case "1":
|
||
*e = PostUsersSignInDataDefaultSubtitleAccessibility(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataDefaultSubtitleAccessibility: %v", v)
|
||
}
|
||
}
|
||
|
||
// PostUsersSignInDataDefaultSubtitleForced - 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 PostUsersSignInDataDefaultSubtitleForced string
|
||
|
||
const (
|
||
PostUsersSignInDataDefaultSubtitleForcedZero PostUsersSignInDataDefaultSubtitleForced = "0"
|
||
PostUsersSignInDataDefaultSubtitleForcedOne PostUsersSignInDataDefaultSubtitleForced = "1"
|
||
)
|
||
|
||
func (e PostUsersSignInDataDefaultSubtitleForced) ToPointer() *PostUsersSignInDataDefaultSubtitleForced {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataDefaultSubtitleForced) UnmarshalJSON(data []byte) error {
|
||
var v string
|
||
if err := json.Unmarshal(data, &v); err != nil {
|
||
return err
|
||
}
|
||
switch v {
|
||
case "0":
|
||
fallthrough
|
||
case "1":
|
||
*e = PostUsersSignInDataDefaultSubtitleForced(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataDefaultSubtitleForced: %v", v)
|
||
}
|
||
}
|
||
|
||
type PostUsersSignInDataWatchedIndicator string
|
||
|
||
const (
|
||
PostUsersSignInDataWatchedIndicatorZero PostUsersSignInDataWatchedIndicator = "0"
|
||
PostUsersSignInDataWatchedIndicatorOne PostUsersSignInDataWatchedIndicator = "1"
|
||
)
|
||
|
||
func (e PostUsersSignInDataWatchedIndicator) ToPointer() *PostUsersSignInDataWatchedIndicator {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataWatchedIndicator) UnmarshalJSON(data []byte) error {
|
||
var v string
|
||
if err := json.Unmarshal(data, &v); err != nil {
|
||
return err
|
||
}
|
||
switch v {
|
||
case "0":
|
||
fallthrough
|
||
case "1":
|
||
*e = PostUsersSignInDataWatchedIndicator(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataWatchedIndicator: %v", v)
|
||
}
|
||
}
|
||
|
||
type PostUsersSignInDataMediaReviewsVisibility int64
|
||
|
||
const (
|
||
PostUsersSignInDataMediaReviewsVisibilityZero PostUsersSignInDataMediaReviewsVisibility = 0
|
||
PostUsersSignInDataMediaReviewsVisibilityOne PostUsersSignInDataMediaReviewsVisibility = 1
|
||
)
|
||
|
||
func (e PostUsersSignInDataMediaReviewsVisibility) ToPointer() *PostUsersSignInDataMediaReviewsVisibility {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataMediaReviewsVisibility) UnmarshalJSON(data []byte) error {
|
||
var v int64
|
||
if err := json.Unmarshal(data, &v); err != nil {
|
||
return err
|
||
}
|
||
switch v {
|
||
case 0:
|
||
fallthrough
|
||
case 1:
|
||
*e = PostUsersSignInDataMediaReviewsVisibility(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataMediaReviewsVisibility: %v", v)
|
||
}
|
||
}
|
||
|
||
type PostUsersSignInDataUserProfile 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"`
|
||
// The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
|
||
AutoSelectSubtitle *PostUsersSignInDataAutoSelectSubtitle `json:"autoSelectSubtitle,omitempty"`
|
||
// 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 shown non-SDH subtitles)
|
||
DefaultSubtitleAccessibility *PostUsersSignInDataDefaultSubtitleAccessibility `json:"defaultSubtitleAccessibility,omitempty"`
|
||
// 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)
|
||
DefaultSubtitleForced *PostUsersSignInDataDefaultSubtitleForced `json:"defaultSubtitleForced,omitempty"`
|
||
WatchedIndicator *PostUsersSignInDataWatchedIndicator `json:"watchedIndicator,omitempty"`
|
||
MediaReviewsVisibility *PostUsersSignInDataMediaReviewsVisibility `json:"mediaReviewsVisibility,omitempty"`
|
||
}
|
||
|
||
func (p PostUsersSignInDataUserProfile) MarshalJSON() ([]byte, error) {
|
||
return utils.MarshalJSON(p, "", false)
|
||
}
|
||
|
||
func (p *PostUsersSignInDataUserProfile) UnmarshalJSON(data []byte) error {
|
||
if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil {
|
||
return err
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserProfile) GetAutoSelectAudio() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.AutoSelectAudio
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserProfile) GetDefaultAudioLanguage() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.DefaultAudioLanguage
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserProfile) GetDefaultSubtitleLanguage() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.DefaultSubtitleLanguage
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserProfile) GetAutoSelectSubtitle() *PostUsersSignInDataAutoSelectSubtitle {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.AutoSelectSubtitle
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserProfile) GetDefaultSubtitleAccessibility() *PostUsersSignInDataDefaultSubtitleAccessibility {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.DefaultSubtitleAccessibility
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserProfile) GetDefaultSubtitleForced() *PostUsersSignInDataDefaultSubtitleForced {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.DefaultSubtitleForced
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserProfile) GetWatchedIndicator() *PostUsersSignInDataWatchedIndicator {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.WatchedIndicator
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserProfile) GetMediaReviewsVisibility() *PostUsersSignInDataMediaReviewsVisibility {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.MediaReviewsVisibility
|
||
}
|
||
|
||
type PostUsersSignInDataStatus string
|
||
|
||
const (
|
||
PostUsersSignInDataStatusOnline PostUsersSignInDataStatus = "online"
|
||
PostUsersSignInDataStatusOffline PostUsersSignInDataStatus = "offline"
|
||
)
|
||
|
||
func (e PostUsersSignInDataStatus) ToPointer() *PostUsersSignInDataStatus {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataStatus) 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 = PostUsersSignInDataStatus(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataStatus: %v", v)
|
||
}
|
||
}
|
||
|
||
type PostUsersSignInDataServices struct {
|
||
Identifier string `json:"identifier"`
|
||
Endpoint string `json:"endpoint"`
|
||
Token *string `json:"token"`
|
||
Secret *string `json:"secret"`
|
||
Status PostUsersSignInDataStatus `json:"status"`
|
||
}
|
||
|
||
func (o *PostUsersSignInDataServices) GetIdentifier() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Identifier
|
||
}
|
||
|
||
func (o *PostUsersSignInDataServices) GetEndpoint() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Endpoint
|
||
}
|
||
|
||
func (o *PostUsersSignInDataServices) GetToken() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Token
|
||
}
|
||
|
||
func (o *PostUsersSignInDataServices) GetSecret() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Secret
|
||
}
|
||
|
||
func (o *PostUsersSignInDataServices) GetStatus() PostUsersSignInDataStatus {
|
||
if o == nil {
|
||
return PostUsersSignInDataStatus("")
|
||
}
|
||
return o.Status
|
||
}
|
||
|
||
type PostUsersSignInDataFeatures string
|
||
|
||
const (
|
||
PostUsersSignInDataFeaturesAndroidDolbyVision PostUsersSignInDataFeatures = "Android - Dolby Vision"
|
||
PostUsersSignInDataFeaturesAndroidPiP PostUsersSignInDataFeatures = "Android - PiP"
|
||
PostUsersSignInDataFeaturesCuSunset PostUsersSignInDataFeatures = "CU Sunset"
|
||
PostUsersSignInDataFeaturesHrkEnableEur PostUsersSignInDataFeatures = "HRK_enable_EUR"
|
||
PostUsersSignInDataFeaturesTrebleShowFeatures PostUsersSignInDataFeatures = "TREBLE-show-features"
|
||
PostUsersSignInDataFeaturesAdCountdownTimer PostUsersSignInDataFeatures = "ad-countdown-timer"
|
||
PostUsersSignInDataFeaturesAdaptiveBitrate PostUsersSignInDataFeatures = "adaptive_bitrate"
|
||
PostUsersSignInDataFeaturesAmazonLoopDebug PostUsersSignInDataFeatures = "amazon-loop-debug"
|
||
PostUsersSignInDataFeaturesAvodAdAnalysis PostUsersSignInDataFeatures = "avod-ad-analysis"
|
||
PostUsersSignInDataFeaturesAvodNewMedia PostUsersSignInDataFeatures = "avod-new-media"
|
||
PostUsersSignInDataFeaturesBlacklistGetSignin PostUsersSignInDataFeatures = "blacklist_get_signin"
|
||
PostUsersSignInDataFeaturesClientRadioStations PostUsersSignInDataFeatures = "client-radio-stations"
|
||
PostUsersSignInDataFeaturesCloudflareTurnstileRequired PostUsersSignInDataFeatures = "cloudflare-turnstile-required"
|
||
PostUsersSignInDataFeaturesCollections PostUsersSignInDataFeatures = "collections"
|
||
PostUsersSignInDataFeaturesCommentsAndRepliesPushNotifications PostUsersSignInDataFeatures = "comments_and_replies_push_notifications"
|
||
PostUsersSignInDataFeaturesCommunityAccessPlexTv PostUsersSignInDataFeatures = "community_access_plex_tv"
|
||
PostUsersSignInDataFeaturesCompanionsSonos PostUsersSignInDataFeatures = "companions_sonos"
|
||
PostUsersSignInDataFeaturesCustomHomeRemoval PostUsersSignInDataFeatures = "custom-home-removal"
|
||
PostUsersSignInDataFeaturesDisableHomeUserFriendships PostUsersSignInDataFeatures = "disable_home_user_friendships"
|
||
PostUsersSignInDataFeaturesDisableSharingFriendships PostUsersSignInDataFeatures = "disable_sharing_friendships"
|
||
PostUsersSignInDataFeaturesDrmSupport PostUsersSignInDataFeatures = "drm_support"
|
||
PostUsersSignInDataFeaturesExcludeRestrictions PostUsersSignInDataFeatures = "exclude restrictions"
|
||
PostUsersSignInDataFeaturesFederatedAuth PostUsersSignInDataFeatures = "federated-auth"
|
||
PostUsersSignInDataFeaturesFriendRequestPushNotifications PostUsersSignInDataFeatures = "friend_request_push_notifications"
|
||
PostUsersSignInDataFeaturesGuidedUpgrade PostUsersSignInDataFeatures = "guided-upgrade"
|
||
PostUsersSignInDataFeaturesHome PostUsersSignInDataFeatures = "home"
|
||
PostUsersSignInDataFeaturesIncreasePasswordComplexity PostUsersSignInDataFeatures = "increase-password-complexity"
|
||
PostUsersSignInDataFeaturesIos14PrivacyBanner PostUsersSignInDataFeatures = "ios14-privacy-banner"
|
||
PostUsersSignInDataFeaturesIterableNotificationTokens PostUsersSignInDataFeatures = "iterable-notification-tokens"
|
||
PostUsersSignInDataFeaturesKeepPaymentMethod PostUsersSignInDataFeatures = "keep-payment-method"
|
||
PostUsersSignInDataFeaturesKevinBacon PostUsersSignInDataFeatures = "kevin-bacon"
|
||
PostUsersSignInDataFeaturesKoreaConsent PostUsersSignInDataFeatures = "korea-consent"
|
||
PostUsersSignInDataFeaturesLeIsrgRootX1 PostUsersSignInDataFeatures = "le_isrg_root_x1"
|
||
PostUsersSignInDataFeaturesLetsEncrypt PostUsersSignInDataFeatures = "lets_encrypt"
|
||
PostUsersSignInDataFeaturesLightningDvrPivot PostUsersSignInDataFeatures = "lightning-dvr-pivot"
|
||
PostUsersSignInDataFeaturesLiveTvSupportIncompleteSegments PostUsersSignInDataFeatures = "live-tv-support-incomplete-segments"
|
||
PostUsersSignInDataFeaturesLivetv PostUsersSignInDataFeatures = "livetv"
|
||
PostUsersSignInDataFeaturesMetadataSearch PostUsersSignInDataFeatures = "metadata_search"
|
||
PostUsersSignInDataFeaturesNewPlexPassPrices PostUsersSignInDataFeatures = "new_plex_pass_prices"
|
||
PostUsersSignInDataFeaturesNewsProviderSunsetModal PostUsersSignInDataFeatures = "news-provider-sunset-modal"
|
||
PostUsersSignInDataFeaturesPhotosFavorites PostUsersSignInDataFeatures = "photos-favorites"
|
||
PostUsersSignInDataFeaturesPhotosMetadataEdition PostUsersSignInDataFeatures = "photos-metadata-edition"
|
||
PostUsersSignInDataFeaturesPmsHealth PostUsersSignInDataFeatures = "pms_health"
|
||
PostUsersSignInDataFeaturesRadio PostUsersSignInDataFeatures = "radio"
|
||
PostUsersSignInDataFeaturesRateLimitClientToken PostUsersSignInDataFeatures = "rate-limit-client-token"
|
||
PostUsersSignInDataFeaturesScrobblingServicePlexTv PostUsersSignInDataFeatures = "scrobbling-service-plex-tv"
|
||
PostUsersSignInDataFeaturesSharedServerNotification PostUsersSignInDataFeatures = "shared_server_notification"
|
||
PostUsersSignInDataFeaturesSharedSourceNotification PostUsersSignInDataFeatures = "shared_source_notification"
|
||
PostUsersSignInDataFeaturesSigninWithApple PostUsersSignInDataFeatures = "signin_with_apple"
|
||
PostUsersSignInDataFeaturesSpringServeAdProvider PostUsersSignInDataFeatures = "spring_serve_ad_provider"
|
||
PostUsersSignInDataFeaturesTranscoderCache PostUsersSignInDataFeatures = "transcoder_cache"
|
||
PostUsersSignInDataFeaturesTunerSharing PostUsersSignInDataFeatures = "tuner-sharing"
|
||
PostUsersSignInDataFeaturesTwoFactorAuthentication PostUsersSignInDataFeatures = "two-factor-authentication"
|
||
PostUsersSignInDataFeaturesUnsupportedtuners PostUsersSignInDataFeatures = "unsupportedtuners"
|
||
PostUsersSignInDataFeaturesUpgrade3ds2 PostUsersSignInDataFeatures = "upgrade-3ds2"
|
||
PostUsersSignInDataFeaturesVodSchema PostUsersSignInDataFeatures = "vod-schema"
|
||
PostUsersSignInDataFeaturesVodCloudflare PostUsersSignInDataFeatures = "vod_cloudflare"
|
||
PostUsersSignInDataFeaturesWatchTogetherInvite PostUsersSignInDataFeatures = "watch-together-invite"
|
||
PostUsersSignInDataFeaturesWebServerDashboard PostUsersSignInDataFeatures = "web_server_dashboard"
|
||
)
|
||
|
||
func (e PostUsersSignInDataFeatures) ToPointer() *PostUsersSignInDataFeatures {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataFeatures) 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 = PostUsersSignInDataFeatures(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataFeatures: %v", v)
|
||
}
|
||
}
|
||
|
||
// PostUsersSignInDataAuthenticationStatus - String representation of subscriptionActive
|
||
type PostUsersSignInDataAuthenticationStatus string
|
||
|
||
const (
|
||
PostUsersSignInDataAuthenticationStatusInactive PostUsersSignInDataAuthenticationStatus = "Inactive"
|
||
PostUsersSignInDataAuthenticationStatusActive PostUsersSignInDataAuthenticationStatus = "Active"
|
||
)
|
||
|
||
func (e PostUsersSignInDataAuthenticationStatus) ToPointer() *PostUsersSignInDataAuthenticationStatus {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataAuthenticationStatus) 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 = PostUsersSignInDataAuthenticationStatus(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataAuthenticationStatus: %v", v)
|
||
}
|
||
}
|
||
|
||
// PostUsersSignInDataSubscription - If the account’s Plex Pass subscription is active
|
||
type PostUsersSignInDataSubscription struct {
|
||
// List of features allowed on your Plex Pass subscription
|
||
Features []PostUsersSignInDataFeatures `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 *PostUsersSignInDataAuthenticationStatus `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 *PostUsersSignInDataSubscription) GetFeatures() []PostUsersSignInDataFeatures {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Features
|
||
}
|
||
|
||
func (o *PostUsersSignInDataSubscription) GetActive() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Active
|
||
}
|
||
|
||
func (o *PostUsersSignInDataSubscription) GetSubscribedAt() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.SubscribedAt
|
||
}
|
||
|
||
func (o *PostUsersSignInDataSubscription) GetStatus() *PostUsersSignInDataAuthenticationStatus {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Status
|
||
}
|
||
|
||
func (o *PostUsersSignInDataSubscription) GetPaymentService() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.PaymentService
|
||
}
|
||
|
||
func (o *PostUsersSignInDataSubscription) GetPlan() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Plan
|
||
}
|
||
|
||
type PostUsersSignInDataAuthenticationFeatures string
|
||
|
||
const (
|
||
PostUsersSignInDataAuthenticationFeaturesAndroidDolbyVision PostUsersSignInDataAuthenticationFeatures = "Android - Dolby Vision"
|
||
PostUsersSignInDataAuthenticationFeaturesAndroidPiP PostUsersSignInDataAuthenticationFeatures = "Android - PiP"
|
||
PostUsersSignInDataAuthenticationFeaturesCuSunset PostUsersSignInDataAuthenticationFeatures = "CU Sunset"
|
||
PostUsersSignInDataAuthenticationFeaturesHrkEnableEur PostUsersSignInDataAuthenticationFeatures = "HRK_enable_EUR"
|
||
PostUsersSignInDataAuthenticationFeaturesTrebleShowFeatures PostUsersSignInDataAuthenticationFeatures = "TREBLE-show-features"
|
||
PostUsersSignInDataAuthenticationFeaturesAdCountdownTimer PostUsersSignInDataAuthenticationFeatures = "ad-countdown-timer"
|
||
PostUsersSignInDataAuthenticationFeaturesAdaptiveBitrate PostUsersSignInDataAuthenticationFeatures = "adaptive_bitrate"
|
||
PostUsersSignInDataAuthenticationFeaturesAmazonLoopDebug PostUsersSignInDataAuthenticationFeatures = "amazon-loop-debug"
|
||
PostUsersSignInDataAuthenticationFeaturesAvodAdAnalysis PostUsersSignInDataAuthenticationFeatures = "avod-ad-analysis"
|
||
PostUsersSignInDataAuthenticationFeaturesAvodNewMedia PostUsersSignInDataAuthenticationFeatures = "avod-new-media"
|
||
PostUsersSignInDataAuthenticationFeaturesBlacklistGetSignin PostUsersSignInDataAuthenticationFeatures = "blacklist_get_signin"
|
||
PostUsersSignInDataAuthenticationFeaturesClientRadioStations PostUsersSignInDataAuthenticationFeatures = "client-radio-stations"
|
||
PostUsersSignInDataAuthenticationFeaturesCloudflareTurnstileRequired PostUsersSignInDataAuthenticationFeatures = "cloudflare-turnstile-required"
|
||
PostUsersSignInDataAuthenticationFeaturesCollections PostUsersSignInDataAuthenticationFeatures = "collections"
|
||
PostUsersSignInDataAuthenticationFeaturesCommentsAndRepliesPushNotifications PostUsersSignInDataAuthenticationFeatures = "comments_and_replies_push_notifications"
|
||
PostUsersSignInDataAuthenticationFeaturesCommunityAccessPlexTv PostUsersSignInDataAuthenticationFeatures = "community_access_plex_tv"
|
||
PostUsersSignInDataAuthenticationFeaturesCompanionsSonos PostUsersSignInDataAuthenticationFeatures = "companions_sonos"
|
||
PostUsersSignInDataAuthenticationFeaturesCustomHomeRemoval PostUsersSignInDataAuthenticationFeatures = "custom-home-removal"
|
||
PostUsersSignInDataAuthenticationFeaturesDisableHomeUserFriendships PostUsersSignInDataAuthenticationFeatures = "disable_home_user_friendships"
|
||
PostUsersSignInDataAuthenticationFeaturesDisableSharingFriendships PostUsersSignInDataAuthenticationFeatures = "disable_sharing_friendships"
|
||
PostUsersSignInDataAuthenticationFeaturesDrmSupport PostUsersSignInDataAuthenticationFeatures = "drm_support"
|
||
PostUsersSignInDataAuthenticationFeaturesExcludeRestrictions PostUsersSignInDataAuthenticationFeatures = "exclude restrictions"
|
||
PostUsersSignInDataAuthenticationFeaturesFederatedAuth PostUsersSignInDataAuthenticationFeatures = "federated-auth"
|
||
PostUsersSignInDataAuthenticationFeaturesFriendRequestPushNotifications PostUsersSignInDataAuthenticationFeatures = "friend_request_push_notifications"
|
||
PostUsersSignInDataAuthenticationFeaturesGuidedUpgrade PostUsersSignInDataAuthenticationFeatures = "guided-upgrade"
|
||
PostUsersSignInDataAuthenticationFeaturesHome PostUsersSignInDataAuthenticationFeatures = "home"
|
||
PostUsersSignInDataAuthenticationFeaturesIncreasePasswordComplexity PostUsersSignInDataAuthenticationFeatures = "increase-password-complexity"
|
||
PostUsersSignInDataAuthenticationFeaturesIos14PrivacyBanner PostUsersSignInDataAuthenticationFeatures = "ios14-privacy-banner"
|
||
PostUsersSignInDataAuthenticationFeaturesIterableNotificationTokens PostUsersSignInDataAuthenticationFeatures = "iterable-notification-tokens"
|
||
PostUsersSignInDataAuthenticationFeaturesKeepPaymentMethod PostUsersSignInDataAuthenticationFeatures = "keep-payment-method"
|
||
PostUsersSignInDataAuthenticationFeaturesKevinBacon PostUsersSignInDataAuthenticationFeatures = "kevin-bacon"
|
||
PostUsersSignInDataAuthenticationFeaturesKoreaConsent PostUsersSignInDataAuthenticationFeatures = "korea-consent"
|
||
PostUsersSignInDataAuthenticationFeaturesLeIsrgRootX1 PostUsersSignInDataAuthenticationFeatures = "le_isrg_root_x1"
|
||
PostUsersSignInDataAuthenticationFeaturesLetsEncrypt PostUsersSignInDataAuthenticationFeatures = "lets_encrypt"
|
||
PostUsersSignInDataAuthenticationFeaturesLightningDvrPivot PostUsersSignInDataAuthenticationFeatures = "lightning-dvr-pivot"
|
||
PostUsersSignInDataAuthenticationFeaturesLiveTvSupportIncompleteSegments PostUsersSignInDataAuthenticationFeatures = "live-tv-support-incomplete-segments"
|
||
PostUsersSignInDataAuthenticationFeaturesLivetv PostUsersSignInDataAuthenticationFeatures = "livetv"
|
||
PostUsersSignInDataAuthenticationFeaturesMetadataSearch PostUsersSignInDataAuthenticationFeatures = "metadata_search"
|
||
PostUsersSignInDataAuthenticationFeaturesNewPlexPassPrices PostUsersSignInDataAuthenticationFeatures = "new_plex_pass_prices"
|
||
PostUsersSignInDataAuthenticationFeaturesNewsProviderSunsetModal PostUsersSignInDataAuthenticationFeatures = "news-provider-sunset-modal"
|
||
PostUsersSignInDataAuthenticationFeaturesPhotosFavorites PostUsersSignInDataAuthenticationFeatures = "photos-favorites"
|
||
PostUsersSignInDataAuthenticationFeaturesPhotosMetadataEdition PostUsersSignInDataAuthenticationFeatures = "photos-metadata-edition"
|
||
PostUsersSignInDataAuthenticationFeaturesPmsHealth PostUsersSignInDataAuthenticationFeatures = "pms_health"
|
||
PostUsersSignInDataAuthenticationFeaturesRadio PostUsersSignInDataAuthenticationFeatures = "radio"
|
||
PostUsersSignInDataAuthenticationFeaturesRateLimitClientToken PostUsersSignInDataAuthenticationFeatures = "rate-limit-client-token"
|
||
PostUsersSignInDataAuthenticationFeaturesScrobblingServicePlexTv PostUsersSignInDataAuthenticationFeatures = "scrobbling-service-plex-tv"
|
||
PostUsersSignInDataAuthenticationFeaturesSharedServerNotification PostUsersSignInDataAuthenticationFeatures = "shared_server_notification"
|
||
PostUsersSignInDataAuthenticationFeaturesSharedSourceNotification PostUsersSignInDataAuthenticationFeatures = "shared_source_notification"
|
||
PostUsersSignInDataAuthenticationFeaturesSigninWithApple PostUsersSignInDataAuthenticationFeatures = "signin_with_apple"
|
||
PostUsersSignInDataAuthenticationFeaturesSpringServeAdProvider PostUsersSignInDataAuthenticationFeatures = "spring_serve_ad_provider"
|
||
PostUsersSignInDataAuthenticationFeaturesTranscoderCache PostUsersSignInDataAuthenticationFeatures = "transcoder_cache"
|
||
PostUsersSignInDataAuthenticationFeaturesTunerSharing PostUsersSignInDataAuthenticationFeatures = "tuner-sharing"
|
||
PostUsersSignInDataAuthenticationFeaturesTwoFactorAuthentication PostUsersSignInDataAuthenticationFeatures = "two-factor-authentication"
|
||
PostUsersSignInDataAuthenticationFeaturesUnsupportedtuners PostUsersSignInDataAuthenticationFeatures = "unsupportedtuners"
|
||
PostUsersSignInDataAuthenticationFeaturesUpgrade3ds2 PostUsersSignInDataAuthenticationFeatures = "upgrade-3ds2"
|
||
PostUsersSignInDataAuthenticationFeaturesVodSchema PostUsersSignInDataAuthenticationFeatures = "vod-schema"
|
||
PostUsersSignInDataAuthenticationFeaturesVodCloudflare PostUsersSignInDataAuthenticationFeatures = "vod_cloudflare"
|
||
PostUsersSignInDataAuthenticationFeaturesWatchTogetherInvite PostUsersSignInDataAuthenticationFeatures = "watch-together-invite"
|
||
PostUsersSignInDataAuthenticationFeaturesWebServerDashboard PostUsersSignInDataAuthenticationFeatures = "web_server_dashboard"
|
||
)
|
||
|
||
func (e PostUsersSignInDataAuthenticationFeatures) ToPointer() *PostUsersSignInDataAuthenticationFeatures {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataAuthenticationFeatures) 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 = PostUsersSignInDataAuthenticationFeatures(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataAuthenticationFeatures: %v", v)
|
||
}
|
||
}
|
||
|
||
// PostUsersSignInDataAuthenticationResponseStatus - String representation of subscriptionActive
|
||
type PostUsersSignInDataAuthenticationResponseStatus string
|
||
|
||
const (
|
||
PostUsersSignInDataAuthenticationResponseStatusInactive PostUsersSignInDataAuthenticationResponseStatus = "Inactive"
|
||
PostUsersSignInDataAuthenticationResponseStatusActive PostUsersSignInDataAuthenticationResponseStatus = "Active"
|
||
)
|
||
|
||
func (e PostUsersSignInDataAuthenticationResponseStatus) ToPointer() *PostUsersSignInDataAuthenticationResponseStatus {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataAuthenticationResponseStatus) 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 = PostUsersSignInDataAuthenticationResponseStatus(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataAuthenticationResponseStatus: %v", v)
|
||
}
|
||
}
|
||
|
||
type PostUsersSignInDataAuthenticationSubscription struct {
|
||
// List of features allowed on your Plex Pass subscription
|
||
Features []PostUsersSignInDataAuthenticationFeatures `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 *PostUsersSignInDataAuthenticationResponseStatus `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 *PostUsersSignInDataAuthenticationSubscription) GetFeatures() []PostUsersSignInDataAuthenticationFeatures {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Features
|
||
}
|
||
|
||
func (o *PostUsersSignInDataAuthenticationSubscription) GetActive() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Active
|
||
}
|
||
|
||
func (o *PostUsersSignInDataAuthenticationSubscription) GetSubscribedAt() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.SubscribedAt
|
||
}
|
||
|
||
func (o *PostUsersSignInDataAuthenticationSubscription) GetStatus() *PostUsersSignInDataAuthenticationResponseStatus {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Status
|
||
}
|
||
|
||
func (o *PostUsersSignInDataAuthenticationSubscription) GetPaymentService() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.PaymentService
|
||
}
|
||
|
||
func (o *PostUsersSignInDataAuthenticationSubscription) GetPlan() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Plan
|
||
}
|
||
|
||
type PostUsersSignInDataState string
|
||
|
||
const (
|
||
PostUsersSignInDataStateEnded PostUsersSignInDataState = "ended"
|
||
)
|
||
|
||
func (e PostUsersSignInDataState) ToPointer() *PostUsersSignInDataState {
|
||
return &e
|
||
}
|
||
func (e *PostUsersSignInDataState) UnmarshalJSON(data []byte) error {
|
||
var v string
|
||
if err := json.Unmarshal(data, &v); err != nil {
|
||
return err
|
||
}
|
||
switch v {
|
||
case "ended":
|
||
*e = PostUsersSignInDataState(v)
|
||
return nil
|
||
default:
|
||
return fmt.Errorf("invalid value for PostUsersSignInDataState: %v", v)
|
||
}
|
||
}
|
||
|
||
type InternalPaymentMethod struct {
|
||
}
|
||
|
||
type Billing struct {
|
||
InternalPaymentMethod InternalPaymentMethod `json:"internalPaymentMethod"`
|
||
PaymentMethodID *int64 `json:"paymentMethodId"`
|
||
}
|
||
|
||
func (o *Billing) GetInternalPaymentMethod() InternalPaymentMethod {
|
||
if o == nil {
|
||
return InternalPaymentMethod{}
|
||
}
|
||
return o.InternalPaymentMethod
|
||
}
|
||
|
||
func (o *Billing) GetPaymentMethodID() *int64 {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.PaymentMethodID
|
||
}
|
||
|
||
type PastSubscription struct {
|
||
ID *string `json:"id"`
|
||
Mode *string `json:"mode"`
|
||
RenewsAt *int64 `json:"renewsAt"`
|
||
EndsAt *int64 `json:"endsAt"`
|
||
Canceled *bool `default:"false" json:"canceled"`
|
||
GracePeriod *bool `default:"false" json:"gracePeriod"`
|
||
OnHold *bool `default:"false" json:"onHold"`
|
||
CanReactivate *bool `default:"false" json:"canReactivate"`
|
||
CanUpgrade *bool `default:"false" json:"canUpgrade"`
|
||
CanDowngrade *bool `default:"false" json:"canDowngrade"`
|
||
CanConvert *bool `default:"false" json:"canConvert"`
|
||
Type string `json:"type"`
|
||
Transfer *string `json:"transfer"`
|
||
State PostUsersSignInDataState `json:"state"`
|
||
Billing Billing `json:"billing"`
|
||
}
|
||
|
||
func (p PastSubscription) MarshalJSON() ([]byte, error) {
|
||
return utils.MarshalJSON(p, "", false)
|
||
}
|
||
|
||
func (p *PastSubscription) UnmarshalJSON(data []byte) error {
|
||
if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil {
|
||
return err
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (o *PastSubscription) GetID() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *PastSubscription) GetMode() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Mode
|
||
}
|
||
|
||
func (o *PastSubscription) GetRenewsAt() *int64 {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.RenewsAt
|
||
}
|
||
|
||
func (o *PastSubscription) GetEndsAt() *int64 {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.EndsAt
|
||
}
|
||
|
||
func (o *PastSubscription) GetCanceled() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Canceled
|
||
}
|
||
|
||
func (o *PastSubscription) GetGracePeriod() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.GracePeriod
|
||
}
|
||
|
||
func (o *PastSubscription) GetOnHold() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.OnHold
|
||
}
|
||
|
||
func (o *PastSubscription) GetCanReactivate() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.CanReactivate
|
||
}
|
||
|
||
func (o *PastSubscription) GetCanUpgrade() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.CanUpgrade
|
||
}
|
||
|
||
func (o *PastSubscription) GetCanDowngrade() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.CanDowngrade
|
||
}
|
||
|
||
func (o *PastSubscription) GetCanConvert() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.CanConvert
|
||
}
|
||
|
||
func (o *PastSubscription) GetType() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Type
|
||
}
|
||
|
||
func (o *PastSubscription) GetTransfer() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Transfer
|
||
}
|
||
|
||
func (o *PastSubscription) GetState() PostUsersSignInDataState {
|
||
if o == nil {
|
||
return PostUsersSignInDataState("")
|
||
}
|
||
return o.State
|
||
}
|
||
|
||
func (o *PastSubscription) GetBilling() Billing {
|
||
if o == nil {
|
||
return Billing{}
|
||
}
|
||
return o.Billing
|
||
}
|
||
|
||
type Trials struct {
|
||
}
|
||
|
||
// PostUsersSignInDataUserPlexAccount - Returns the user account data with a valid auth token
|
||
type PostUsersSignInDataUserPlexAccount 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
|
||
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 PostUsersSignInDataMailingListStatus `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 PostUsersSignInDataUserProfile `json:"profile"`
|
||
// If the account has a Plex Home PIN enabled
|
||
Protected *bool `default:"false" json:"protected"`
|
||
// Unix epoch datetime
|
||
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 []PostUsersSignInDataServices `json:"services"`
|
||
// If the account’s Plex Pass subscription is active
|
||
Subscription PostUsersSignInDataSubscription `json:"subscription"`
|
||
// Description of the Plex Pass subscription
|
||
SubscriptionDescription *string `json:"subscriptionDescription"`
|
||
Subscriptions []PostUsersSignInDataAuthenticationSubscription `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"`
|
||
PastSubscriptions []PastSubscription `json:"pastSubscriptions"`
|
||
Trials []Trials `json:"trials"`
|
||
}
|
||
|
||
func (p PostUsersSignInDataUserPlexAccount) MarshalJSON() ([]byte, error) {
|
||
return utils.MarshalJSON(p, "", false)
|
||
}
|
||
|
||
func (p *PostUsersSignInDataUserPlexAccount) UnmarshalJSON(data []byte) error {
|
||
if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil {
|
||
return err
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetAdsConsent() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.AdsConsent
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetAdsConsentReminderAt() *time.Time {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.AdsConsentReminderAt
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetAdsConsentSetAt() *time.Time {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.AdsConsentSetAt
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetAnonymous() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Anonymous
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetAuthToken() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.AuthToken
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetBackupCodesCreated() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.BackupCodesCreated
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetConfirmed() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Confirmed
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetCountry() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Country
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetEmail() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Email
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetEmailOnlyAuth() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.EmailOnlyAuth
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetExperimentalFeatures() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.ExperimentalFeatures
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetFriendlyName() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.FriendlyName
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetEntitlements() []string {
|
||
if o == nil {
|
||
return []string{}
|
||
}
|
||
return o.Entitlements
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetGuest() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Guest
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetHasPassword() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.HasPassword
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetHome() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Home
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetHomeAdmin() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.HomeAdmin
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetHomeSize() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.HomeSize
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetID() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.ID
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetJoinedAt() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.JoinedAt
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetLocale() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Locale
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetMailingListActive() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.MailingListActive
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetMailingListStatus() PostUsersSignInDataMailingListStatus {
|
||
if o == nil {
|
||
return PostUsersSignInDataMailingListStatus("")
|
||
}
|
||
return o.MailingListStatus
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetMaxHomeSize() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.MaxHomeSize
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetPin() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Pin
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetProfile() PostUsersSignInDataUserProfile {
|
||
if o == nil {
|
||
return PostUsersSignInDataUserProfile{}
|
||
}
|
||
return o.Profile
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetProtected() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Protected
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetRememberExpiresAt() int64 {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.RememberExpiresAt
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetRestricted() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Restricted
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetRoles() []string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.Roles
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetScrobbleTypes() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.ScrobbleTypes
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetServices() []PostUsersSignInDataServices {
|
||
if o == nil {
|
||
return []PostUsersSignInDataServices{}
|
||
}
|
||
return o.Services
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetSubscription() PostUsersSignInDataSubscription {
|
||
if o == nil {
|
||
return PostUsersSignInDataSubscription{}
|
||
}
|
||
return o.Subscription
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetSubscriptionDescription() *string {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.SubscriptionDescription
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetSubscriptions() []PostUsersSignInDataAuthenticationSubscription {
|
||
if o == nil {
|
||
return []PostUsersSignInDataAuthenticationSubscription{}
|
||
}
|
||
return o.Subscriptions
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetThumb() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Thumb
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetTitle() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Title
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetTwoFactorEnabled() *bool {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.TwoFactorEnabled
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetUsername() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.Username
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetUUID() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.UUID
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetPastSubscriptions() []PastSubscription {
|
||
if o == nil {
|
||
return []PastSubscription{}
|
||
}
|
||
return o.PastSubscriptions
|
||
}
|
||
|
||
func (o *PostUsersSignInDataUserPlexAccount) GetTrials() []Trials {
|
||
if o == nil {
|
||
return []Trials{}
|
||
}
|
||
return o.Trials
|
||
}
|
||
|
||
type PostUsersSignInDataResponse 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
|
||
// Returns the user account data with a valid auth token
|
||
UserPlexAccount *PostUsersSignInDataUserPlexAccount
|
||
}
|
||
|
||
func (o *PostUsersSignInDataResponse) GetContentType() string {
|
||
if o == nil {
|
||
return ""
|
||
}
|
||
return o.ContentType
|
||
}
|
||
|
||
func (o *PostUsersSignInDataResponse) GetStatusCode() int {
|
||
if o == nil {
|
||
return 0
|
||
}
|
||
return o.StatusCode
|
||
}
|
||
|
||
func (o *PostUsersSignInDataResponse) GetRawResponse() *http.Response {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.RawResponse
|
||
}
|
||
|
||
func (o *PostUsersSignInDataResponse) GetUserPlexAccount() *PostUsersSignInDataUserPlexAccount {
|
||
if o == nil {
|
||
return nil
|
||
}
|
||
return o.UserPlexAccount
|
||
}
|