// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. package operations import ( "encoding/json" "fmt" "github.com/LukeHagar/plexgo/internal/utils" "net/http" ) // IncludeDetails - Whether or not to include details for a section (types, filters, and sorts). // Only exists for backwards compatibility, media providers other than the server libraries have it on always. type IncludeDetails int64 const ( IncludeDetailsZero IncludeDetails = 0 IncludeDetailsOne IncludeDetails = 1 ) func (e IncludeDetails) ToPointer() *IncludeDetails { return &e } func (e *IncludeDetails) 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 = IncludeDetails(v) return nil default: return fmt.Errorf("invalid value for IncludeDetails: %v", v) } } type GetLibraryDetailsRequest struct { // Whether or not to include details for a section (types, filters, and sorts). // Only exists for backwards compatibility, media providers other than the server libraries have it on always. // IncludeDetails *IncludeDetails `default:"0" queryParam:"style=form,explode=true,name=includeDetails"` // The unique key of the Plex library. // Note: This is unique in the context of the Plex server. // SectionKey int `pathParam:"style=simple,explode=false,name=sectionKey"` } func (g GetLibraryDetailsRequest) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetLibraryDetailsRequest) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, []string{"sectionKey"}); err != nil { return err } return nil } func (g *GetLibraryDetailsRequest) GetIncludeDetails() *IncludeDetails { if g == nil { return nil } return g.IncludeDetails } func (g *GetLibraryDetailsRequest) GetSectionKey() int { if g == nil { return 0 } return g.SectionKey } type GetLibraryDetailsDirectory struct { Key *string `json:"key,omitempty"` Title *string `json:"title,omitempty"` Secondary *bool `json:"secondary,omitempty"` Prompt *string `json:"prompt,omitempty"` Search *bool `json:"search,omitempty"` } func (g *GetLibraryDetailsDirectory) GetKey() *string { if g == nil { return nil } return g.Key } func (g *GetLibraryDetailsDirectory) GetTitle() *string { if g == nil { return nil } return g.Title } func (g *GetLibraryDetailsDirectory) GetSecondary() *bool { if g == nil { return nil } return g.Secondary } func (g *GetLibraryDetailsDirectory) GetPrompt() *string { if g == nil { return nil } return g.Prompt } func (g *GetLibraryDetailsDirectory) GetSearch() *bool { if g == nil { return nil } return g.Search } type GetLibraryDetailsFilter struct { Filter *string `json:"filter,omitempty"` FilterType *string `json:"filterType,omitempty"` Key *string `json:"key,omitempty"` Title *string `json:"title,omitempty"` Type *string `json:"type,omitempty"` } func (g *GetLibraryDetailsFilter) GetFilter() *string { if g == nil { return nil } return g.Filter } func (g *GetLibraryDetailsFilter) GetFilterType() *string { if g == nil { return nil } return g.FilterType } func (g *GetLibraryDetailsFilter) GetKey() *string { if g == nil { return nil } return g.Key } func (g *GetLibraryDetailsFilter) GetTitle() *string { if g == nil { return nil } return g.Title } func (g *GetLibraryDetailsFilter) GetType() *string { if g == nil { return nil } return g.Type } type GetLibraryDetailsSort struct { Default *string `json:"default,omitempty"` DefaultDirection *string `json:"defaultDirection,omitempty"` DescKey *string `json:"descKey,omitempty"` FirstCharacterKey *string `json:"firstCharacterKey,omitempty"` Key *string `json:"key,omitempty"` Title *string `json:"title,omitempty"` } func (g *GetLibraryDetailsSort) GetDefault() *string { if g == nil { return nil } return g.Default } func (g *GetLibraryDetailsSort) GetDefaultDirection() *string { if g == nil { return nil } return g.DefaultDirection } func (g *GetLibraryDetailsSort) GetDescKey() *string { if g == nil { return nil } return g.DescKey } func (g *GetLibraryDetailsSort) GetFirstCharacterKey() *string { if g == nil { return nil } return g.FirstCharacterKey } func (g *GetLibraryDetailsSort) GetKey() *string { if g == nil { return nil } return g.Key } func (g *GetLibraryDetailsSort) GetTitle() *string { if g == nil { return nil } return g.Title } type GetLibraryDetailsField struct { Key *string `json:"key,omitempty"` Title *string `json:"title,omitempty"` Type *string `json:"type,omitempty"` SubType *string `json:"subType,omitempty"` } func (g *GetLibraryDetailsField) GetKey() *string { if g == nil { return nil } return g.Key } func (g *GetLibraryDetailsField) GetTitle() *string { if g == nil { return nil } return g.Title } func (g *GetLibraryDetailsField) GetType() *string { if g == nil { return nil } return g.Type } func (g *GetLibraryDetailsField) GetSubType() *string { if g == nil { return nil } return g.SubType } type GetLibraryDetailsType struct { Key *string `json:"key,omitempty"` Type *string `json:"type,omitempty"` Title *string `json:"title,omitempty"` Active *bool `json:"active,omitempty"` Filter []GetLibraryDetailsFilter `json:"Filter,omitempty"` Sort []GetLibraryDetailsSort `json:"Sort,omitempty"` Field []GetLibraryDetailsField `json:"Field,omitempty"` } func (g *GetLibraryDetailsType) GetKey() *string { if g == nil { return nil } return g.Key } func (g *GetLibraryDetailsType) GetType() *string { if g == nil { return nil } return g.Type } func (g *GetLibraryDetailsType) GetTitle() *string { if g == nil { return nil } return g.Title } func (g *GetLibraryDetailsType) GetActive() *bool { if g == nil { return nil } return g.Active } func (g *GetLibraryDetailsType) GetFilter() []GetLibraryDetailsFilter { if g == nil { return nil } return g.Filter } func (g *GetLibraryDetailsType) GetSort() []GetLibraryDetailsSort { if g == nil { return nil } return g.Sort } func (g *GetLibraryDetailsType) GetField() []GetLibraryDetailsField { if g == nil { return nil } return g.Field } type GetLibraryDetailsOperator struct { Key *string `json:"key,omitempty"` Title *string `json:"title,omitempty"` } func (g *GetLibraryDetailsOperator) GetKey() *string { if g == nil { return nil } return g.Key } func (g *GetLibraryDetailsOperator) GetTitle() *string { if g == nil { return nil } return g.Title } type GetLibraryDetailsFieldType struct { Type *string `json:"type,omitempty"` Operator []GetLibraryDetailsOperator `json:"Operator,omitempty"` } func (g *GetLibraryDetailsFieldType) GetType() *string { if g == nil { return nil } return g.Type } func (g *GetLibraryDetailsFieldType) GetOperator() []GetLibraryDetailsOperator { if g == nil { return nil } return g.Operator } type GetLibraryDetailsMediaContainer struct { Size *int `json:"size,omitempty"` AllowSync *bool `json:"allowSync,omitempty"` Art *string `json:"art,omitempty"` Content *string `json:"content,omitempty"` Identifier *string `json:"identifier,omitempty"` LibrarySectionID *int `json:"librarySectionID,omitempty"` MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"` MediaTagVersion *int `json:"mediaTagVersion,omitempty"` Thumb *string `json:"thumb,omitempty"` Title1 *string `json:"title1,omitempty"` ViewGroup *string `json:"viewGroup,omitempty"` ViewMode *int `json:"viewMode,omitempty"` Directory []GetLibraryDetailsDirectory `json:"Directory,omitempty"` Type []GetLibraryDetailsType `json:"Type,omitempty"` FieldType []GetLibraryDetailsFieldType `json:"FieldType,omitempty"` } func (g *GetLibraryDetailsMediaContainer) GetSize() *int { if g == nil { return nil } return g.Size } func (g *GetLibraryDetailsMediaContainer) GetAllowSync() *bool { if g == nil { return nil } return g.AllowSync } func (g *GetLibraryDetailsMediaContainer) GetArt() *string { if g == nil { return nil } return g.Art } func (g *GetLibraryDetailsMediaContainer) GetContent() *string { if g == nil { return nil } return g.Content } func (g *GetLibraryDetailsMediaContainer) GetIdentifier() *string { if g == nil { return nil } return g.Identifier } func (g *GetLibraryDetailsMediaContainer) GetLibrarySectionID() *int { if g == nil { return nil } return g.LibrarySectionID } func (g *GetLibraryDetailsMediaContainer) GetMediaTagPrefix() *string { if g == nil { return nil } return g.MediaTagPrefix } func (g *GetLibraryDetailsMediaContainer) GetMediaTagVersion() *int { if g == nil { return nil } return g.MediaTagVersion } func (g *GetLibraryDetailsMediaContainer) GetThumb() *string { if g == nil { return nil } return g.Thumb } func (g *GetLibraryDetailsMediaContainer) GetTitle1() *string { if g == nil { return nil } return g.Title1 } func (g *GetLibraryDetailsMediaContainer) GetViewGroup() *string { if g == nil { return nil } return g.ViewGroup } func (g *GetLibraryDetailsMediaContainer) GetViewMode() *int { if g == nil { return nil } return g.ViewMode } func (g *GetLibraryDetailsMediaContainer) GetDirectory() []GetLibraryDetailsDirectory { if g == nil { return nil } return g.Directory } func (g *GetLibraryDetailsMediaContainer) GetType() []GetLibraryDetailsType { if g == nil { return nil } return g.Type } func (g *GetLibraryDetailsMediaContainer) GetFieldType() []GetLibraryDetailsFieldType { if g == nil { return nil } return g.FieldType } // GetLibraryDetailsResponseBody - The details of the library type GetLibraryDetailsResponseBody struct { MediaContainer *GetLibraryDetailsMediaContainer `json:"MediaContainer,omitempty"` } func (g *GetLibraryDetailsResponseBody) GetMediaContainer() *GetLibraryDetailsMediaContainer { if g == nil { return nil } return g.MediaContainer } type GetLibraryDetailsResponse 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 // The details of the library Object *GetLibraryDetailsResponseBody } func (g *GetLibraryDetailsResponse) GetContentType() string { if g == nil { return "" } return g.ContentType } func (g *GetLibraryDetailsResponse) GetStatusCode() int { if g == nil { return 0 } return g.StatusCode } func (g *GetLibraryDetailsResponse) GetRawResponse() *http.Response { if g == nil { return nil } return g.RawResponse } func (g *GetLibraryDetailsResponse) GetObject() *GetLibraryDetailsResponseBody { if g == nil { return nil } return g.Object }