mirror of
https://github.com/LukeHagar/plexterraform.git
synced 2025-12-06 12:37:47 +00:00
433 lines
9.0 KiB
Go
433 lines
9.0 KiB
Go
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
// Type - Plex content type to search for
|
|
type Type int64
|
|
|
|
const (
|
|
TypeOne Type = 1
|
|
TypeTwo Type = 2
|
|
TypeThree Type = 3
|
|
TypeFour Type = 4
|
|
)
|
|
|
|
func (e Type) ToPointer() *Type {
|
|
return &e
|
|
}
|
|
func (e *Type) 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:
|
|
*e = Type(v)
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("invalid value for Type: %v", v)
|
|
}
|
|
}
|
|
|
|
type SearchLibraryRequest struct {
|
|
// the Id of the library to query
|
|
SectionID int64 `pathParam:"style=simple,explode=false,name=sectionId"`
|
|
// Plex content type to search for
|
|
Type Type `queryParam:"style=form,explode=true,name=type"`
|
|
}
|
|
|
|
func (o *SearchLibraryRequest) GetSectionID() int64 {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.SectionID
|
|
}
|
|
|
|
func (o *SearchLibraryRequest) GetType() Type {
|
|
if o == nil {
|
|
return Type(0)
|
|
}
|
|
return o.Type
|
|
}
|
|
|
|
type SearchLibraryErrors struct {
|
|
Code *float64 `json:"code,omitempty"`
|
|
Message *string `json:"message,omitempty"`
|
|
Status *float64 `json:"status,omitempty"`
|
|
}
|
|
|
|
func (o *SearchLibraryErrors) GetCode() *float64 {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Code
|
|
}
|
|
|
|
func (o *SearchLibraryErrors) GetMessage() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Message
|
|
}
|
|
|
|
func (o *SearchLibraryErrors) GetStatus() *float64 {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Status
|
|
}
|
|
|
|
// SearchLibraryLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
type SearchLibraryLibraryResponseBody struct {
|
|
Errors []SearchLibraryErrors `json:"errors,omitempty"`
|
|
}
|
|
|
|
func (o *SearchLibraryLibraryResponseBody) GetErrors() []SearchLibraryErrors {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Errors
|
|
}
|
|
|
|
type SearchLibraryMetadata 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 (o *SearchLibraryMetadata) GetRatingKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.RatingKey
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Key
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetParentRatingKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentRatingKey
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetGUID() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.GUID
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetParentGUID() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentGUID
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetParentStudio() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentStudio
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetType() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Type
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetTitle() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Title
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetParentKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentKey
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetParentTitle() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentTitle
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetSummary() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Summary
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetIndex() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Index
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetParentIndex() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentIndex
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetParentYear() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentYear
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetThumb() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Thumb
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetArt() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Art
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetParentThumb() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentThumb
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetParentTheme() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentTheme
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetAddedAt() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.AddedAt
|
|
}
|
|
|
|
func (o *SearchLibraryMetadata) GetUpdatedAt() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.UpdatedAt
|
|
}
|
|
|
|
type SearchLibraryMediaContainer 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 []SearchLibraryMetadata `json:"Metadata,omitempty"`
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetSize() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Size
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetAllowSync() *bool {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.AllowSync
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetArt() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Art
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetIdentifier() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Identifier
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetMediaTagPrefix() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.MediaTagPrefix
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetMediaTagVersion() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.MediaTagVersion
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetNocache() *bool {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Nocache
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetThumb() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Thumb
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetTitle1() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Title1
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetTitle2() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Title2
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetViewGroup() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ViewGroup
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetViewMode() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ViewMode
|
|
}
|
|
|
|
func (o *SearchLibraryMediaContainer) GetMetadata() []SearchLibraryMetadata {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Metadata
|
|
}
|
|
|
|
// SearchLibraryResponseBody - The contents of the library by section and type
|
|
type SearchLibraryResponseBody struct {
|
|
MediaContainer *SearchLibraryMediaContainer `json:"MediaContainer,omitempty"`
|
|
}
|
|
|
|
func (o *SearchLibraryResponseBody) GetMediaContainer() *SearchLibraryMediaContainer {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.MediaContainer
|
|
}
|
|
|
|
type SearchLibraryResponse 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
|
|
TwoHundredApplicationJSONObject *SearchLibraryResponseBody
|
|
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
FourHundredAndOneApplicationJSONObject *SearchLibraryLibraryResponseBody
|
|
}
|
|
|
|
func (o *SearchLibraryResponse) GetContentType() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.ContentType
|
|
}
|
|
|
|
func (o *SearchLibraryResponse) GetStatusCode() int {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.StatusCode
|
|
}
|
|
|
|
func (o *SearchLibraryResponse) GetRawResponse() *http.Response {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.RawResponse
|
|
}
|
|
|
|
func (o *SearchLibraryResponse) GetTwoHundredApplicationJSONObject() *SearchLibraryResponseBody {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.TwoHundredApplicationJSONObject
|
|
}
|
|
|
|
func (o *SearchLibraryResponse) GetFourHundredAndOneApplicationJSONObject() *SearchLibraryLibraryResponseBody {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.FourHundredAndOneApplicationJSONObject
|
|
}
|