Files
plexgo/models/operations/getgenreslibrary.go

266 lines
6.3 KiB
Go

// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"net/http"
)
// GetGenresLibraryQueryParamType - 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 GetGenresLibraryQueryParamType int64
const (
GetGenresLibraryQueryParamTypeMovie GetGenresLibraryQueryParamType = 1
GetGenresLibraryQueryParamTypeTvShow GetGenresLibraryQueryParamType = 2
GetGenresLibraryQueryParamTypeSeason GetGenresLibraryQueryParamType = 3
GetGenresLibraryQueryParamTypeEpisode GetGenresLibraryQueryParamType = 4
GetGenresLibraryQueryParamTypeArtist GetGenresLibraryQueryParamType = 5
GetGenresLibraryQueryParamTypeAlbum GetGenresLibraryQueryParamType = 6
GetGenresLibraryQueryParamTypeTrack GetGenresLibraryQueryParamType = 7
GetGenresLibraryQueryParamTypePhotoAlbum GetGenresLibraryQueryParamType = 8
GetGenresLibraryQueryParamTypePhoto GetGenresLibraryQueryParamType = 9
)
func (e GetGenresLibraryQueryParamType) ToPointer() *GetGenresLibraryQueryParamType {
return &e
}
type GetGenresLibraryRequest 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 GetGenresLibraryQueryParamType `queryParam:"style=form,explode=true,name=type"`
}
func (g *GetGenresLibraryRequest) GetSectionKey() int {
if g == nil {
return 0
}
return g.SectionKey
}
func (g *GetGenresLibraryRequest) GetType() GetGenresLibraryQueryParamType {
if g == nil {
return GetGenresLibraryQueryParamType(0)
}
return g.Type
}
type GetGenresLibraryDirectory struct {
FastKey string `json:"fastKey"`
Key string `json:"key"`
Title string `json:"title"`
Type string `json:"type"`
}
func (g *GetGenresLibraryDirectory) GetFastKey() string {
if g == nil {
return ""
}
return g.FastKey
}
func (g *GetGenresLibraryDirectory) GetKey() string {
if g == nil {
return ""
}
return g.Key
}
func (g *GetGenresLibraryDirectory) GetTitle() string {
if g == nil {
return ""
}
return g.Title
}
func (g *GetGenresLibraryDirectory) GetType() string {
if g == nil {
return ""
}
return g.Type
}
type GetGenresLibraryMediaContainer struct {
// Number of media items returned in this response.
Size int `json:"size"`
// Indicates whether syncing is allowed.
AllowSync bool `json:"allowSync"`
// URL for the background artwork of the media container.
Art string `json:"art"`
// The content type or mode.
Content string `json:"content"`
// An plugin identifier for the media container.
Identifier string `json:"identifier"`
// The prefix used for media tag resource paths.
MediaTagPrefix string `json:"mediaTagPrefix"`
// The version number for media tags.
MediaTagVersion int64 `json:"mediaTagVersion"`
// Specifies whether caching is disabled.
Nocache bool `json:"nocache"`
// URL for the thumbnail image of the media container.
Thumb string `json:"thumb"`
// The primary title of the media container.
Title1 string `json:"title1"`
// The secondary title of the media container.
Title2 string `json:"title2"`
// Identifier for the view group layout.
ViewGroup string `json:"viewGroup"`
Directory []GetGenresLibraryDirectory `json:"Directory,omitempty"`
}
func (g *GetGenresLibraryMediaContainer) GetSize() int {
if g == nil {
return 0
}
return g.Size
}
func (g *GetGenresLibraryMediaContainer) GetAllowSync() bool {
if g == nil {
return false
}
return g.AllowSync
}
func (g *GetGenresLibraryMediaContainer) GetArt() string {
if g == nil {
return ""
}
return g.Art
}
func (g *GetGenresLibraryMediaContainer) GetContent() string {
if g == nil {
return ""
}
return g.Content
}
func (g *GetGenresLibraryMediaContainer) GetIdentifier() string {
if g == nil {
return ""
}
return g.Identifier
}
func (g *GetGenresLibraryMediaContainer) GetMediaTagPrefix() string {
if g == nil {
return ""
}
return g.MediaTagPrefix
}
func (g *GetGenresLibraryMediaContainer) GetMediaTagVersion() int64 {
if g == nil {
return 0
}
return g.MediaTagVersion
}
func (g *GetGenresLibraryMediaContainer) GetNocache() bool {
if g == nil {
return false
}
return g.Nocache
}
func (g *GetGenresLibraryMediaContainer) GetThumb() string {
if g == nil {
return ""
}
return g.Thumb
}
func (g *GetGenresLibraryMediaContainer) GetTitle1() string {
if g == nil {
return ""
}
return g.Title1
}
func (g *GetGenresLibraryMediaContainer) GetTitle2() string {
if g == nil {
return ""
}
return g.Title2
}
func (g *GetGenresLibraryMediaContainer) GetViewGroup() string {
if g == nil {
return ""
}
return g.ViewGroup
}
func (g *GetGenresLibraryMediaContainer) GetDirectory() []GetGenresLibraryDirectory {
if g == nil {
return nil
}
return g.Directory
}
// GetGenresLibraryResponseBody - Successful response containing media container data.
type GetGenresLibraryResponseBody struct {
MediaContainer *GetGenresLibraryMediaContainer `json:"MediaContainer,omitempty"`
}
func (g *GetGenresLibraryResponseBody) GetMediaContainer() *GetGenresLibraryMediaContainer {
if g == nil {
return nil
}
return g.MediaContainer
}
type GetGenresLibraryResponse 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
// Successful response containing media container data.
Object *GetGenresLibraryResponseBody
}
func (g *GetGenresLibraryResponse) GetContentType() string {
if g == nil {
return ""
}
return g.ContentType
}
func (g *GetGenresLibraryResponse) GetStatusCode() int {
if g == nil {
return 0
}
return g.StatusCode
}
func (g *GetGenresLibraryResponse) GetRawResponse() *http.Response {
if g == nil {
return nil
}
return g.RawResponse
}
func (g *GetGenresLibraryResponse) GetObject() *GetGenresLibraryResponseBody {
if g == nil {
return nil
}
return g.Object
}