mirror of
https://github.com/LukeHagar/plexterraform.git
synced 2025-12-09 20:47:45 +00:00
ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.148.0
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
lockVersion: 2.0.0
|
lockVersion: 2.0.0
|
||||||
id: e742591b-391d-4f4e-8484-d01a093b32ec
|
id: e742591b-391d-4f4e-8484-d01a093b32ec
|
||||||
management:
|
management:
|
||||||
docChecksum: a14d0ae27d4f5bd83b80747112f74352
|
docChecksum: 1e8e82037a237e1d1467721fbd2c7ab0
|
||||||
docVersion: 0.0.3
|
docVersion: 0.0.3
|
||||||
speakeasyVersion: internal
|
speakeasyVersion: internal
|
||||||
generationVersion: 2.237.2
|
generationVersion: 2.237.3
|
||||||
releaseVersion: 0.2.5
|
releaseVersion: 0.3.0
|
||||||
configChecksum: 8a99c36c4d1db17583b4c16f920029a5
|
configChecksum: 870f0f2f99cd8c64af8475f2693673f7
|
||||||
repoURL: https://github.com/LukeHagar/plexterraform.git
|
repoURL: https://github.com/LukeHagar/plexterraform.git
|
||||||
repoSubDirectory: .
|
repoSubDirectory: .
|
||||||
published: true
|
published: true
|
||||||
@@ -17,6 +17,7 @@ features:
|
|||||||
globalSecurity: 2.81.3
|
globalSecurity: 2.81.3
|
||||||
globalServerURLs: 2.82.1
|
globalServerURLs: 2.82.1
|
||||||
nameOverrides: 2.81.1
|
nameOverrides: 2.81.1
|
||||||
|
unions: 2.81.7
|
||||||
generatedFiles:
|
generatedFiles:
|
||||||
- internal/sdk/server.go
|
- internal/sdk/server.go
|
||||||
- internal/sdk/media.go
|
- internal/sdk/media.go
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
PlexAPI = {
|
PlexAPI = {
|
||||||
source = "LukeHagar/PlexAPI"
|
source = "LukeHagar/PlexAPI"
|
||||||
version = "0.2.5"
|
version = "0.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,3 +63,11 @@ Based on:
|
|||||||
- Speakeasy CLI 1.147.0 (2.237.2) https://github.com/speakeasy-api/speakeasy
|
- Speakeasy CLI 1.147.0 (2.237.2) https://github.com/speakeasy-api/speakeasy
|
||||||
### Generated
|
### Generated
|
||||||
- [terraform v0.2.5] .
|
- [terraform v0.2.5] .
|
||||||
|
|
||||||
|
## 2024-01-20 03:10:25
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc 0.0.3
|
||||||
|
- Speakeasy CLI 1.148.0 (2.237.3) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [terraform v0.3.0] .
|
||||||
@@ -17,7 +17,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
PlexAPI = {
|
PlexAPI = {
|
||||||
source = "LukeHagar/PlexAPI"
|
source = "LukeHagar/PlexAPI"
|
||||||
version = "0.2.5"
|
version = "0.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ terraform {
|
|||||||
required_providers {
|
required_providers {
|
||||||
PlexAPI = {
|
PlexAPI = {
|
||||||
source = "LukeHagar/PlexAPI"
|
source = "LukeHagar/PlexAPI"
|
||||||
version = "0.2.5"
|
version = "0.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
gen.yaml
2
gen.yaml
@@ -8,7 +8,7 @@ generation:
|
|||||||
fixes:
|
fixes:
|
||||||
nameResolutionDec2023: false
|
nameResolutionDec2023: false
|
||||||
terraform:
|
terraform:
|
||||||
version: 0.2.5
|
version: 0.3.0
|
||||||
author: LukeHagar
|
author: LukeHagar
|
||||||
imports:
|
imports:
|
||||||
option: openapi
|
option: openapi
|
||||||
|
|||||||
@@ -112,11 +112,25 @@ func (o *GetLibraryLibraryResponseBody) GetErrors() []GetLibraryErrors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GetLibraryDirectory struct {
|
type GetLibraryDirectory struct {
|
||||||
|
Key *string `json:"key,omitempty"`
|
||||||
|
Title *string `json:"title,omitempty"`
|
||||||
Secondary *bool `json:"secondary,omitempty"`
|
Secondary *bool `json:"secondary,omitempty"`
|
||||||
Prompt *string `json:"prompt,omitempty"`
|
Prompt *string `json:"prompt,omitempty"`
|
||||||
Search *bool `json:"search,omitempty"`
|
Search *bool `json:"search,omitempty"`
|
||||||
Key *string `json:"key,omitempty"`
|
}
|
||||||
Title *string `json:"title,omitempty"`
|
|
||||||
|
func (o *GetLibraryDirectory) GetKey() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Key
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryDirectory) GetTitle() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Title
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetLibraryDirectory) GetSecondary() *bool {
|
func (o *GetLibraryDirectory) GetSecondary() *bool {
|
||||||
@@ -140,20 +154,232 @@ func (o *GetLibraryDirectory) GetSearch() *bool {
|
|||||||
return o.Search
|
return o.Search
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetLibraryDirectory) GetKey() *string {
|
type Filter struct {
|
||||||
|
Filter *string `json:"filter,omitempty"`
|
||||||
|
FilterType *string `json:"filterType,omitempty"`
|
||||||
|
Key *string `json:"key,omitempty"`
|
||||||
|
Title *string `json:"title,omitempty"`
|
||||||
|
Type *string `json:"type,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Filter) GetFilter() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Filter
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Filter) GetFilterType() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.FilterType
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Filter) GetKey() *string {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return o.Key
|
return o.Key
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetLibraryDirectory) GetTitle() *string {
|
func (o *Filter) GetTitle() *string {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return o.Title
|
return o.Title
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (o *Filter) GetType() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Type
|
||||||
|
}
|
||||||
|
|
||||||
|
type Sort struct {
|
||||||
|
Default *string `json:"default,omitempty"`
|
||||||
|
DefaultDirection *string `json:"defaultDirection,omitempty"`
|
||||||
|
DescKey *string `json:"descKey,omitempty"`
|
||||||
|
FirstCharacterKey *string `json:"firstCharacterKey,omitempty"`
|
||||||
|
Key *string `json:"key,omitempty"`
|
||||||
|
Title *string `json:"title,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Sort) GetDefault() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Default
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Sort) GetDefaultDirection() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.DefaultDirection
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Sort) GetDescKey() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.DescKey
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Sort) GetFirstCharacterKey() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.FirstCharacterKey
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Sort) GetKey() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Key
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Sort) GetTitle() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Title
|
||||||
|
}
|
||||||
|
|
||||||
|
type Field struct {
|
||||||
|
Key *string `json:"key,omitempty"`
|
||||||
|
Title *string `json:"title,omitempty"`
|
||||||
|
Type *string `json:"type,omitempty"`
|
||||||
|
SubType *string `json:"subType,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Field) GetKey() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Key
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Field) GetTitle() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Title
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Field) GetType() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Type
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Field) GetSubType() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.SubType
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetLibraryType struct {
|
||||||
|
Key *string `json:"key,omitempty"`
|
||||||
|
Type *string `json:"type,omitempty"`
|
||||||
|
Title *string `json:"title,omitempty"`
|
||||||
|
Active *bool `json:"active,omitempty"`
|
||||||
|
Filter []Filter `json:"Filter,omitempty"`
|
||||||
|
Sort []Sort `json:"Sort,omitempty"`
|
||||||
|
Field []Field `json:"Field,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryType) GetKey() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Key
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryType) GetType() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Type
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryType) GetTitle() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Title
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryType) GetActive() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Active
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryType) GetFilter() []Filter {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Filter
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryType) GetSort() []Sort {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Sort
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryType) GetField() []Field {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Field
|
||||||
|
}
|
||||||
|
|
||||||
|
type Operator struct {
|
||||||
|
Key *string `json:"key,omitempty"`
|
||||||
|
Title *string `json:"title,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Operator) GetKey() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Key
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Operator) GetTitle() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Title
|
||||||
|
}
|
||||||
|
|
||||||
|
type FieldType struct {
|
||||||
|
Type *string `json:"type,omitempty"`
|
||||||
|
Operator []Operator `json:"Operator,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *FieldType) GetType() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Type
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *FieldType) GetOperator() []Operator {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Operator
|
||||||
|
}
|
||||||
|
|
||||||
type GetLibraryMediaContainer struct {
|
type GetLibraryMediaContainer struct {
|
||||||
Size *int `json:"size,omitempty"`
|
Size *int `json:"size,omitempty"`
|
||||||
AllowSync *bool `json:"allowSync,omitempty"`
|
AllowSync *bool `json:"allowSync,omitempty"`
|
||||||
@@ -168,6 +394,8 @@ type GetLibraryMediaContainer struct {
|
|||||||
ViewGroup *string `json:"viewGroup,omitempty"`
|
ViewGroup *string `json:"viewGroup,omitempty"`
|
||||||
ViewMode *int `json:"viewMode,omitempty"`
|
ViewMode *int `json:"viewMode,omitempty"`
|
||||||
Directory []GetLibraryDirectory `json:"Directory,omitempty"`
|
Directory []GetLibraryDirectory `json:"Directory,omitempty"`
|
||||||
|
Type []GetLibraryType `json:"Type,omitempty"`
|
||||||
|
FieldType []FieldType `json:"FieldType,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetLibraryMediaContainer) GetSize() *int {
|
func (o *GetLibraryMediaContainer) GetSize() *int {
|
||||||
@@ -261,6 +489,20 @@ func (o *GetLibraryMediaContainer) GetDirectory() []GetLibraryDirectory {
|
|||||||
return o.Directory
|
return o.Directory
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetType() []GetLibraryType {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Type
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetLibraryMediaContainer) GetFieldType() []FieldType {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.FieldType
|
||||||
|
}
|
||||||
|
|
||||||
// GetLibraryResponseBody - The details of the library
|
// GetLibraryResponseBody - The details of the library
|
||||||
type GetLibraryResponseBody struct {
|
type GetLibraryResponseBody struct {
|
||||||
MediaContainer *GetLibraryMediaContainer `json:"MediaContainer,omitempty"`
|
MediaContainer *GetLibraryMediaContainer `json:"MediaContainer,omitempty"`
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
package operations
|
package operations
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -33,18 +35,270 @@ func (o *GetServerPreferencesErrors) GetStatus() *float64 {
|
|||||||
return o.Status
|
return o.Status
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetServerPreferencesResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
// GetServerPreferencesServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||||
type GetServerPreferencesResponseBody struct {
|
type GetServerPreferencesServerResponseBody struct {
|
||||||
Errors []GetServerPreferencesErrors `json:"errors,omitempty"`
|
Errors []GetServerPreferencesErrors `json:"errors,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetServerPreferencesResponseBody) GetErrors() []GetServerPreferencesErrors {
|
func (o *GetServerPreferencesServerResponseBody) GetErrors() []GetServerPreferencesErrors {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return o.Errors
|
return o.Errors
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Two struct {
|
||||||
|
ID *string `json:"id,omitempty"`
|
||||||
|
Label *string `json:"label,omitempty"`
|
||||||
|
Summary *string `json:"summary,omitempty"`
|
||||||
|
Type *string `json:"type,omitempty"`
|
||||||
|
Default *int `json:"default,omitempty"`
|
||||||
|
Value *int `json:"value,omitempty"`
|
||||||
|
Hidden *bool `json:"hidden,omitempty"`
|
||||||
|
Advanced *bool `json:"advanced,omitempty"`
|
||||||
|
Group *string `json:"group,omitempty"`
|
||||||
|
EnumValues *string `json:"enumValues,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Two) GetID() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.ID
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Two) GetLabel() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Label
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Two) GetSummary() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Summary
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Two) GetType() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Type
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Two) GetDefault() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Default
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Two) GetValue() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Two) GetHidden() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Two) GetAdvanced() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Advanced
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Two) GetGroup() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Group
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *Two) GetEnumValues() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.EnumValues
|
||||||
|
}
|
||||||
|
|
||||||
|
type One struct {
|
||||||
|
ID *string `json:"id,omitempty"`
|
||||||
|
Label *string `json:"label,omitempty"`
|
||||||
|
Summary *string `json:"summary,omitempty"`
|
||||||
|
Type *string `json:"type,omitempty"`
|
||||||
|
Default *string `json:"default,omitempty"`
|
||||||
|
Value *string `json:"value,omitempty"`
|
||||||
|
Hidden *bool `json:"hidden,omitempty"`
|
||||||
|
Advanced *bool `json:"advanced,omitempty"`
|
||||||
|
Group *string `json:"group,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *One) GetID() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.ID
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *One) GetLabel() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Label
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *One) GetSummary() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Summary
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *One) GetType() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Type
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *One) GetDefault() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Default
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *One) GetValue() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *One) GetHidden() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *One) GetAdvanced() *bool {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Advanced
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *One) GetGroup() *string {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Group
|
||||||
|
}
|
||||||
|
|
||||||
|
type SettingType string
|
||||||
|
|
||||||
|
const (
|
||||||
|
SettingTypeOne SettingType = "1"
|
||||||
|
SettingTypeTwo SettingType = "2"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Setting struct {
|
||||||
|
One *One
|
||||||
|
Two *Two
|
||||||
|
|
||||||
|
Type SettingType
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateSettingOne(one One) Setting {
|
||||||
|
typ := SettingTypeOne
|
||||||
|
|
||||||
|
return Setting{
|
||||||
|
One: &one,
|
||||||
|
Type: typ,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateSettingTwo(two Two) Setting {
|
||||||
|
typ := SettingTypeTwo
|
||||||
|
|
||||||
|
return Setting{
|
||||||
|
Two: &two,
|
||||||
|
Type: typ,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (u *Setting) UnmarshalJSON(data []byte) error {
|
||||||
|
|
||||||
|
one := new(One)
|
||||||
|
if err := utils.UnmarshalJSON(data, &one, "", true, true); err == nil {
|
||||||
|
u.One = one
|
||||||
|
u.Type = SettingTypeOne
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
two := new(Two)
|
||||||
|
if err := utils.UnmarshalJSON(data, &two, "", true, true); err == nil {
|
||||||
|
u.Two = two
|
||||||
|
u.Type = SettingTypeTwo
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return errors.New("could not unmarshal into supported union types")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (u Setting) MarshalJSON() ([]byte, error) {
|
||||||
|
if u.One != nil {
|
||||||
|
return utils.MarshalJSON(u.One, "", true)
|
||||||
|
}
|
||||||
|
|
||||||
|
if u.Two != nil {
|
||||||
|
return utils.MarshalJSON(u.Two, "", true)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil, errors.New("could not marshal union type: all fields are null")
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetServerPreferencesMediaContainer struct {
|
||||||
|
Size *int `json:"size,omitempty"`
|
||||||
|
Setting []Setting `json:"Setting,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetServerPreferencesMediaContainer) GetSize() *int {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Size
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetServerPreferencesMediaContainer) GetSetting() []Setting {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.Setting
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetServerPreferencesResponseBody - Server Preferences
|
||||||
|
type GetServerPreferencesResponseBody struct {
|
||||||
|
MediaContainer *GetServerPreferencesMediaContainer `json:"MediaContainer,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetServerPreferencesResponseBody) GetMediaContainer() *GetServerPreferencesMediaContainer {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.MediaContainer
|
||||||
|
}
|
||||||
|
|
||||||
type GetServerPreferencesResponse struct {
|
type GetServerPreferencesResponse struct {
|
||||||
// HTTP response content type for this operation
|
// HTTP response content type for this operation
|
||||||
ContentType string
|
ContentType string
|
||||||
@@ -52,8 +306,10 @@ type GetServerPreferencesResponse struct {
|
|||||||
StatusCode int
|
StatusCode int
|
||||||
// Raw HTTP response; suitable for custom response parsing
|
// Raw HTTP response; suitable for custom response parsing
|
||||||
RawResponse *http.Response
|
RawResponse *http.Response
|
||||||
|
// Server Preferences
|
||||||
|
TwoHundredApplicationJSONObject *GetServerPreferencesResponseBody
|
||||||
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
||||||
Object *GetServerPreferencesResponseBody
|
FourHundredAndOneApplicationJSONObject *GetServerPreferencesServerResponseBody
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetServerPreferencesResponse) GetContentType() string {
|
func (o *GetServerPreferencesResponse) GetContentType() string {
|
||||||
@@ -77,9 +333,16 @@ func (o *GetServerPreferencesResponse) GetRawResponse() *http.Response {
|
|||||||
return o.RawResponse
|
return o.RawResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *GetServerPreferencesResponse) GetObject() *GetServerPreferencesResponseBody {
|
func (o *GetServerPreferencesResponse) GetTwoHundredApplicationJSONObject() *GetServerPreferencesResponseBody {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return o.Object
|
return o.TwoHundredApplicationJSONObject
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *GetServerPreferencesResponse) GetFourHundredAndOneApplicationJSONObject() *GetServerPreferencesServerResponseBody {
|
||||||
|
if o == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return o.FourHundredAndOneApplicationJSONObject
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,9 +259,9 @@ func New(opts ...SDKOption) *PlexAPI {
|
|||||||
sdkConfiguration: sdkConfiguration{
|
sdkConfiguration: sdkConfiguration{
|
||||||
Language: "go",
|
Language: "go",
|
||||||
OpenAPIDocVersion: "0.0.3",
|
OpenAPIDocVersion: "0.0.3",
|
||||||
SDKVersion: "0.2.5",
|
SDKVersion: "0.3.0",
|
||||||
GenVersion: "2.237.2",
|
GenVersion: "2.237.3",
|
||||||
UserAgent: "speakeasy-sdk/go 0.2.5 2.237.2 0.0.3 PlexAPI",
|
UserAgent: "speakeasy-sdk/go 0.3.0 2.237.3 0.0.3 PlexAPI",
|
||||||
ServerDefaults: []map[string]string{
|
ServerDefaults: []map[string]string{
|
||||||
{
|
{
|
||||||
"protocol": "http",
|
"protocol": "http",
|
||||||
|
|||||||
@@ -132,9 +132,6 @@ func (s *Server) GetServerPreferences(ctx context.Context) (*operations.GetServe
|
|||||||
}
|
}
|
||||||
switch {
|
switch {
|
||||||
case httpRes.StatusCode == 200:
|
case httpRes.StatusCode == 200:
|
||||||
fallthrough
|
|
||||||
case httpRes.StatusCode == 400:
|
|
||||||
case httpRes.StatusCode == 401:
|
|
||||||
switch {
|
switch {
|
||||||
case utils.MatchContentType(contentType, `application/json`):
|
case utils.MatchContentType(contentType, `application/json`):
|
||||||
var out operations.GetServerPreferencesResponseBody
|
var out operations.GetServerPreferencesResponseBody
|
||||||
@@ -142,7 +139,20 @@ func (s *Server) GetServerPreferences(ctx context.Context) (*operations.GetServe
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
res.Object = &out
|
res.TwoHundredApplicationJSONObject = &out
|
||||||
|
default:
|
||||||
|
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
|
}
|
||||||
|
case httpRes.StatusCode == 400:
|
||||||
|
case httpRes.StatusCode == 401:
|
||||||
|
switch {
|
||||||
|
case utils.MatchContentType(contentType, `application/json`):
|
||||||
|
var out operations.GetServerPreferencesServerResponseBody
|
||||||
|
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
res.FourHundredAndOneApplicationJSONObject = &out
|
||||||
default:
|
default:
|
||||||
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user