mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
283 lines
6.6 KiB
Go
283 lines
6.6 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
// GetCountriesLibraryQueryParamType - 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 GetCountriesLibraryQueryParamType int64
|
|
|
|
const (
|
|
GetCountriesLibraryQueryParamTypeMovie GetCountriesLibraryQueryParamType = 1
|
|
GetCountriesLibraryQueryParamTypeTvShow GetCountriesLibraryQueryParamType = 2
|
|
GetCountriesLibraryQueryParamTypeSeason GetCountriesLibraryQueryParamType = 3
|
|
GetCountriesLibraryQueryParamTypeEpisode GetCountriesLibraryQueryParamType = 4
|
|
GetCountriesLibraryQueryParamTypeAudio GetCountriesLibraryQueryParamType = 8
|
|
GetCountriesLibraryQueryParamTypeAlbum GetCountriesLibraryQueryParamType = 9
|
|
GetCountriesLibraryQueryParamTypeTrack GetCountriesLibraryQueryParamType = 10
|
|
)
|
|
|
|
func (e GetCountriesLibraryQueryParamType) ToPointer() *GetCountriesLibraryQueryParamType {
|
|
return &e
|
|
}
|
|
func (e *GetCountriesLibraryQueryParamType) UnmarshalJSON(data []byte) error {
|
|
var v int64
|
|
if err := json.Unmarshal(data, &v); err != nil {
|
|
return err
|
|
}
|
|
switch v {
|
|
case 1:
|
|
fallthrough
|
|
case 2:
|
|
fallthrough
|
|
case 3:
|
|
fallthrough
|
|
case 4:
|
|
fallthrough
|
|
case 8:
|
|
fallthrough
|
|
case 9:
|
|
fallthrough
|
|
case 10:
|
|
*e = GetCountriesLibraryQueryParamType(v)
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("invalid value for GetCountriesLibraryQueryParamType: %v", v)
|
|
}
|
|
}
|
|
|
|
type GetCountriesLibraryRequest 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 GetCountriesLibraryQueryParamType `queryParam:"style=form,explode=true,name=type"`
|
|
}
|
|
|
|
func (o *GetCountriesLibraryRequest) GetSectionKey() int {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.SectionKey
|
|
}
|
|
|
|
func (o *GetCountriesLibraryRequest) GetType() GetCountriesLibraryQueryParamType {
|
|
if o == nil {
|
|
return GetCountriesLibraryQueryParamType(0)
|
|
}
|
|
return o.Type
|
|
}
|
|
|
|
type GetCountriesLibraryDirectory struct {
|
|
FastKey string `json:"fastKey"`
|
|
Key string `json:"key"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
func (o *GetCountriesLibraryDirectory) GetFastKey() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.FastKey
|
|
}
|
|
|
|
func (o *GetCountriesLibraryDirectory) GetKey() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Key
|
|
}
|
|
|
|
func (o *GetCountriesLibraryDirectory) GetTitle() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Title
|
|
}
|
|
|
|
type GetCountriesLibraryMediaContainer 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 []GetCountriesLibraryDirectory `json:"Directory,omitempty"`
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetSize() int {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.Size
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetAllowSync() bool {
|
|
if o == nil {
|
|
return false
|
|
}
|
|
return o.AllowSync
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetArt() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Art
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetContent() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Content
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetIdentifier() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Identifier
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetMediaTagPrefix() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.MediaTagPrefix
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetMediaTagVersion() int64 {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.MediaTagVersion
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetNocache() bool {
|
|
if o == nil {
|
|
return false
|
|
}
|
|
return o.Nocache
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetThumb() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Thumb
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetTitle1() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Title1
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetTitle2() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Title2
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetViewGroup() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.ViewGroup
|
|
}
|
|
|
|
func (o *GetCountriesLibraryMediaContainer) GetDirectory() []GetCountriesLibraryDirectory {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Directory
|
|
}
|
|
|
|
// GetCountriesLibraryResponseBody - Successful response containing media container data.
|
|
type GetCountriesLibraryResponseBody struct {
|
|
MediaContainer *GetCountriesLibraryMediaContainer `json:"MediaContainer,omitempty"`
|
|
}
|
|
|
|
func (o *GetCountriesLibraryResponseBody) GetMediaContainer() *GetCountriesLibraryMediaContainer {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.MediaContainer
|
|
}
|
|
|
|
type GetCountriesLibraryResponse 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 *GetCountriesLibraryResponseBody
|
|
}
|
|
|
|
func (o *GetCountriesLibraryResponse) GetContentType() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.ContentType
|
|
}
|
|
|
|
func (o *GetCountriesLibraryResponse) GetStatusCode() int {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.StatusCode
|
|
}
|
|
|
|
func (o *GetCountriesLibraryResponse) GetRawResponse() *http.Response {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.RawResponse
|
|
}
|
|
|
|
func (o *GetCountriesLibraryResponse) GetObject() *GetCountriesLibraryResponseBody {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Object
|
|
}
|