mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
374 lines
7.4 KiB
Go
374 lines
7.4 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). 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 (g *GetGlobalHubsRequest) GetCount() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Count
|
|
}
|
|
|
|
func (g *GetGlobalHubsRequest) GetOnlyTransient() *OnlyTransient {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.OnlyTransient
|
|
}
|
|
|
|
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 (g *GetGlobalHubsMetadata) GetRatingKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RatingKey
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Key
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetGUID() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.GUID
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetType() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Type
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetTitle() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Title
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetTitleSort() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.TitleSort
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetSummary() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Summary
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetSmart() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Smart
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetPlaylistType() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.PlaylistType
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetComposite() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Composite
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetIcon() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Icon
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetViewCount() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ViewCount
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetLastViewedAt() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.LastViewedAt
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetDuration() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Duration
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetLeafCount() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.LeafCount
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetAddedAt() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AddedAt
|
|
}
|
|
|
|
func (g *GetGlobalHubsMetadata) GetUpdatedAt() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.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 (h *Hub) GetHubKey() *string {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return h.HubKey
|
|
}
|
|
|
|
func (h *Hub) GetKey() *string {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return h.Key
|
|
}
|
|
|
|
func (h *Hub) GetTitle() *string {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return h.Title
|
|
}
|
|
|
|
func (h *Hub) GetType() *string {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return h.Type
|
|
}
|
|
|
|
func (h *Hub) GetHubIdentifier() *string {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return h.HubIdentifier
|
|
}
|
|
|
|
func (h *Hub) GetContext() *string {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return h.Context
|
|
}
|
|
|
|
func (h *Hub) GetSize() *int {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return h.Size
|
|
}
|
|
|
|
func (h *Hub) GetMore() *bool {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return h.More
|
|
}
|
|
|
|
func (h *Hub) GetStyle() *string {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return h.Style
|
|
}
|
|
|
|
func (h *Hub) GetPromoted() *bool {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return h.Promoted
|
|
}
|
|
|
|
func (h *Hub) GetMetadata() []GetGlobalHubsMetadata {
|
|
if h == nil {
|
|
return nil
|
|
}
|
|
return h.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 (g *GetGlobalHubsMediaContainer) GetSize() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Size
|
|
}
|
|
|
|
func (g *GetGlobalHubsMediaContainer) GetAllowSync() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AllowSync
|
|
}
|
|
|
|
func (g *GetGlobalHubsMediaContainer) GetIdentifier() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Identifier
|
|
}
|
|
|
|
func (g *GetGlobalHubsMediaContainer) GetHub() []Hub {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Hub
|
|
}
|
|
|
|
// GetGlobalHubsResponseBody - returns global hubs
|
|
type GetGlobalHubsResponseBody struct {
|
|
MediaContainer *GetGlobalHubsMediaContainer `json:"MediaContainer,omitempty"`
|
|
}
|
|
|
|
func (g *GetGlobalHubsResponseBody) GetMediaContainer() *GetGlobalHubsMediaContainer {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.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
|
|
Object *GetGlobalHubsResponseBody
|
|
}
|
|
|
|
func (g *GetGlobalHubsResponse) GetContentType() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.ContentType
|
|
}
|
|
|
|
func (g *GetGlobalHubsResponse) GetStatusCode() int {
|
|
if g == nil {
|
|
return 0
|
|
}
|
|
return g.StatusCode
|
|
}
|
|
|
|
func (g *GetGlobalHubsResponse) GetRawResponse() *http.Response {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RawResponse
|
|
}
|
|
|
|
func (g *GetGlobalHubsResponse) GetObject() *GetGlobalHubsResponseBody {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Object
|
|
}
|