// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. package operations import ( "github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/internal/utils" "github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/types" "net/http" ) // Filter - Filters content by field and direction/equality // (Unknown if viewedAt is the only supported column) type Filter 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 *Filter `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() *Filter { if o == nil { return nil } return o.Filter } func (o *GetSessionHistoryRequest) GetLibrarySectionID() *int64 { if o == nil { return nil } return o.LibrarySectionID } type GetSessionHistoryErrors struct { Code *float64 `json:"code,omitempty"` Message *string `json:"message,omitempty"` Status *float64 `json:"status,omitempty"` } func (o *GetSessionHistoryErrors) GetCode() *float64 { if o == nil { return nil } return o.Code } func (o *GetSessionHistoryErrors) GetMessage() *string { if o == nil { return nil } return o.Message } func (o *GetSessionHistoryErrors) GetStatus() *float64 { if o == nil { return nil } return o.Status } // GetSessionHistorySessionsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query. type GetSessionHistorySessionsResponseBody struct { Errors []GetSessionHistoryErrors `json:"errors,omitempty"` } func (o *GetSessionHistorySessionsResponseBody) GetErrors() []GetSessionHistoryErrors { if o == nil { return nil } return o.Errors } 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 TwoHundredApplicationJSONObject *GetSessionHistoryResponseBody // Unauthorized - Returned if the X-Plex-Token is missing from the header or query. FourHundredAndOneApplicationJSONObject *GetSessionHistorySessionsResponseBody } 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) GetTwoHundredApplicationJSONObject() *GetSessionHistoryResponseBody { if o == nil { return nil } return o.TwoHundredApplicationJSONObject } func (o *GetSessionHistoryResponse) GetFourHundredAndOneApplicationJSONObject() *GetSessionHistorySessionsResponseBody { if o == nil { return nil } return o.FourHundredAndOneApplicationJSONObject }