mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
295 lines
6.7 KiB
Go
295 lines
6.7 KiB
Go
// 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 (o *GetSessionHistoryRequest) GetSort() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Sort
|
|
}
|
|
|
|
func (o *GetSessionHistoryRequest) GetAccountID() *int64 {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.AccountID
|
|
}
|
|
|
|
func (o *GetSessionHistoryRequest) GetFilter() *QueryParamFilter {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Filter
|
|
}
|
|
|
|
func (o *GetSessionHistoryRequest) GetLibrarySectionID() *int64 {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.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, false); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetHistoryKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.HistoryKey
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Key
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetRatingKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.RatingKey
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetLibrarySectionID() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.LibrarySectionID
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetParentKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentKey
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetGrandparentKey() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.GrandparentKey
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetTitle() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Title
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetGrandparentTitle() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.GrandparentTitle
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetType() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Type
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetThumb() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Thumb
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetParentThumb() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentThumb
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetGrandparentThumb() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.GrandparentThumb
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetGrandparentArt() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.GrandparentArt
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetIndex() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Index
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetParentIndex() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ParentIndex
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetOriginallyAvailableAt() *types.Date {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.OriginallyAvailableAt
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetViewedAt() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.ViewedAt
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetAccountID() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.AccountID
|
|
}
|
|
|
|
func (o *GetSessionHistoryMetadata) GetDeviceID() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.DeviceID
|
|
}
|
|
|
|
type GetSessionHistoryMediaContainer struct {
|
|
Size *int `json:"size,omitempty"`
|
|
Metadata []GetSessionHistoryMetadata `json:"Metadata,omitempty"`
|
|
}
|
|
|
|
func (o *GetSessionHistoryMediaContainer) GetSize() *int {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Size
|
|
}
|
|
|
|
func (o *GetSessionHistoryMediaContainer) GetMetadata() []GetSessionHistoryMetadata {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Metadata
|
|
}
|
|
|
|
// GetSessionHistoryResponseBody - List of Plex Sessions
|
|
type GetSessionHistoryResponseBody struct {
|
|
MediaContainer *GetSessionHistoryMediaContainer `json:"MediaContainer,omitempty"`
|
|
}
|
|
|
|
func (o *GetSessionHistoryResponseBody) GetMediaContainer() *GetSessionHistoryMediaContainer {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.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 (o *GetSessionHistoryResponse) GetContentType() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.ContentType
|
|
}
|
|
|
|
func (o *GetSessionHistoryResponse) GetStatusCode() int {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.StatusCode
|
|
}
|
|
|
|
func (o *GetSessionHistoryResponse) GetRawResponse() *http.Response {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.RawResponse
|
|
}
|
|
|
|
func (o *GetSessionHistoryResponse) GetObject() *GetSessionHistoryResponseBody {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Object
|
|
}
|