mirror of
https://github.com/LukeHagar/plexterraform.git
synced 2025-12-06 04:20:52 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.295.1
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: e742591b-391d-4f4e-8484-d01a093b32ec
|
||||
management:
|
||||
docChecksum: 543cb95355401d2e3c2ba11a50d9dd94
|
||||
docChecksum: 911d74baa0d06121d2ce2c71d94e977a
|
||||
docVersion: 0.0.3
|
||||
speakeasyVersion: 1.285.0
|
||||
generationVersion: 2.326.3
|
||||
releaseVersion: 0.14.0
|
||||
configChecksum: 2c6e8190ee0aa4e41bd653129a33e169
|
||||
speakeasyVersion: 1.295.1
|
||||
generationVersion: 2.335.5
|
||||
releaseVersion: 0.15.0
|
||||
configChecksum: 918c48da4bd2da76e996dcde2db696ba
|
||||
repoURL: https://github.com/LukeHagar/plexterraform.git
|
||||
repoSubDirectory: .
|
||||
published: true
|
||||
@@ -14,13 +14,12 @@ features:
|
||||
terraform:
|
||||
additionalDependencies: 0.1.0
|
||||
constsAndDefaults: 0.1.4
|
||||
core: 3.20.0
|
||||
core: 3.21.0
|
||||
globalSecurity: 2.81.6
|
||||
globalServerURLs: 2.82.1
|
||||
globals: 2.82.1
|
||||
methodServerURLs: 2.82.1
|
||||
nameOverrides: 2.81.2
|
||||
unions: 2.81.12
|
||||
generatedFiles:
|
||||
- internal/sdk/server.go
|
||||
- internal/sdk/media.go
|
||||
@@ -85,6 +84,7 @@ generatedFiles:
|
||||
- internal/sdk/models/operations/getlibraries.go
|
||||
- internal/sdk/models/operations/getlibrary.go
|
||||
- internal/sdk/models/operations/deletelibrary.go
|
||||
- internal/sdk/models/operations/getlibraryitems.go
|
||||
- internal/sdk/models/operations/refreshlibrary.go
|
||||
- internal/sdk/models/operations/searchlibrary.go
|
||||
- internal/sdk/models/operations/getmetadata.go
|
||||
|
||||
@@ -12,8 +12,11 @@ generation:
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: false
|
||||
terraform:
|
||||
version: 0.14.0
|
||||
version: 0.15.0
|
||||
additionalDataSources: []
|
||||
additionalDependencies: {}
|
||||
additionalResources: []
|
||||
allowUnknownFieldsInWeakUnions: false
|
||||
author: LukeHagar
|
||||
environmentVariables: []
|
||||
imports:
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
speakeasyVersion: 1.285.0
|
||||
speakeasyVersion: 1.295.1
|
||||
sources:
|
||||
my-source: {}
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
sourceRevisionDigest: sha256:60df3251f413e288ee3d938dc82cccfb7dd7bfdde2dee5e7a014e806f91250bd
|
||||
sourceBlobDigest: sha256:9864585de73bd6d332127cdb3868c1814936cb60a877f7b3c9b79cdc42233ae6
|
||||
tags:
|
||||
- latest
|
||||
- main
|
||||
targets:
|
||||
plexterraform:
|
||||
source: my-source
|
||||
sourceNamespace: my-source
|
||||
sourceRevisionDigest: sha256:60df3251f413e288ee3d938dc82cccfb7dd7bfdde2dee5e7a014e806f91250bd
|
||||
sourceBlobDigest: sha256:9864585de73bd6d332127cdb3868c1814936cb60a877f7b3c9b79cdc42233ae6
|
||||
outLocation: /github/workspace/repo
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
@@ -12,6 +21,8 @@ workflow:
|
||||
my-source:
|
||||
inputs:
|
||||
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
|
||||
targets:
|
||||
plexterraform:
|
||||
target: terraform
|
||||
|
||||
@@ -4,6 +4,8 @@ sources:
|
||||
my-source:
|
||||
inputs:
|
||||
- location: https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml
|
||||
registry:
|
||||
location: registry.speakeasyapi.dev/lukehagar/lukehagar/my-source
|
||||
targets:
|
||||
plexterraform:
|
||||
target: terraform
|
||||
|
||||
@@ -61,7 +61,7 @@ terraform {
|
||||
required_providers {
|
||||
PlexAPI = {
|
||||
source = "LukeHagar/PlexAPI"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
12
RELEASES.md
12
RELEASES.md
@@ -262,4 +262,14 @@ Based on:
|
||||
### Generated
|
||||
- [terraform v0.14.0] .
|
||||
### Releases
|
||||
- [Terraform v0.14.0] https://registry.terraform.io/providers/LukeHagar/PlexAPI/0.14.0 - .
|
||||
- [Terraform v0.14.0] https://registry.terraform.io/providers/LukeHagar/PlexAPI/0.14.0 - .
|
||||
|
||||
## 2024-05-23 15:56:57
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.295.1 (2.335.5) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [terraform v0.15.0] .
|
||||
### Releases
|
||||
- [Terraform v0.15.0] https://registry.terraform.io/providers/LukeHagar/PlexAPI/0.15.0 - .
|
||||
@@ -17,7 +17,7 @@ terraform {
|
||||
required_providers {
|
||||
PlexAPI = {
|
||||
source = "LukeHagar/PlexAPI"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ terraform {
|
||||
required_providers {
|
||||
PlexAPI = {
|
||||
source = "LukeHagar/PlexAPI"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
go.mod
2
go.mod
@@ -2,7 +2,7 @@ module github.com/LukeHagar/terraform-provider-PlexAPI
|
||||
|
||||
go 1.21
|
||||
|
||||
toolchain go1.21.9
|
||||
toolchain go1.21.10
|
||||
|
||||
require (
|
||||
github.com/cenkalti/backoff/v4 v4.2.0
|
||||
|
||||
@@ -132,6 +132,7 @@ func (s *Activities) GetServerActivities(ctx context.Context) (*operations.GetSe
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// CancelServerActivities - Cancel Server Activities
|
||||
@@ -224,4 +225,5 @@ func (s *Activities) CancelServerActivities(ctx context.Context, request operati
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -120,6 +120,7 @@ func (s *Authentication) GetTransientToken(ctx context.Context, request operatio
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetSourceConnectionInformation - Get Source Connection Information
|
||||
@@ -217,4 +218,5 @@ func (s *Authentication) GetSourceConnectionInformation(ctx context.Context, req
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@ func (s *Butler) GetButlerTasks(ctx context.Context) (*operations.GetButlerTasks
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// StartAllTasks - Start all Butler tasks
|
||||
@@ -222,6 +223,7 @@ func (s *Butler) StartAllTasks(ctx context.Context) (*operations.StartAllTasksRe
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// StopAllTasks - Stop all Butler tasks
|
||||
@@ -314,6 +316,7 @@ func (s *Butler) StopAllTasks(ctx context.Context) (*operations.StopAllTasksResp
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// StartTask - Start a single Butler task
|
||||
@@ -412,6 +415,7 @@ func (s *Butler) StartTask(ctx context.Context, request operations.StartTaskRequ
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// StopTask - Stop a single Butler task
|
||||
@@ -506,4 +510,5 @@ func (s *Butler) StopTask(ctx context.Context, request operations.StopTaskReques
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, request operations.GetGlobalHu
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetLibraryHubs - Get library specific hubs
|
||||
@@ -236,4 +237,5 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, request operations.GetLibrary
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -18,8 +18,7 @@ func PopulateHeaders(_ context.Context, req *http.Request, headers interface{},
|
||||
}
|
||||
|
||||
func populateHeaders(headers interface{}, globals interface{}, reqHeaders http.Header, skipFields []string) []string {
|
||||
headerParamsStructType := reflect.TypeOf(headers)
|
||||
headerParamsValType := reflect.ValueOf(headers)
|
||||
headerParamsStructType, headerParamsValType := dereferencePointers(reflect.TypeOf(headers), reflect.ValueOf(headers))
|
||||
|
||||
globalsAlreadyPopulated := []string{}
|
||||
|
||||
|
||||
@@ -38,8 +38,7 @@ func GenerateURL(_ context.Context, serverURL, path string, pathParams interface
|
||||
}
|
||||
|
||||
func populateParsedParameters(pathParams interface{}, globals interface{}, parsedParameters map[string]string, skipFields []string) ([]string, error) {
|
||||
pathParamsStructType := reflect.TypeOf(pathParams)
|
||||
pathParamsValType := reflect.ValueOf(pathParams)
|
||||
pathParamsStructType, pathParamsValType := dereferencePointers(reflect.TypeOf(pathParams), reflect.ValueOf(pathParams))
|
||||
|
||||
globalsAlreadyPopulated := []string{}
|
||||
|
||||
|
||||
@@ -32,8 +32,7 @@ func PopulateQueryParams(_ context.Context, req *http.Request, queryParams inter
|
||||
}
|
||||
|
||||
func populateQueryParams(queryParams interface{}, globals interface{}, values url.Values, skipFields []string) ([]string, error) {
|
||||
queryParamsStructType := reflect.TypeOf(queryParams)
|
||||
queryParamsValType := reflect.ValueOf(queryParams)
|
||||
queryParamsStructType, queryParamsValType := dereferencePointers(reflect.TypeOf(queryParams), reflect.ValueOf(queryParams))
|
||||
|
||||
globalsAlreadyPopulated := []string{}
|
||||
|
||||
|
||||
@@ -196,6 +196,10 @@ func handleBasicAuthScheme(headers map[string]string, scheme interface{}) {
|
||||
fieldType := schemeStructType.Field(i)
|
||||
valType := schemeValType.Field(i)
|
||||
|
||||
if fieldType.Type.Kind() == reflect.Ptr {
|
||||
valType = valType.Elem()
|
||||
}
|
||||
|
||||
secTag := parseSecurityTag(fieldType)
|
||||
if secTag == nil || secTag.Name == "" {
|
||||
continue
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/big"
|
||||
@@ -87,6 +88,12 @@ func MatchStatusCodes(expectedCodes []string, statusCode int) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func AsSecuritySource(security interface{}) func(context.Context) (interface{}, error) {
|
||||
return func(context.Context) (interface{}, error) {
|
||||
return security, nil
|
||||
}
|
||||
}
|
||||
|
||||
func parseStructTag(tagKey string, field reflect.StructField) map[string]string {
|
||||
tag := field.Tag.Get(tagKey)
|
||||
if tag == "" {
|
||||
|
||||
@@ -120,6 +120,7 @@ func (s *Library) GetFileHash(ctx context.Context, request operations.GetFileHas
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetRecentlyAdded - Get Recently Added
|
||||
@@ -222,6 +223,7 @@ func (s *Library) GetRecentlyAdded(ctx context.Context) (*operations.GetRecently
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetLibraries - Get All Libraries
|
||||
@@ -329,6 +331,7 @@ func (s *Library) GetLibraries(ctx context.Context) (*operations.GetLibrariesRes
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetLibrary - Get Library Details
|
||||
@@ -473,6 +476,7 @@ func (s *Library) GetLibrary(ctx context.Context, request operations.GetLibraryR
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// DeleteLibrary - Delete Library Section
|
||||
@@ -565,6 +569,129 @@ func (s *Library) DeleteLibrary(ctx context.Context, request operations.DeleteLi
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetLibraryItems - Get Library Items
|
||||
// Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values:
|
||||
// - `all`: All items in the section.
|
||||
// - `unwatched`: Items that have not been played.
|
||||
// - `newest`: Items that are recently released.
|
||||
// - `recentlyAdded`: Items that are recently added to the library.
|
||||
// - `recentlyViewed`: Items that were recently viewed.
|
||||
// - `onDeck`: Items to continue watching.
|
||||
// - `collection`: Items categorized by collection.
|
||||
// - `edition`: Items categorized by edition.
|
||||
// - `genre`: Items categorized by genre.
|
||||
// - `year`: Items categorized by year of release.
|
||||
// - `decade`: Items categorized by decade.
|
||||
// - `director`: Items categorized by director.
|
||||
// - `actor`: Items categorized by starring actor.
|
||||
// - `country`: Items categorized by country of origin.
|
||||
// - `contentRating`: Items categorized by content rating.
|
||||
// - `rating`: Items categorized by rating.
|
||||
// - `resolution`: Items categorized by resolution.
|
||||
// - `firstCharacter`: Items categorized by the first letter.
|
||||
// - `folder`: Items categorized by folder.
|
||||
func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLibraryItemsRequest) (*operations.GetLibraryItemsResponse, error) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getLibraryItems",
|
||||
OAuth2Scopes: []string{},
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
opURL, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/{tag}", request, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error generating URL: %w", err)
|
||||
}
|
||||
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error creating request: %w", err)
|
||||
}
|
||||
req.Header.Set("Accept", "application/json")
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
httpRes, err := s.sdkConfiguration.Client.Do(req)
|
||||
if err != nil || httpRes == nil {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error sending request: %w", err)
|
||||
} else {
|
||||
err = fmt.Errorf("error sending request: no response")
|
||||
}
|
||||
|
||||
_, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err)
|
||||
return nil, err
|
||||
} else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) {
|
||||
_httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if _httpRes != nil {
|
||||
httpRes = _httpRes
|
||||
}
|
||||
} else {
|
||||
httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
res := &operations.GetLibraryItemsResponse{
|
||||
StatusCode: httpRes.StatusCode,
|
||||
ContentType: httpRes.Header.Get("Content-Type"),
|
||||
RawResponse: httpRes,
|
||||
}
|
||||
|
||||
rawBody, err := io.ReadAll(httpRes.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error reading response body: %w", err)
|
||||
}
|
||||
httpRes.Body.Close()
|
||||
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
|
||||
|
||||
switch {
|
||||
case httpRes.StatusCode == 200:
|
||||
switch {
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out operations.GetLibraryItemsResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
res.TwoHundredApplicationJSONObject = &out
|
||||
default:
|
||||
return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
case httpRes.StatusCode == 400:
|
||||
case httpRes.StatusCode == 401:
|
||||
switch {
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out operations.GetLibraryItemsLibraryResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
res.FourHundredAndOneApplicationJSONObject = &out
|
||||
default:
|
||||
return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
default:
|
||||
return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// RefreshLibrary - Refresh Library
|
||||
@@ -657,6 +784,7 @@ func (s *Library) RefreshLibrary(ctx context.Context, request operations.Refresh
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// SearchLibrary - Search Library
|
||||
@@ -758,7 +886,20 @@ func (s *Library) SearchLibrary(ctx context.Context, request operations.SearchLi
|
||||
return nil, err
|
||||
}
|
||||
|
||||
res.Object = &out
|
||||
res.TwoHundredApplicationJSONObject = &out
|
||||
default:
|
||||
return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
case httpRes.StatusCode == 400:
|
||||
case httpRes.StatusCode == 401:
|
||||
switch {
|
||||
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
|
||||
var out operations.SearchLibraryLibraryResponseBody
|
||||
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
res.FourHundredAndOneApplicationJSONObject = &out
|
||||
default:
|
||||
return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes)
|
||||
}
|
||||
@@ -767,6 +908,7 @@ func (s *Library) SearchLibrary(ctx context.Context, request operations.SearchLi
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetMetadata - Get Items Metadata
|
||||
@@ -869,6 +1011,7 @@ func (s *Library) GetMetadata(ctx context.Context, request operations.GetMetadat
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetMetadataChildren - Get Items Children
|
||||
@@ -971,6 +1114,7 @@ func (s *Library) GetMetadataChildren(ctx context.Context, request operations.Ge
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetOnDeck - Get On Deck
|
||||
@@ -1073,4 +1217,5 @@ func (s *Library) GetOnDeck(ctx context.Context) (*operations.GetOnDeckResponse,
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -120,6 +120,7 @@ func (s *Log) LogLine(ctx context.Context, request operations.LogLineRequest) (*
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// LogMultiLine - Logging a multi-line message
|
||||
@@ -238,6 +239,7 @@ func (s *Log) LogMultiLine(ctx context.Context, request string) (*operations.Log
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// EnablePaperTrail - Enabling Papertrail
|
||||
@@ -332,4 +334,5 @@ func (s *Log) EnablePaperTrail(ctx context.Context) (*operations.EnablePaperTrai
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -120,6 +120,7 @@ func (s *Media) MarkPlayed(ctx context.Context, request operations.MarkPlayedReq
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// MarkUnplayed - Mark Media Unplayed
|
||||
@@ -216,6 +217,7 @@ func (s *Media) MarkUnplayed(ctx context.Context, request operations.MarkUnplaye
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// UpdatePlayProgress - Update Media Play Progress
|
||||
@@ -312,4 +314,5 @@ func (s *Media) UpdatePlayProgress(ctx context.Context, request operations.Updat
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ const (
|
||||
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 {
|
||||
@@ -47,7 +46,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -19,7 +19,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -20,7 +20,6 @@ const (
|
||||
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 {
|
||||
@@ -50,7 +49,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -19,7 +19,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -21,7 +21,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -21,7 +21,6 @@ const (
|
||||
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 {
|
||||
|
||||
1039
internal/sdk/models/operations/getlibraryitems.go
Normal file
1039
internal/sdk/models/operations/getlibraryitems.go
Normal file
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,6 @@ const (
|
||||
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 {
|
||||
@@ -50,7 +49,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -20,7 +20,6 @@ const (
|
||||
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 {
|
||||
@@ -48,7 +47,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -20,7 +20,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -18,7 +18,6 @@ const (
|
||||
func (e GetTransientTokenQueryParamType) ToPointer() *GetTransientTokenQueryParamType {
|
||||
return &e
|
||||
}
|
||||
|
||||
func (e *GetTransientTokenQueryParamType) UnmarshalJSON(data []byte) error {
|
||||
var v string
|
||||
if err := json.Unmarshal(data, &v); err != nil {
|
||||
@@ -43,7 +42,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -27,7 +27,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -21,7 +21,6 @@ const (
|
||||
func (e Type) ToPointer() *Type {
|
||||
return &e
|
||||
}
|
||||
|
||||
func (e *Type) UnmarshalJSON(data []byte) error {
|
||||
var v int64
|
||||
if err := json.Unmarshal(data, &v); err != nil {
|
||||
@@ -63,6 +62,45 @@ func (o *SearchLibraryRequest) GetType() Type {
|
||||
return o.Type
|
||||
}
|
||||
|
||||
type SearchLibraryErrors struct {
|
||||
Code *float64 `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Status *float64 `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
func (o *SearchLibraryErrors) GetCode() *float64 {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.Code
|
||||
}
|
||||
|
||||
func (o *SearchLibraryErrors) GetMessage() *string {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.Message
|
||||
}
|
||||
|
||||
func (o *SearchLibraryErrors) GetStatus() *float64 {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.Status
|
||||
}
|
||||
|
||||
// SearchLibraryLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
type SearchLibraryLibraryResponseBody struct {
|
||||
Errors []SearchLibraryErrors `json:"errors,omitempty"`
|
||||
}
|
||||
|
||||
func (o *SearchLibraryLibraryResponseBody) GetErrors() []SearchLibraryErrors {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.Errors
|
||||
}
|
||||
|
||||
type SearchLibraryMetadata struct {
|
||||
RatingKey *string `json:"ratingKey,omitempty"`
|
||||
Key *string `json:"key,omitempty"`
|
||||
@@ -353,7 +391,9 @@ type SearchLibraryResponse struct {
|
||||
// Raw HTTP response; suitable for custom response parsing
|
||||
RawResponse *http.Response
|
||||
// The contents of the library by section and type
|
||||
Object *SearchLibraryResponseBody
|
||||
TwoHundredApplicationJSONObject *SearchLibraryResponseBody
|
||||
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||
FourHundredAndOneApplicationJSONObject *SearchLibraryLibraryResponseBody
|
||||
}
|
||||
|
||||
func (o *SearchLibraryResponse) GetContentType() string {
|
||||
@@ -377,9 +417,16 @@ func (o *SearchLibraryResponse) GetRawResponse() *http.Response {
|
||||
return o.RawResponse
|
||||
}
|
||||
|
||||
func (o *SearchLibraryResponse) GetObject() *SearchLibraryResponseBody {
|
||||
func (o *SearchLibraryResponse) GetTwoHundredApplicationJSONObject() *SearchLibraryResponseBody {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.Object
|
||||
return o.TwoHundredApplicationJSONObject
|
||||
}
|
||||
|
||||
func (o *SearchLibraryResponse) GetFourHundredAndOneApplicationJSONObject() *SearchLibraryLibraryResponseBody {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
return o.FourHundredAndOneApplicationJSONObject
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -31,7 +31,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -22,7 +22,6 @@ const (
|
||||
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 {
|
||||
|
||||
@@ -135,6 +135,7 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetPlaylists - Get All Playlists
|
||||
@@ -241,6 +242,7 @@ func (s *Playlists) GetPlaylists(ctx context.Context, request operations.GetPlay
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetPlaylist - Retrieve Playlist
|
||||
@@ -344,6 +346,7 @@ func (s *Playlists) GetPlaylist(ctx context.Context, request operations.GetPlayl
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// DeletePlaylist - Deletes a Playlist
|
||||
@@ -436,6 +439,7 @@ func (s *Playlists) DeletePlaylist(ctx context.Context, request operations.Delet
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// UpdatePlaylist - Update a Playlist
|
||||
@@ -532,6 +536,7 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, request operations.Updat
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetPlaylistContents - Retrieve Playlist Contents
|
||||
@@ -641,6 +646,7 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, request operations.
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// ClearPlaylistContents - Delete Playlist Contents
|
||||
@@ -733,6 +739,7 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, request operation
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// AddPlaylistContents - Adding to a Playlist
|
||||
@@ -840,6 +847,7 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, request operations.
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// UploadPlaylist - Upload Playlist
|
||||
@@ -936,4 +944,5 @@ func (s *Playlists) UploadPlaylist(ctx context.Context, request operations.Uploa
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@ func (s *Plex) GetPin(ctx context.Context, request operations.GetPinRequest, opt
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetToken - Get Access Token
|
||||
@@ -254,4 +255,5 @@ func (s *Plex) GetToken(ctx context.Context, request operations.GetTokenRequest,
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -171,7 +171,6 @@ const (
|
||||
func (e ServerProtocol) ToPointer() *ServerProtocol {
|
||||
return &e
|
||||
}
|
||||
|
||||
func (e *ServerProtocol) UnmarshalJSON(data []byte) error {
|
||||
var v string
|
||||
if err := json.Unmarshal(data, &v); err != nil {
|
||||
@@ -234,16 +233,10 @@ func WithClient(client HTTPClient) SDKOption {
|
||||
}
|
||||
}
|
||||
|
||||
func withSecurity(security interface{}) func(context.Context) (interface{}, error) {
|
||||
return func(context.Context) (interface{}, error) {
|
||||
return security, nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurity configures the SDK to use the provided security details
|
||||
func WithSecurity(security shared.Security) SDKOption {
|
||||
return func(sdk *PlexAPI) {
|
||||
sdk.sdkConfiguration.Security = withSecurity(security)
|
||||
sdk.sdkConfiguration.Security = utils.AsSecuritySource(security)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,8 +269,8 @@ func New(opts ...SDKOption) *PlexAPI {
|
||||
Language: "go",
|
||||
OpenAPIDocVersion: "0.0.3",
|
||||
SDKVersion: "0.0.1",
|
||||
GenVersion: "2.326.3",
|
||||
UserAgent: "speakeasy-sdk/go 0.0.1 2.326.3 0.0.3 github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk",
|
||||
GenVersion: "2.335.5",
|
||||
UserAgent: "speakeasy-sdk/go 0.0.1 2.335.5 0.0.3 github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk",
|
||||
Globals: globals.Globals{},
|
||||
ServerDefaults: []map[string]string{
|
||||
{
|
||||
|
||||
@@ -132,6 +132,7 @@ func (s *Search) PerformSearch(ctx context.Context, request operations.PerformSe
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// PerformVoiceSearch - Perform a voice search
|
||||
@@ -231,6 +232,7 @@ func (s *Search) PerformVoiceSearch(ctx context.Context, request operations.Perf
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetSearchResults - Get Search Results
|
||||
@@ -337,4 +339,5 @@ func (s *Search) GetSearchResults(ctx context.Context, request operations.GetSea
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@ func (s *Server) GetServerCapabilities(ctx context.Context) (*operations.GetServ
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetServerPreferences - Get Server Preferences
|
||||
@@ -228,6 +229,7 @@ func (s *Server) GetServerPreferences(ctx context.Context) (*operations.GetServe
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetAvailableClients - Get Available Clients
|
||||
@@ -330,6 +332,7 @@ func (s *Server) GetAvailableClients(ctx context.Context) (*operations.GetAvaila
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetDevices - Get Devices
|
||||
@@ -432,6 +435,7 @@ func (s *Server) GetDevices(ctx context.Context) (*operations.GetDevicesResponse
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetServerIdentity - Get Server Identity
|
||||
@@ -534,6 +538,7 @@ func (s *Server) GetServerIdentity(ctx context.Context) (*operations.GetServerId
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetMyPlexAccount - Get MyPlex Account
|
||||
@@ -636,6 +641,7 @@ func (s *Server) GetMyPlexAccount(ctx context.Context) (*operations.GetMyPlexAcc
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetResizedPhoto - Get a Resized Photo
|
||||
@@ -732,6 +738,7 @@ func (s *Server) GetResizedPhoto(ctx context.Context, request operations.GetResi
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetServerList - Get Server List
|
||||
@@ -834,4 +841,5 @@ func (s *Server) GetServerList(ctx context.Context) (*operations.GetServerListRe
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@ func (s *Sessions) GetSessions(ctx context.Context) (*operations.GetSessionsResp
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetSessionHistory - Get Session History
|
||||
@@ -228,6 +229,7 @@ func (s *Sessions) GetSessionHistory(ctx context.Context) (*operations.GetSessio
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// GetTranscodeSessions - Get Transcode Sessions
|
||||
@@ -330,6 +332,7 @@ func (s *Sessions) GetTranscodeSessions(ctx context.Context) (*operations.GetTra
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// StopTranscodeSession - Stop a Transcode Session
|
||||
@@ -422,4 +425,5 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, request operations.
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -130,4 +130,5 @@ func (s *Statistics) GetStatistics(ctx context.Context, request operations.GetSt
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ func (s *Updater) GetUpdateStatus(ctx context.Context) (*operations.GetUpdateSta
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// CheckForUpdates - Checking for updates
|
||||
@@ -223,6 +224,7 @@ func (s *Updater) CheckForUpdates(ctx context.Context, request operations.CheckF
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// ApplyUpdates - Apply Updates
|
||||
@@ -321,4 +323,5 @@ func (s *Updater) ApplyUpdates(ctx context.Context, request operations.ApplyUpda
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
@@ -120,6 +120,7 @@ func (s *Video) GetTimeline(ctx context.Context, request operations.GetTimelineR
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
// StartUniversalTranscode - Start Universal Transcode
|
||||
@@ -216,4 +217,5 @@ func (s *Video) StartUniversalTranscode(ctx context.Context, request operations.
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user