mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
682 lines
15 KiB
Go
682 lines
15 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"github.com/LukeHagar/plexgo/internal/utils"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
type GetSearchResultsRequest struct {
|
|
// The search query string to use
|
|
Query string `queryParam:"style=form,explode=true,name=query"`
|
|
}
|
|
|
|
func (g *GetSearchResultsRequest) GetQuery() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.Query
|
|
}
|
|
|
|
type GetSearchResultsPart struct {
|
|
ID *float64 `json:"id,omitempty"`
|
|
Key *string `json:"key,omitempty"`
|
|
Duration *float64 `json:"duration,omitempty"`
|
|
File *string `json:"file,omitempty"`
|
|
Size *float64 `json:"size,omitempty"`
|
|
AudioProfile *string `json:"audioProfile,omitempty"`
|
|
Container *string `json:"container,omitempty"`
|
|
VideoProfile *string `json:"videoProfile,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchResultsPart) GetID() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ID
|
|
}
|
|
|
|
func (g *GetSearchResultsPart) GetKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Key
|
|
}
|
|
|
|
func (g *GetSearchResultsPart) GetDuration() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Duration
|
|
}
|
|
|
|
func (g *GetSearchResultsPart) GetFile() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.File
|
|
}
|
|
|
|
func (g *GetSearchResultsPart) GetSize() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Size
|
|
}
|
|
|
|
func (g *GetSearchResultsPart) GetAudioProfile() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AudioProfile
|
|
}
|
|
|
|
func (g *GetSearchResultsPart) GetContainer() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Container
|
|
}
|
|
|
|
func (g *GetSearchResultsPart) GetVideoProfile() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.VideoProfile
|
|
}
|
|
|
|
type GetSearchResultsMedia struct {
|
|
ID *float64 `json:"id,omitempty"`
|
|
Duration *float64 `json:"duration,omitempty"`
|
|
Bitrate *float64 `json:"bitrate,omitempty"`
|
|
Width *float64 `json:"width,omitempty"`
|
|
Height *float64 `json:"height,omitempty"`
|
|
AspectRatio *float64 `json:"aspectRatio,omitempty"`
|
|
AudioChannels *float64 `json:"audioChannels,omitempty"`
|
|
AudioCodec *string `json:"audioCodec,omitempty"`
|
|
VideoCodec *string `json:"videoCodec,omitempty"`
|
|
VideoResolution *float64 `json:"videoResolution,omitempty"`
|
|
Container *string `json:"container,omitempty"`
|
|
VideoFrameRate *string `json:"videoFrameRate,omitempty"`
|
|
AudioProfile *string `json:"audioProfile,omitempty"`
|
|
VideoProfile *string `json:"videoProfile,omitempty"`
|
|
Part []GetSearchResultsPart `json:"Part,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetID() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ID
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetDuration() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Duration
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetBitrate() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Bitrate
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetWidth() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Width
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetHeight() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Height
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetAspectRatio() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AspectRatio
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetAudioChannels() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AudioChannels
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetAudioCodec() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AudioCodec
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetVideoCodec() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.VideoCodec
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetVideoResolution() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.VideoResolution
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetContainer() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Container
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetVideoFrameRate() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.VideoFrameRate
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetAudioProfile() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AudioProfile
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetVideoProfile() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.VideoProfile
|
|
}
|
|
|
|
func (g *GetSearchResultsMedia) GetPart() []GetSearchResultsPart {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Part
|
|
}
|
|
|
|
type GetSearchResultsGenre struct {
|
|
Tag *string `json:"tag,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchResultsGenre) GetTag() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tag
|
|
}
|
|
|
|
type GetSearchResultsDirector struct {
|
|
Tag *string `json:"tag,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchResultsDirector) GetTag() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tag
|
|
}
|
|
|
|
type GetSearchResultsWriter struct {
|
|
Tag *string `json:"tag,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchResultsWriter) GetTag() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tag
|
|
}
|
|
|
|
type GetSearchResultsCountry struct {
|
|
Tag *string `json:"tag,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchResultsCountry) GetTag() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tag
|
|
}
|
|
|
|
type GetSearchResultsRole struct {
|
|
Tag *string `json:"tag,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchResultsRole) GetTag() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tag
|
|
}
|
|
|
|
type GetSearchResultsMetadata struct {
|
|
AllowSync *bool `json:"allowSync,omitempty"`
|
|
LibrarySectionID *float64 `json:"librarySectionID,omitempty"`
|
|
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
|
|
LibrarySectionUUID *string `json:"librarySectionUUID,omitempty"`
|
|
Personal *bool `json:"personal,omitempty"`
|
|
SourceTitle *string `json:"sourceTitle,omitempty"`
|
|
RatingKey *float64 `json:"ratingKey,omitempty"`
|
|
Key *string `json:"key,omitempty"`
|
|
GUID *string `json:"guid,omitempty"`
|
|
Studio *string `json:"studio,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
ContentRating *string `json:"contentRating,omitempty"`
|
|
Summary *string `json:"summary,omitempty"`
|
|
Rating *float64 `json:"rating,omitempty"`
|
|
AudienceRating *float64 `json:"audienceRating,omitempty"`
|
|
Year *float64 `json:"year,omitempty"`
|
|
Tagline *string `json:"tagline,omitempty"`
|
|
Thumb *string `json:"thumb,omitempty"`
|
|
Art *string `json:"art,omitempty"`
|
|
Duration *float64 `json:"duration,omitempty"`
|
|
OriginallyAvailableAt *time.Time `json:"originallyAvailableAt,omitempty"`
|
|
AddedAt *float64 `json:"addedAt,omitempty"`
|
|
UpdatedAt *float64 `json:"updatedAt,omitempty"`
|
|
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
|
|
ChapterSource *string `json:"chapterSource,omitempty"`
|
|
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
|
|
RatingImage *string `json:"ratingImage,omitempty"`
|
|
Media []GetSearchResultsMedia `json:"Media,omitempty"`
|
|
Genre []GetSearchResultsGenre `json:"Genre,omitempty"`
|
|
Director []GetSearchResultsDirector `json:"Director,omitempty"`
|
|
Writer []GetSearchResultsWriter `json:"Writer,omitempty"`
|
|
Country []GetSearchResultsCountry `json:"Country,omitempty"`
|
|
Role []GetSearchResultsRole `json:"Role,omitempty"`
|
|
}
|
|
|
|
func (g GetSearchResultsMetadata) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(g, "", false)
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &g, "", false, nil); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetAllowSync() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AllowSync
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetLibrarySectionID() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.LibrarySectionID
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetLibrarySectionTitle() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.LibrarySectionTitle
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetLibrarySectionUUID() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.LibrarySectionUUID
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetPersonal() *bool {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Personal
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetSourceTitle() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.SourceTitle
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetRatingKey() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RatingKey
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Key
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetGUID() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.GUID
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetStudio() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Studio
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetType() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Type
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetTitle() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Title
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetContentRating() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ContentRating
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetSummary() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Summary
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetRating() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Rating
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetAudienceRating() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AudienceRating
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetYear() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Year
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetTagline() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Tagline
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetThumb() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Thumb
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetArt() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Art
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetDuration() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Duration
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetOriginallyAvailableAt() *time.Time {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.OriginallyAvailableAt
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetAddedAt() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AddedAt
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetUpdatedAt() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.UpdatedAt
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetAudienceRatingImage() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.AudienceRatingImage
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetChapterSource() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.ChapterSource
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetPrimaryExtraKey() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.PrimaryExtraKey
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetRatingImage() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RatingImage
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetMedia() []GetSearchResultsMedia {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Media
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetGenre() []GetSearchResultsGenre {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Genre
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetDirector() []GetSearchResultsDirector {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Director
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetWriter() []GetSearchResultsWriter {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Writer
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetCountry() []GetSearchResultsCountry {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Country
|
|
}
|
|
|
|
func (g *GetSearchResultsMetadata) GetRole() []GetSearchResultsRole {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Role
|
|
}
|
|
|
|
type Provider struct {
|
|
Key *string `json:"key,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
}
|
|
|
|
func (p *Provider) GetKey() *string {
|
|
if p == nil {
|
|
return nil
|
|
}
|
|
return p.Key
|
|
}
|
|
|
|
func (p *Provider) GetTitle() *string {
|
|
if p == nil {
|
|
return nil
|
|
}
|
|
return p.Title
|
|
}
|
|
|
|
func (p *Provider) GetType() *string {
|
|
if p == nil {
|
|
return nil
|
|
}
|
|
return p.Type
|
|
}
|
|
|
|
type GetSearchResultsMediaContainer struct {
|
|
Size *float64 `json:"size,omitempty"`
|
|
Identifier *string `json:"identifier,omitempty"`
|
|
MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"`
|
|
MediaTagVersion *float64 `json:"mediaTagVersion,omitempty"`
|
|
Metadata []GetSearchResultsMetadata `json:"Metadata,omitempty"`
|
|
Provider []Provider `json:"Provider,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchResultsMediaContainer) GetSize() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Size
|
|
}
|
|
|
|
func (g *GetSearchResultsMediaContainer) GetIdentifier() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Identifier
|
|
}
|
|
|
|
func (g *GetSearchResultsMediaContainer) GetMediaTagPrefix() *string {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.MediaTagPrefix
|
|
}
|
|
|
|
func (g *GetSearchResultsMediaContainer) GetMediaTagVersion() *float64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.MediaTagVersion
|
|
}
|
|
|
|
func (g *GetSearchResultsMediaContainer) GetMetadata() []GetSearchResultsMetadata {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Metadata
|
|
}
|
|
|
|
func (g *GetSearchResultsMediaContainer) GetProvider() []Provider {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Provider
|
|
}
|
|
|
|
// GetSearchResultsResponseBody - Search Results
|
|
type GetSearchResultsResponseBody struct {
|
|
MediaContainer *GetSearchResultsMediaContainer `json:"MediaContainer,omitempty"`
|
|
}
|
|
|
|
func (g *GetSearchResultsResponseBody) GetMediaContainer() *GetSearchResultsMediaContainer {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.MediaContainer
|
|
}
|
|
|
|
type GetSearchResultsResponse 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
|
|
// Search Results
|
|
Object *GetSearchResultsResponseBody
|
|
}
|
|
|
|
func (g *GetSearchResultsResponse) GetContentType() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.ContentType
|
|
}
|
|
|
|
func (g *GetSearchResultsResponse) GetStatusCode() int {
|
|
if g == nil {
|
|
return 0
|
|
}
|
|
return g.StatusCode
|
|
}
|
|
|
|
func (g *GetSearchResultsResponse) GetRawResponse() *http.Response {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RawResponse
|
|
}
|
|
|
|
func (g *GetSearchResultsResponse) GetObject() *GetSearchResultsResponseBody {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Object
|
|
}
|