Files
plexgo/models/operations/getplaylists.go

255 lines
5.0 KiB
Go

// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"net/http"
)
// PlaylistType - limit to a type of playlist.
type PlaylistType string
const (
PlaylistTypeAudio PlaylistType = "audio"
PlaylistTypeVideo PlaylistType = "video"
PlaylistTypePhoto PlaylistType = "photo"
)
func (e PlaylistType) ToPointer() *PlaylistType {
return &e
}
// QueryParamSmart - type of playlists to return (default is all).
type QueryParamSmart int64
const (
QueryParamSmartZero QueryParamSmart = 0
QueryParamSmartOne QueryParamSmart = 1
)
func (e QueryParamSmart) ToPointer() *QueryParamSmart {
return &e
}
type GetPlaylistsRequest struct {
// limit to a type of playlist.
PlaylistType *PlaylistType `queryParam:"style=form,explode=true,name=playlistType"`
// type of playlists to return (default is all).
Smart *QueryParamSmart `queryParam:"style=form,explode=true,name=smart"`
}
func (g *GetPlaylistsRequest) GetPlaylistType() *PlaylistType {
if g == nil {
return nil
}
return g.PlaylistType
}
func (g *GetPlaylistsRequest) GetSmart() *QueryParamSmart {
if g == nil {
return nil
}
return g.Smart
}
type GetPlaylistsMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
Summary *string `json:"summary,omitempty"`
Smart *bool `json:"smart,omitempty"`
PlaylistType *string `json:"playlistType,omitempty"`
Composite *string `json:"composite,omitempty"`
Icon *string `json:"icon,omitempty"`
ViewCount *int `json:"viewCount,omitempty"`
LastViewedAt *int `json:"lastViewedAt,omitempty"`
Duration *int `json:"duration,omitempty"`
LeafCount *int `json:"leafCount,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
}
func (g *GetPlaylistsMetadata) GetRatingKey() *string {
if g == nil {
return nil
}
return g.RatingKey
}
func (g *GetPlaylistsMetadata) GetKey() *string {
if g == nil {
return nil
}
return g.Key
}
func (g *GetPlaylistsMetadata) GetGUID() *string {
if g == nil {
return nil
}
return g.GUID
}
func (g *GetPlaylistsMetadata) GetType() *string {
if g == nil {
return nil
}
return g.Type
}
func (g *GetPlaylistsMetadata) GetTitle() *string {
if g == nil {
return nil
}
return g.Title
}
func (g *GetPlaylistsMetadata) GetSummary() *string {
if g == nil {
return nil
}
return g.Summary
}
func (g *GetPlaylistsMetadata) GetSmart() *bool {
if g == nil {
return nil
}
return g.Smart
}
func (g *GetPlaylistsMetadata) GetPlaylistType() *string {
if g == nil {
return nil
}
return g.PlaylistType
}
func (g *GetPlaylistsMetadata) GetComposite() *string {
if g == nil {
return nil
}
return g.Composite
}
func (g *GetPlaylistsMetadata) GetIcon() *string {
if g == nil {
return nil
}
return g.Icon
}
func (g *GetPlaylistsMetadata) GetViewCount() *int {
if g == nil {
return nil
}
return g.ViewCount
}
func (g *GetPlaylistsMetadata) GetLastViewedAt() *int {
if g == nil {
return nil
}
return g.LastViewedAt
}
func (g *GetPlaylistsMetadata) GetDuration() *int {
if g == nil {
return nil
}
return g.Duration
}
func (g *GetPlaylistsMetadata) GetLeafCount() *int {
if g == nil {
return nil
}
return g.LeafCount
}
func (g *GetPlaylistsMetadata) GetAddedAt() *int {
if g == nil {
return nil
}
return g.AddedAt
}
func (g *GetPlaylistsMetadata) GetUpdatedAt() *int {
if g == nil {
return nil
}
return g.UpdatedAt
}
type GetPlaylistsMediaContainer struct {
Size *int `json:"size,omitempty"`
Metadata []GetPlaylistsMetadata `json:"Metadata,omitempty"`
}
func (g *GetPlaylistsMediaContainer) GetSize() *int {
if g == nil {
return nil
}
return g.Size
}
func (g *GetPlaylistsMediaContainer) GetMetadata() []GetPlaylistsMetadata {
if g == nil {
return nil
}
return g.Metadata
}
// GetPlaylistsResponseBody - returns all playlists
type GetPlaylistsResponseBody struct {
MediaContainer *GetPlaylistsMediaContainer `json:"MediaContainer,omitempty"`
}
func (g *GetPlaylistsResponseBody) GetMediaContainer() *GetPlaylistsMediaContainer {
if g == nil {
return nil
}
return g.MediaContainer
}
type GetPlaylistsResponse 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
// returns all playlists
Object *GetPlaylistsResponseBody
}
func (g *GetPlaylistsResponse) GetContentType() string {
if g == nil {
return ""
}
return g.ContentType
}
func (g *GetPlaylistsResponse) GetStatusCode() int {
if g == nil {
return 0
}
return g.StatusCode
}
func (g *GetPlaylistsResponse) GetRawResponse() *http.Response {
if g == nil {
return nil
}
return g.RawResponse
}
func (g *GetPlaylistsResponse) GetObject() *GetPlaylistsResponseBody {
if g == nil {
return nil
}
return g.Object
}