mirror of
https://github.com/LukeHagar/plexterraform.git
synced 2025-12-10 04:21:03 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.129.1
This commit is contained in:
211
internal/sdk/pkg/models/operations/gettimeline.go
Normal file
211
internal/sdk/pkg/models/operations/gettimeline.go
Normal file
@@ -0,0 +1,211 @@
|
||||
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
||||
|
||||
package operations
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// State - The state of the media item
|
||||
type State string
|
||||
|
||||
const (
|
||||
StatePlaying State = "playing"
|
||||
StatePaused State = "paused"
|
||||
StateStopped State = "stopped"
|
||||
)
|
||||
|
||||
func (e State) ToPointer() *State {
|
||||
return &e
|
||||
}
|
||||
|
||||
func (e *State) UnmarshalJSON(data []byte) error {
|
||||
var v string
|
||||
if err := json.Unmarshal(data, &v); err != nil {
|
||||
return err
|
||||
}
|
||||
switch v {
|
||||
case "playing":
|
||||
fallthrough
|
||||
case "paused":
|
||||
fallthrough
|
||||
case "stopped":
|
||||
*e = State(v)
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("invalid value for State: %v", v)
|
||||
}
|
||||
}
|
||||
|
||||
type GetTimelineRequest struct {
|
||||
// The rating key of the media item
|
||||
RatingKey float64 `queryParam:"style=form,explode=true,name=ratingKey"`
|
||||
// The key of the media item to get the timeline for
|
||||
Key string `queryParam:"style=form,explode=true,name=key"`
|
||||
// The state of the media item
|
||||
State State `queryParam:"style=form,explode=true,name=state"`
|
||||
// Whether the media item has MDE
|
||||
HasMDE float64 `queryParam:"style=form,explode=true,name=hasMDE"`
|
||||
// The time of the media item
|
||||
Time float64 `queryParam:"style=form,explode=true,name=time"`
|
||||
// The duration of the media item
|
||||
Duration float64 `queryParam:"style=form,explode=true,name=duration"`
|
||||
// The context of the media item
|
||||
Context string `queryParam:"style=form,explode=true,name=context"`
|
||||
// The play queue item ID of the media item
|
||||
PlayQueueItemID float64 `queryParam:"style=form,explode=true,name=playQueueItemID"`
|
||||
// The playback time of the media item
|
||||
PlayBackTime float64 `queryParam:"style=form,explode=true,name=playBackTime"`
|
||||
// The row of the media item
|
||||
Row float64 `queryParam:"style=form,explode=true,name=row"`
|
||||
}
|
||||
|
||||
func (o *GetTimelineRequest) GetRatingKey() float64 {
|
||||
if o == nil {
|
||||
return 0.0
|
||||
}
|
||||
return o.RatingKey
|
||||
}
|
||||
|
||||
func (o *GetTimelineRequest) GetKey() string {
|
||||
if o == nil {
|
||||
return ""
|
||||
}
|
||||
return o.Key
|
||||
}
|
||||
|
||||
func (o *GetTimelineRequest) GetState() State {
|
||||
if o == nil {
|
||||
return State("")
|
||||
}
|
||||
return o.State
|
||||
}
|
||||
|
||||
func (o *GetTimelineRequest) GetHasMDE() float64 {
|
||||
if o == nil {
|
||||
return 0.0
|
||||
}
|
||||
return o.HasMDE
|
||||
}
|
||||
|
||||
func (o *GetTimelineRequest) GetTime() float64 {
|
||||
if o == nil {
|
||||
return 0.0
|
||||
}
|
||||
return o.Time
|
||||
}
|
||||
|
||||
func (o *GetTimelineRequest) GetDuration() float64 {
|
||||
if o == nil {
|
||||
return 0.0
|
||||
}
|
||||
return o.Duration
|
||||
}
|
||||
|
||||
func (o *GetTimelineRequest) GetContext() string {
|
||||
if o == nil {
|
||||
return ""
|
||||
}
|
||||
return o.Context
|
||||
}
|
||||
|
||||
func (o *GetTimelineRequest) GetPlayQueueItemID() float64 {
|
||||
if o == nil {
|
||||
return 0.0
|
||||
}
|
||||
return o.PlayQueueItemID
|
||||
}
|
||||
|
||||
func (o *GetTimelineRequest) GetPlayBackTime() float64 {
|
||||
if o == nil {
|
||||
return 0.0
|
||||
}
|
||||
return o.PlayBackTime
|
||||
}
|
||||
|
||||
func (o *GetTimelineRequest) GetRow() float64 {
|
||||
if o == nil {
|
||||
return 0.0
|
||||
}
|
||||
return o.Row
|
||||
}
|
||||
|
||||
type GetTimelineErrors struct {
|
||||
Code *float64 `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Status *float64 `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
func (o *GetTimelineErrors) GetCode() *float64 {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.Code
|
||||
}
|
||||
|
||||
func (o *GetTimelineErrors) GetMessage() *string {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.Message
|
||||
}
|
||||
|
||||
func (o *GetTimelineErrors) GetStatus() *float64 {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.Status
|
||||
}
|
||||
|
||||
// GetTimelineResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
type GetTimelineResponseBody struct {
|
||||
Errors []GetTimelineErrors `json:"errors,omitempty"`
|
||||
}
|
||||
|
||||
func (o *GetTimelineResponseBody) GetErrors() []GetTimelineErrors {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.Errors
|
||||
}
|
||||
|
||||
type GetTimelineResponse 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
|
||||
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
Object *GetTimelineResponseBody
|
||||
}
|
||||
|
||||
func (o *GetTimelineResponse) GetContentType() string {
|
||||
if o == nil {
|
||||
return ""
|
||||
}
|
||||
return o.ContentType
|
||||
}
|
||||
|
||||
func (o *GetTimelineResponse) GetStatusCode() int {
|
||||
if o == nil {
|
||||
return 0
|
||||
}
|
||||
return o.StatusCode
|
||||
}
|
||||
|
||||
func (o *GetTimelineResponse) GetRawResponse() *http.Response {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.RawResponse
|
||||
}
|
||||
|
||||
func (o *GetTimelineResponse) GetObject() *GetTimelineResponseBody {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.Object
|
||||
}
|
||||
Reference in New Issue
Block a user