ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.129.1

This commit is contained in:
speakeasybot
2023-12-25 01:08:54 +00:00
parent 7b1a8e6d93
commit 77aa3835df
134 changed files with 20503 additions and 3 deletions

View File

@@ -0,0 +1,115 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type AddPlaylistContentsRequest struct {
// the ID of the playlist
PlaylistID float64 `pathParam:"style=simple,explode=false,name=playlistID"`
// the content URI for the playlist
URI string `queryParam:"style=form,explode=true,name=uri"`
// the play queue to add to a playlist
PlayQueueID float64 `queryParam:"style=form,explode=true,name=playQueueID"`
}
func (o *AddPlaylistContentsRequest) GetPlaylistID() float64 {
if o == nil {
return 0.0
}
return o.PlaylistID
}
func (o *AddPlaylistContentsRequest) GetURI() string {
if o == nil {
return ""
}
return o.URI
}
func (o *AddPlaylistContentsRequest) GetPlayQueueID() float64 {
if o == nil {
return 0.0
}
return o.PlayQueueID
}
type AddPlaylistContentsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *AddPlaylistContentsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *AddPlaylistContentsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *AddPlaylistContentsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// AddPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type AddPlaylistContentsResponseBody struct {
Errors []AddPlaylistContentsErrors `json:"errors,omitempty"`
}
func (o *AddPlaylistContentsResponseBody) GetErrors() []AddPlaylistContentsErrors {
if o == nil {
return nil
}
return o.Errors
}
type AddPlaylistContentsResponse 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 *AddPlaylistContentsResponseBody
}
func (o *AddPlaylistContentsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *AddPlaylistContentsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *AddPlaylistContentsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *AddPlaylistContentsResponse) GetObject() *AddPlaylistContentsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,164 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// Tonight - Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
type Tonight int64
const (
TonightZero Tonight = 0
TonightOne Tonight = 1
)
func (e Tonight) ToPointer() *Tonight {
return &e
}
func (e *Tonight) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = Tonight(v)
return nil
default:
return fmt.Errorf("invalid value for Tonight: %v", v)
}
}
// Skip - Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
type Skip int64
const (
SkipZero Skip = 0
SkipOne Skip = 1
)
func (e Skip) ToPointer() *Skip {
return &e
}
func (e *Skip) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = Skip(v)
return nil
default:
return fmt.Errorf("invalid value for Skip: %v", v)
}
}
type ApplyUpdatesRequest struct {
// Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
Tonight *Tonight `queryParam:"style=form,explode=true,name=tonight"`
// Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`.
Skip *Skip `queryParam:"style=form,explode=true,name=skip"`
}
func (o *ApplyUpdatesRequest) GetTonight() *Tonight {
if o == nil {
return nil
}
return o.Tonight
}
func (o *ApplyUpdatesRequest) GetSkip() *Skip {
if o == nil {
return nil
}
return o.Skip
}
type ApplyUpdatesErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *ApplyUpdatesErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *ApplyUpdatesErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *ApplyUpdatesErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// ApplyUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type ApplyUpdatesResponseBody struct {
Errors []ApplyUpdatesErrors `json:"errors,omitempty"`
}
func (o *ApplyUpdatesResponseBody) GetErrors() []ApplyUpdatesErrors {
if o == nil {
return nil
}
return o.Errors
}
type ApplyUpdatesResponse 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 *ApplyUpdatesResponseBody
}
func (o *ApplyUpdatesResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *ApplyUpdatesResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *ApplyUpdatesResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *ApplyUpdatesResponse) GetObject() *ApplyUpdatesResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type CancelServerActivitiesRequest struct {
// The UUID of the activity to cancel.
ActivityUUID string `pathParam:"style=simple,explode=false,name=activityUUID"`
}
func (o *CancelServerActivitiesRequest) GetActivityUUID() string {
if o == nil {
return ""
}
return o.ActivityUUID
}
type CancelServerActivitiesErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *CancelServerActivitiesErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *CancelServerActivitiesErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *CancelServerActivitiesErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// CancelServerActivitiesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type CancelServerActivitiesResponseBody struct {
Errors []CancelServerActivitiesErrors `json:"errors,omitempty"`
}
func (o *CancelServerActivitiesResponseBody) GetErrors() []CancelServerActivitiesErrors {
if o == nil {
return nil
}
return o.Errors
}
type CancelServerActivitiesResponse 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 *CancelServerActivitiesResponseBody
}
func (o *CancelServerActivitiesResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *CancelServerActivitiesResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *CancelServerActivitiesResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *CancelServerActivitiesResponse) GetObject() *CancelServerActivitiesResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,127 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// Download - Indicate that you want to start download any updates found.
type Download int64
const (
DownloadZero Download = 0
DownloadOne Download = 1
)
func (e Download) ToPointer() *Download {
return &e
}
func (e *Download) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = Download(v)
return nil
default:
return fmt.Errorf("invalid value for Download: %v", v)
}
}
type CheckForUpdatesRequest struct {
// Indicate that you want to start download any updates found.
Download *Download `queryParam:"style=form,explode=true,name=download"`
}
func (o *CheckForUpdatesRequest) GetDownload() *Download {
if o == nil {
return nil
}
return o.Download
}
type CheckForUpdatesErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *CheckForUpdatesErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *CheckForUpdatesErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *CheckForUpdatesErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// CheckForUpdatesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type CheckForUpdatesResponseBody struct {
Errors []CheckForUpdatesErrors `json:"errors,omitempty"`
}
func (o *CheckForUpdatesResponseBody) GetErrors() []CheckForUpdatesErrors {
if o == nil {
return nil
}
return o.Errors
}
type CheckForUpdatesResponse 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 *CheckForUpdatesResponseBody
}
func (o *CheckForUpdatesResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *CheckForUpdatesResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *CheckForUpdatesResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *CheckForUpdatesResponse) GetObject() *CheckForUpdatesResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type ClearPlaylistContentsRequest struct {
// the ID of the playlist
PlaylistID float64 `pathParam:"style=simple,explode=false,name=playlistID"`
}
func (o *ClearPlaylistContentsRequest) GetPlaylistID() float64 {
if o == nil {
return 0.0
}
return o.PlaylistID
}
type ClearPlaylistContentsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *ClearPlaylistContentsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *ClearPlaylistContentsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *ClearPlaylistContentsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// ClearPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type ClearPlaylistContentsResponseBody struct {
Errors []ClearPlaylistContentsErrors `json:"errors,omitempty"`
}
func (o *ClearPlaylistContentsResponseBody) GetErrors() []ClearPlaylistContentsErrors {
if o == nil {
return nil
}
return o.Errors
}
type ClearPlaylistContentsResponse 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 *ClearPlaylistContentsResponseBody
}
func (o *ClearPlaylistContentsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *ClearPlaylistContentsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *ClearPlaylistContentsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *ClearPlaylistContentsResponse) GetObject() *ClearPlaylistContentsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,194 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// Type - type of playlist to create
type Type string
const (
TypeAudio Type = "audio"
TypeVideo Type = "video"
TypePhoto Type = "photo"
)
func (e Type) ToPointer() *Type {
return &e
}
func (e *Type) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "audio":
fallthrough
case "video":
fallthrough
case "photo":
*e = Type(v)
return nil
default:
return fmt.Errorf("invalid value for Type: %v", v)
}
}
// Smart - whether the playlist is smart or not
type Smart int64
const (
SmartZero Smart = 0
SmartOne Smart = 1
)
func (e Smart) ToPointer() *Smart {
return &e
}
func (e *Smart) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = Smart(v)
return nil
default:
return fmt.Errorf("invalid value for Smart: %v", v)
}
}
type CreatePlaylistRequest struct {
// name of the playlist
Title string `queryParam:"style=form,explode=true,name=title"`
// type of playlist to create
Type Type `queryParam:"style=form,explode=true,name=type"`
// whether the playlist is smart or not
Smart Smart `queryParam:"style=form,explode=true,name=smart"`
// the content URI for the playlist
URI *string `queryParam:"style=form,explode=true,name=uri"`
// the play queue to copy to a playlist
PlayQueueID *float64 `queryParam:"style=form,explode=true,name=playQueueID"`
}
func (o *CreatePlaylistRequest) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
func (o *CreatePlaylistRequest) GetType() Type {
if o == nil {
return Type("")
}
return o.Type
}
func (o *CreatePlaylistRequest) GetSmart() Smart {
if o == nil {
return Smart(0)
}
return o.Smart
}
func (o *CreatePlaylistRequest) GetURI() *string {
if o == nil {
return nil
}
return o.URI
}
func (o *CreatePlaylistRequest) GetPlayQueueID() *float64 {
if o == nil {
return nil
}
return o.PlayQueueID
}
type CreatePlaylistErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *CreatePlaylistErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *CreatePlaylistErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *CreatePlaylistErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// CreatePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type CreatePlaylistResponseBody struct {
Errors []CreatePlaylistErrors `json:"errors,omitempty"`
}
func (o *CreatePlaylistResponseBody) GetErrors() []CreatePlaylistErrors {
if o == nil {
return nil
}
return o.Errors
}
type CreatePlaylistResponse 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 *CreatePlaylistResponseBody
}
func (o *CreatePlaylistResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *CreatePlaylistResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *CreatePlaylistResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *CreatePlaylistResponse) GetObject() *CreatePlaylistResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type DeleteLibraryRequest struct {
// the Id of the library to query
SectionID float64 `pathParam:"style=simple,explode=false,name=sectionId"`
}
func (o *DeleteLibraryRequest) GetSectionID() float64 {
if o == nil {
return 0.0
}
return o.SectionID
}
type DeleteLibraryErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *DeleteLibraryErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *DeleteLibraryErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *DeleteLibraryErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// DeleteLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type DeleteLibraryResponseBody struct {
Errors []DeleteLibraryErrors `json:"errors,omitempty"`
}
func (o *DeleteLibraryResponseBody) GetErrors() []DeleteLibraryErrors {
if o == nil {
return nil
}
return o.Errors
}
type DeleteLibraryResponse 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 *DeleteLibraryResponseBody
}
func (o *DeleteLibraryResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *DeleteLibraryResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *DeleteLibraryResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *DeleteLibraryResponse) GetObject() *DeleteLibraryResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type DeletePlaylistRequest struct {
// the ID of the playlist
PlaylistID float64 `pathParam:"style=simple,explode=false,name=playlistID"`
}
func (o *DeletePlaylistRequest) GetPlaylistID() float64 {
if o == nil {
return 0.0
}
return o.PlaylistID
}
type DeletePlaylistErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *DeletePlaylistErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *DeletePlaylistErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *DeletePlaylistErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// DeletePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type DeletePlaylistResponseBody struct {
Errors []DeletePlaylistErrors `json:"errors,omitempty"`
}
func (o *DeletePlaylistResponseBody) GetErrors() []DeletePlaylistErrors {
if o == nil {
return nil
}
return o.Errors
}
type DeletePlaylistResponse 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 *DeletePlaylistResponseBody
}
func (o *DeletePlaylistResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *DeletePlaylistResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *DeletePlaylistResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *DeletePlaylistResponse) GetObject() *DeletePlaylistResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,85 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type EnablePaperTrailErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *EnablePaperTrailErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *EnablePaperTrailErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *EnablePaperTrailErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// EnablePaperTrailResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type EnablePaperTrailResponseBody struct {
Errors []EnablePaperTrailErrors `json:"errors,omitempty"`
}
func (o *EnablePaperTrailResponseBody) GetErrors() []EnablePaperTrailErrors {
if o == nil {
return nil
}
return o.Errors
}
type EnablePaperTrailResponse 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 *EnablePaperTrailResponseBody
}
func (o *EnablePaperTrailResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *EnablePaperTrailResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *EnablePaperTrailResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *EnablePaperTrailResponse) GetObject() *EnablePaperTrailResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,215 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetAvailableClientsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetAvailableClientsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetAvailableClientsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetAvailableClientsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetAvailableClientsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetAvailableClientsResponseBody struct {
Errors []GetAvailableClientsErrors `json:"errors,omitempty"`
}
func (o *GetAvailableClientsResponseBody) GetErrors() []GetAvailableClientsErrors {
if o == nil {
return nil
}
return o.Errors
}
type Server struct {
Name *string `json:"name,omitempty"`
Host *string `json:"host,omitempty"`
Address *string `json:"address,omitempty"`
Port *float64 `json:"port,omitempty"`
MachineIdentifier *string `json:"machineIdentifier,omitempty"`
Version *string `json:"version,omitempty"`
Protocol *string `json:"protocol,omitempty"`
Product *string `json:"product,omitempty"`
DeviceClass *string `json:"deviceClass,omitempty"`
ProtocolVersion *float64 `json:"protocolVersion,omitempty"`
ProtocolCapabilities *string `json:"protocolCapabilities,omitempty"`
}
func (o *Server) GetName() *string {
if o == nil {
return nil
}
return o.Name
}
func (o *Server) GetHost() *string {
if o == nil {
return nil
}
return o.Host
}
func (o *Server) GetAddress() *string {
if o == nil {
return nil
}
return o.Address
}
func (o *Server) GetPort() *float64 {
if o == nil {
return nil
}
return o.Port
}
func (o *Server) GetMachineIdentifier() *string {
if o == nil {
return nil
}
return o.MachineIdentifier
}
func (o *Server) GetVersion() *string {
if o == nil {
return nil
}
return o.Version
}
func (o *Server) GetProtocol() *string {
if o == nil {
return nil
}
return o.Protocol
}
func (o *Server) GetProduct() *string {
if o == nil {
return nil
}
return o.Product
}
func (o *Server) GetDeviceClass() *string {
if o == nil {
return nil
}
return o.DeviceClass
}
func (o *Server) GetProtocolVersion() *float64 {
if o == nil {
return nil
}
return o.ProtocolVersion
}
func (o *Server) GetProtocolCapabilities() *string {
if o == nil {
return nil
}
return o.ProtocolCapabilities
}
type GetAvailableClientsMediaContainer struct {
Size *float64 `json:"size,omitempty"`
Server []Server `json:"Server,omitempty"`
}
func (o *GetAvailableClientsMediaContainer) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetAvailableClientsMediaContainer) GetServer() []Server {
if o == nil {
return nil
}
return o.Server
}
type ResponseBody struct {
MediaContainer *GetAvailableClientsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *ResponseBody) GetMediaContainer() *GetAvailableClientsMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetAvailableClientsResponse 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
// Available Clients
ResponseBodies []ResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetAvailableClientsResponseBody
}
func (o *GetAvailableClientsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetAvailableClientsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetAvailableClientsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetAvailableClientsResponse) GetResponseBodies() []ResponseBody {
if o == nil {
return nil
}
return o.ResponseBodies
}
func (o *GetAvailableClientsResponse) GetObject() *GetAvailableClientsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,168 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetButlerTasksErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetButlerTasksErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetButlerTasksErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetButlerTasksErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetButlerTasksButlerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetButlerTasksButlerResponseBody struct {
Errors []GetButlerTasksErrors `json:"errors,omitempty"`
}
func (o *GetButlerTasksButlerResponseBody) GetErrors() []GetButlerTasksErrors {
if o == nil {
return nil
}
return o.Errors
}
type ButlerTask struct {
Name *string `json:"name,omitempty"`
Interval *float64 `json:"interval,omitempty"`
ScheduleRandomized *bool `json:"scheduleRandomized,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Title *string `json:"title,omitempty"`
Description *string `json:"description,omitempty"`
}
func (o *ButlerTask) GetName() *string {
if o == nil {
return nil
}
return o.Name
}
func (o *ButlerTask) GetInterval() *float64 {
if o == nil {
return nil
}
return o.Interval
}
func (o *ButlerTask) GetScheduleRandomized() *bool {
if o == nil {
return nil
}
return o.ScheduleRandomized
}
func (o *ButlerTask) GetEnabled() *bool {
if o == nil {
return nil
}
return o.Enabled
}
func (o *ButlerTask) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *ButlerTask) GetDescription() *string {
if o == nil {
return nil
}
return o.Description
}
type ButlerTasks struct {
ButlerTask []ButlerTask `json:"ButlerTask,omitempty"`
}
func (o *ButlerTasks) GetButlerTask() []ButlerTask {
if o == nil {
return nil
}
return o.ButlerTask
}
// GetButlerTasksResponseBody - All butler tasks
type GetButlerTasksResponseBody struct {
ButlerTasks *ButlerTasks `json:"ButlerTasks,omitempty"`
}
func (o *GetButlerTasksResponseBody) GetButlerTasks() *ButlerTasks {
if o == nil {
return nil
}
return o.ButlerTasks
}
type GetButlerTasksResponse 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
// All butler tasks
TwoHundredApplicationJSONObject *GetButlerTasksResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetButlerTasksButlerResponseBody
}
func (o *GetButlerTasksResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetButlerTasksResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetButlerTasksResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetButlerTasksResponse) GetTwoHundredApplicationJSONObject() *GetButlerTasksResponseBody {
if o == nil {
return nil
}
return o.TwoHundredApplicationJSONObject
}
func (o *GetButlerTasksResponse) GetFourHundredAndOneApplicationJSONObject() *GetButlerTasksButlerResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -0,0 +1,115 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetCommonLibraryItemsRequest struct {
// the Id of the library to query
SectionID float64 `pathParam:"style=simple,explode=false,name=sectionId"`
// item type
Type float64 `queryParam:"style=form,explode=true,name=type"`
// the filter parameter
Filter *string `queryParam:"style=form,explode=true,name=filter"`
}
func (o *GetCommonLibraryItemsRequest) GetSectionID() float64 {
if o == nil {
return 0.0
}
return o.SectionID
}
func (o *GetCommonLibraryItemsRequest) GetType() float64 {
if o == nil {
return 0.0
}
return o.Type
}
func (o *GetCommonLibraryItemsRequest) GetFilter() *string {
if o == nil {
return nil
}
return o.Filter
}
type GetCommonLibraryItemsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetCommonLibraryItemsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetCommonLibraryItemsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetCommonLibraryItemsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetCommonLibraryItemsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetCommonLibraryItemsResponseBody struct {
Errors []GetCommonLibraryItemsErrors `json:"errors,omitempty"`
}
func (o *GetCommonLibraryItemsResponseBody) GetErrors() []GetCommonLibraryItemsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetCommonLibraryItemsResponse 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 *GetCommonLibraryItemsResponseBody
}
func (o *GetCommonLibraryItemsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetCommonLibraryItemsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetCommonLibraryItemsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetCommonLibraryItemsResponse) GetObject() *GetCommonLibraryItemsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,176 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetDevicesErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetDevicesErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetDevicesErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetDevicesErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetDevicesServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetDevicesServerResponseBody struct {
Errors []GetDevicesErrors `json:"errors,omitempty"`
}
func (o *GetDevicesServerResponseBody) GetErrors() []GetDevicesErrors {
if o == nil {
return nil
}
return o.Errors
}
type Device struct {
ID *float64 `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Platform *string `json:"platform,omitempty"`
ClientIdentifier *string `json:"clientIdentifier,omitempty"`
CreatedAt *float64 `json:"createdAt,omitempty"`
}
func (o *Device) GetID() *float64 {
if o == nil {
return nil
}
return o.ID
}
func (o *Device) GetName() *string {
if o == nil {
return nil
}
return o.Name
}
func (o *Device) GetPlatform() *string {
if o == nil {
return nil
}
return o.Platform
}
func (o *Device) GetClientIdentifier() *string {
if o == nil {
return nil
}
return o.ClientIdentifier
}
func (o *Device) GetCreatedAt() *float64 {
if o == nil {
return nil
}
return o.CreatedAt
}
type GetDevicesMediaContainer struct {
Size *float64 `json:"size,omitempty"`
Identifier *string `json:"identifier,omitempty"`
Device []Device `json:"Device,omitempty"`
}
func (o *GetDevicesMediaContainer) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetDevicesMediaContainer) GetIdentifier() *string {
if o == nil {
return nil
}
return o.Identifier
}
func (o *GetDevicesMediaContainer) GetDevice() []Device {
if o == nil {
return nil
}
return o.Device
}
// GetDevicesResponseBody - Devices
type GetDevicesResponseBody struct {
MediaContainer *GetDevicesMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetDevicesResponseBody) GetMediaContainer() *GetDevicesMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetDevicesResponse 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
// Devices
TwoHundredApplicationJSONObject *GetDevicesResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetDevicesServerResponseBody
}
func (o *GetDevicesResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetDevicesResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetDevicesResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetDevicesResponse) GetTwoHundredApplicationJSONObject() *GetDevicesResponseBody {
if o == nil {
return nil
}
return o.TwoHundredApplicationJSONObject
}
func (o *GetDevicesResponse) GetFourHundredAndOneApplicationJSONObject() *GetDevicesServerResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -0,0 +1,106 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetFileHashRequest struct {
// This is the path to the local file, must be prefixed by `file://`
URL string `queryParam:"style=form,explode=true,name=url"`
// Item type
Type *float64 `queryParam:"style=form,explode=true,name=type"`
}
func (o *GetFileHashRequest) GetURL() string {
if o == nil {
return ""
}
return o.URL
}
func (o *GetFileHashRequest) GetType() *float64 {
if o == nil {
return nil
}
return o.Type
}
type GetFileHashErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetFileHashErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetFileHashErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetFileHashErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetFileHashResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetFileHashResponseBody struct {
Errors []GetFileHashErrors `json:"errors,omitempty"`
}
func (o *GetFileHashResponseBody) GetErrors() []GetFileHashErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetFileHashResponse 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 *GetFileHashResponseBody
}
func (o *GetFileHashResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetFileHashResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetFileHashResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetFileHashResponse) GetObject() *GetFileHashResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,136 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// OnlyTransient - Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
type OnlyTransient int64
const (
OnlyTransientZero OnlyTransient = 0
OnlyTransientOne OnlyTransient = 1
)
func (e OnlyTransient) ToPointer() *OnlyTransient {
return &e
}
func (e *OnlyTransient) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = OnlyTransient(v)
return nil
default:
return fmt.Errorf("invalid value for OnlyTransient: %v", v)
}
}
type GetGlobalHubsRequest struct {
// The number of items to return with each hub.
Count *float64 `queryParam:"style=form,explode=true,name=count"`
// Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
OnlyTransient *OnlyTransient `queryParam:"style=form,explode=true,name=onlyTransient"`
}
func (o *GetGlobalHubsRequest) GetCount() *float64 {
if o == nil {
return nil
}
return o.Count
}
func (o *GetGlobalHubsRequest) GetOnlyTransient() *OnlyTransient {
if o == nil {
return nil
}
return o.OnlyTransient
}
type GetGlobalHubsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetGlobalHubsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetGlobalHubsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetGlobalHubsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetGlobalHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetGlobalHubsResponseBody struct {
Errors []GetGlobalHubsErrors `json:"errors,omitempty"`
}
func (o *GetGlobalHubsResponseBody) GetErrors() []GetGlobalHubsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetGlobalHubsResponse 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 *GetGlobalHubsResponseBody
}
func (o *GetGlobalHubsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetGlobalHubsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetGlobalHubsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetGlobalHubsResponse) GetObject() *GetGlobalHubsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,115 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetLatestLibraryItemsRequest struct {
// the Id of the library to query
SectionID float64 `pathParam:"style=simple,explode=false,name=sectionId"`
// item type
Type float64 `queryParam:"style=form,explode=true,name=type"`
// the filter parameter
Filter *string `queryParam:"style=form,explode=true,name=filter"`
}
func (o *GetLatestLibraryItemsRequest) GetSectionID() float64 {
if o == nil {
return 0.0
}
return o.SectionID
}
func (o *GetLatestLibraryItemsRequest) GetType() float64 {
if o == nil {
return 0.0
}
return o.Type
}
func (o *GetLatestLibraryItemsRequest) GetFilter() *string {
if o == nil {
return nil
}
return o.Filter
}
type GetLatestLibraryItemsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetLatestLibraryItemsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetLatestLibraryItemsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetLatestLibraryItemsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetLatestLibraryItemsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetLatestLibraryItemsResponseBody struct {
Errors []GetLatestLibraryItemsErrors `json:"errors,omitempty"`
}
func (o *GetLatestLibraryItemsResponseBody) GetErrors() []GetLatestLibraryItemsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetLatestLibraryItemsResponse 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 *GetLatestLibraryItemsResponseBody
}
func (o *GetLatestLibraryItemsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetLatestLibraryItemsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetLatestLibraryItemsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetLatestLibraryItemsResponse) GetObject() *GetLatestLibraryItemsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,85 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetLibrariesErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetLibrariesErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetLibrariesErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetLibrariesErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetLibrariesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetLibrariesResponseBody struct {
Errors []GetLibrariesErrors `json:"errors,omitempty"`
}
func (o *GetLibrariesResponseBody) GetErrors() []GetLibrariesErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetLibrariesResponse 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 *GetLibrariesResponseBody
}
func (o *GetLibrariesResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetLibrariesResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetLibrariesResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetLibrariesResponse) GetObject() *GetLibrariesResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,151 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
"net/http"
)
// IncludeDetails - Whether or not to include details for a section (types, filters, and sorts).
// Only exists for backwards compatibility, media providers other than the server libraries have it on always.
type IncludeDetails int64
const (
IncludeDetailsZero IncludeDetails = 0
IncludeDetailsOne IncludeDetails = 1
)
func (e IncludeDetails) ToPointer() *IncludeDetails {
return &e
}
func (e *IncludeDetails) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = IncludeDetails(v)
return nil
default:
return fmt.Errorf("invalid value for IncludeDetails: %v", v)
}
}
type GetLibraryRequest struct {
// the Id of the library to query
SectionID float64 `pathParam:"style=simple,explode=false,name=sectionId"`
// Whether or not to include details for a section (types, filters, and sorts).
// Only exists for backwards compatibility, media providers other than the server libraries have it on always.
//
IncludeDetails *IncludeDetails `default:"0" queryParam:"style=form,explode=true,name=includeDetails"`
}
func (g GetLibraryRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetLibraryRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetLibraryRequest) GetSectionID() float64 {
if o == nil {
return 0.0
}
return o.SectionID
}
func (o *GetLibraryRequest) GetIncludeDetails() *IncludeDetails {
if o == nil {
return nil
}
return o.IncludeDetails
}
type GetLibraryErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetLibraryErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetLibraryErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetLibraryErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetLibraryResponseBody struct {
Errors []GetLibraryErrors `json:"errors,omitempty"`
}
func (o *GetLibraryResponseBody) GetErrors() []GetLibraryErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetLibraryResponse 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 *GetLibraryResponseBody
}
func (o *GetLibraryResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetLibraryResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetLibraryResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetLibraryResponse) GetObject() *GetLibraryResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,145 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// QueryParamOnlyTransient - Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
type QueryParamOnlyTransient int64
const (
QueryParamOnlyTransientZero QueryParamOnlyTransient = 0
QueryParamOnlyTransientOne QueryParamOnlyTransient = 1
)
func (e QueryParamOnlyTransient) ToPointer() *QueryParamOnlyTransient {
return &e
}
func (e *QueryParamOnlyTransient) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = QueryParamOnlyTransient(v)
return nil
default:
return fmt.Errorf("invalid value for QueryParamOnlyTransient: %v", v)
}
}
type GetLibraryHubsRequest struct {
// the Id of the library to query
SectionID float64 `pathParam:"style=simple,explode=false,name=sectionId"`
// The number of items to return with each hub.
Count *float64 `queryParam:"style=form,explode=true,name=count"`
// Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
OnlyTransient *QueryParamOnlyTransient `queryParam:"style=form,explode=true,name=onlyTransient"`
}
func (o *GetLibraryHubsRequest) GetSectionID() float64 {
if o == nil {
return 0.0
}
return o.SectionID
}
func (o *GetLibraryHubsRequest) GetCount() *float64 {
if o == nil {
return nil
}
return o.Count
}
func (o *GetLibraryHubsRequest) GetOnlyTransient() *QueryParamOnlyTransient {
if o == nil {
return nil
}
return o.OnlyTransient
}
type GetLibraryHubsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetLibraryHubsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetLibraryHubsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetLibraryHubsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetLibraryHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetLibraryHubsResponseBody struct {
Errors []GetLibraryHubsErrors `json:"errors,omitempty"`
}
func (o *GetLibraryHubsResponseBody) GetErrors() []GetLibraryHubsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetLibraryHubsResponse 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 *GetLibraryHubsResponseBody
}
func (o *GetLibraryHubsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetLibraryHubsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetLibraryHubsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetLibraryHubsResponse) GetObject() *GetLibraryHubsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,115 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetLibraryItemsRequest struct {
// the Id of the library to query
SectionID float64 `pathParam:"style=simple,explode=false,name=sectionId"`
// item type
Type *float64 `queryParam:"style=form,explode=true,name=type"`
// the filter parameter
Filter *string `queryParam:"style=form,explode=true,name=filter"`
}
func (o *GetLibraryItemsRequest) GetSectionID() float64 {
if o == nil {
return 0.0
}
return o.SectionID
}
func (o *GetLibraryItemsRequest) GetType() *float64 {
if o == nil {
return nil
}
return o.Type
}
func (o *GetLibraryItemsRequest) GetFilter() *string {
if o == nil {
return nil
}
return o.Filter
}
type GetLibraryItemsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetLibraryItemsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetLibraryItemsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetLibraryItemsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetLibraryItemsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetLibraryItemsResponseBody struct {
Errors []GetLibraryItemsErrors `json:"errors,omitempty"`
}
func (o *GetLibraryItemsResponseBody) GetErrors() []GetLibraryItemsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetLibraryItemsResponse 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 *GetLibraryItemsResponseBody
}
func (o *GetLibraryItemsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetLibraryItemsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetLibraryItemsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetLibraryItemsResponse) GetObject() *GetLibraryItemsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetMetadataRequest struct {
// the id of the library item to return the children of.
RatingKey float64 `pathParam:"style=simple,explode=false,name=ratingKey"`
}
func (o *GetMetadataRequest) GetRatingKey() float64 {
if o == nil {
return 0.0
}
return o.RatingKey
}
type GetMetadataErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetMetadataErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetMetadataErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetMetadataErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetMetadataResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetMetadataResponseBody struct {
Errors []GetMetadataErrors `json:"errors,omitempty"`
}
func (o *GetMetadataResponseBody) GetErrors() []GetMetadataErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetMetadataResponse 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 *GetMetadataResponseBody
}
func (o *GetMetadataResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetMetadataResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetMetadataResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetMetadataResponse) GetObject() *GetMetadataResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetMetadataChildrenRequest struct {
// the id of the library item to return the children of.
RatingKey float64 `pathParam:"style=simple,explode=false,name=ratingKey"`
}
func (o *GetMetadataChildrenRequest) GetRatingKey() float64 {
if o == nil {
return 0.0
}
return o.RatingKey
}
type GetMetadataChildrenErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetMetadataChildrenErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetMetadataChildrenErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetMetadataChildrenErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetMetadataChildrenResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetMetadataChildrenResponseBody struct {
Errors []GetMetadataChildrenErrors `json:"errors,omitempty"`
}
func (o *GetMetadataChildrenResponseBody) GetErrors() []GetMetadataChildrenErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetMetadataChildrenResponse 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 *GetMetadataChildrenResponseBody
}
func (o *GetMetadataChildrenResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetMetadataChildrenResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetMetadataChildrenResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetMetadataChildrenResponse) GetObject() *GetMetadataChildrenResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,205 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetMyPlexAccountErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetMyPlexAccountErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetMyPlexAccountErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetMyPlexAccountErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetMyPlexAccountServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetMyPlexAccountServerResponseBody struct {
Errors []GetMyPlexAccountErrors `json:"errors,omitempty"`
}
func (o *GetMyPlexAccountServerResponseBody) GetErrors() []GetMyPlexAccountErrors {
if o == nil {
return nil
}
return o.Errors
}
type MyPlex struct {
AuthToken *string `json:"authToken,omitempty"`
Username *string `json:"username,omitempty"`
MappingState *string `json:"mappingState,omitempty"`
MappingError *string `json:"mappingError,omitempty"`
SignInState *string `json:"signInState,omitempty"`
PublicAddress *string `json:"publicAddress,omitempty"`
PublicPort *float64 `json:"publicPort,omitempty"`
PrivateAddress *string `json:"privateAddress,omitempty"`
PrivatePort *float64 `json:"privatePort,omitempty"`
SubscriptionFeatures *string `json:"subscriptionFeatures,omitempty"`
SubscriptionActive *bool `json:"subscriptionActive,omitempty"`
SubscriptionState *string `json:"subscriptionState,omitempty"`
}
func (o *MyPlex) GetAuthToken() *string {
if o == nil {
return nil
}
return o.AuthToken
}
func (o *MyPlex) GetUsername() *string {
if o == nil {
return nil
}
return o.Username
}
func (o *MyPlex) GetMappingState() *string {
if o == nil {
return nil
}
return o.MappingState
}
func (o *MyPlex) GetMappingError() *string {
if o == nil {
return nil
}
return o.MappingError
}
func (o *MyPlex) GetSignInState() *string {
if o == nil {
return nil
}
return o.SignInState
}
func (o *MyPlex) GetPublicAddress() *string {
if o == nil {
return nil
}
return o.PublicAddress
}
func (o *MyPlex) GetPublicPort() *float64 {
if o == nil {
return nil
}
return o.PublicPort
}
func (o *MyPlex) GetPrivateAddress() *string {
if o == nil {
return nil
}
return o.PrivateAddress
}
func (o *MyPlex) GetPrivatePort() *float64 {
if o == nil {
return nil
}
return o.PrivatePort
}
func (o *MyPlex) GetSubscriptionFeatures() *string {
if o == nil {
return nil
}
return o.SubscriptionFeatures
}
func (o *MyPlex) GetSubscriptionActive() *bool {
if o == nil {
return nil
}
return o.SubscriptionActive
}
func (o *MyPlex) GetSubscriptionState() *string {
if o == nil {
return nil
}
return o.SubscriptionState
}
// GetMyPlexAccountResponseBody - MyPlex Account
type GetMyPlexAccountResponseBody struct {
MyPlex *MyPlex `json:"MyPlex,omitempty"`
}
func (o *GetMyPlexAccountResponseBody) GetMyPlex() *MyPlex {
if o == nil {
return nil
}
return o.MyPlex
}
type GetMyPlexAccountResponse 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
// MyPlex Account
TwoHundredApplicationJSONObject *GetMyPlexAccountResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetMyPlexAccountServerResponseBody
}
func (o *GetMyPlexAccountResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetMyPlexAccountResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetMyPlexAccountResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetMyPlexAccountResponse) GetTwoHundredApplicationJSONObject() *GetMyPlexAccountResponseBody {
if o == nil {
return nil
}
return o.TwoHundredApplicationJSONObject
}
func (o *GetMyPlexAccountResponse) GetFourHundredAndOneApplicationJSONObject() *GetMyPlexAccountServerResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -0,0 +1,865 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
"net/http"
"time"
)
type GetOnDeckErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetOnDeckErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetOnDeckErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetOnDeckErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetOnDeckLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetOnDeckLibraryResponseBody struct {
Errors []GetOnDeckErrors `json:"errors,omitempty"`
}
func (o *GetOnDeckLibraryResponseBody) GetErrors() []GetOnDeckErrors {
if o == nil {
return nil
}
return o.Errors
}
type Stream struct {
ID *float64 `json:"id,omitempty"`
StreamType *float64 `json:"streamType,omitempty"`
Default *bool `json:"default,omitempty"`
Codec *string `json:"codec,omitempty"`
Index *float64 `json:"index,omitempty"`
Bitrate *float64 `json:"bitrate,omitempty"`
Language *string `json:"language,omitempty"`
LanguageTag *string `json:"languageTag,omitempty"`
LanguageCode *string `json:"languageCode,omitempty"`
BitDepth *float64 `json:"bitDepth,omitempty"`
ChromaLocation *string `json:"chromaLocation,omitempty"`
ChromaSubsampling *string `json:"chromaSubsampling,omitempty"`
CodedHeight *float64 `json:"codedHeight,omitempty"`
CodedWidth *float64 `json:"codedWidth,omitempty"`
ColorRange *string `json:"colorRange,omitempty"`
FrameRate *float64 `json:"frameRate,omitempty"`
Height *float64 `json:"height,omitempty"`
Level *float64 `json:"level,omitempty"`
Profile *string `json:"profile,omitempty"`
RefFrames *float64 `json:"refFrames,omitempty"`
Width *float64 `json:"width,omitempty"`
DisplayTitle *string `json:"displayTitle,omitempty"`
ExtendedDisplayTitle *string `json:"extendedDisplayTitle,omitempty"`
}
func (o *Stream) GetID() *float64 {
if o == nil {
return nil
}
return o.ID
}
func (o *Stream) GetStreamType() *float64 {
if o == nil {
return nil
}
return o.StreamType
}
func (o *Stream) GetDefault() *bool {
if o == nil {
return nil
}
return o.Default
}
func (o *Stream) GetCodec() *string {
if o == nil {
return nil
}
return o.Codec
}
func (o *Stream) GetIndex() *float64 {
if o == nil {
return nil
}
return o.Index
}
func (o *Stream) GetBitrate() *float64 {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *Stream) GetLanguage() *string {
if o == nil {
return nil
}
return o.Language
}
func (o *Stream) GetLanguageTag() *string {
if o == nil {
return nil
}
return o.LanguageTag
}
func (o *Stream) GetLanguageCode() *string {
if o == nil {
return nil
}
return o.LanguageCode
}
func (o *Stream) GetBitDepth() *float64 {
if o == nil {
return nil
}
return o.BitDepth
}
func (o *Stream) GetChromaLocation() *string {
if o == nil {
return nil
}
return o.ChromaLocation
}
func (o *Stream) GetChromaSubsampling() *string {
if o == nil {
return nil
}
return o.ChromaSubsampling
}
func (o *Stream) GetCodedHeight() *float64 {
if o == nil {
return nil
}
return o.CodedHeight
}
func (o *Stream) GetCodedWidth() *float64 {
if o == nil {
return nil
}
return o.CodedWidth
}
func (o *Stream) GetColorRange() *string {
if o == nil {
return nil
}
return o.ColorRange
}
func (o *Stream) GetFrameRate() *float64 {
if o == nil {
return nil
}
return o.FrameRate
}
func (o *Stream) GetHeight() *float64 {
if o == nil {
return nil
}
return o.Height
}
func (o *Stream) GetLevel() *float64 {
if o == nil {
return nil
}
return o.Level
}
func (o *Stream) GetProfile() *string {
if o == nil {
return nil
}
return o.Profile
}
func (o *Stream) GetRefFrames() *float64 {
if o == nil {
return nil
}
return o.RefFrames
}
func (o *Stream) GetWidth() *float64 {
if o == nil {
return nil
}
return o.Width
}
func (o *Stream) GetDisplayTitle() *string {
if o == nil {
return nil
}
return o.DisplayTitle
}
func (o *Stream) GetExtendedDisplayTitle() *string {
if o == nil {
return nil
}
return o.ExtendedDisplayTitle
}
type GetOnDeckPart struct {
ID *float64 `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
Duration *float64 `json:"duration,omitempty"`
File *string `json:"file,omitempty"`
Size *float64 `json:"size,omitempty"`
AudioProfile *string `json:"audioProfile,omitempty"`
Container *string `json:"container,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
Stream []Stream `json:"Stream,omitempty"`
}
func (o *GetOnDeckPart) GetID() *float64 {
if o == nil {
return nil
}
return o.ID
}
func (o *GetOnDeckPart) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetOnDeckPart) GetDuration() *float64 {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetOnDeckPart) GetFile() *string {
if o == nil {
return nil
}
return o.File
}
func (o *GetOnDeckPart) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetOnDeckPart) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetOnDeckPart) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetOnDeckPart) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *GetOnDeckPart) GetStream() []Stream {
if o == nil {
return nil
}
return o.Stream
}
type GetOnDeckMedia struct {
ID *float64 `json:"id,omitempty"`
Duration *float64 `json:"duration,omitempty"`
Bitrate *float64 `json:"bitrate,omitempty"`
Width *float64 `json:"width,omitempty"`
Height *float64 `json:"height,omitempty"`
AspectRatio *float64 `json:"aspectRatio,omitempty"`
AudioChannels *float64 `json:"audioChannels,omitempty"`
AudioCodec *string `json:"audioCodec,omitempty"`
VideoCodec *string `json:"videoCodec,omitempty"`
VideoResolution *string `json:"videoResolution,omitempty"`
Container *string `json:"container,omitempty"`
VideoFrameRate *string `json:"videoFrameRate,omitempty"`
AudioProfile *string `json:"audioProfile,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
Part []GetOnDeckPart `json:"Part,omitempty"`
}
func (o *GetOnDeckMedia) GetID() *float64 {
if o == nil {
return nil
}
return o.ID
}
func (o *GetOnDeckMedia) GetDuration() *float64 {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetOnDeckMedia) GetBitrate() *float64 {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetOnDeckMedia) GetWidth() *float64 {
if o == nil {
return nil
}
return o.Width
}
func (o *GetOnDeckMedia) GetHeight() *float64 {
if o == nil {
return nil
}
return o.Height
}
func (o *GetOnDeckMedia) GetAspectRatio() *float64 {
if o == nil {
return nil
}
return o.AspectRatio
}
func (o *GetOnDeckMedia) GetAudioChannels() *float64 {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *GetOnDeckMedia) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *GetOnDeckMedia) GetVideoCodec() *string {
if o == nil {
return nil
}
return o.VideoCodec
}
func (o *GetOnDeckMedia) GetVideoResolution() *string {
if o == nil {
return nil
}
return o.VideoResolution
}
func (o *GetOnDeckMedia) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetOnDeckMedia) GetVideoFrameRate() *string {
if o == nil {
return nil
}
return o.VideoFrameRate
}
func (o *GetOnDeckMedia) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetOnDeckMedia) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *GetOnDeckMedia) GetPart() []GetOnDeckPart {
if o == nil {
return nil
}
return o.Part
}
type Guids struct {
ID *string `json:"id,omitempty"`
}
func (o *Guids) GetID() *string {
if o == nil {
return nil
}
return o.ID
}
type GetOnDeckMetadata struct {
AllowSync *bool `json:"allowSync,omitempty"`
LibrarySectionID *float64 `json:"librarySectionID,omitempty"`
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
LibrarySectionUUID *string `json:"librarySectionUUID,omitempty"`
RatingKey *float64 `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
ParentRatingKey *float64 `json:"parentRatingKey,omitempty"`
GrandparentRatingKey *float64 `json:"grandparentRatingKey,omitempty"`
GUID *string `json:"guid,omitempty"`
ParentGUID *string `json:"parentGuid,omitempty"`
GrandparentGUID *string `json:"grandparentGuid,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
GrandparentKey *string `json:"grandparentKey,omitempty"`
ParentKey *string `json:"parentKey,omitempty"`
LibrarySectionKey *string `json:"librarySectionKey,omitempty"`
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
ParentTitle *string `json:"parentTitle,omitempty"`
ContentRating *string `json:"contentRating,omitempty"`
Summary *string `json:"summary,omitempty"`
Index *float64 `json:"index,omitempty"`
ParentIndex *float64 `json:"parentIndex,omitempty"`
LastViewedAt *float64 `json:"lastViewedAt,omitempty"`
Year *float64 `json:"year,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Art *string `json:"art,omitempty"`
ParentThumb *string `json:"parentThumb,omitempty"`
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
GrandparentArt *string `json:"grandparentArt,omitempty"`
GrandparentTheme *string `json:"grandparentTheme,omitempty"`
Duration *float64 `json:"duration,omitempty"`
OriginallyAvailableAt *time.Time `json:"originallyAvailableAt,omitempty"`
AddedAt *float64 `json:"addedAt,omitempty"`
UpdatedAt *float64 `json:"updatedAt,omitempty"`
Media []GetOnDeckMedia `json:"Media,omitempty"`
Guids []Guids `json:"Guid,omitempty"`
}
func (g GetOnDeckMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetOnDeckMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetOnDeckMetadata) GetAllowSync() *bool {
if o == nil {
return nil
}
return o.AllowSync
}
func (o *GetOnDeckMetadata) GetLibrarySectionID() *float64 {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetOnDeckMetadata) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetOnDeckMetadata) GetLibrarySectionUUID() *string {
if o == nil {
return nil
}
return o.LibrarySectionUUID
}
func (o *GetOnDeckMetadata) GetRatingKey() *float64 {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetOnDeckMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetOnDeckMetadata) GetParentRatingKey() *float64 {
if o == nil {
return nil
}
return o.ParentRatingKey
}
func (o *GetOnDeckMetadata) GetGrandparentRatingKey() *float64 {
if o == nil {
return nil
}
return o.GrandparentRatingKey
}
func (o *GetOnDeckMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *GetOnDeckMetadata) GetParentGUID() *string {
if o == nil {
return nil
}
return o.ParentGUID
}
func (o *GetOnDeckMetadata) GetGrandparentGUID() *string {
if o == nil {
return nil
}
return o.GrandparentGUID
}
func (o *GetOnDeckMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetOnDeckMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetOnDeckMetadata) GetGrandparentKey() *string {
if o == nil {
return nil
}
return o.GrandparentKey
}
func (o *GetOnDeckMetadata) GetParentKey() *string {
if o == nil {
return nil
}
return o.ParentKey
}
func (o *GetOnDeckMetadata) GetLibrarySectionKey() *string {
if o == nil {
return nil
}
return o.LibrarySectionKey
}
func (o *GetOnDeckMetadata) GetGrandparentTitle() *string {
if o == nil {
return nil
}
return o.GrandparentTitle
}
func (o *GetOnDeckMetadata) GetParentTitle() *string {
if o == nil {
return nil
}
return o.ParentTitle
}
func (o *GetOnDeckMetadata) GetContentRating() *string {
if o == nil {
return nil
}
return o.ContentRating
}
func (o *GetOnDeckMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *GetOnDeckMetadata) GetIndex() *float64 {
if o == nil {
return nil
}
return o.Index
}
func (o *GetOnDeckMetadata) GetParentIndex() *float64 {
if o == nil {
return nil
}
return o.ParentIndex
}
func (o *GetOnDeckMetadata) GetLastViewedAt() *float64 {
if o == nil {
return nil
}
return o.LastViewedAt
}
func (o *GetOnDeckMetadata) GetYear() *float64 {
if o == nil {
return nil
}
return o.Year
}
func (o *GetOnDeckMetadata) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetOnDeckMetadata) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *GetOnDeckMetadata) GetParentThumb() *string {
if o == nil {
return nil
}
return o.ParentThumb
}
func (o *GetOnDeckMetadata) GetGrandparentThumb() *string {
if o == nil {
return nil
}
return o.GrandparentThumb
}
func (o *GetOnDeckMetadata) GetGrandparentArt() *string {
if o == nil {
return nil
}
return o.GrandparentArt
}
func (o *GetOnDeckMetadata) GetGrandparentTheme() *string {
if o == nil {
return nil
}
return o.GrandparentTheme
}
func (o *GetOnDeckMetadata) GetDuration() *float64 {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetOnDeckMetadata) GetOriginallyAvailableAt() *time.Time {
if o == nil {
return nil
}
return o.OriginallyAvailableAt
}
func (o *GetOnDeckMetadata) GetAddedAt() *float64 {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *GetOnDeckMetadata) GetUpdatedAt() *float64 {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *GetOnDeckMetadata) GetMedia() []GetOnDeckMedia {
if o == nil {
return nil
}
return o.Media
}
func (o *GetOnDeckMetadata) GetGuids() []Guids {
if o == nil {
return nil
}
return o.Guids
}
type GetOnDeckMediaContainer struct {
Size *float64 `json:"size,omitempty"`
AllowSync *bool `json:"allowSync,omitempty"`
Identifier *string `json:"identifier,omitempty"`
MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"`
MediaTagVersion *float64 `json:"mediaTagVersion,omitempty"`
MixedParents *bool `json:"mixedParents,omitempty"`
Metadata []GetOnDeckMetadata `json:"Metadata,omitempty"`
}
func (o *GetOnDeckMediaContainer) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetOnDeckMediaContainer) GetAllowSync() *bool {
if o == nil {
return nil
}
return o.AllowSync
}
func (o *GetOnDeckMediaContainer) GetIdentifier() *string {
if o == nil {
return nil
}
return o.Identifier
}
func (o *GetOnDeckMediaContainer) GetMediaTagPrefix() *string {
if o == nil {
return nil
}
return o.MediaTagPrefix
}
func (o *GetOnDeckMediaContainer) GetMediaTagVersion() *float64 {
if o == nil {
return nil
}
return o.MediaTagVersion
}
func (o *GetOnDeckMediaContainer) GetMixedParents() *bool {
if o == nil {
return nil
}
return o.MixedParents
}
func (o *GetOnDeckMediaContainer) GetMetadata() []GetOnDeckMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// GetOnDeckResponseBody - The on Deck content
type GetOnDeckResponseBody struct {
MediaContainer *GetOnDeckMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetOnDeckResponseBody) GetMediaContainer() *GetOnDeckMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetOnDeckResponse 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
// The on Deck content
TwoHundredApplicationJSONObject *GetOnDeckResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetOnDeckLibraryResponseBody
}
func (o *GetOnDeckResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetOnDeckResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetOnDeckResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetOnDeckResponse) GetTwoHundredApplicationJSONObject() *GetOnDeckResponseBody {
if o == nil {
return nil
}
return o.TwoHundredApplicationJSONObject
}
func (o *GetOnDeckResponse) GetFourHundredAndOneApplicationJSONObject() *GetOnDeckLibraryResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetPlaylistRequest struct {
// the ID of the playlist
PlaylistID float64 `pathParam:"style=simple,explode=false,name=playlistID"`
}
func (o *GetPlaylistRequest) GetPlaylistID() float64 {
if o == nil {
return 0.0
}
return o.PlaylistID
}
type GetPlaylistErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetPlaylistErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetPlaylistErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetPlaylistErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetPlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetPlaylistResponseBody struct {
Errors []GetPlaylistErrors `json:"errors,omitempty"`
}
func (o *GetPlaylistResponseBody) GetErrors() []GetPlaylistErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetPlaylistResponse 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 *GetPlaylistResponseBody
}
func (o *GetPlaylistResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetPlaylistResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetPlaylistResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetPlaylistResponse) GetObject() *GetPlaylistResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,106 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetPlaylistContentsRequest struct {
// the ID of the playlist
PlaylistID float64 `pathParam:"style=simple,explode=false,name=playlistID"`
// the metadata type of the item to return
Type float64 `queryParam:"style=form,explode=true,name=type"`
}
func (o *GetPlaylistContentsRequest) GetPlaylistID() float64 {
if o == nil {
return 0.0
}
return o.PlaylistID
}
func (o *GetPlaylistContentsRequest) GetType() float64 {
if o == nil {
return 0.0
}
return o.Type
}
type GetPlaylistContentsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetPlaylistContentsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetPlaylistContentsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetPlaylistContentsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetPlaylistContentsResponseBody struct {
Errors []GetPlaylistContentsErrors `json:"errors,omitempty"`
}
func (o *GetPlaylistContentsResponseBody) GetErrors() []GetPlaylistContentsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetPlaylistContentsResponse 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 *GetPlaylistContentsResponseBody
}
func (o *GetPlaylistContentsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetPlaylistContentsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetPlaylistContentsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetPlaylistContentsResponse) GetObject() *GetPlaylistContentsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,167 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"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
}
func (e *PlaylistType) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "audio":
fallthrough
case "video":
fallthrough
case "photo":
*e = PlaylistType(v)
return nil
default:
return fmt.Errorf("invalid value for PlaylistType: %v", v)
}
}
// 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
}
func (e *QueryParamSmart) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = QueryParamSmart(v)
return nil
default:
return fmt.Errorf("invalid value for QueryParamSmart: %v", v)
}
}
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 (o *GetPlaylistsRequest) GetPlaylistType() *PlaylistType {
if o == nil {
return nil
}
return o.PlaylistType
}
func (o *GetPlaylistsRequest) GetSmart() *QueryParamSmart {
if o == nil {
return nil
}
return o.Smart
}
type GetPlaylistsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetPlaylistsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetPlaylistsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetPlaylistsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetPlaylistsResponseBody struct {
Errors []GetPlaylistsErrors `json:"errors,omitempty"`
}
func (o *GetPlaylistsResponseBody) GetErrors() []GetPlaylistsErrors {
if o == nil {
return nil
}
return o.Errors
}
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
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetPlaylistsResponseBody
}
func (o *GetPlaylistsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetPlaylistsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetPlaylistsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetPlaylistsResponse) GetObject() *GetPlaylistsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,706 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
"net/http"
"time"
)
type GetRecentlyAddedErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetRecentlyAddedErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetRecentlyAddedErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetRecentlyAddedErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetRecentlyAddedLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetRecentlyAddedLibraryResponseBody struct {
Errors []GetRecentlyAddedErrors `json:"errors,omitempty"`
}
func (o *GetRecentlyAddedLibraryResponseBody) GetErrors() []GetRecentlyAddedErrors {
if o == nil {
return nil
}
return o.Errors
}
type Part struct {
ID *float64 `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
Duration *float64 `json:"duration,omitempty"`
File *string `json:"file,omitempty"`
Size *float64 `json:"size,omitempty"`
Container *string `json:"container,omitempty"`
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
HasThumbnail *float64 `json:"hasThumbnail,omitempty"`
OptimizedForStreaming *bool `json:"optimizedForStreaming,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
}
func (o *Part) GetID() *float64 {
if o == nil {
return nil
}
return o.ID
}
func (o *Part) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *Part) GetDuration() *float64 {
if o == nil {
return nil
}
return o.Duration
}
func (o *Part) GetFile() *string {
if o == nil {
return nil
}
return o.File
}
func (o *Part) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *Part) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *Part) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *Part) GetHasThumbnail() *float64 {
if o == nil {
return nil
}
return o.HasThumbnail
}
func (o *Part) GetOptimizedForStreaming() *bool {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *Part) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
type Media struct {
ID *float64 `json:"id,omitempty"`
Duration *float64 `json:"duration,omitempty"`
Bitrate *float64 `json:"bitrate,omitempty"`
Width *float64 `json:"width,omitempty"`
Height *float64 `json:"height,omitempty"`
AspectRatio *float64 `json:"aspectRatio,omitempty"`
AudioChannels *float64 `json:"audioChannels,omitempty"`
AudioCodec *string `json:"audioCodec,omitempty"`
VideoCodec *string `json:"videoCodec,omitempty"`
VideoResolution *float64 `json:"videoResolution,omitempty"`
Container *string `json:"container,omitempty"`
VideoFrameRate *string `json:"videoFrameRate,omitempty"`
OptimizedForStreaming *float64 `json:"optimizedForStreaming,omitempty"`
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
Part []Part `json:"Part,omitempty"`
}
func (o *Media) GetID() *float64 {
if o == nil {
return nil
}
return o.ID
}
func (o *Media) GetDuration() *float64 {
if o == nil {
return nil
}
return o.Duration
}
func (o *Media) GetBitrate() *float64 {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *Media) GetWidth() *float64 {
if o == nil {
return nil
}
return o.Width
}
func (o *Media) GetHeight() *float64 {
if o == nil {
return nil
}
return o.Height
}
func (o *Media) GetAspectRatio() *float64 {
if o == nil {
return nil
}
return o.AspectRatio
}
func (o *Media) GetAudioChannels() *float64 {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *Media) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *Media) GetVideoCodec() *string {
if o == nil {
return nil
}
return o.VideoCodec
}
func (o *Media) GetVideoResolution() *float64 {
if o == nil {
return nil
}
return o.VideoResolution
}
func (o *Media) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *Media) GetVideoFrameRate() *string {
if o == nil {
return nil
}
return o.VideoFrameRate
}
func (o *Media) GetOptimizedForStreaming() *float64 {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *Media) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *Media) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *Media) GetPart() []Part {
if o == nil {
return nil
}
return o.Part
}
type Genre struct {
Tag *string `json:"tag,omitempty"`
}
func (o *Genre) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type Director struct {
Tag *string `json:"tag,omitempty"`
}
func (o *Director) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type Writer struct {
Tag *string `json:"tag,omitempty"`
}
func (o *Writer) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type Country struct {
Tag *string `json:"tag,omitempty"`
}
func (o *Country) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type Role struct {
Tag *string `json:"tag,omitempty"`
}
func (o *Role) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type Metadata struct {
AllowSync *bool `json:"allowSync,omitempty"`
LibrarySectionID *float64 `json:"librarySectionID,omitempty"`
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
LibrarySectionUUID *string `json:"librarySectionUUID,omitempty"`
RatingKey *float64 `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Studio *string `json:"studio,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
ContentRating *string `json:"contentRating,omitempty"`
Summary *string `json:"summary,omitempty"`
Rating *float64 `json:"rating,omitempty"`
AudienceRating *float64 `json:"audienceRating,omitempty"`
Year *float64 `json:"year,omitempty"`
Tagline *string `json:"tagline,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Art *string `json:"art,omitempty"`
Duration *float64 `json:"duration,omitempty"`
OriginallyAvailableAt *time.Time `json:"originallyAvailableAt,omitempty"`
AddedAt *float64 `json:"addedAt,omitempty"`
UpdatedAt *float64 `json:"updatedAt,omitempty"`
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
ChapterSource *string `json:"chapterSource,omitempty"`
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
RatingImage *string `json:"ratingImage,omitempty"`
Media []Media `json:"Media,omitempty"`
Genre []Genre `json:"Genre,omitempty"`
Director []Director `json:"Director,omitempty"`
Writer []Writer `json:"Writer,omitempty"`
Country []Country `json:"Country,omitempty"`
Role []Role `json:"Role,omitempty"`
}
func (m Metadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(m, "", false)
}
func (m *Metadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &m, "", false, false); err != nil {
return err
}
return nil
}
func (o *Metadata) GetAllowSync() *bool {
if o == nil {
return nil
}
return o.AllowSync
}
func (o *Metadata) GetLibrarySectionID() *float64 {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *Metadata) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *Metadata) GetLibrarySectionUUID() *string {
if o == nil {
return nil
}
return o.LibrarySectionUUID
}
func (o *Metadata) GetRatingKey() *float64 {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *Metadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *Metadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *Metadata) GetStudio() *string {
if o == nil {
return nil
}
return o.Studio
}
func (o *Metadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *Metadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *Metadata) GetContentRating() *string {
if o == nil {
return nil
}
return o.ContentRating
}
func (o *Metadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *Metadata) GetRating() *float64 {
if o == nil {
return nil
}
return o.Rating
}
func (o *Metadata) GetAudienceRating() *float64 {
if o == nil {
return nil
}
return o.AudienceRating
}
func (o *Metadata) GetYear() *float64 {
if o == nil {
return nil
}
return o.Year
}
func (o *Metadata) GetTagline() *string {
if o == nil {
return nil
}
return o.Tagline
}
func (o *Metadata) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *Metadata) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *Metadata) GetDuration() *float64 {
if o == nil {
return nil
}
return o.Duration
}
func (o *Metadata) GetOriginallyAvailableAt() *time.Time {
if o == nil {
return nil
}
return o.OriginallyAvailableAt
}
func (o *Metadata) GetAddedAt() *float64 {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *Metadata) GetUpdatedAt() *float64 {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *Metadata) GetAudienceRatingImage() *string {
if o == nil {
return nil
}
return o.AudienceRatingImage
}
func (o *Metadata) GetChapterSource() *string {
if o == nil {
return nil
}
return o.ChapterSource
}
func (o *Metadata) GetPrimaryExtraKey() *string {
if o == nil {
return nil
}
return o.PrimaryExtraKey
}
func (o *Metadata) GetRatingImage() *string {
if o == nil {
return nil
}
return o.RatingImage
}
func (o *Metadata) GetMedia() []Media {
if o == nil {
return nil
}
return o.Media
}
func (o *Metadata) GetGenre() []Genre {
if o == nil {
return nil
}
return o.Genre
}
func (o *Metadata) GetDirector() []Director {
if o == nil {
return nil
}
return o.Director
}
func (o *Metadata) GetWriter() []Writer {
if o == nil {
return nil
}
return o.Writer
}
func (o *Metadata) GetCountry() []Country {
if o == nil {
return nil
}
return o.Country
}
func (o *Metadata) GetRole() []Role {
if o == nil {
return nil
}
return o.Role
}
type GetRecentlyAddedMediaContainer struct {
Size *float64 `json:"size,omitempty"`
AllowSync *bool `json:"allowSync,omitempty"`
Identifier *string `json:"identifier,omitempty"`
MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"`
MediaTagVersion *float64 `json:"mediaTagVersion,omitempty"`
MixedParents *bool `json:"mixedParents,omitempty"`
Metadata []Metadata `json:"Metadata,omitempty"`
}
func (o *GetRecentlyAddedMediaContainer) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetRecentlyAddedMediaContainer) GetAllowSync() *bool {
if o == nil {
return nil
}
return o.AllowSync
}
func (o *GetRecentlyAddedMediaContainer) GetIdentifier() *string {
if o == nil {
return nil
}
return o.Identifier
}
func (o *GetRecentlyAddedMediaContainer) GetMediaTagPrefix() *string {
if o == nil {
return nil
}
return o.MediaTagPrefix
}
func (o *GetRecentlyAddedMediaContainer) GetMediaTagVersion() *float64 {
if o == nil {
return nil
}
return o.MediaTagVersion
}
func (o *GetRecentlyAddedMediaContainer) GetMixedParents() *bool {
if o == nil {
return nil
}
return o.MixedParents
}
func (o *GetRecentlyAddedMediaContainer) GetMetadata() []Metadata {
if o == nil {
return nil
}
return o.Metadata
}
// GetRecentlyAddedResponseBody - The recently added content
type GetRecentlyAddedResponseBody struct {
MediaContainer *GetRecentlyAddedMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetRecentlyAddedResponseBody) GetMediaContainer() *GetRecentlyAddedMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetRecentlyAddedResponse 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
// The recently added content
TwoHundredApplicationJSONObject *GetRecentlyAddedResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetRecentlyAddedLibraryResponseBody
}
func (o *GetRecentlyAddedResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetRecentlyAddedResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetRecentlyAddedResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetRecentlyAddedResponse) GetTwoHundredApplicationJSONObject() *GetRecentlyAddedResponseBody {
if o == nil {
return nil
}
return o.TwoHundredApplicationJSONObject
}
func (o *GetRecentlyAddedResponse) GetFourHundredAndOneApplicationJSONObject() *GetRecentlyAddedLibraryResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -0,0 +1,221 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
"net/http"
)
// MinSize - images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against.
type MinSize int64
const (
MinSizeZero MinSize = 0
MinSizeOne MinSize = 1
)
func (e MinSize) ToPointer() *MinSize {
return &e
}
func (e *MinSize) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = MinSize(v)
return nil
default:
return fmt.Errorf("invalid value for MinSize: %v", v)
}
}
// Upscale - allow images to be resized beyond native dimensions.
type Upscale int64
const (
UpscaleZero Upscale = 0
UpscaleOne Upscale = 1
)
func (e Upscale) ToPointer() *Upscale {
return &e
}
func (e *Upscale) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = Upscale(v)
return nil
default:
return fmt.Errorf("invalid value for Upscale: %v", v)
}
}
type GetResizedPhotoRequest struct {
// The width for the resized photo
Width float64 `queryParam:"style=form,explode=true,name=width"`
// The height for the resized photo
Height float64 `queryParam:"style=form,explode=true,name=height"`
// The opacity for the resized photo
Opacity int64 `default:"100" queryParam:"style=form,explode=true,name=opacity"`
// The width for the resized photo
Blur float64 `queryParam:"style=form,explode=true,name=blur"`
// images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against.
MinSize MinSize `queryParam:"style=form,explode=true,name=minSize"`
// allow images to be resized beyond native dimensions.
Upscale Upscale `queryParam:"style=form,explode=true,name=upscale"`
// path to image within Plex
URL string `queryParam:"style=form,explode=true,name=url"`
}
func (g GetResizedPhotoRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetResizedPhotoRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetResizedPhotoRequest) GetWidth() float64 {
if o == nil {
return 0.0
}
return o.Width
}
func (o *GetResizedPhotoRequest) GetHeight() float64 {
if o == nil {
return 0.0
}
return o.Height
}
func (o *GetResizedPhotoRequest) GetOpacity() int64 {
if o == nil {
return 0
}
return o.Opacity
}
func (o *GetResizedPhotoRequest) GetBlur() float64 {
if o == nil {
return 0.0
}
return o.Blur
}
func (o *GetResizedPhotoRequest) GetMinSize() MinSize {
if o == nil {
return MinSize(0)
}
return o.MinSize
}
func (o *GetResizedPhotoRequest) GetUpscale() Upscale {
if o == nil {
return Upscale(0)
}
return o.Upscale
}
func (o *GetResizedPhotoRequest) GetURL() string {
if o == nil {
return ""
}
return o.URL
}
type GetResizedPhotoErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetResizedPhotoErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetResizedPhotoErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetResizedPhotoErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetResizedPhotoResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetResizedPhotoResponseBody struct {
Errors []GetResizedPhotoErrors `json:"errors,omitempty"`
}
func (o *GetResizedPhotoResponseBody) GetErrors() []GetResizedPhotoErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetResizedPhotoResponse 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 *GetResizedPhotoResponseBody
}
func (o *GetResizedPhotoResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetResizedPhotoResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetResizedPhotoResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetResizedPhotoResponse) GetObject() *GetResizedPhotoResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,729 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
"net/http"
"time"
)
type GetSearchResultsRequest struct {
// The search query string to use
Query string `queryParam:"style=form,explode=true,name=query"`
}
func (o *GetSearchResultsRequest) GetQuery() string {
if o == nil {
return ""
}
return o.Query
}
type GetSearchResultsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetSearchResultsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetSearchResultsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetSearchResultsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetSearchResultsSearchResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetSearchResultsSearchResponseBody struct {
Errors []GetSearchResultsErrors `json:"errors,omitempty"`
}
func (o *GetSearchResultsSearchResponseBody) GetErrors() []GetSearchResultsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetSearchResultsPart struct {
ID *float64 `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
Duration *float64 `json:"duration,omitempty"`
File *string `json:"file,omitempty"`
Size *float64 `json:"size,omitempty"`
AudioProfile *string `json:"audioProfile,omitempty"`
Container *string `json:"container,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
}
func (o *GetSearchResultsPart) GetID() *float64 {
if o == nil {
return nil
}
return o.ID
}
func (o *GetSearchResultsPart) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetSearchResultsPart) GetDuration() *float64 {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetSearchResultsPart) GetFile() *string {
if o == nil {
return nil
}
return o.File
}
func (o *GetSearchResultsPart) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetSearchResultsPart) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetSearchResultsPart) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetSearchResultsPart) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
type GetSearchResultsMedia struct {
ID *float64 `json:"id,omitempty"`
Duration *float64 `json:"duration,omitempty"`
Bitrate *float64 `json:"bitrate,omitempty"`
Width *float64 `json:"width,omitempty"`
Height *float64 `json:"height,omitempty"`
AspectRatio *float64 `json:"aspectRatio,omitempty"`
AudioChannels *float64 `json:"audioChannels,omitempty"`
AudioCodec *string `json:"audioCodec,omitempty"`
VideoCodec *string `json:"videoCodec,omitempty"`
VideoResolution *float64 `json:"videoResolution,omitempty"`
Container *string `json:"container,omitempty"`
VideoFrameRate *string `json:"videoFrameRate,omitempty"`
AudioProfile *string `json:"audioProfile,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
Part []GetSearchResultsPart `json:"Part,omitempty"`
}
func (o *GetSearchResultsMedia) GetID() *float64 {
if o == nil {
return nil
}
return o.ID
}
func (o *GetSearchResultsMedia) GetDuration() *float64 {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetSearchResultsMedia) GetBitrate() *float64 {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetSearchResultsMedia) GetWidth() *float64 {
if o == nil {
return nil
}
return o.Width
}
func (o *GetSearchResultsMedia) GetHeight() *float64 {
if o == nil {
return nil
}
return o.Height
}
func (o *GetSearchResultsMedia) GetAspectRatio() *float64 {
if o == nil {
return nil
}
return o.AspectRatio
}
func (o *GetSearchResultsMedia) GetAudioChannels() *float64 {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *GetSearchResultsMedia) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *GetSearchResultsMedia) GetVideoCodec() *string {
if o == nil {
return nil
}
return o.VideoCodec
}
func (o *GetSearchResultsMedia) GetVideoResolution() *float64 {
if o == nil {
return nil
}
return o.VideoResolution
}
func (o *GetSearchResultsMedia) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetSearchResultsMedia) GetVideoFrameRate() *string {
if o == nil {
return nil
}
return o.VideoFrameRate
}
func (o *GetSearchResultsMedia) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetSearchResultsMedia) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *GetSearchResultsMedia) GetPart() []GetSearchResultsPart {
if o == nil {
return nil
}
return o.Part
}
type GetSearchResultsGenre struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetSearchResultsGenre) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetSearchResultsDirector struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetSearchResultsDirector) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetSearchResultsWriter struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetSearchResultsWriter) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetSearchResultsCountry struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetSearchResultsCountry) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetSearchResultsRole struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetSearchResultsRole) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetSearchResultsMetadata struct {
AllowSync *bool `json:"allowSync,omitempty"`
LibrarySectionID *float64 `json:"librarySectionID,omitempty"`
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
LibrarySectionUUID *string `json:"librarySectionUUID,omitempty"`
Personal *bool `json:"personal,omitempty"`
SourceTitle *string `json:"sourceTitle,omitempty"`
RatingKey *float64 `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Studio *string `json:"studio,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
ContentRating *string `json:"contentRating,omitempty"`
Summary *string `json:"summary,omitempty"`
Rating *float64 `json:"rating,omitempty"`
AudienceRating *float64 `json:"audienceRating,omitempty"`
Year *float64 `json:"year,omitempty"`
Tagline *string `json:"tagline,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Art *string `json:"art,omitempty"`
Duration *float64 `json:"duration,omitempty"`
OriginallyAvailableAt *time.Time `json:"originallyAvailableAt,omitempty"`
AddedAt *float64 `json:"addedAt,omitempty"`
UpdatedAt *float64 `json:"updatedAt,omitempty"`
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
ChapterSource *string `json:"chapterSource,omitempty"`
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
RatingImage *string `json:"ratingImage,omitempty"`
Media []GetSearchResultsMedia `json:"Media,omitempty"`
Genre []GetSearchResultsGenre `json:"Genre,omitempty"`
Director []GetSearchResultsDirector `json:"Director,omitempty"`
Writer []GetSearchResultsWriter `json:"Writer,omitempty"`
Country []GetSearchResultsCountry `json:"Country,omitempty"`
Role []GetSearchResultsRole `json:"Role,omitempty"`
}
func (g GetSearchResultsMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetSearchResultsMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetSearchResultsMetadata) GetAllowSync() *bool {
if o == nil {
return nil
}
return o.AllowSync
}
func (o *GetSearchResultsMetadata) GetLibrarySectionID() *float64 {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetSearchResultsMetadata) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetSearchResultsMetadata) GetLibrarySectionUUID() *string {
if o == nil {
return nil
}
return o.LibrarySectionUUID
}
func (o *GetSearchResultsMetadata) GetPersonal() *bool {
if o == nil {
return nil
}
return o.Personal
}
func (o *GetSearchResultsMetadata) GetSourceTitle() *string {
if o == nil {
return nil
}
return o.SourceTitle
}
func (o *GetSearchResultsMetadata) GetRatingKey() *float64 {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetSearchResultsMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetSearchResultsMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *GetSearchResultsMetadata) GetStudio() *string {
if o == nil {
return nil
}
return o.Studio
}
func (o *GetSearchResultsMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetSearchResultsMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetSearchResultsMetadata) GetContentRating() *string {
if o == nil {
return nil
}
return o.ContentRating
}
func (o *GetSearchResultsMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *GetSearchResultsMetadata) GetRating() *float64 {
if o == nil {
return nil
}
return o.Rating
}
func (o *GetSearchResultsMetadata) GetAudienceRating() *float64 {
if o == nil {
return nil
}
return o.AudienceRating
}
func (o *GetSearchResultsMetadata) GetYear() *float64 {
if o == nil {
return nil
}
return o.Year
}
func (o *GetSearchResultsMetadata) GetTagline() *string {
if o == nil {
return nil
}
return o.Tagline
}
func (o *GetSearchResultsMetadata) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetSearchResultsMetadata) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *GetSearchResultsMetadata) GetDuration() *float64 {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetSearchResultsMetadata) GetOriginallyAvailableAt() *time.Time {
if o == nil {
return nil
}
return o.OriginallyAvailableAt
}
func (o *GetSearchResultsMetadata) GetAddedAt() *float64 {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *GetSearchResultsMetadata) GetUpdatedAt() *float64 {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *GetSearchResultsMetadata) GetAudienceRatingImage() *string {
if o == nil {
return nil
}
return o.AudienceRatingImage
}
func (o *GetSearchResultsMetadata) GetChapterSource() *string {
if o == nil {
return nil
}
return o.ChapterSource
}
func (o *GetSearchResultsMetadata) GetPrimaryExtraKey() *string {
if o == nil {
return nil
}
return o.PrimaryExtraKey
}
func (o *GetSearchResultsMetadata) GetRatingImage() *string {
if o == nil {
return nil
}
return o.RatingImage
}
func (o *GetSearchResultsMetadata) GetMedia() []GetSearchResultsMedia {
if o == nil {
return nil
}
return o.Media
}
func (o *GetSearchResultsMetadata) GetGenre() []GetSearchResultsGenre {
if o == nil {
return nil
}
return o.Genre
}
func (o *GetSearchResultsMetadata) GetDirector() []GetSearchResultsDirector {
if o == nil {
return nil
}
return o.Director
}
func (o *GetSearchResultsMetadata) GetWriter() []GetSearchResultsWriter {
if o == nil {
return nil
}
return o.Writer
}
func (o *GetSearchResultsMetadata) GetCountry() []GetSearchResultsCountry {
if o == nil {
return nil
}
return o.Country
}
func (o *GetSearchResultsMetadata) GetRole() []GetSearchResultsRole {
if o == nil {
return nil
}
return o.Role
}
type Provider struct {
Key *string `json:"key,omitempty"`
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
}
func (o *Provider) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *Provider) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *Provider) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
type GetSearchResultsMediaContainer struct {
Size *float64 `json:"size,omitempty"`
Identifier *string `json:"identifier,omitempty"`
MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"`
MediaTagVersion *float64 `json:"mediaTagVersion,omitempty"`
Metadata []GetSearchResultsMetadata `json:"Metadata,omitempty"`
Provider []Provider `json:"Provider,omitempty"`
}
func (o *GetSearchResultsMediaContainer) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetSearchResultsMediaContainer) GetIdentifier() *string {
if o == nil {
return nil
}
return o.Identifier
}
func (o *GetSearchResultsMediaContainer) GetMediaTagPrefix() *string {
if o == nil {
return nil
}
return o.MediaTagPrefix
}
func (o *GetSearchResultsMediaContainer) GetMediaTagVersion() *float64 {
if o == nil {
return nil
}
return o.MediaTagVersion
}
func (o *GetSearchResultsMediaContainer) GetMetadata() []GetSearchResultsMetadata {
if o == nil {
return nil
}
return o.Metadata
}
func (o *GetSearchResultsMediaContainer) GetProvider() []Provider {
if o == nil {
return nil
}
return o.Provider
}
// GetSearchResultsResponseBody - Search Results
type GetSearchResultsResponseBody struct {
MediaContainer *GetSearchResultsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetSearchResultsResponseBody) GetMediaContainer() *GetSearchResultsMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetSearchResultsResponse 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
// Search Results
TwoHundredApplicationJSONObject *GetSearchResultsResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetSearchResultsSearchResponseBody
}
func (o *GetSearchResultsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetSearchResultsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetSearchResultsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetSearchResultsResponse) GetTwoHundredApplicationJSONObject() *GetSearchResultsResponseBody {
if o == nil {
return nil
}
return o.TwoHundredApplicationJSONObject
}
func (o *GetSearchResultsResponse) GetFourHundredAndOneApplicationJSONObject() *GetSearchResultsSearchResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -0,0 +1,203 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetServerActivitiesErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetServerActivitiesErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetServerActivitiesErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetServerActivitiesErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetServerActivitiesActivitiesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetServerActivitiesActivitiesResponseBody struct {
Errors []GetServerActivitiesErrors `json:"errors,omitempty"`
}
func (o *GetServerActivitiesActivitiesResponseBody) GetErrors() []GetServerActivitiesErrors {
if o == nil {
return nil
}
return o.Errors
}
type Context struct {
LibrarySectionID *string `json:"librarySectionID,omitempty"`
}
func (o *Context) GetLibrarySectionID() *string {
if o == nil {
return nil
}
return o.LibrarySectionID
}
type Activity struct {
UUID *string `json:"uuid,omitempty"`
Type *string `json:"type,omitempty"`
Cancellable *bool `json:"cancellable,omitempty"`
UserID *float64 `json:"userID,omitempty"`
Title *string `json:"title,omitempty"`
Subtitle *string `json:"subtitle,omitempty"`
Progress *float64 `json:"progress,omitempty"`
Context *Context `json:"Context,omitempty"`
}
func (o *Activity) GetUUID() *string {
if o == nil {
return nil
}
return o.UUID
}
func (o *Activity) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *Activity) GetCancellable() *bool {
if o == nil {
return nil
}
return o.Cancellable
}
func (o *Activity) GetUserID() *float64 {
if o == nil {
return nil
}
return o.UserID
}
func (o *Activity) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *Activity) GetSubtitle() *string {
if o == nil {
return nil
}
return o.Subtitle
}
func (o *Activity) GetProgress() *float64 {
if o == nil {
return nil
}
return o.Progress
}
func (o *Activity) GetContext() *Context {
if o == nil {
return nil
}
return o.Context
}
type GetServerActivitiesMediaContainer struct {
Size *float64 `json:"size,omitempty"`
Activity []Activity `json:"Activity,omitempty"`
}
func (o *GetServerActivitiesMediaContainer) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetServerActivitiesMediaContainer) GetActivity() []Activity {
if o == nil {
return nil
}
return o.Activity
}
// GetServerActivitiesResponseBody - The Server Activities
type GetServerActivitiesResponseBody struct {
MediaContainer *GetServerActivitiesMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetServerActivitiesResponseBody) GetMediaContainer() *GetServerActivitiesMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetServerActivitiesResponse 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
// The Server Activities
TwoHundredApplicationJSONObject *GetServerActivitiesResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetServerActivitiesActivitiesResponseBody
}
func (o *GetServerActivitiesResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetServerActivitiesResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetServerActivitiesResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetServerActivitiesResponse) GetTwoHundredApplicationJSONObject() *GetServerActivitiesResponseBody {
if o == nil {
return nil
}
return o.TwoHundredApplicationJSONObject
}
func (o *GetServerActivitiesResponse) GetFourHundredAndOneApplicationJSONObject() *GetServerActivitiesActivitiesResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -0,0 +1,544 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type Errors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *Errors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *Errors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *Errors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetServerCapabilitiesServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetServerCapabilitiesServerResponseBody struct {
Errors []Errors `json:"errors,omitempty"`
}
func (o *GetServerCapabilitiesServerResponseBody) GetErrors() []Errors {
if o == nil {
return nil
}
return o.Errors
}
type Directory struct {
Count *float64 `json:"count,omitempty"`
Key *string `json:"key,omitempty"`
Title *string `json:"title,omitempty"`
}
func (o *Directory) GetCount() *float64 {
if o == nil {
return nil
}
return o.Count
}
func (o *Directory) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *Directory) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
type MediaContainer struct {
Size *float64 `json:"size,omitempty"`
AllowCameraUpload *bool `json:"allowCameraUpload,omitempty"`
AllowChannelAccess *bool `json:"allowChannelAccess,omitempty"`
AllowMediaDeletion *bool `json:"allowMediaDeletion,omitempty"`
AllowSharing *bool `json:"allowSharing,omitempty"`
AllowSync *bool `json:"allowSync,omitempty"`
AllowTuners *bool `json:"allowTuners,omitempty"`
BackgroundProcessing *bool `json:"backgroundProcessing,omitempty"`
Certificate *bool `json:"certificate,omitempty"`
CompanionProxy *bool `json:"companionProxy,omitempty"`
CountryCode *string `json:"countryCode,omitempty"`
Diagnostics *string `json:"diagnostics,omitempty"`
EventStream *bool `json:"eventStream,omitempty"`
FriendlyName *string `json:"friendlyName,omitempty"`
HubSearch *bool `json:"hubSearch,omitempty"`
ItemClusters *bool `json:"itemClusters,omitempty"`
Livetv *float64 `json:"livetv,omitempty"`
MachineIdentifier *string `json:"machineIdentifier,omitempty"`
MediaProviders *bool `json:"mediaProviders,omitempty"`
Multiuser *bool `json:"multiuser,omitempty"`
MusicAnalysis *float64 `json:"musicAnalysis,omitempty"`
MyPlex *bool `json:"myPlex,omitempty"`
MyPlexMappingState *string `json:"myPlexMappingState,omitempty"`
MyPlexSigninState *string `json:"myPlexSigninState,omitempty"`
MyPlexSubscription *bool `json:"myPlexSubscription,omitempty"`
MyPlexUsername *string `json:"myPlexUsername,omitempty"`
OfflineTranscode *float64 `json:"offlineTranscode,omitempty"`
OwnerFeatures *string `json:"ownerFeatures,omitempty"`
PhotoAutoTag *bool `json:"photoAutoTag,omitempty"`
Platform *string `json:"platform,omitempty"`
PlatformVersion *string `json:"platformVersion,omitempty"`
PluginHost *bool `json:"pluginHost,omitempty"`
PushNotifications *bool `json:"pushNotifications,omitempty"`
ReadOnlyLibraries *bool `json:"readOnlyLibraries,omitempty"`
StreamingBrainABRVersion *float64 `json:"streamingBrainABRVersion,omitempty"`
StreamingBrainVersion *float64 `json:"streamingBrainVersion,omitempty"`
Sync *bool `json:"sync,omitempty"`
TranscoderActiveVideoSessions *float64 `json:"transcoderActiveVideoSessions,omitempty"`
TranscoderAudio *bool `json:"transcoderAudio,omitempty"`
TranscoderLyrics *bool `json:"transcoderLyrics,omitempty"`
TranscoderPhoto *bool `json:"transcoderPhoto,omitempty"`
TranscoderSubtitles *bool `json:"transcoderSubtitles,omitempty"`
TranscoderVideo *bool `json:"transcoderVideo,omitempty"`
TranscoderVideoBitrates *string `json:"transcoderVideoBitrates,omitempty"`
TranscoderVideoQualities *string `json:"transcoderVideoQualities,omitempty"`
TranscoderVideoResolutions *string `json:"transcoderVideoResolutions,omitempty"`
UpdatedAt *float64 `json:"updatedAt,omitempty"`
Updater *bool `json:"updater,omitempty"`
Version *string `json:"version,omitempty"`
VoiceSearch *bool `json:"voiceSearch,omitempty"`
Directory []Directory `json:"Directory,omitempty"`
}
func (o *MediaContainer) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *MediaContainer) GetAllowCameraUpload() *bool {
if o == nil {
return nil
}
return o.AllowCameraUpload
}
func (o *MediaContainer) GetAllowChannelAccess() *bool {
if o == nil {
return nil
}
return o.AllowChannelAccess
}
func (o *MediaContainer) GetAllowMediaDeletion() *bool {
if o == nil {
return nil
}
return o.AllowMediaDeletion
}
func (o *MediaContainer) GetAllowSharing() *bool {
if o == nil {
return nil
}
return o.AllowSharing
}
func (o *MediaContainer) GetAllowSync() *bool {
if o == nil {
return nil
}
return o.AllowSync
}
func (o *MediaContainer) GetAllowTuners() *bool {
if o == nil {
return nil
}
return o.AllowTuners
}
func (o *MediaContainer) GetBackgroundProcessing() *bool {
if o == nil {
return nil
}
return o.BackgroundProcessing
}
func (o *MediaContainer) GetCertificate() *bool {
if o == nil {
return nil
}
return o.Certificate
}
func (o *MediaContainer) GetCompanionProxy() *bool {
if o == nil {
return nil
}
return o.CompanionProxy
}
func (o *MediaContainer) GetCountryCode() *string {
if o == nil {
return nil
}
return o.CountryCode
}
func (o *MediaContainer) GetDiagnostics() *string {
if o == nil {
return nil
}
return o.Diagnostics
}
func (o *MediaContainer) GetEventStream() *bool {
if o == nil {
return nil
}
return o.EventStream
}
func (o *MediaContainer) GetFriendlyName() *string {
if o == nil {
return nil
}
return o.FriendlyName
}
func (o *MediaContainer) GetHubSearch() *bool {
if o == nil {
return nil
}
return o.HubSearch
}
func (o *MediaContainer) GetItemClusters() *bool {
if o == nil {
return nil
}
return o.ItemClusters
}
func (o *MediaContainer) GetLivetv() *float64 {
if o == nil {
return nil
}
return o.Livetv
}
func (o *MediaContainer) GetMachineIdentifier() *string {
if o == nil {
return nil
}
return o.MachineIdentifier
}
func (o *MediaContainer) GetMediaProviders() *bool {
if o == nil {
return nil
}
return o.MediaProviders
}
func (o *MediaContainer) GetMultiuser() *bool {
if o == nil {
return nil
}
return o.Multiuser
}
func (o *MediaContainer) GetMusicAnalysis() *float64 {
if o == nil {
return nil
}
return o.MusicAnalysis
}
func (o *MediaContainer) GetMyPlex() *bool {
if o == nil {
return nil
}
return o.MyPlex
}
func (o *MediaContainer) GetMyPlexMappingState() *string {
if o == nil {
return nil
}
return o.MyPlexMappingState
}
func (o *MediaContainer) GetMyPlexSigninState() *string {
if o == nil {
return nil
}
return o.MyPlexSigninState
}
func (o *MediaContainer) GetMyPlexSubscription() *bool {
if o == nil {
return nil
}
return o.MyPlexSubscription
}
func (o *MediaContainer) GetMyPlexUsername() *string {
if o == nil {
return nil
}
return o.MyPlexUsername
}
func (o *MediaContainer) GetOfflineTranscode() *float64 {
if o == nil {
return nil
}
return o.OfflineTranscode
}
func (o *MediaContainer) GetOwnerFeatures() *string {
if o == nil {
return nil
}
return o.OwnerFeatures
}
func (o *MediaContainer) GetPhotoAutoTag() *bool {
if o == nil {
return nil
}
return o.PhotoAutoTag
}
func (o *MediaContainer) GetPlatform() *string {
if o == nil {
return nil
}
return o.Platform
}
func (o *MediaContainer) GetPlatformVersion() *string {
if o == nil {
return nil
}
return o.PlatformVersion
}
func (o *MediaContainer) GetPluginHost() *bool {
if o == nil {
return nil
}
return o.PluginHost
}
func (o *MediaContainer) GetPushNotifications() *bool {
if o == nil {
return nil
}
return o.PushNotifications
}
func (o *MediaContainer) GetReadOnlyLibraries() *bool {
if o == nil {
return nil
}
return o.ReadOnlyLibraries
}
func (o *MediaContainer) GetStreamingBrainABRVersion() *float64 {
if o == nil {
return nil
}
return o.StreamingBrainABRVersion
}
func (o *MediaContainer) GetStreamingBrainVersion() *float64 {
if o == nil {
return nil
}
return o.StreamingBrainVersion
}
func (o *MediaContainer) GetSync() *bool {
if o == nil {
return nil
}
return o.Sync
}
func (o *MediaContainer) GetTranscoderActiveVideoSessions() *float64 {
if o == nil {
return nil
}
return o.TranscoderActiveVideoSessions
}
func (o *MediaContainer) GetTranscoderAudio() *bool {
if o == nil {
return nil
}
return o.TranscoderAudio
}
func (o *MediaContainer) GetTranscoderLyrics() *bool {
if o == nil {
return nil
}
return o.TranscoderLyrics
}
func (o *MediaContainer) GetTranscoderPhoto() *bool {
if o == nil {
return nil
}
return o.TranscoderPhoto
}
func (o *MediaContainer) GetTranscoderSubtitles() *bool {
if o == nil {
return nil
}
return o.TranscoderSubtitles
}
func (o *MediaContainer) GetTranscoderVideo() *bool {
if o == nil {
return nil
}
return o.TranscoderVideo
}
func (o *MediaContainer) GetTranscoderVideoBitrates() *string {
if o == nil {
return nil
}
return o.TranscoderVideoBitrates
}
func (o *MediaContainer) GetTranscoderVideoQualities() *string {
if o == nil {
return nil
}
return o.TranscoderVideoQualities
}
func (o *MediaContainer) GetTranscoderVideoResolutions() *string {
if o == nil {
return nil
}
return o.TranscoderVideoResolutions
}
func (o *MediaContainer) GetUpdatedAt() *float64 {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *MediaContainer) GetUpdater() *bool {
if o == nil {
return nil
}
return o.Updater
}
func (o *MediaContainer) GetVersion() *string {
if o == nil {
return nil
}
return o.Version
}
func (o *MediaContainer) GetVoiceSearch() *bool {
if o == nil {
return nil
}
return o.VoiceSearch
}
func (o *MediaContainer) GetDirectory() []Directory {
if o == nil {
return nil
}
return o.Directory
}
// GetServerCapabilitiesResponseBody - The Server Capabilities
type GetServerCapabilitiesResponseBody struct {
MediaContainer *MediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetServerCapabilitiesResponseBody) GetMediaContainer() *MediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetServerCapabilitiesResponse 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
// The Server Capabilities
TwoHundredApplicationJSONObject *GetServerCapabilitiesResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetServerCapabilitiesServerResponseBody
}
func (o *GetServerCapabilitiesResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetServerCapabilitiesResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetServerCapabilitiesResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetServerCapabilitiesResponse) GetTwoHundredApplicationJSONObject() *GetServerCapabilitiesResponseBody {
if o == nil {
return nil
}
return o.TwoHundredApplicationJSONObject
}
func (o *GetServerCapabilitiesResponse) GetFourHundredAndOneApplicationJSONObject() *GetServerCapabilitiesServerResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -0,0 +1,141 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetServerIdentityErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetServerIdentityErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetServerIdentityErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetServerIdentityErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetServerIdentityServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetServerIdentityServerResponseBody struct {
Errors []GetServerIdentityErrors `json:"errors,omitempty"`
}
func (o *GetServerIdentityServerResponseBody) GetErrors() []GetServerIdentityErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetServerIdentityMediaContainer struct {
Size *float64 `json:"size,omitempty"`
Claimed *bool `json:"claimed,omitempty"`
MachineIdentifier *string `json:"machineIdentifier,omitempty"`
Version *string `json:"version,omitempty"`
}
func (o *GetServerIdentityMediaContainer) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetServerIdentityMediaContainer) GetClaimed() *bool {
if o == nil {
return nil
}
return o.Claimed
}
func (o *GetServerIdentityMediaContainer) GetMachineIdentifier() *string {
if o == nil {
return nil
}
return o.MachineIdentifier
}
func (o *GetServerIdentityMediaContainer) GetVersion() *string {
if o == nil {
return nil
}
return o.Version
}
// GetServerIdentityResponseBody - The Transcode Sessions
type GetServerIdentityResponseBody struct {
MediaContainer *GetServerIdentityMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetServerIdentityResponseBody) GetMediaContainer() *GetServerIdentityMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetServerIdentityResponse 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
// The Transcode Sessions
TwoHundredApplicationJSONObject *GetServerIdentityResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetServerIdentityServerResponseBody
}
func (o *GetServerIdentityResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetServerIdentityResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetServerIdentityResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetServerIdentityResponse) GetTwoHundredApplicationJSONObject() *GetServerIdentityResponseBody {
if o == nil {
return nil
}
return o.TwoHundredApplicationJSONObject
}
func (o *GetServerIdentityResponse) GetFourHundredAndOneApplicationJSONObject() *GetServerIdentityServerResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -0,0 +1,176 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetServerListErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetServerListErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetServerListErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetServerListErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetServerListServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetServerListServerResponseBody struct {
Errors []GetServerListErrors `json:"errors,omitempty"`
}
func (o *GetServerListServerResponseBody) GetErrors() []GetServerListErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetServerListServer struct {
Name *string `json:"name,omitempty"`
Host *string `json:"host,omitempty"`
Address *string `json:"address,omitempty"`
Port *float64 `json:"port,omitempty"`
MachineIdentifier *string `json:"machineIdentifier,omitempty"`
Version *string `json:"version,omitempty"`
}
func (o *GetServerListServer) GetName() *string {
if o == nil {
return nil
}
return o.Name
}
func (o *GetServerListServer) GetHost() *string {
if o == nil {
return nil
}
return o.Host
}
func (o *GetServerListServer) GetAddress() *string {
if o == nil {
return nil
}
return o.Address
}
func (o *GetServerListServer) GetPort() *float64 {
if o == nil {
return nil
}
return o.Port
}
func (o *GetServerListServer) GetMachineIdentifier() *string {
if o == nil {
return nil
}
return o.MachineIdentifier
}
func (o *GetServerListServer) GetVersion() *string {
if o == nil {
return nil
}
return o.Version
}
type GetServerListMediaContainer struct {
Size *float64 `json:"size,omitempty"`
Server []GetServerListServer `json:"Server,omitempty"`
}
func (o *GetServerListMediaContainer) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetServerListMediaContainer) GetServer() []GetServerListServer {
if o == nil {
return nil
}
return o.Server
}
// GetServerListResponseBody - List of Servers
type GetServerListResponseBody struct {
MediaContainer *GetServerListMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetServerListResponseBody) GetMediaContainer() *GetServerListMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetServerListResponse 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 Servers
TwoHundredApplicationJSONObject *GetServerListResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetServerListServerResponseBody
}
func (o *GetServerListResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetServerListResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetServerListResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetServerListResponse) GetTwoHundredApplicationJSONObject() *GetServerListResponseBody {
if o == nil {
return nil
}
return o.TwoHundredApplicationJSONObject
}
func (o *GetServerListResponse) GetFourHundredAndOneApplicationJSONObject() *GetServerListServerResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -0,0 +1,85 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetServerPreferencesErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetServerPreferencesErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetServerPreferencesErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetServerPreferencesErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetServerPreferencesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetServerPreferencesResponseBody struct {
Errors []GetServerPreferencesErrors `json:"errors,omitempty"`
}
func (o *GetServerPreferencesResponseBody) GetErrors() []GetServerPreferencesErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetServerPreferencesResponse 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 *GetServerPreferencesResponseBody
}
func (o *GetServerPreferencesResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetServerPreferencesResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetServerPreferencesResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetServerPreferencesResponse) GetObject() *GetServerPreferencesResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,85 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
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
}
// GetSessionHistoryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetSessionHistoryResponseBody struct {
Errors []GetSessionHistoryErrors `json:"errors,omitempty"`
}
func (o *GetSessionHistoryResponseBody) GetErrors() []GetSessionHistoryErrors {
if o == nil {
return nil
}
return o.Errors
}
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
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
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
}

