mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
382 lines
8.8 KiB
Go
382 lines
8.8 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// GetSearchLibraryQueryParamType - The type of media to retrieve or filter by.
|
|
// 1 = movie
|
|
// 2 = show
|
|
// 3 = season
|
|
// 4 = episode
|
|
// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
|
|
type GetSearchLibraryQueryParamType int64
|
|
|
|
const (
|
|
GetSearchLibraryQueryParamTypeMovie GetSearchLibraryQueryParamType = 1
|
|
GetSearchLibraryQueryParamTypeTvShow GetSearchLibraryQueryParamType = 2
|
|
GetSearchLibraryQueryParamTypeSeason GetSearchLibraryQueryParamType = 3
|
|
GetSearchLibraryQueryParamTypeEpisode GetSearchLibraryQueryParamType = 4
|
|
GetSearchLibraryQueryParamTypeArtist GetSearchLibraryQueryParamType = 5
|
|
GetSearchLibraryQueryParamTypeAlbum GetSearchLibraryQueryParamType = 6
|
|
GetSearchLibraryQueryParamTypeTrack GetSearchLibraryQueryParamType = 7
|
|
GetSearchLibraryQueryParamTypePhotoAlbum GetSearchLibraryQueryParamType = 8
|
|
GetSearchLibraryQueryParamTypePhoto GetSearchLibraryQueryParamType = 9
|
|
)
|
|
|
|
func (e GetSearchLibraryQueryParamType) ToPointer() *GetSearchLibraryQueryParamType {
|
|
return &e
|
|
}
|
|
|
|
type GetSearchLibraryRequest struct {
|
|
// 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"`
|
|
// The type of media to retrieve or filter by.
|
|
// 1 = movie
|
|
// 2 = show
|
|
// 3 = season
|
|
// 4 = episode
|
|
// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
|
|
//
|
|
Type GetSearchLibraryQueryParamType `queryParam:"style=form,explode=true,name=type"`
|
|
}
|
|
|
|
func (g *GetSearchLibraryRequest) GetSectionKey() int {
|
|
if g == nil {
|
|
return 0
|
|
}
|
|
return g.SectionKey
|
|
}
|
|
|
|
func (g *GetSearchLibraryRequest) GetType() GetSearchLibraryQueryParamType {
|
|
if g == nil {
|
|
return GetSearchLibraryQueryParamType(0)
|
|
}
|
|
return g.Type
|
|
}
|
|
|
|
type GetSearchLibraryMetadata struct {
|
|
RatingKey *string `json:"ratingKey,omitempty"`
|
|
Key *string `json:"key,omitempty"`
|
|
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
|
|
GUID *string `json:"guid,omitempty"`
|
|
ParentGUID *string `json:"parentGuid,omitempty"`
|
|
ParentStudio *string `json:"parentStudio,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
ParentKey *string `json:"parentKey,omitempty"`
|
|
ParentTitle *string `json:"parentTitle,omitempty"`
|
|
Summary *string `json:"summary,omitempty"`
|
|
Index *int `json:"index,omitempty"`
|
|
ParentIndex *int `json:"parentIndex,omitempty"`
|
|
ParentYear *int `json:"parentYear,omitempty"`
|
|
Thumb *string `json:"thumb,omitempty"`
|
|
Art *string `json:"art,omitempty"`
|
|
ParentThumb *string `json:"parentThumb,omitempty"`
|
|
ParentTheme *string `json:"parentTheme,omitempty"`
|
|
AddedAt *int `json:"addedAt,omitempty"`
|
|
UpdatedAt *int `json:"updatedAt,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetRatingKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RatingKey
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Key
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetParentRatingKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ParentRatingKey
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetGUID() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.GUID
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetParentGUID() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ParentGUID
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetParentStudio() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ParentStudio
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetType() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Type
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetTitle() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Title
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetParentKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ParentKey
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetParentTitle() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ParentTitle
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetSummary() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Summary
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetIndex() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Index
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetParentIndex() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ParentIndex
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetParentYear() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ParentYear
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetThumb() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Thumb
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetArt() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Art
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetParentThumb() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ParentThumb
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetParentTheme() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ParentTheme
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetAddedAt() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AddedAt
|
|
}
|
|
|
|
func (g *GetSearchLibraryMetadata) GetUpdatedAt() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.UpdatedAt
|
|
}
|
|
|
|
type GetSearchLibraryMediaContainer struct {
|
|
Size *int `json:"size,omitempty"`
|
|
AllowSync *bool `json:"allowSync,omitempty"`
|
|
Art *string `json:"art,omitempty"`
|
|
Identifier *string `json:"identifier,omitempty"`
|
|
MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"`
|
|
MediaTagVersion *int `json:"mediaTagVersion,omitempty"`
|
|
Nocache *bool `json:"nocache,omitempty"`
|
|
Thumb *string `json:"thumb,omitempty"`
|
|
Title1 *string `json:"title1,omitempty"`
|
|
Title2 *string `json:"title2,omitempty"`
|
|
ViewGroup *string `json:"viewGroup,omitempty"`
|
|
ViewMode *int `json:"viewMode,omitempty"`
|
|
Metadata []GetSearchLibraryMetadata `json:"Metadata,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetSize() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Size
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetAllowSync() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AllowSync
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetArt() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Art
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetIdentifier() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Identifier
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetMediaTagPrefix() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.MediaTagPrefix
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetMediaTagVersion() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.MediaTagVersion
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetNocache() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Nocache
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetThumb() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Thumb
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetTitle1() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Title1
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetTitle2() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Title2
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetViewGroup() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ViewGroup
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetViewMode() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ViewMode
|
|
}
|
|
|
|
func (g *GetSearchLibraryMediaContainer) GetMetadata() []GetSearchLibraryMetadata {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Metadata
|
|
}
|
|
|
|
// GetSearchLibraryResponseBody - The contents of the library by section and type
|
|
type GetSearchLibraryResponseBody struct {
|
|
MediaContainer *GetSearchLibraryMediaContainer `json:"MediaContainer,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchLibraryResponseBody) GetMediaContainer() *GetSearchLibraryMediaContainer {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.MediaContainer
|
|
}
|
|
|
|
type GetSearchLibraryResponse 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 contents of the library by section and type
|
|
Object *GetSearchLibraryResponseBody
|
|
}
|
|
|
|
func (g *GetSearchLibraryResponse) GetContentType() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.ContentType
|
|
}
|
|
|
|
func (g *GetSearchLibraryResponse) GetStatusCode() int {
|
|
if g == nil {
|
|
return 0
|
|
}
|
|
return g.StatusCode
|
|
}
|
|
|
|
func (g *GetSearchLibraryResponse) GetRawResponse() *http.Response {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RawResponse
|
|
}
|
|
|
|
func (g *GetSearchLibraryResponse) GetObject() *GetSearchLibraryResponseBody {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Object
|
|
}
|