mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
518 lines
11 KiB
Go
518 lines
11 KiB
Go
// 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, false); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetLibraryDetailsRequest) GetIncludeDetails() *IncludeDetails {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.IncludeDetails
|
|
}
|
|
|
|
func (o *GetLibraryDetailsRequest) GetSectionKey() int {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.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 (o *GetLibraryDetailsDirectory) GetKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Key
|
|
}
|
|
|
|
func (o *GetLibraryDetailsDirectory) GetTitle() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Title
|
|
}
|
|
|
|
func (o *GetLibraryDetailsDirectory) GetSecondary() *bool {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Secondary
|
|
}
|
|
|
|
func (o *GetLibraryDetailsDirectory) GetPrompt() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Prompt
|
|
}
|
|
|
|
func (o *GetLibraryDetailsDirectory) GetSearch() *bool {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.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 (o *GetLibraryDetailsFilter) GetFilter() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Filter
|
|
}
|
|
|
|
func (o *GetLibraryDetailsFilter) GetFilterType() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.FilterType
|
|
}
|
|
|
|
func (o *GetLibraryDetailsFilter) GetKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Key
|
|
}
|
|
|
|
func (o *GetLibraryDetailsFilter) GetTitle() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Title
|
|
}
|
|
|
|
func (o *GetLibraryDetailsFilter) GetType() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.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 (o *GetLibraryDetailsSort) GetDefault() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Default
|
|
}
|
|
|
|
func (o *GetLibraryDetailsSort) GetDefaultDirection() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.DefaultDirection
|
|
}
|
|
|
|
func (o *GetLibraryDetailsSort) GetDescKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.DescKey
|
|
}
|
|
|
|
func (o *GetLibraryDetailsSort) GetFirstCharacterKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.FirstCharacterKey
|
|
}
|
|
|
|
func (o *GetLibraryDetailsSort) GetKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Key
|
|
}
|
|
|
|
func (o *GetLibraryDetailsSort) GetTitle() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.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 (o *GetLibraryDetailsField) GetKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Key
|
|
}
|
|
|
|
func (o *GetLibraryDetailsField) GetTitle() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Title
|
|
}
|
|
|
|
func (o *GetLibraryDetailsField) GetType() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Type
|
|
}
|
|
|
|
func (o *GetLibraryDetailsField) GetSubType() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.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 (o *GetLibraryDetailsType) GetKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Key
|
|
}
|
|
|
|
func (o *GetLibraryDetailsType) GetType() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Type
|
|
}
|
|
|
|
func (o *GetLibraryDetailsType) GetTitle() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Title
|
|
}
|
|
|
|
func (o *GetLibraryDetailsType) GetActive() *bool {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Active
|
|
}
|
|
|
|
func (o *GetLibraryDetailsType) GetFilter() []GetLibraryDetailsFilter {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Filter
|
|
}
|
|
|
|
func (o *GetLibraryDetailsType) GetSort() []GetLibraryDetailsSort {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Sort
|
|
}
|
|
|
|
func (o *GetLibraryDetailsType) GetField() []GetLibraryDetailsField {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Field
|
|
}
|
|
|
|
type GetLibraryDetailsOperator struct {
|
|
Key *string `json:"key,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
}
|
|
|
|
func (o *GetLibraryDetailsOperator) GetKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Key
|
|
}
|
|
|
|
func (o *GetLibraryDetailsOperator) GetTitle() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Title
|
|
}
|
|
|
|
type GetLibraryDetailsFieldType struct {
|
|
Type *string `json:"type,omitempty"`
|
|
Operator []GetLibraryDetailsOperator `json:"Operator,omitempty"`
|
|
}
|
|
|
|
func (o *GetLibraryDetailsFieldType) GetType() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Type
|
|
}
|
|
|
|
func (o *GetLibraryDetailsFieldType) GetOperator() []GetLibraryDetailsOperator {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.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 (o *GetLibraryDetailsMediaContainer) GetSize() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Size
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetAllowSync() *bool {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.AllowSync
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetArt() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Art
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetContent() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Content
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetIdentifier() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Identifier
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetLibrarySectionID() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.LibrarySectionID
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetMediaTagPrefix() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.MediaTagPrefix
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetMediaTagVersion() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.MediaTagVersion
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetThumb() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Thumb
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetTitle1() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Title1
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetViewGroup() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ViewGroup
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetViewMode() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ViewMode
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetDirectory() []GetLibraryDetailsDirectory {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Directory
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetType() []GetLibraryDetailsType {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Type
|
|
}
|
|
|
|
func (o *GetLibraryDetailsMediaContainer) GetFieldType() []GetLibraryDetailsFieldType {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.FieldType
|
|
}
|
|
|
|
// GetLibraryDetailsResponseBody - The details of the library
|
|
type GetLibraryDetailsResponseBody struct {
|
|
MediaContainer *GetLibraryDetailsMediaContainer `json:"MediaContainer,omitempty"`
|
|
}
|
|
|
|
func (o *GetLibraryDetailsResponseBody) GetMediaContainer() *GetLibraryDetailsMediaContainer {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.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 (o *GetLibraryDetailsResponse) GetContentType() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.ContentType
|
|
}
|
|
|
|
func (o *GetLibraryDetailsResponse) GetStatusCode() int {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.StatusCode
|
|
}
|
|
|
|
func (o *GetLibraryDetailsResponse) GetRawResponse() *http.Response {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.RawResponse
|
|
}
|
|
|
|
func (o *GetLibraryDetailsResponse) GetObject() *GetLibraryDetailsResponseBody {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Object
|
|
}
|