View File

@@ -0,0 +1,85 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetSessionsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetSessionsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetSessionsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetSessionsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetSessionsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetSessionsResponseBody struct {
Errors []GetSessionsErrors `json:"errors,omitempty"`
}
func (o *GetSessionsResponseBody) GetErrors() []GetSessionsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetSessionsResponse 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 *GetSessionsResponseBody
}
func (o *GetSessionsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetSessionsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetSessionsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetSessionsResponse) GetObject() *GetSessionsResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetSourceConnectionInformationRequest struct {
// The source identifier with an included prefix.
Source string `queryParam:"style=form,explode=true,name=source"`
}
func (o *GetSourceConnectionInformationRequest) GetSource() string {
if o == nil {
return ""
}
return o.Source
}
type GetSourceConnectionInformationErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetSourceConnectionInformationErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetSourceConnectionInformationErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetSourceConnectionInformationErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetSourceConnectionInformationResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetSourceConnectionInformationResponseBody struct {
Errors []GetSourceConnectionInformationErrors `json:"errors,omitempty"`
}
func (o *GetSourceConnectionInformationResponseBody) GetErrors() []GetSourceConnectionInformationErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetSourceConnectionInformationResponse 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 *GetSourceConnectionInformationResponseBody
}
func (o *GetSourceConnectionInformationResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetSourceConnectionInformationResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetSourceConnectionInformationResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetSourceConnectionInformationResponse) GetObject() *GetSourceConnectionInformationResponseBody {
if o == nil {
return nil
}
return o.Object
}

