// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. package operations import ( "encoding/json" "fmt" "net/http" ) // OnlyTransient - Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). type OnlyTransient int64 const ( OnlyTransientZero OnlyTransient = 0 OnlyTransientOne OnlyTransient = 1 ) func (e OnlyTransient) ToPointer() *OnlyTransient { return &e } func (e *OnlyTransient) 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 = OnlyTransient(v) return nil default: return fmt.Errorf("invalid value for OnlyTransient: %v", v) } } type GetGlobalHubsRequest struct { // The number of items to return with each hub. Count *float64 `queryParam:"style=form,explode=true,name=count"` // Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). OnlyTransient *OnlyTransient `queryParam:"style=form,explode=true,name=onlyTransient"` } func (o *GetGlobalHubsRequest) GetCount() *float64 { if o == nil { return nil } return o.Count } func (o *GetGlobalHubsRequest) GetOnlyTransient() *OnlyTransient { if o == nil { return nil } return o.OnlyTransient } type GetGlobalHubsErrors struct { Code *float64 `json:"code,omitempty"` Message *string `json:"message,omitempty"` Status *float64 `json:"status,omitempty"` } func (o *GetGlobalHubsErrors) GetCode() *float64 { if o == nil { return nil } return o.Code } func (o *GetGlobalHubsErrors) GetMessage() *string { if o == nil { return nil } return o.Message } func (o *GetGlobalHubsErrors) GetStatus() *float64 { if o == nil { return nil } return o.Status } // GetGlobalHubsHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. type GetGlobalHubsHubsResponseBody struct { Errors []GetGlobalHubsErrors `json:"errors,omitempty"` } func (o *GetGlobalHubsHubsResponseBody) GetErrors() []GetGlobalHubsErrors { if o == nil { return nil } return o.Errors } type GetGlobalHubsMetadata struct { RatingKey *string `json:"ratingKey,omitempty"` Key *string `json:"key,omitempty"` GUID *string `json:"guid,omitempty"` Type *string `json:"type,omitempty"` Title *string `json:"title,omitempty"` TitleSort *string `json:"titleSort,omitempty"` Summary *string `json:"summary,omitempty"` Smart *bool `json:"smart,omitempty"` PlaylistType *string `json:"playlistType,omitempty"` Composite *string `json:"composite,omitempty"` Icon *string `json:"icon,omitempty"` ViewCount *int `json:"viewCount,omitempty"` LastViewedAt *int `json:"lastViewedAt,omitempty"` Duration *int `json:"duration,omitempty"` LeafCount *int `json:"leafCount,omitempty"` AddedAt *int `json:"addedAt,omitempty"` UpdatedAt *int `json:"updatedAt,omitempty"` } func (o *GetGlobalHubsMetadata) GetRatingKey() *string { if o == nil { return nil } return o.RatingKey } func (o *GetGlobalHubsMetadata) GetKey() *string { if o == nil { return nil } return o.Key } func (o *GetGlobalHubsMetadata) GetGUID() *string { if o == nil { return nil } return o.GUID } func (o *GetGlobalHubsMetadata) GetType() *string { if o == nil { return nil } return o.Type } func (o *GetGlobalHubsMetadata) GetTitle() *string { if o == nil { return nil } return o.Title } func (o *GetGlobalHubsMetadata) GetTitleSort() *string { if o == nil { return nil } return o.TitleSort } func (o *GetGlobalHubsMetadata) GetSummary() *string { if o == nil { return nil } return o.Summary } func (o *GetGlobalHubsMetadata) GetSmart() *bool { if o == nil { return nil } return o.Smart } func (o *GetGlobalHubsMetadata) GetPlaylistType() *string { if o == nil { return nil } return o.PlaylistType } func (o *GetGlobalHubsMetadata) GetComposite() *string { if o == nil { return nil } return o.Composite } func (o *GetGlobalHubsMetadata) GetIcon() *string { if o == nil { return nil } return o.Icon } func (o *GetGlobalHubsMetadata) GetViewCount() *int { if o == nil { return nil } return o.ViewCount } func (o *GetGlobalHubsMetadata) GetLastViewedAt() *int { if o == nil { return nil } return o.LastViewedAt } func (o *GetGlobalHubsMetadata) GetDuration() *int { if o == nil { return nil } return o.Duration } func (o *GetGlobalHubsMetadata) GetLeafCount() *int { if o == nil { return nil } return o.LeafCount } func (o *GetGlobalHubsMetadata) GetAddedAt() *int { if o == nil { return nil } return o.AddedAt } func (o *GetGlobalHubsMetadata) GetUpdatedAt() *int { if o == nil { return nil } return o.UpdatedAt } type Hub struct { HubKey *string `json:"hubKey,omitempty"` Key *string `json:"key,omitempty"` Title *string `json:"title,omitempty"` Type *string `json:"type,omitempty"` HubIdentifier *string `json:"hubIdentifier,omitempty"` Context *string `json:"context,omitempty"` Size *int `json:"size,omitempty"` More *bool `json:"more,omitempty"` Style *string `json:"style,omitempty"` Promoted *bool `json:"promoted,omitempty"` Metadata []GetGlobalHubsMetadata `json:"Metadata,omitempty"` } func (o *Hub) GetHubKey() *string { if o == nil { return nil } return o.HubKey } func (o *Hub) GetKey() *string { if o == nil { return nil } return o.Key } func (o *Hub) GetTitle() *string { if o == nil { return nil } return o.Title } func (o *Hub) GetType() *string { if o == nil { return nil } return o.Type } func (o *Hub) GetHubIdentifier() *string { if o == nil { return nil } return o.HubIdentifier } func (o *Hub) GetContext() *string { if o == nil { return nil } return o.Context } func (o *Hub) GetSize() *int { if o == nil { return nil } return o.Size } func (o *Hub) GetMore() *bool { if o == nil { return nil } return o.More } func (o *Hub) GetStyle() *string { if o == nil { return nil } return o.Style } func (o *Hub) GetPromoted() *bool { if o == nil { return nil } return o.Promoted } func (o *Hub) GetMetadata() []GetGlobalHubsMetadata { if o == nil { return nil } return o.Metadata } type GetGlobalHubsMediaContainer struct { Size *int `json:"size,omitempty"` AllowSync *bool `json:"allowSync,omitempty"` Identifier *string `json:"identifier,omitempty"` Hub []Hub `json:"Hub,omitempty"` } func (o *GetGlobalHubsMediaContainer) GetSize() *int { if o == nil { return nil } return o.Size } func (o *GetGlobalHubsMediaContainer) GetAllowSync() *bool { if o == nil { return nil } return o.AllowSync } func (o *GetGlobalHubsMediaContainer) GetIdentifier() *string { if o == nil { return nil } return o.Identifier } func (o *GetGlobalHubsMediaContainer) GetHub() []Hub { if o == nil { return nil } return o.Hub } // GetGlobalHubsResponseBody - returns global hubs type GetGlobalHubsResponseBody struct { MediaContainer *GetGlobalHubsMediaContainer `json:"MediaContainer,omitempty"` } func (o *GetGlobalHubsResponseBody) GetMediaContainer() *GetGlobalHubsMediaContainer { if o == nil { return nil } return o.MediaContainer } type GetGlobalHubsResponse 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 global hubs TwoHundredApplicationJSONObject *GetGlobalHubsResponseBody // Unauthorized - Returned if the X-Plex-Token is missing from the header or query. FourHundredAndOneApplicationJSONObject *GetGlobalHubsHubsResponseBody } func (o *GetGlobalHubsResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } func (o *GetGlobalHubsResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } func (o *GetGlobalHubsResponse) GetRawResponse() *http.Response { if o == nil { return nil } return o.RawResponse } func (o *GetGlobalHubsResponse) GetTwoHundredApplicationJSONObject() *GetGlobalHubsResponseBody { if o == nil { return nil } return o.TwoHundredApplicationJSONObject } func (o *GetGlobalHubsResponse) GetFourHundredAndOneApplicationJSONObject() *GetGlobalHubsHubsResponseBody { if o == nil { return nil } return o.FourHundredAndOneApplicationJSONObject }