// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. package operations import ( "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/types" "net/http" ) // QueryParamFilter - Filters content by field and direction/equality // (Unknown if viewedAt is the only supported column) type QueryParamFilter struct { } type GetSessionHistoryRequest struct { // Sorts the results by the specified field followed by the direction (asc, desc) // Sort *string `queryParam:"style=form,explode=true,name=sort"` // Filter results by those that are related to a specific users id // AccountID *int64 `queryParam:"style=form,explode=true,name=accountId"` // Filters content by field and direction/equality // (Unknown if viewedAt is the only supported column) // Filter *QueryParamFilter `queryParam:"style=form,explode=true,name=filter"` // Filters the results based on the id of a valid library section // LibrarySectionID *int64 `queryParam:"style=form,explode=true,name=librarySectionID"` } func (g *GetSessionHistoryRequest) GetSort() *string { if g == nil { return nil } return g.Sort } func (g *GetSessionHistoryRequest) GetAccountID() *int64 { if g == nil { return nil } return g.AccountID } func (g *GetSessionHistoryRequest) GetFilter() *QueryParamFilter { if g == nil { return nil } return g.Filter } func (g *GetSessionHistoryRequest) GetLibrarySectionID() *int64 { if g == nil { return nil } return g.LibrarySectionID } type GetSessionHistoryMetadata struct { HistoryKey *string `json:"historyKey,omitempty"` Key *string `json:"key,omitempty"` RatingKey *string `json:"ratingKey,omitempty"` LibrarySectionID *string `json:"librarySectionID,omitempty"` ParentKey *string `json:"parentKey,omitempty"` GrandparentKey *string `json:"grandparentKey,omitempty"` Title *string `json:"title,omitempty"` GrandparentTitle *string `json:"grandparentTitle,omitempty"` Type *string `json:"type,omitempty"` Thumb *string `json:"thumb,omitempty"` ParentThumb *string `json:"parentThumb,omitempty"` GrandparentThumb *string `json:"grandparentThumb,omitempty"` GrandparentArt *string `json:"grandparentArt,omitempty"` Index *int `json:"index,omitempty"` ParentIndex *int `json:"parentIndex,omitempty"` OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"` ViewedAt *int `json:"viewedAt,omitempty"` AccountID *int `json:"accountID,omitempty"` DeviceID *int `json:"deviceID,omitempty"` } func (g GetSessionHistoryMetadata) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(g, "", false) } func (g *GetSessionHistoryMetadata) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &g, "", false, nil); err != nil { return err } return nil } func (g *GetSessionHistoryMetadata) GetHistoryKey() *string { if g == nil { return nil } return g.HistoryKey } func (g *GetSessionHistoryMetadata) GetKey() *string { if g == nil { return nil } return g.Key } func (g *GetSessionHistoryMetadata) GetRatingKey() *string { if g == nil { return nil } return g.RatingKey } func (g *GetSessionHistoryMetadata) GetLibrarySectionID() *string { if g == nil { return nil } return g.LibrarySectionID } func (g *GetSessionHistoryMetadata) GetParentKey() *string { if g == nil { return nil } return g.ParentKey } func (g *GetSessionHistoryMetadata) GetGrandparentKey() *string { if g == nil { return nil } return g.GrandparentKey } func (g *GetSessionHistoryMetadata) GetTitle() *string { if g == nil { return nil } return g.Title } func (g *GetSessionHistoryMetadata) GetGrandparentTitle() *string { if g == nil { return nil } return g.GrandparentTitle } func (g *GetSessionHistoryMetadata) GetType() *string { if g == nil { return nil } return g.Type } func (g *GetSessionHistoryMetadata) GetThumb() *string { if g == nil { return nil } return g.Thumb } func (g *GetSessionHistoryMetadata) GetParentThumb() *string { if g == nil { return nil } return g.ParentThumb } func (g *GetSessionHistoryMetadata) GetGrandparentThumb() *string { if g == nil { return nil } return g.GrandparentThumb } func (g *GetSessionHistoryMetadata) GetGrandparentArt() *string { if g == nil { return nil } return g.GrandparentArt } func (g *GetSessionHistoryMetadata) GetIndex() *int { if g == nil { return nil } return g.Index } func (g *GetSessionHistoryMetadata) GetParentIndex() *int { if g == nil { return nil } return g.ParentIndex } func (g *GetSessionHistoryMetadata) GetOriginallyAvailableAt() *types.Date { if g == nil { return nil } return g.OriginallyAvailableAt } func (g *GetSessionHistoryMetadata) GetViewedAt() *int { if g == nil { return nil } return g.ViewedAt } func (g *GetSessionHistoryMetadata) GetAccountID() *int { if g == nil { return nil } return g.AccountID } func (g *GetSessionHistoryMetadata) GetDeviceID() *int { if g == nil { return nil } return g.DeviceID } type GetSessionHistoryMediaContainer struct { Size *int `json:"size,omitempty"` Metadata []GetSessionHistoryMetadata `json:"Metadata,omitempty"` } func (g *GetSessionHistoryMediaContainer) GetSize() *int { if g == nil { return nil } return g.Size } func (g *GetSessionHistoryMediaContainer) GetMetadata() []GetSessionHistoryMetadata { if g == nil { return nil } return g.Metadata } // GetSessionHistoryResponseBody - List of Plex Sessions type GetSessionHistoryResponseBody struct { MediaContainer *GetSessionHistoryMediaContainer `json:"MediaContainer,omitempty"` } func (g *GetSessionHistoryResponseBody) GetMediaContainer() *GetSessionHistoryMediaContainer { if g == nil { return nil } return g.MediaContainer } type GetSessionHistoryResponse 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 // List of Plex Sessions Object *GetSessionHistoryResponseBody } func (g *GetSessionHistoryResponse) GetContentType() string { if g == nil { return "" } return g.ContentType } func (g *GetSessionHistoryResponse) GetStatusCode() int { if g == nil { return 0 } return g.StatusCode } func (g *GetSessionHistoryResponse) GetRawResponse() *http.Response { if g == nil { return nil } return g.RawResponse } func (g *GetSessionHistoryResponse) GetObject() *GetSessionHistoryResponseBody { if g == nil { return nil } return g.Object }