View 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
}

View File

@@ -0,0 +1,304 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetTranscodeSessionsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetTranscodeSessionsErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetTranscodeSessionsErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetTranscodeSessionsErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetTranscodeSessionsSessionsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetTranscodeSessionsSessionsResponseBody struct {
Errors []GetTranscodeSessionsErrors `json:"errors,omitempty"`
}
func (o *GetTranscodeSessionsSessionsResponseBody) GetErrors() []GetTranscodeSessionsErrors {
if o == nil {
return nil
}
return o.Errors
}
type TranscodeSession struct {
Key *string `json:"key,omitempty"`
Throttled *bool `json:"throttled,omitempty"`
Complete *bool `json:"complete,omitempty"`
Progress *float64 `json:"progress,omitempty"`
Size *float64 `json:"size,omitempty"`
Speed *float64 `json:"speed,omitempty"`
Error *bool `json:"error,omitempty"`
Duration *float64 `json:"duration,omitempty"`
Context *string `json:"context,omitempty"`
SourceVideoCodec *string `json:"sourceVideoCodec,omitempty"`
SourceAudioCodec *string `json:"sourceAudioCodec,omitempty"`
VideoDecision *string `json:"videoDecision,omitempty"`
AudioDecision *string `json:"audioDecision,omitempty"`
Protocol *string `json:"protocol,omitempty"`
Container *string `json:"container,omitempty"`
VideoCodec *string `json:"videoCodec,omitempty"`
AudioCodec *string `json:"audioCodec,omitempty"`
AudioChannels *float64 `json:"audioChannels,omitempty"`
TranscodeHwRequested *bool `json:"transcodeHwRequested,omitempty"`
TimeStamp *float64 `json:"timeStamp,omitempty"`
MaxOffsetAvailable *float64 `json:"maxOffsetAvailable,omitempty"`
MinOffsetAvailable *float64 `json:"minOffsetAvailable,omitempty"`
}
func (o *TranscodeSession) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *TranscodeSession) GetThrottled() *bool {
if o == nil {
return nil
}
return o.Throttled
}
func (o *TranscodeSession) GetComplete() *bool {
if o == nil {
return nil
}
return o.Complete
}
func (o *TranscodeSession) GetProgress() *float64 {
if o == nil {
return nil
}
return o.Progress
}
func (o *TranscodeSession) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *TranscodeSession) GetSpeed() *float64 {
if o == nil {
return nil
}
return o.Speed
}
func (o *TranscodeSession) GetError() *bool {
if o == nil {
return nil
}
return o.Error
}
func (o *TranscodeSession) GetDuration() *float64 {
if o == nil {
return nil
}
return o.Duration
}
func (o *TranscodeSession) GetContext() *string {
if o == nil {
return nil
}
return o.Context
}
func (o *TranscodeSession) GetSourceVideoCodec() *string {
if o == nil {
return nil
}
return o.SourceVideoCodec
}
func (o *TranscodeSession) GetSourceAudioCodec() *string {
if o == nil {
return nil
}
return o.SourceAudioCodec
}
func (o *TranscodeSession) GetVideoDecision() *string {
if o == nil {
return nil
}
return o.VideoDecision
}
func (o *TranscodeSession) GetAudioDecision() *string {
if o == nil {
return nil
}
return o.AudioDecision
}
func (o *TranscodeSession) GetProtocol() *string {
if o == nil {
return nil
}
return o.Protocol
}
func (o *TranscodeSession) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *TranscodeSession) GetVideoCodec() *string {
if o == nil {
return nil
}
return o.VideoCodec
}
func (o *TranscodeSession) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *TranscodeSession) GetAudioChannels() *float64 {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *TranscodeSession) GetTranscodeHwRequested() *bool {
if o == nil {
return nil
}
return o.TranscodeHwRequested
}
func (o *TranscodeSession) GetTimeStamp() *float64 {
if o == nil {
return nil
}
return o.TimeStamp
}
func (o *TranscodeSession) GetMaxOffsetAvailable() *float64 {
if o == nil {
return nil
}
return o.MaxOffsetAvailable
}
func (o *TranscodeSession) GetMinOffsetAvailable() *float64 {
if o == nil {
return nil
}
return o.MinOffsetAvailable
}
type GetTranscodeSessionsMediaContainer struct {
Size *float64 `json:"size,omitempty"`
TranscodeSession []TranscodeSession `json:"TranscodeSession,omitempty"`
}
func (o *GetTranscodeSessionsMediaContainer) GetSize() *float64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetTranscodeSessionsMediaContainer) GetTranscodeSession() []TranscodeSession {
if o == nil {
return nil
}
return o.TranscodeSession
}
// GetTranscodeSessionsResponseBody - The Transcode Sessions
type GetTranscodeSessionsResponseBody struct {
MediaContainer *GetTranscodeSessionsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetTranscodeSessionsResponseBody) GetMediaContainer() *GetTranscodeSessionsMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetTranscodeSessionsResponse 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
// The Transcode Sessions
TwoHundredApplicationJSONObject *GetTranscodeSessionsResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetTranscodeSessionsSessionsResponseBody
}
func (o *GetTranscodeSessionsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetTranscodeSessionsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetTranscodeSessionsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetTranscodeSessionsResponse) GetTwoHundredApplicationJSONObject() *GetTranscodeSessionsResponseBody {
if o == nil {
return nil
}
return o.TwoHundredApplicationJSONObject
}
func (o *GetTranscodeSessionsResponse) GetFourHundredAndOneApplicationJSONObject() *GetTranscodeSessionsSessionsResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -0,0 +1,158 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// QueryParamType - `delegation` - This is the only supported `type` parameter.
type QueryParamType string
const (
QueryParamTypeDelegation QueryParamType = "delegation"
)
func (e QueryParamType) ToPointer() *QueryParamType {
return &e
}
func (e *QueryParamType) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "delegation":
*e = QueryParamType(v)
return nil
default:
return fmt.Errorf("invalid value for QueryParamType: %v", v)
}
}
// Scope - `all` - This is the only supported `scope` parameter.
type Scope string
const (
ScopeAll Scope = "all"
)
func (e Scope) ToPointer() *Scope {
return &e
}
func (e *Scope) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "all":
*e = Scope(v)
return nil
default:
return fmt.Errorf("invalid value for Scope: %v", v)
}
}
type GetTransientTokenRequest struct {
// `delegation` - This is the only supported `type` parameter.
Type QueryParamType `queryParam:"style=form,explode=true,name=type"`
// `all` - This is the only supported `scope` parameter.
Scope Scope `queryParam:"style=form,explode=true,name=scope"`
}
func (o *GetTransientTokenRequest) GetType() QueryParamType {
if o == nil {
return QueryParamType("")
}
return o.Type
}
func (o *GetTransientTokenRequest) GetScope() Scope {
if o == nil {
return Scope("")
}
return o.Scope
}
type GetTransientTokenErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetTransientTokenErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetTransientTokenErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetTransientTokenErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetTransientTokenResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetTransientTokenResponseBody struct {
Errors []GetTransientTokenErrors `json:"errors,omitempty"`
}
func (o *GetTransientTokenResponseBody) GetErrors() []GetTransientTokenErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetTransientTokenResponse 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 *GetTransientTokenResponseBody
}
func (o *GetTransientTokenResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetTransientTokenResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetTransientTokenResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetTransientTokenResponse) GetObject() *GetTransientTokenResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,85 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type GetUpdateStatusErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetUpdateStatusErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *GetUpdateStatusErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *GetUpdateStatusErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// GetUpdateStatusResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetUpdateStatusResponseBody struct {
Errors []GetUpdateStatusErrors `json:"errors,omitempty"`
}
func (o *GetUpdateStatusResponseBody) GetErrors() []GetUpdateStatusErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetUpdateStatusResponse 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 *GetUpdateStatusResponseBody
}
func (o *GetUpdateStatusResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetUpdateStatusResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetUpdateStatusResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetUpdateStatusResponse) GetObject() *GetUpdateStatusResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,165 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// Level - An integer log level to write to the PMS log with.
// 0: Error
// 1: Warning
// 2: Info
// 3: Debug
// 4: Verbose
type Level int64
const (
LevelZero Level = 0
LevelOne Level = 1
LevelTwo Level = 2
LevelThree Level = 3
LevelFour Level = 4
)
func (e Level) ToPointer() *Level {
return &e
}
func (e *Level) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
fallthrough
case 2:
fallthrough
case 3:
fallthrough
case 4:
*e = Level(v)
return nil
default:
return fmt.Errorf("invalid value for Level: %v", v)
}
}
type LogLineRequest struct {
// An integer log level to write to the PMS log with.
// 0: Error
// 1: Warning
// 2: Info
// 3: Debug
// 4: Verbose
//
Level Level `queryParam:"style=form,explode=true,name=level"`
// The text of the message to write to the log.
Message string `queryParam:"style=form,explode=true,name=message"`
// a string indicating the source of the message.
Source string `queryParam:"style=form,explode=true,name=source"`
}
func (o *LogLineRequest) GetLevel() Level {
if o == nil {
return Level(0)
}
return o.Level
}
func (o *LogLineRequest) GetMessage() string {
if o == nil {
return ""
}
return o.Message
}
func (o *LogLineRequest) GetSource() string {
if o == nil {
return ""
}
return o.Source
}
type LogLineErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *LogLineErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *LogLineErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *LogLineErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// LogLineResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type LogLineResponseBody struct {
Errors []LogLineErrors `json:"errors,omitempty"`
}
func (o *LogLineResponseBody) GetErrors() []LogLineErrors {
if o == nil {
return nil
}
return o.Errors
}
type LogLineResponse 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 *LogLineResponseBody
}
func (o *LogLineResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *LogLineResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *LogLineResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *LogLineResponse) GetObject() *LogLineResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,85 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type LogMultiLineErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *LogMultiLineErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *LogMultiLineErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *LogMultiLineErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// LogMultiLineResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type LogMultiLineResponseBody struct {
Errors []LogMultiLineErrors `json:"errors,omitempty"`
}
func (o *LogMultiLineResponseBody) GetErrors() []LogMultiLineErrors {
if o == nil {
return nil
}
return o.Errors
}
type LogMultiLineResponse 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 *LogMultiLineResponseBody
}
func (o *LogMultiLineResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *LogMultiLineResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *LogMultiLineResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *LogMultiLineResponse) GetObject() *LogMultiLineResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type MarkPlayedRequest struct {
// The media key to mark as played
Key float64 `queryParam:"style=form,explode=true,name=key"`
}
func (o *MarkPlayedRequest) GetKey() float64 {
if o == nil {
return 0.0
}
return o.Key
}
type MarkPlayedErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *MarkPlayedErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *MarkPlayedErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *MarkPlayedErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// MarkPlayedResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type MarkPlayedResponseBody struct {
Errors []MarkPlayedErrors `json:"errors,omitempty"`
}
func (o *MarkPlayedResponseBody) GetErrors() []MarkPlayedErrors {
if o == nil {
return nil
}
return o.Errors
}
type MarkPlayedResponse 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 *MarkPlayedResponseBody
}
func (o *MarkPlayedResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *MarkPlayedResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *MarkPlayedResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *MarkPlayedResponse) GetObject() *MarkPlayedResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type MarkUnplayedRequest struct {
// The media key to mark as Unplayed
Key float64 `queryParam:"style=form,explode=true,name=key"`
}
func (o *MarkUnplayedRequest) GetKey() float64 {
if o == nil {
return 0.0
}
return o.Key
}
type MarkUnplayedErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *MarkUnplayedErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *MarkUnplayedErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *MarkUnplayedErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// MarkUnplayedResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type MarkUnplayedResponseBody struct {
Errors []MarkUnplayedErrors `json:"errors,omitempty"`
}
func (o *MarkUnplayedResponseBody) GetErrors() []MarkUnplayedErrors {
if o == nil {
return nil
}
return o.Errors
}
type MarkUnplayedResponse 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 *MarkUnplayedResponseBody
}
func (o *MarkUnplayedResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *MarkUnplayedResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *MarkUnplayedResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *MarkUnplayedResponse) GetObject() *MarkUnplayedResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,127 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
"net/http"
)
type PerformSearchRequest struct {
// The query term
Query string `queryParam:"style=form,explode=true,name=query"`
// This gives context to the search, and can result in re-ordering of search result hubs
SectionID *float64 `queryParam:"style=form,explode=true,name=sectionId"`
// The number of items to return per hub
Limit *float64 `default:"3" queryParam:"style=form,explode=true,name=limit"`
}
func (p PerformSearchRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(p, "", false)
}
func (p *PerformSearchRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil {
return err
}
return nil
}
func (o *PerformSearchRequest) GetQuery() string {
if o == nil {
return ""
}
return o.Query
}
func (o *PerformSearchRequest) GetSectionID() *float64 {
if o == nil {
return nil
}
return o.SectionID
}
func (o *PerformSearchRequest) GetLimit() *float64 {
if o == nil {
return nil
}
return o.Limit
}
type PerformSearchErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *PerformSearchErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *PerformSearchErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *PerformSearchErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// PerformSearchResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type PerformSearchResponseBody struct {
Errors []PerformSearchErrors `json:"errors,omitempty"`
}
func (o *PerformSearchResponseBody) GetErrors() []PerformSearchErrors {
if o == nil {
return nil
}
return o.Errors
}
type PerformSearchResponse 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 *PerformSearchResponseBody
}
func (o *PerformSearchResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *PerformSearchResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *PerformSearchResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *PerformSearchResponse) GetObject() *PerformSearchResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,127 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
"net/http"
)
type PerformVoiceSearchRequest struct {
// The query term
Query string `queryParam:"style=form,explode=true,name=query"`
// This gives context to the search, and can result in re-ordering of search result hubs
SectionID *float64 `queryParam:"style=form,explode=true,name=sectionId"`
// The number of items to return per hub
Limit *float64 `default:"3" queryParam:"style=form,explode=true,name=limit"`
}
func (p PerformVoiceSearchRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(p, "", false)
}
func (p *PerformVoiceSearchRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil {
return err
}
return nil
}
func (o *PerformVoiceSearchRequest) GetQuery() string {
if o == nil {
return ""
}
return o.Query
}
func (o *PerformVoiceSearchRequest) GetSectionID() *float64 {
if o == nil {
return nil
}
return o.SectionID
}
func (o *PerformVoiceSearchRequest) GetLimit() *float64 {
if o == nil {
return nil
}
return o.Limit
}
type PerformVoiceSearchErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *PerformVoiceSearchErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *PerformVoiceSearchErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *PerformVoiceSearchErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// PerformVoiceSearchResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type PerformVoiceSearchResponseBody struct {
Errors []PerformVoiceSearchErrors `json:"errors,omitempty"`
}
func (o *PerformVoiceSearchResponseBody) GetErrors() []PerformVoiceSearchErrors {
if o == nil {
return nil
}
return o.Errors
}
type PerformVoiceSearchResponse 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 *PerformVoiceSearchResponseBody
}
func (o *PerformVoiceSearchResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *PerformVoiceSearchResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *PerformVoiceSearchResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *PerformVoiceSearchResponse) GetObject() *PerformVoiceSearchResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type RefreshLibraryRequest struct {
// the Id of the library to refresh
SectionID float64 `pathParam:"style=simple,explode=false,name=sectionId"`
}
func (o *RefreshLibraryRequest) GetSectionID() float64 {
if o == nil {
return 0.0
}
return o.SectionID
}
type RefreshLibraryErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *RefreshLibraryErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *RefreshLibraryErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *RefreshLibraryErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// RefreshLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type RefreshLibraryResponseBody struct {
Errors []RefreshLibraryErrors `json:"errors,omitempty"`
}
func (o *RefreshLibraryResponseBody) GetErrors() []RefreshLibraryErrors {
if o == nil {
return nil
}
return o.Errors
}
type RefreshLibraryResponse 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 *RefreshLibraryResponseBody
}
func (o *RefreshLibraryResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *RefreshLibraryResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *RefreshLibraryResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *RefreshLibraryResponse) GetObject() *RefreshLibraryResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,85 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type StartAllTasksErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *StartAllTasksErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *StartAllTasksErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *StartAllTasksErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// StartAllTasksResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type StartAllTasksResponseBody struct {
Errors []StartAllTasksErrors `json:"errors,omitempty"`
}
func (o *StartAllTasksResponseBody) GetErrors() []StartAllTasksErrors {
if o == nil {
return nil
}
return o.Errors
}
type StartAllTasksResponse 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 *StartAllTasksResponseBody
}
func (o *StartAllTasksResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *StartAllTasksResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *StartAllTasksResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *StartAllTasksResponse) GetObject() *StartAllTasksResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,163 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// TaskName - the name of the task to be started.
type TaskName string
const (
TaskNameBackupDatabase TaskName = "BackupDatabase"
TaskNameBuildGracenoteCollections TaskName = "BuildGracenoteCollections"
TaskNameCheckForUpdates TaskName = "CheckForUpdates"
TaskNameCleanOldBundles TaskName = "CleanOldBundles"
TaskNameCleanOldCacheFiles TaskName = "CleanOldCacheFiles"
TaskNameDeepMediaAnalysis TaskName = "DeepMediaAnalysis"
TaskNameGenerateAutoTags TaskName = "GenerateAutoTags"
TaskNameGenerateChapterThumbs TaskName = "GenerateChapterThumbs"
TaskNameGenerateMediaIndexFiles TaskName = "GenerateMediaIndexFiles"
TaskNameOptimizeDatabase TaskName = "OptimizeDatabase"
TaskNameRefreshLibraries TaskName = "RefreshLibraries"
TaskNameRefreshLocalMedia TaskName = "RefreshLocalMedia"
TaskNameRefreshPeriodicMetadata TaskName = "RefreshPeriodicMetadata"
TaskNameUpgradeMediaAnalysis TaskName = "UpgradeMediaAnalysis"
)
func (e TaskName) ToPointer() *TaskName {
return &e
}
func (e *TaskName) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "BackupDatabase":
fallthrough
case "BuildGracenoteCollections":
fallthrough
case "CheckForUpdates":
fallthrough
case "CleanOldBundles":
fallthrough
case "CleanOldCacheFiles":
fallthrough
case "DeepMediaAnalysis":
fallthrough
case "GenerateAutoTags":
fallthrough
case "GenerateChapterThumbs":
fallthrough
case "GenerateMediaIndexFiles":
fallthrough
case "OptimizeDatabase":
fallthrough
case "RefreshLibraries":
fallthrough
case "RefreshLocalMedia":
fallthrough
case "RefreshPeriodicMetadata":
fallthrough
case "UpgradeMediaAnalysis":
*e = TaskName(v)
return nil
default:
return fmt.Errorf("invalid value for TaskName: %v", v)
}
}
type StartTaskRequest struct {
// the name of the task to be started.
TaskName TaskName `pathParam:"style=simple,explode=false,name=taskName"`
}
func (o *StartTaskRequest) GetTaskName() TaskName {
if o == nil {
return TaskName("")
}
return o.TaskName
}
type StartTaskErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *StartTaskErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *StartTaskErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *StartTaskErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// StartTaskResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type StartTaskResponseBody struct {
Errors []StartTaskErrors `json:"errors,omitempty"`
}
func (o *StartTaskResponseBody) GetErrors() []StartTaskErrors {
if o == nil {
return nil
}
return o.Errors
}
type StartTaskResponse 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 *StartTaskResponseBody
}
func (o *StartTaskResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *StartTaskResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *StartTaskResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *StartTaskResponse) GetObject() *StartTaskResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,232 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type StartUniversalTranscodeRequest struct {
// Whether the media item has MDE
HasMDE float64 `queryParam:"style=form,explode=true,name=hasMDE"`
// The path to the media item to transcode
Path string `queryParam:"style=form,explode=true,name=path"`
// The index of the media item to transcode
MediaIndex float64 `queryParam:"style=form,explode=true,name=mediaIndex"`
// The index of the part to transcode
PartIndex float64 `queryParam:"style=form,explode=true,name=partIndex"`
// The protocol to use for the transcode session
Protocol string `queryParam:"style=form,explode=true,name=protocol"`
// Whether to use fast seek or not
FastSeek *float64 `queryParam:"style=form,explode=true,name=fastSeek"`
// Whether to use direct play or not
DirectPlay *float64 `queryParam:"style=form,explode=true,name=directPlay"`
// Whether to use direct stream or not
DirectStream *float64 `queryParam:"style=form,explode=true,name=directStream"`
// The size of the subtitles
SubtitleSize *float64 `queryParam:"style=form,explode=true,name=subtitleSize"`
// The subtitles
Subtites *string `queryParam:"style=form,explode=true,name=subtites"`
// The audio boost
AudioBoost *float64 `queryParam:"style=form,explode=true,name=audioBoost"`
// The location of the transcode session
Location *string `queryParam:"style=form,explode=true,name=location"`
// The size of the media buffer
MediaBufferSize *float64 `queryParam:"style=form,explode=true,name=mediaBufferSize"`
// The session ID
Session *string `queryParam:"style=form,explode=true,name=session"`
// Whether to add a debug overlay or not
AddDebugOverlay *float64 `queryParam:"style=form,explode=true,name=addDebugOverlay"`
// Whether to auto adjust quality or not
AutoAdjustQuality *float64 `queryParam:"style=form,explode=true,name=autoAdjustQuality"`
}
func (o *StartUniversalTranscodeRequest) GetHasMDE() float64 {
if o == nil {
return 0.0
}
return o.HasMDE
}
func (o *StartUniversalTranscodeRequest) GetPath() string {
if o == nil {
return ""
}
return o.Path
}
func (o *StartUniversalTranscodeRequest) GetMediaIndex() float64 {
if o == nil {
return 0.0
}
return o.MediaIndex
}
func (o *StartUniversalTranscodeRequest) GetPartIndex() float64 {
if o == nil {
return 0.0
}
return o.PartIndex
}
func (o *StartUniversalTranscodeRequest) GetProtocol() string {
if o == nil {
return ""
}
return o.Protocol
}
func (o *StartUniversalTranscodeRequest) GetFastSeek() *float64 {
if o == nil {
return nil
}
return o.FastSeek
}
func (o *StartUniversalTranscodeRequest) GetDirectPlay() *float64 {
if o == nil {
return nil
}
return o.DirectPlay
}
func (o *StartUniversalTranscodeRequest) GetDirectStream() *float64 {
if o == nil {
return nil
}
return o.DirectStream
}
func (o *StartUniversalTranscodeRequest) GetSubtitleSize() *float64 {
if o == nil {
return nil
}
return o.SubtitleSize
}
func (o *StartUniversalTranscodeRequest) GetSubtites() *string {
if o == nil {
return nil
}
return o.Subtites
}
func (o *StartUniversalTranscodeRequest) GetAudioBoost() *float64 {
if o == nil {
return nil
}
return o.AudioBoost
}
func (o *StartUniversalTranscodeRequest) GetLocation() *string {
if o == nil {
return nil
}
return o.Location
}
func (o *StartUniversalTranscodeRequest) GetMediaBufferSize() *float64 {
if o == nil {
return nil
}
return o.MediaBufferSize
}
func (o *StartUniversalTranscodeRequest) GetSession() *string {
if o == nil {
return nil
}
return o.Session
}
func (o *StartUniversalTranscodeRequest) GetAddDebugOverlay() *float64 {
if o == nil {
return nil
}
return o.AddDebugOverlay
}
func (o *StartUniversalTranscodeRequest) GetAutoAdjustQuality() *float64 {
if o == nil {
return nil
}
return o.AutoAdjustQuality
}
type StartUniversalTranscodeErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *StartUniversalTranscodeErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *StartUniversalTranscodeErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *StartUniversalTranscodeErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// StartUniversalTranscodeResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type StartUniversalTranscodeResponseBody struct {
Errors []StartUniversalTranscodeErrors `json:"errors,omitempty"`
}
func (o *StartUniversalTranscodeResponseBody) GetErrors() []StartUniversalTranscodeErrors {
if o == nil {
return nil
}
return o.Errors
}
type StartUniversalTranscodeResponse 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 *StartUniversalTranscodeResponseBody
}
func (o *StartUniversalTranscodeResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *StartUniversalTranscodeResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *StartUniversalTranscodeResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *StartUniversalTranscodeResponse) GetObject() *StartUniversalTranscodeResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,85 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type StopAllTasksErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *StopAllTasksErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *StopAllTasksErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *StopAllTasksErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// StopAllTasksResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type StopAllTasksResponseBody struct {
Errors []StopAllTasksErrors `json:"errors,omitempty"`
}
func (o *StopAllTasksResponseBody) GetErrors() []StopAllTasksErrors {
if o == nil {
return nil
}
return o.Errors
}
type StopAllTasksResponse 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 *StopAllTasksResponseBody
}
func (o *StopAllTasksResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *StopAllTasksResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *StopAllTasksResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *StopAllTasksResponse) GetObject() *StopAllTasksResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,163 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// PathParamTaskName - The name of the task to be started.
type PathParamTaskName string
const (
PathParamTaskNameBackupDatabase PathParamTaskName = "BackupDatabase"
PathParamTaskNameBuildGracenoteCollections PathParamTaskName = "BuildGracenoteCollections"
PathParamTaskNameCheckForUpdates PathParamTaskName = "CheckForUpdates"
PathParamTaskNameCleanOldBundles PathParamTaskName = "CleanOldBundles"
PathParamTaskNameCleanOldCacheFiles PathParamTaskName = "CleanOldCacheFiles"
PathParamTaskNameDeepMediaAnalysis PathParamTaskName = "DeepMediaAnalysis"
PathParamTaskNameGenerateAutoTags PathParamTaskName = "GenerateAutoTags"
PathParamTaskNameGenerateChapterThumbs PathParamTaskName = "GenerateChapterThumbs"
PathParamTaskNameGenerateMediaIndexFiles PathParamTaskName = "GenerateMediaIndexFiles"
PathParamTaskNameOptimizeDatabase PathParamTaskName = "OptimizeDatabase"
PathParamTaskNameRefreshLibraries PathParamTaskName = "RefreshLibraries"
PathParamTaskNameRefreshLocalMedia PathParamTaskName = "RefreshLocalMedia"
PathParamTaskNameRefreshPeriodicMetadata PathParamTaskName = "RefreshPeriodicMetadata"
PathParamTaskNameUpgradeMediaAnalysis PathParamTaskName = "UpgradeMediaAnalysis"
)
func (e PathParamTaskName) ToPointer() *PathParamTaskName {
return &e
}
func (e *PathParamTaskName) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "BackupDatabase":
fallthrough
case "BuildGracenoteCollections":
fallthrough
case "CheckForUpdates":
fallthrough
case "CleanOldBundles":
fallthrough
case "CleanOldCacheFiles":
fallthrough
case "DeepMediaAnalysis":
fallthrough
case "GenerateAutoTags":
fallthrough
case "GenerateChapterThumbs":
fallthrough
case "GenerateMediaIndexFiles":
fallthrough
case "OptimizeDatabase":
fallthrough
case "RefreshLibraries":
fallthrough
case "RefreshLocalMedia":
fallthrough
case "RefreshPeriodicMetadata":
fallthrough
case "UpgradeMediaAnalysis":
*e = PathParamTaskName(v)
return nil
default:
return fmt.Errorf("invalid value for PathParamTaskName: %v", v)
}
}
type StopTaskRequest struct {
// The name of the task to be started.
TaskName PathParamTaskName `pathParam:"style=simple,explode=false,name=taskName"`
}
func (o *StopTaskRequest) GetTaskName() PathParamTaskName {
if o == nil {
return PathParamTaskName("")
}
return o.TaskName
}
type StopTaskErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *StopTaskErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *StopTaskErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *StopTaskErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// StopTaskResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type StopTaskResponseBody struct {
Errors []StopTaskErrors `json:"errors,omitempty"`
}
func (o *StopTaskResponseBody) GetErrors() []StopTaskErrors {
if o == nil {
return nil
}
return o.Errors
}
type StopTaskResponse 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 *StopTaskResponseBody
}
func (o *StopTaskResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *StopTaskResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *StopTaskResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *StopTaskResponse) GetObject() *StopTaskResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type StopTranscodeSessionRequest struct {
// the Key of the transcode session to stop
SessionKey string `pathParam:"style=simple,explode=false,name=sessionKey"`
}
func (o *StopTranscodeSessionRequest) GetSessionKey() string {
if o == nil {
return ""
}
return o.SessionKey
}
type StopTranscodeSessionErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *StopTranscodeSessionErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *StopTranscodeSessionErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *StopTranscodeSessionErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// StopTranscodeSessionResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type StopTranscodeSessionResponseBody struct {
Errors []StopTranscodeSessionErrors `json:"errors,omitempty"`
}
func (o *StopTranscodeSessionResponseBody) GetErrors() []StopTranscodeSessionErrors {
if o == nil {
return nil
}
return o.Errors
}
type StopTranscodeSessionResponse 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 *StopTranscodeSessionResponseBody
}
func (o *StopTranscodeSessionResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *StopTranscodeSessionResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *StopTranscodeSessionResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *StopTranscodeSessionResponse) GetObject() *StopTranscodeSessionResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,97 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type UpdatePlaylistRequest struct {
// the ID of the playlist
PlaylistID float64 `pathParam:"style=simple,explode=false,name=playlistID"`
}
func (o *UpdatePlaylistRequest) GetPlaylistID() float64 {
if o == nil {
return 0.0
}
return o.PlaylistID
}
type UpdatePlaylistErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *UpdatePlaylistErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *UpdatePlaylistErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *UpdatePlaylistErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// UpdatePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type UpdatePlaylistResponseBody struct {
Errors []UpdatePlaylistErrors `json:"errors,omitempty"`
}
func (o *UpdatePlaylistResponseBody) GetErrors() []UpdatePlaylistErrors {
if o == nil {
return nil
}
return o.Errors
}
type UpdatePlaylistResponse 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 *UpdatePlaylistResponseBody
}
func (o *UpdatePlaylistResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *UpdatePlaylistResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *UpdatePlaylistResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *UpdatePlaylistResponse) GetObject() *UpdatePlaylistResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,115 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"net/http"
)
type UpdatePlayProgressRequest struct {
// the media key
Key string `queryParam:"style=form,explode=true,name=key"`
// The time, in milliseconds, used to set the media playback progress.
Time float64 `queryParam:"style=form,explode=true,name=time"`
// The playback state of the media item.
State string `queryParam:"style=form,explode=true,name=state"`
}
func (o *UpdatePlayProgressRequest) GetKey() string {
if o == nil {
return ""
}
return o.Key
}
func (o *UpdatePlayProgressRequest) GetTime() float64 {
if o == nil {
return 0.0
}
return o.Time
}
func (o *UpdatePlayProgressRequest) GetState() string {
if o == nil {
return ""
}
return o.State
}
type UpdatePlayProgressErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *UpdatePlayProgressErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *UpdatePlayProgressErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *UpdatePlayProgressErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// UpdatePlayProgressResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type UpdatePlayProgressResponseBody struct {
Errors []UpdatePlayProgressErrors `json:"errors,omitempty"`
}
func (o *UpdatePlayProgressResponseBody) GetErrors() []UpdatePlayProgressErrors {
if o == nil {
return nil
}
return o.Errors
}
type UpdatePlayProgressResponse 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 *UpdatePlayProgressResponseBody
}
func (o *UpdatePlayProgressResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *UpdatePlayProgressResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *UpdatePlayProgressResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *UpdatePlayProgressResponse) GetObject() *UpdatePlayProgressResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,145 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"encoding/json"
"fmt"
"net/http"
)
// Force - force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist.
// The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
type Force int64
const (
ForceZero Force = 0
ForceOne Force = 1
)
func (e Force) ToPointer() *Force {
return &e
}
func (e *Force) UnmarshalJSON(data []byte) error {
var v int64
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case 0:
fallthrough
case 1:
*e = Force(v)
return nil
default:
return fmt.Errorf("invalid value for Force: %v", v)
}
}
type UploadPlaylistRequest struct {
// absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
// If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
// Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
// The GUID of each playlist is based on the filename.
// If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
// The GUID of each playlist is based on the filename.
//
Path string `queryParam:"style=form,explode=true,name=path"`
// force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist.
// The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
//
Force Force `queryParam:"style=form,explode=true,name=force"`
}
func (o *UploadPlaylistRequest) GetPath() string {
if o == nil {
return ""
}
return o.Path
}
func (o *UploadPlaylistRequest) GetForce() Force {
if o == nil {
return Force(0)
}
return o.Force
}
type UploadPlaylistErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *UploadPlaylistErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *UploadPlaylistErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *UploadPlaylistErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// UploadPlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type UploadPlaylistResponseBody struct {
Errors []UploadPlaylistErrors `json:"errors,omitempty"`
}
func (o *UploadPlaylistResponseBody) GetErrors() []UploadPlaylistErrors {
if o == nil {
return nil
}
return o.Errors
}
type UploadPlaylistResponse 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 *UploadPlaylistResponseBody
}
func (o *UploadPlaylistResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *UploadPlaylistResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *UploadPlaylistResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *UploadPlaylistResponse) GetObject() *UploadPlaylistResponseBody {
if o == nil {
return nil
}
return o.Object
}

View File

@@ -0,0 +1,35 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package sdkerrors
import (
"fmt"
"net/http"
)
type SDKError struct {
Message string
StatusCode int
Body string
RawResponse *http.Response
}
var _ error = &SDKError{}
func NewSDKError(message string, statusCode int, body string, httpRes *http.Response) *SDKError {
return &SDKError{
Message: message,
StatusCode: statusCode,
Body: body,
RawResponse: httpRes,
}
}
func (e *SDKError) Error() string {
body := ""
if len(e.Body) > 0 {
body = fmt.Sprintf("\n%s", e.Body)
}
return fmt.Sprintf("%s: Status %d%s", e.Message, e.StatusCode, body)
}

View File

@@ -0,0 +1,14 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package shared
type Security struct {
AccessToken string `security:"scheme,type=apiKey,subtype=header,name=X-Plex-Token"`
}
func (o *Security) GetAccessToken() string {
if o == nil {
return ""
}
return o.AccessToken
}