diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 476b507..0000000 --- a/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -vendor/ - -# Go workspace file -go.work - -api-specs/ diff --git a/Makefile b/Makefile deleted file mode 100644 index 08a649c..0000000 --- a/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -.PHONY: * - -all: speakeasy - - -speakeasy: check-speakeasy - speakeasy generate sdk --lang go -o . -s ./openapi.yaml - -speakeasy-validate: check-speakeasy - speakeasy validate openapi -s ./openapi.yaml - -openapi: - curl https://raw.githubusercontent.com/LukeHagar/plex-api-spec/main/plex-media-server-spec-dereferenced.yaml > ./openapi.yaml - -# This will replace the generation source in your workflow file with your local schema path -generate-from-local: - @if ! which sed >/dev/null; then \ - echo "sed is not installed. Please install it using the following command:"; \ - echo "For Ubuntu/Debian: apt-get install sed"; \ - echo "For macOS: sed is pre-installed"; \ - exit 1; \ - fi - @sed -i '' '/openapi_docs: |/{n;s|-.*|- ./openapi.yaml|;}' ./.github/workflows/speakeasy_sdk_generation.yml - -check-speakeasy: - @command -v speakeasy >/dev/null 2>&1 || { echo >&2 "speakeasy CLI is not installed. Please install before continuing."; exit 1; } diff --git a/README.md b/README.md deleted file mode 100644 index ef176ba..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# plexgo diff --git a/client.go b/client.go deleted file mode 100644 index 59c35e7..0000000 --- a/client.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -IdentityNow V3 API - -Use these APIs to interact with the IdentityNow platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. - -API version: 3.0.0 -*/ - -package plexgo - -import ( - "regexp" - - "github.com/hashicorp/go-retryablehttp" - "github.com/lukehagar/plexgo/plextv" - "github.com/lukehagar/plexgo/pms" -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) -) - -// APIClient manages communication with the Plex API -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - PMS *pms.APIClient - PlexTV *plextv.APIClient - token string -} - -type service struct { - PMS *pms.APIClient - PlexTV *plextv.APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = retryablehttp.NewClient() - } - - c := &APIClient{} - - ClientPMS := pms.NewConfiguration(cfg.ClientConfiguration.ClientId, cfg.ClientConfiguration.ClientSecret, cfg.ClientConfiguration.BaseURL, cfg.ClientConfiguration.TokenURL, cfg.ClientConfiguration.Token) - ClientPlexTV := plextv.NewConfiguration(cfg.ClientConfiguration.ClientId, cfg.ClientConfiguration.ClientSecret, "https://plex.tv/api", cfg.ClientConfiguration.TokenURL, cfg.ClientConfiguration.Token) - - ClientPMS.HTTPClient = cfg.HTTPClient - ClientPlexTV.HTTPClient = cfg.HTTPClient - - c.PMS = pms.NewAPIClient(ClientPMS) - c.PlexTV = plextv.NewAPIClient(ClientPlexTV) - - // API Services - - return c -} diff --git a/configuration.go b/configuration.go deleted file mode 100644 index 4c26a38..0000000 --- a/configuration.go +++ /dev/null @@ -1,183 +0,0 @@ -/* -IdentityNow V3 API - -Use these APIs to interact with the IdentityNow platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. - -API version: 3.0.0 -*/ - -package plexgo - -import ( - "fmt" - "os" - "path/filepath" - "time" - - "github.com/hashicorp/go-retryablehttp" - "github.com/spf13/viper" -) - -type PatConfig struct { - ClientID string `mapstructure:"clientid"` - ClientSecret string `mapstructure:"clientsecret"` - AccessToken string `mapstructure:"accesstoken"` - Expiry time.Time `mapstructure:"expiry"` -} - -type Token struct { - AccessToken string `mapstructure:"accesstoken"` - Expiry time.Time `mapstructure:"expiry"` -} - -type Environment struct { - TenantURL string `mapstructure:"tenanturl"` - BaseURL string `mapstructure:"baseurl"` - Pat PatConfig `mapstructure:"pat"` - OAuth Token `mapstructure:"oauth"` -} - -type OrgConfig struct { - - //Standard Variables - Debug bool `mapstructure:"debug"` - AuthType string `mapstructure:"authtype"` - ActiveEnvironment string `mapstructure:"activeenvironment"` - Environments map[string]Environment `mapstructure:"environments"` -} - -type ClientConfiguration struct { - ClientId string - ClientSecret string - BaseURL string - TokenURL string - Token string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - HTTPClient *retryablehttp.Client - ClientConfiguration ClientConfiguration -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration(clientConfiguration ClientConfiguration) *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/0.1.0/go", - Debug: false, - ClientConfiguration: clientConfiguration, - } - return cfg -} - -func localConfig() ClientConfiguration { - executableDir, err := os.Executable() - if err != nil { - panic(fmt.Errorf("unable to find executable directory: %s", err)) - } - - viper.AddConfigPath(filepath.Dir(executableDir)) - viper.AddConfigPath(".") - viper.SetConfigName("config") - viper.SetConfigType("json") - - if err2 := viper.ReadInConfig(); err != nil { - if _, ok := err2.(viper.ConfigFileNotFoundError); ok { - // Config file not found; ignore error if desired - // IGNORE they may be using env vars - } else { - // Config file was found but another error was produced - panic(fmt.Errorf("unable to read config: %s", err2)) - } - } - var simpleConfig ClientConfiguration - err3 := viper.Unmarshal(&simpleConfig) - - if err3 != nil { - panic(fmt.Errorf("unable to decode Config: %s", err3)) - } - - simpleConfig.TokenURL = simpleConfig.BaseURL + "/oauth/token" - return simpleConfig -} - -func homeConfig() ClientConfiguration { - home, err := os.UserHomeDir() - if err != nil { - panic(fmt.Errorf("unable to find home directory: %s", err)) - } - viper.AddConfigPath(filepath.Join(home, ".sailpoint")) - viper.SetConfigName("config") - viper.SetConfigType("yaml") - - if err2 := viper.ReadInConfig(); err != nil { - if _, ok := err2.(viper.ConfigFileNotFoundError); ok { - // Config file not found; ignore error if desired - // IGNORE they may be using env vars - } else { - // Config file was found but another error was produced - panic(fmt.Errorf("unable to read config: %s", err2)) - } - } - - var config OrgConfig - - err3 := viper.Unmarshal(&config) - - if err3 != nil { - panic(fmt.Errorf("unable to decode Config: %s", err3)) - } - - var simpleConfig ClientConfiguration - simpleConfig.BaseURL = config.Environments[config.ActiveEnvironment].BaseURL - simpleConfig.ClientId = config.Environments[config.ActiveEnvironment].Pat.ClientID - simpleConfig.ClientSecret = config.Environments[config.ActiveEnvironment].Pat.ClientSecret - simpleConfig.TokenURL = simpleConfig.BaseURL + "/oauth/token" - - return simpleConfig -} - -func envConfig() ClientConfiguration { - var simpleConfig ClientConfiguration - if os.Getenv("SAIL_BASE_URL") != "" { - simpleConfig.BaseURL = os.Getenv("SAIL_BASE_URL") - } - if os.Getenv("SAIL_CLIENT_ID") != "" { - simpleConfig.ClientId = os.Getenv("SAIL_CLIENT_ID") - } - if os.Getenv("SAIL_CLIENT_SECRET") != "" { - simpleConfig.ClientSecret = os.Getenv("SAIL_CLIENT_SECRET") - } - simpleConfig.TokenURL = simpleConfig.BaseURL + "/oauth/token" - return simpleConfig -} - -func NewDefaultConfiguration() *Configuration { - envConfiguration := envConfig() - if envConfiguration.BaseURL != "" { - return NewConfiguration(envConfiguration) - } - localConfiguration := localConfig() - if localConfiguration.BaseURL != "" { - return NewConfiguration(localConfiguration) - } - homeConfiguration := homeConfig() - if homeConfiguration.BaseURL != "" { - fmt.Printf("Configuration file found in home directory, this approach of loading configuration will be deprecated in future releases, please upgrade the CLI and use the new 'sail sdk init config' command to create a local configuration file") - return NewConfiguration(homeConfiguration) - } - panic(fmt.Errorf("unable to find any config file")) -} diff --git a/examples/go.mod b/examples/go.mod deleted file mode 100644 index 6b5a34f..0000000 --- a/examples/go.mod +++ /dev/null @@ -1,30 +0,0 @@ -module sdk - -go 1.18 - -require github.com/sailpoint-oss/golang-sdk v1.0.1 - -require ( - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-retryablehttp v0.7.2 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/magiconair/properties v1.8.7 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect - github.com/spf13/afero v1.9.3 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.15.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect - golang.org/x/net v0.6.0 // indirect - golang.org/x/oauth2 v0.5.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/examples/go.sum b/examples/go.sum deleted file mode 100644 index 20d6df9..0000000 --- a/examples/go.sum +++ /dev/null @@ -1,501 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= -github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= -github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= -github.com/sailpoint-oss/golang-sdk v1.0.1 h1:JFqoW5K7/RkwzqhEnh0bJfcDc5CDAwrf9TxXnYqK/Ho= -github.com/sailpoint-oss/golang-sdk v1.0.1/go.mod h1:aMxZu5ieAI89duSsOy/R7+dXwk5EbF6CAEvXt8ivMYw= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/examples/sdk.go b/examples/sdk.go deleted file mode 100644 index 9dd3e32..0000000 --- a/examples/sdk.go +++ /dev/null @@ -1,28 +0,0 @@ -package main - -import ( - "context" - - "github.com/lukehagar/plexgo" -) - -func main() { - - ctx := context.TODO() - - configuration := plexgo.NewDefaultConfiguration() - - apiClient := plexgo.NewAPIClient(configuration) - configuration.HTTPClient.RetryMax = 10 - - getResults(ctx, apiClient) - - //getAllPaginatedResults(ctx, apiClient) - -} - -func getResults(ctx context.Context, apiClient *plexgo.APIClient) { - - apiClient.GetLibrarySections(ctx) - -} diff --git a/go.mod b/go.mod deleted file mode 100644 index 66c2c6b..0000000 --- a/go.mod +++ /dev/null @@ -1,35 +0,0 @@ -module github.com/lukehagar/plexgo - -go 1.19 - -require github.com/sailpoint-oss/golang-sdk v1.1.6 - -require ( - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/hashicorp/go-retryablehttp v0.7.2 - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.5 // indirect - github.com/spf13/afero v1.9.2 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.14.0 - github.com/subosito/gotenv v1.4.1 // indirect - golang.org/x/net v0.5.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/text v0.6.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -require ( - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - golang.org/x/oauth2 v0.4.0 // indirect -) diff --git a/go.sum b/go.sum deleted file mode 100644 index 2832762..0000000 --- a/go.sum +++ /dev/null @@ -1,503 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= -github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= -github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= -github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= -github.com/sailpoint-oss/golang-sdk v1.1.6 h1:5EZkxVDeJXl2ZZDfhnc/mgRPExCzBi1oOJSakcdItlM= -github.com/sailpoint-oss/golang-sdk v1.1.6/go.mod h1:llHaEhgszkfXiImwiwwe50WpRQm4xhFXqt19mnmcbk0= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= -github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/openapi-generator-cli.jar b/openapi-generator-cli.jar deleted file mode 100644 index a7b8736..0000000 Binary files a/openapi-generator-cli.jar and /dev/null differ diff --git a/paginator.go b/paginator.go deleted file mode 100644 index 82861ab..0000000 --- a/paginator.go +++ /dev/null @@ -1,51 +0,0 @@ -package plexgo - -import ( - "net/http" - "reflect" -) - -func PaginateWithDefaults[T any](f interface{}) ([]T, *http.Response, error) { - return Paginate[T](f, 0, 250, 10000) -} - -func Paginate[T any](f interface{}, initialOffset int32, increment int32, limit int32) ([]T, *http.Response, error) { - var offset int32 = initialOffset - var returnObject []T - var latestResponse *http.Response - incrementResp := Invoke(f, "Limit", increment) - for offset < limit { - // first invoke the Offset command to set the new offset - offsetResp := Invoke(incrementResp[0].Interface(), "Offset", offset) - // invoke the Execute function to get the response - resp := Invoke(offsetResp[0].Interface(), "Execute") - - // convert the expected return values to their respective types - actualValue := resp[0].Interface().([]T) - latestResponse = resp[1].Interface().(*http.Response) - err := resp[2].Interface() - - if err != nil { - return returnObject, latestResponse, err.(error) - } - - // append the results to the main return object - returnObject = append(returnObject, actualValue...) - - // check if this is the last set in the response. This could be enhanced by inspecting the header for the max results - if int32(len(actualValue)) < increment { - break - } - - offset += increment - } - return returnObject, latestResponse, nil -} - -func Invoke(any interface{}, name string, args ...interface{}) []reflect.Value { - inputs := make([]reflect.Value, len(args)) - for i, v := range args { - inputs[i] = reflect.ValueOf(v) - } - return reflect.ValueOf(any).MethodByName(name).Call(inputs) -} diff --git a/plextv/.gitignore b/plextv/.gitignore deleted file mode 100644 index daf913b..0000000 --- a/plextv/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/plextv/.openapi-generator-ignore b/plextv/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/plextv/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/plextv/.openapi-generator/FILES b/plextv/.openapi-generator/FILES deleted file mode 100644 index 38239b0..0000000 --- a/plextv/.openapi-generator/FILES +++ /dev/null @@ -1,25 +0,0 @@ -.gitignore -.travis.yml -README.md -api/openapi.yaml -api_plex_tv.go -client.go -configuration.go -docs/GetCompanionsData401Response.md -docs/GetGeoData200Response.md -docs/GetPin200Response.md -docs/GetPin200ResponseLocation.md -docs/GetPin400Response.md -docs/GetUserOptOutSettings200Response.md -docs/PlexTvApi.md -git_push.sh -go.mod -go.sum -model_get_companions_data_401_response.go -model_get_geo_data_200_response.go -model_get_pin_200_response.go -model_get_pin_200_response_location.go -model_get_pin_400_response.go -model_get_user_opt_out_settings_200_response.go -response.go -utils.go diff --git a/plextv/.openapi-generator/VERSION b/plextv/.openapi-generator/VERSION deleted file mode 100644 index cd802a1..0000000 --- a/plextv/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/plextv/.travis.yml b/plextv/.travis.yml deleted file mode 100644 index f5cb2ce..0000000 --- a/plextv/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/plextv/README.md b/plextv/README.md deleted file mode 100644 index edb586a..0000000 --- a/plextv/README.md +++ /dev/null @@ -1,197 +0,0 @@ -# Go API client for plextv - -An Open API Spec for interacting with Plex.tv - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 0.0.3 -- Package version: 1.1.6 -- Build package: org.openapitools.codegen.languages.GoClientCodegen -For more information, please visit [https://www.LukeHagar.com](https://www.LukeHagar.com) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import plextv "github.com/lukehagar/plexgo" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), plextv.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), plextv.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), plextv.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), plextv.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://plex.tv/api/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*PlexTvApi* | [**GetCompanionsData**](docs/PlexTvApi.md#getcompanionsdata) | **Get** /companions | Get Companions Data -*PlexTvApi* | [**GetDevices**](docs/PlexTvApi.md#getdevices) | **Get** /resources | Get Devices -*PlexTvApi* | [**GetGeoData**](docs/PlexTvApi.md#getgeodata) | **Get** /geoip | Get Geo Data -*PlexTvApi* | [**GetHomeData**](docs/PlexTvApi.md#gethomedata) | **Get** /home | Get Home Data -*PlexTvApi* | [**GetPin**](docs/PlexTvApi.md#getpin) | **Post** /pins | Get a Pin -*PlexTvApi* | [**GetToken**](docs/PlexTvApi.md#gettoken) | **Get** /pins/{pinID} | Get Access Token -*PlexTvApi* | [**GetUserDetails**](docs/PlexTvApi.md#getuserdetails) | **Get** /user | Get Logged in User -*PlexTvApi* | [**GetUserOptOutSettings**](docs/PlexTvApi.md#getuseroptoutsettings) | **Get** /user/settings/opt_outs | Get User Opt Out Settings -*PlexTvApi* | [**GetUserSettings**](docs/PlexTvApi.md#getusersettings) | **Get** /user/settings | Get User Settings - - -## Documentation For Models - - - [GetCompanionsData401Response](docs/GetCompanionsData401Response.md) - - [GetGeoData200Response](docs/GetGeoData200Response.md) - - [GetPin200Response](docs/GetPin200Response.md) - - [GetPin200ResponseLocation](docs/GetPin200ResponseLocation.md) - - [GetPin400Response](docs/GetPin400Response.md) - - [GetUserOptOutSettings200Response](docs/GetUserOptOutSettings200Response.md) - - -## Documentation For Authorization - - - -### Token - -- **Type**: API key -- **API key parameter name**: X-Plex-Token -- **Location**: HTTP header - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Plex-Token and passed in as the auth context for each request. - - -### ClientIdentifier - -- **Type**: API key -- **API key parameter name**: X-Plex-Client-Identifier -- **Location**: HTTP header - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Plex-Client-Identifier and passed in as the auth context for each request. - - -### DeviceName - -- **Type**: API key -- **API key parameter name**: X-Plex-Device-Name -- **Location**: HTTP header - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Plex-Device-Name and passed in as the auth context for each request. - - -### Device - -- **Type**: API key -- **API key parameter name**: X-Plex-Device -- **Location**: HTTP header - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Plex-Device and passed in as the auth context for each request. - - -### PlatformVersion - -- **Type**: API key -- **API key parameter name**: X-Plex-Platform-Version -- **Location**: HTTP header - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Plex-Platform-Version and passed in as the auth context for each request. - - -### Platform - -- **Type**: API key -- **API key parameter name**: X-Plex-Platform -- **Location**: HTTP header - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Plex-Platform and passed in as the auth context for each request. - - -### Product - -- **Type**: API key -- **API key parameter name**: X-Plex-Product -- **Location**: HTTP header - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Plex-Product and passed in as the auth context for each request. - - -### Version - -- **Type**: API key -- **API key parameter name**: X-Plex-Version -- **Location**: HTTP header - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Plex-Version and passed in as the auth context for each request. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - -Lukeslakemail@gmail.com - diff --git a/plextv/api/openapi.yaml b/plextv/api/openapi.yaml deleted file mode 100644 index d87c337..0000000 --- a/plextv/api/openapi.yaml +++ /dev/null @@ -1,599 +0,0 @@ -openapi: 3.1.0 -info: - contact: - email: Lukeslakemail@gmail.com - name: Luke Hagar - url: https://www.LukeHagar.com - description: An Open API Spec for interacting with Plex.tv - license: - name: MIT - url: https://opensource.org/licenses/MIT - title: Plex-API - version: 0.0.3 -servers: -- url: https://plex.tv/api/v2 -security: -- Token: [] - ClientIdentifier: [] - Device: [] - DeviceName: [] - Platform: [] - PlatformVersion: [] - Product: [] - Version: [] -tags: -- description: | - Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. - Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. - Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: - - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. - - They must contain an `type` which is used by clients to distinguish the specific activity. - - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) - - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. - name: Activities -- description: | - API Calls regarding authentication for Plex Media Server - name: Authentication -- description: | - Butler is the task manager of the Plex Media Server Ecosystem. - name: Butler -- description: | - Operations against the Plex Media Server System. - name: Server -- description: | - This describes the API for searching and applying updates to the Plex Media Server. - Updates to the status can be observed via the Event API. - name: Updater -- description: | - Submit logs to the Log Handler for Plex Media Server - name: Log -- description: | - API Calls against Security for Plex Media Server - name: Security -- description: | - API Calls interacting with Plex Media Server Libraries - name: Library -- description: | - Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. - name: Hubs -- description: "Playlists are ordered collections of media. They can be dumb (just\ - \ a list of media) or smart (based on a media query, such as \"all albums from\ - \ 2017\"). \nThey can be organized in (optionally nesting) folders.\nRetrieving\ - \ a playlist, or its items, will trigger a refresh of its metadata. \nThis may\ - \ cause the duration and number of items to change.\n" - name: Playlists -- description: | - API Calls that perform search operations with Plex Media Server - name: Search -- description: | - API Calls that perform operations with Plex Media Server Users - name: User -paths: - /companions: - get: - description: Get Companions Data - operationId: getCompanionsData - responses: - "200": - content: - application/json: - schema: - items: - properties: - identifier: - example: tv.plex.sonos - baseURL: - example: https://sonos.plex.tv - title: - example: Sonos - linkURL: - example: https://sonos.plex.tv/link - provides: - example: clientplayer - token: - example: VFnxitsRFdWx_WrzsKL - description: Companions Data - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getCompanionsData_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Companions Data - tags: - - Plex.tv - /geoip: - get: - description: Get Geo Data - operationId: getGeoData - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getGeoData_200_response' - description: Geo Data - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getCompanionsData_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Geo Data - tags: - - Plex.tv - /home: - get: - description: Get Home Data - operationId: getHomeData - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getGeoData_200_response' - description: Home Data - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getCompanionsData_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Home Data - tags: - - Plex.tv - /pins: - post: - description: Retrieve a Pin from Plex.tv for authentication flows - operationId: getPin - parameters: - - description: | - Determines the kind of code returned by the API call - Strong codes are used for Pin authentication flows - Non-Strong codes are used for `Plex.tv/link` - explode: true - in: query - name: strong - required: false - schema: - default: false - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getPin_200_response' - description: The Pin - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/getPin_400_response' - description: X-Plex-Client-Identifier is missing - security: - - ClientIdentifier: [] - summary: Get a Pin - tags: - - Plex.tv - /pins/{pinID}: - get: - description: Retrieve an Access Token from Plex.tv after the Pin has already - been authenticated - operationId: getToken - parameters: - - description: The PinID to retrieve an access token for - explode: false - in: path - name: pinID - required: true - schema: {} - style: simple - responses: - "200": - description: Access Token - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/getPin_400_response' - description: X-Plex-Client-Identifier is missing - security: - - ClientIdentifier: [] - summary: Get Access Token - tags: - - Plex.tv - /resources: - get: - description: Get Devices - operationId: getDevices - parameters: - - description: Include Https entries in the results - explode: true - in: query - name: includeHttps - required: false - schema: - enum: - - 0 - - 1 - style: form - - description: Include Relay addresses in the results - explode: true - in: query - name: includeRelay - required: false - schema: - enum: - - 0 - - 1 - style: form - - description: Include IPv6 entries in the results - explode: true - in: query - name: includeIPv6 - required: false - schema: - enum: - - 0 - - 1 - style: form - responses: - "200": - content: - application/json: - schema: - items: - properties: - name: - example: Hera - product: - example: Plex Media Server - productVersion: - example: 1.31.3.6868-28fc46b27 - platform: - example: Linux - platformVersion: - example: 5.19.17-Unraid (#2 SMP PREEMPT_DYNAMIC Wed Nov 2 11:54:15 - PDT 2022) - device: - example: PC - clientIdentifier: - example: 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 - createdAt: - example: 2022-06-02T00:54:26Z - format: date-time - lastSeenAt: - example: 2023-04-11T05:53:59Z - format: date-time - provides: - example: server - ownerId: - format: nullable - sourceTitle: - format: nullable - publicAddress: - example: 68.248.140.20 - accessToken: - example: CR3nxzsaSHdWx_WwZsJL - owned: {} - home: {} - synced: {} - relay: {} - presence: {} - httpsRequired: {} - publicAddressMatches: {} - dnsRebindingProtection: {} - natLoopbackSupported: {} - connections: - items: - properties: - protocol: - example: http - address: - example: 172.18.0.1 - port: - example: 32400 - uri: - example: http://172.18.0.1:32400 - local: {} - relay: {} - IPv6: {} - description: List of Plex Devices - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getCompanionsData_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Devices - tags: - - Plex.tv - /user: - get: - description: Get Logged in User - operationId: getUserDetails - responses: - "200": - description: Logged in user details - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getCompanionsData_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Logged in User - tags: - - Plex.tv - /user/settings: - get: - description: Get User Settings - operationId: getUserSettings - responses: - "200": - content: - application/json: - schema: - items: - properties: - id: - example: experience - type: - example: json - value: {} - hidden: {} - updatedAt: - example: 1681769995 - description: User Settings - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getCompanionsData_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get User Settings - tags: - - Plex.tv - /user/settings/opt_outs: - get: - description: Get User Opt Out Settings - operationId: getUserOptOutSettings - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getUserOptOutSettings_200_response' - description: User Opt Out Settings - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getCompanionsData_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get User Opt Out Settings - tags: - - Plex.tv -components: - schemas: - getPin_400_response: - properties: - errors: - items: - properties: - code: - example: 1000 - message: - example: X-Plex-Client-Identifier is missing - status: - example: 400 - getPin_200_response_location: - example: - country: United States - code: US - city: Austin - european_union_member: "" - coordinates: 30.3768 -97.8935 - continent_code: NA - time_zone: America/Chicago - postal_code: 78732 - in_privacy_restricted_country: "" - subdivisions: Texas - properties: - code: - example: US - european_union_member: {} - continent_code: - example: NA - country: - example: United States - city: - example: Austin - time_zone: - example: America/Chicago - postal_code: - example: 78732 - in_privacy_restricted_country: {} - subdivisions: - example: Texas - coordinates: - example: 30.3768 -97.8935 - getPin_200_response: - example: - expiresIn: 1800 - qr: https://plex.tv/api/v2/pins/qr/3patfx1a78ukcbr7x0n9bl26t - createdAt: 2023-04-12T17:00:03Z - product: Plex Web - code: 3patfx1a78ukcbr7x0n9bl26t - trusted: "" - newRegistration: "" - clientIdentifier: Postman - authToken: "" - location: - country: United States - code: US - city: Austin - european_union_member: "" - coordinates: 30.3768 -97.8935 - continent_code: NA - time_zone: America/Chicago - postal_code: 78732 - in_privacy_restricted_country: "" - subdivisions: Texas - id: 1272322473 - expiresAt: 2023-04-12T17:30:03Z - properties: - id: - description: PinID for use with authentication - example: 1272322473 - code: - example: 3patfx1a78ukcbr7x0n9bl26t - product: - example: Plex Web - trusted: {} - qr: - description: "a link to a QR code hosted on plex.tv \nThe QR code redirects\ - \ to the relevant `plex.tv/link` authentication page\nWhich then prompts\ - \ the user for the 4 Digit Link Pin\n" - example: https://plex.tv/api/v2/pins/qr/3patfx1a78ukcbr7x0n9bl26t - clientIdentifier: - example: Postman - location: - $ref: '#/components/schemas/getPin_200_response_location' - expiresIn: - example: 1800 - createdAt: - example: 2023-04-12T17:00:03Z - format: date-time - expiresAt: - example: 2023-04-12T17:30:03Z - format: date-time - authToken: - format: nullable - newRegistration: - format: nullable - getUserOptOutSettings_200_response: - example: - tv.plex.provider.podcasts: opt_in - tv.plex.provider.webshows: opt_out - scrobbling: opt_in - tv.plex.provider.vod: opt_in - tv.plex.provider.news: opt_in - tv.plex.provider.music: opt_out - properties: - tv.plex.provider.podcasts: - example: opt_in - tv.plex.provider.news: - example: opt_in - tv.plex.provider.webshows: - example: opt_out - tv.plex.provider.music: - example: opt_out - tv.plex.provider.vod: - example: opt_in - scrobbling: - example: opt_in - getGeoData_200_response: - example: - guestUserID: 58815432 - guestUserUUID: f3df4e01bfca0787 - name: Blindkitty38's home - id: 1841489 - subscription: "" - guestEnabled: "" - properties: - id: - example: 1841489 - name: - example: Blindkitty38's home - guestUserID: - example: 58815432 - guestUserUUID: - example: f3df4e01bfca0787 - guestEnabled: {} - subscription: {} - getCompanionsData_401_response: - properties: - errors: - items: - properties: - code: - example: 1001 - message: - example: User could not be authenticated - status: - example: 401 - securitySchemes: - Token: - description: Plex Authentication Token - in: header - name: X-Plex-Token - type: apiKey - ClientIdentifier: - description: Plex Authentication Token - in: header - name: X-Plex-Client-Identifier - type: apiKey - DeviceName: - description: Primary name for the device eg. `Plex Web (Chrome)` - in: header - name: X-Plex-Device-Name - type: apiKey - Device: - description: | - The type of device your application is running on - Device name and or model number, eg `iPhone3,2`, `Motorola XOOMâ„¢`, `LG5200TV` - in: header - name: X-Plex-Device - type: apiKey - PlatformVersion: - description: | - Operating system version - eg `4.3.1`, `10.6.7`, `3.2` - in: header - name: X-Plex-Platform-Version - type: apiKey - Platform: - description: "Platform name \neg: `Web`, `iOS`, `MacOSX`, `Android`, `LG`\n" - in: header - name: X-Plex-Platform - type: apiKey - Product: - description: "Plex application name \neg: `Laika`, `Plex Media Server`, `Media\ - \ Link`\n" - in: header - name: X-Plex-Product - type: apiKey - Version: - description: Plex application version number - in: header - name: X-Plex-Version - type: apiKey diff --git a/plextv/api_plex_tv.go b/plextv/api_plex_tv.go deleted file mode 100644 index e6a8ac1..0000000 --- a/plextv/api_plex_tv.go +++ /dev/null @@ -1,1840 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package plextv - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// PlexTvApiService PlexTvApi service -type PlexTvApiService service - -type ApiGetCompanionsDataRequest struct { - ctx context.Context - ApiService *PlexTvApiService -} - -func (r ApiGetCompanionsDataRequest) Execute() (interface{}, *http.Response, error) { - return r.ApiService.GetCompanionsDataExecute(r) -} - -/* -GetCompanionsData Get Companions Data - -Get Companions Data - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetCompanionsDataRequest -*/ -func (a *PlexTvApiService) GetCompanionsData(ctx context.Context) ApiGetCompanionsDataRequest { - return ApiGetCompanionsDataRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return interface{} -func (a *PlexTvApiService) GetCompanionsDataExecute(r ApiGetCompanionsDataRequest) (interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlexTvApiService.GetCompanionsData") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/companions" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["PlatformVersion"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ClientIdentifier"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Client-Identifier"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Platform"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Version"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Device"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Product"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Product"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["DeviceName"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device-Name"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetCompanionsData401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetDevicesRequest struct { - ctx context.Context - ApiService *PlexTvApiService - includeHttps *interface{} - includeRelay *interface{} - includeIPv6 *interface{} -} - -// Include Https entries in the results -func (r ApiGetDevicesRequest) IncludeHttps(includeHttps interface{}) ApiGetDevicesRequest { - r.includeHttps = &includeHttps - return r -} - -// Include Relay addresses in the results -func (r ApiGetDevicesRequest) IncludeRelay(includeRelay interface{}) ApiGetDevicesRequest { - r.includeRelay = &includeRelay - return r -} - -// Include IPv6 entries in the results -func (r ApiGetDevicesRequest) IncludeIPv6(includeIPv6 interface{}) ApiGetDevicesRequest { - r.includeIPv6 = &includeIPv6 - return r -} - -func (r ApiGetDevicesRequest) Execute() (interface{}, *http.Response, error) { - return r.ApiService.GetDevicesExecute(r) -} - -/* -GetDevices Get Devices - -Get Devices - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetDevicesRequest -*/ -func (a *PlexTvApiService) GetDevices(ctx context.Context) ApiGetDevicesRequest { - return ApiGetDevicesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return interface{} -func (a *PlexTvApiService) GetDevicesExecute(r ApiGetDevicesRequest) (interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlexTvApiService.GetDevices") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/resources" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.includeHttps != nil { - parameterAddToQuery(localVarQueryParams, "includeHttps", r.includeHttps, "") - } - if r.includeRelay != nil { - parameterAddToQuery(localVarQueryParams, "includeRelay", r.includeRelay, "") - } - if r.includeIPv6 != nil { - parameterAddToQuery(localVarQueryParams, "includeIPv6", r.includeIPv6, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["PlatformVersion"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ClientIdentifier"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Client-Identifier"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Platform"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Version"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Device"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Product"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Product"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["DeviceName"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device-Name"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetCompanionsData401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetGeoDataRequest struct { - ctx context.Context - ApiService *PlexTvApiService -} - -func (r ApiGetGeoDataRequest) Execute() (*GetGeoData200Response, *http.Response, error) { - return r.ApiService.GetGeoDataExecute(r) -} - -/* -GetGeoData Get Geo Data - -Get Geo Data - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetGeoDataRequest -*/ -func (a *PlexTvApiService) GetGeoData(ctx context.Context) ApiGetGeoDataRequest { - return ApiGetGeoDataRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetGeoData200Response -func (a *PlexTvApiService) GetGeoDataExecute(r ApiGetGeoDataRequest) (*GetGeoData200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetGeoData200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlexTvApiService.GetGeoData") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/geoip" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["PlatformVersion"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ClientIdentifier"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Client-Identifier"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Platform"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Version"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Device"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Product"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Product"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["DeviceName"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device-Name"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetCompanionsData401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetHomeDataRequest struct { - ctx context.Context - ApiService *PlexTvApiService -} - -func (r ApiGetHomeDataRequest) Execute() (*GetGeoData200Response, *http.Response, error) { - return r.ApiService.GetHomeDataExecute(r) -} - -/* -GetHomeData Get Home Data - -Get Home Data - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetHomeDataRequest -*/ -func (a *PlexTvApiService) GetHomeData(ctx context.Context) ApiGetHomeDataRequest { - return ApiGetHomeDataRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetGeoData200Response -func (a *PlexTvApiService) GetHomeDataExecute(r ApiGetHomeDataRequest) (*GetGeoData200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetGeoData200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlexTvApiService.GetHomeData") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/home" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["PlatformVersion"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ClientIdentifier"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Client-Identifier"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Platform"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Version"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Device"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Product"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Product"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["DeviceName"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device-Name"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetCompanionsData401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPinRequest struct { - ctx context.Context - ApiService *PlexTvApiService - strong *interface{} -} - -// Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for `Plex.tv/link` -func (r ApiGetPinRequest) Strong(strong interface{}) ApiGetPinRequest { - r.strong = &strong - return r -} - -func (r ApiGetPinRequest) Execute() (*GetPin200Response, *http.Response, error) { - return r.ApiService.GetPinExecute(r) -} - -/* -GetPin Get a Pin - -Retrieve a Pin from Plex.tv for authentication flows - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPinRequest -*/ -func (a *PlexTvApiService) GetPin(ctx context.Context) ApiGetPinRequest { - return ApiGetPinRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetPin200Response -func (a *PlexTvApiService) GetPinExecute(r ApiGetPinRequest) (*GetPin200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetPin200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlexTvApiService.GetPin") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/pins" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.strong != nil { - parameterAddToQuery(localVarQueryParams, "strong", r.strong, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ClientIdentifier"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Client-Identifier"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GetPin400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetTokenRequest struct { - ctx context.Context - ApiService *PlexTvApiService - pinID interface{} -} - -func (r ApiGetTokenRequest) Execute() (*http.Response, error) { - return r.ApiService.GetTokenExecute(r) -} - -/* -GetToken Get Access Token - -Retrieve an Access Token from Plex.tv after the Pin has already been authenticated - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param pinID The PinID to retrieve an access token for - @return ApiGetTokenRequest -*/ -func (a *PlexTvApiService) GetToken(ctx context.Context, pinID interface{}) ApiGetTokenRequest { - return ApiGetTokenRequest{ - ApiService: a, - ctx: ctx, - pinID: pinID, - } -} - -// Execute executes the request -func (a *PlexTvApiService) GetTokenExecute(r ApiGetTokenRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlexTvApiService.GetToken") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/pins/{pinID}" - localVarPath = strings.Replace(localVarPath, "{"+"pinID"+"}", url.PathEscape(parameterValueToString(r.pinID, "pinID")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ClientIdentifier"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Client-Identifier"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GetPin400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetUserDetailsRequest struct { - ctx context.Context - ApiService *PlexTvApiService -} - -func (r ApiGetUserDetailsRequest) Execute() (*http.Response, error) { - return r.ApiService.GetUserDetailsExecute(r) -} - -/* -GetUserDetails Get Logged in User - -Get Logged in User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetUserDetailsRequest -*/ -func (a *PlexTvApiService) GetUserDetails(ctx context.Context) ApiGetUserDetailsRequest { - return ApiGetUserDetailsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *PlexTvApiService) GetUserDetailsExecute(r ApiGetUserDetailsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlexTvApiService.GetUserDetails") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/user" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["PlatformVersion"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ClientIdentifier"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Client-Identifier"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Platform"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Version"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Device"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Product"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Product"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["DeviceName"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device-Name"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetCompanionsData401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetUserOptOutSettingsRequest struct { - ctx context.Context - ApiService *PlexTvApiService -} - -func (r ApiGetUserOptOutSettingsRequest) Execute() (*GetUserOptOutSettings200Response, *http.Response, error) { - return r.ApiService.GetUserOptOutSettingsExecute(r) -} - -/* -GetUserOptOutSettings Get User Opt Out Settings - -Get User Opt Out Settings - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetUserOptOutSettingsRequest -*/ -func (a *PlexTvApiService) GetUserOptOutSettings(ctx context.Context) ApiGetUserOptOutSettingsRequest { - return ApiGetUserOptOutSettingsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetUserOptOutSettings200Response -func (a *PlexTvApiService) GetUserOptOutSettingsExecute(r ApiGetUserOptOutSettingsRequest) (*GetUserOptOutSettings200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetUserOptOutSettings200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlexTvApiService.GetUserOptOutSettings") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/user/settings/opt_outs" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["PlatformVersion"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ClientIdentifier"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Client-Identifier"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Platform"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Version"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Device"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Product"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Product"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["DeviceName"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device-Name"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetCompanionsData401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetUserSettingsRequest struct { - ctx context.Context - ApiService *PlexTvApiService -} - -func (r ApiGetUserSettingsRequest) Execute() (interface{}, *http.Response, error) { - return r.ApiService.GetUserSettingsExecute(r) -} - -/* -GetUserSettings Get User Settings - -Get User Settings - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetUserSettingsRequest -*/ -func (a *PlexTvApiService) GetUserSettings(ctx context.Context) ApiGetUserSettingsRequest { - return ApiGetUserSettingsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return interface{} -func (a *PlexTvApiService) GetUserSettingsExecute(r ApiGetUserSettingsRequest) (interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlexTvApiService.GetUserSettings") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/user/settings" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["PlatformVersion"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ClientIdentifier"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Client-Identifier"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Platform"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Platform"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Version"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Version"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Device"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Product"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Product"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["Token"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["DeviceName"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Device-Name"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetCompanionsData401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/plextv/client.go b/plextv/client.go deleted file mode 100644 index 7f1f911..0000000 --- a/plextv/client.go +++ /dev/null @@ -1,710 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package plextv - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "io/ioutil" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - - retryablehttp "github.com/hashicorp/go-retryablehttp" -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Plex-API API v0.0.3 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - PlexTvApi *PlexTvApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = retryablehttp.NewClient() - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.PlexTvApi = (*PlexTvApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToQuery adds the provided object to the url query supporting deep object syntax -func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToQuery(queryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToQuery(queryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - localVarRequest.Header.Add("X-SailPoint-SDK", "1.1.6") - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -type AccessToken struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - ExpiresIn int `json:"expires_in"` - Scope string `json:"scope"` - TenantId string `json:"tenant_id"` - Pod string `json:"pod"` - StrongAuthSupported bool `json:"strong_auth_supported"` - Org string `json:"org"` - IdentityId string `json:"identity_id"` - UserName string `json:"user_name"` - StrongAuth bool `json:"strong_auth"` - Jti string `json:"jti"` -} - -func getAccessToken(clientId string, clientSecret string, tokenURL string) (string, error) { - url := tokenURL + "?grant_type=client_credentials&client_id=" + clientId + "&client_secret=" + clientSecret - method := "POST" - client := &http.Client{} - req, err := http.NewRequest(method, url, nil) - - if err != nil { - fmt.Println(err) - return "", err - } - res, err := client.Do(req) - if err != nil { - fmt.Println(err) - return "", err - } - defer res.Body.Close() - - body, err := ioutil.ReadAll(res.Body) - if err != nil { - fmt.Println(err) - return "", err - } - - var jsonMap AccessToken - json.Unmarshal([]byte(body), &jsonMap) - - return jsonMap.AccessToken, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = ioutil.TempFile("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - - // status title (detail) - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/plextv/configuration.go b/plextv/configuration.go deleted file mode 100644 index 40b0c11..0000000 --- a/plextv/configuration.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package plextv - -import ( - "context" - "fmt" - "strings" - - retryablehttp "github.com/hashicorp/go-retryablehttp" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextAPIKeys takes a string apikey as authentication for the request - ContextAPIKeys = contextKey("apiKeys") - - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *retryablehttp.Client - ClientId string - ClientSecret string - BaseURL string - TokenURL string - Token string -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration(clientId string, clientSecret string, baseURL string, tokenURL string, token string) *Configuration { - cfg := &Configuration{ - ClientId: clientId, - ClientSecret: clientSecret, - BaseURL: baseURL, - TokenURL: tokenURL, - Token: token, - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.1.6/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: baseURL, - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/plextv/docs/GetCompanionsData401Response.md b/plextv/docs/GetCompanionsData401Response.md deleted file mode 100644 index e19ae4b..0000000 --- a/plextv/docs/GetCompanionsData401Response.md +++ /dev/null @@ -1,66 +0,0 @@ -# GetCompanionsData401Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetCompanionsData401Response - -`func NewGetCompanionsData401Response() *GetCompanionsData401Response` - -NewGetCompanionsData401Response instantiates a new GetCompanionsData401Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetCompanionsData401ResponseWithDefaults - -`func NewGetCompanionsData401ResponseWithDefaults() *GetCompanionsData401Response` - -NewGetCompanionsData401ResponseWithDefaults instantiates a new GetCompanionsData401Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetErrors - -`func (o *GetCompanionsData401Response) GetErrors() interface{}` - -GetErrors returns the Errors field if non-nil, zero value otherwise. - -### GetErrorsOk - -`func (o *GetCompanionsData401Response) GetErrorsOk() (*interface{}, bool)` - -GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrors - -`func (o *GetCompanionsData401Response) SetErrors(v interface{})` - -SetErrors sets Errors field to given value. - -### HasErrors - -`func (o *GetCompanionsData401Response) HasErrors() bool` - -HasErrors returns a boolean if a field has been set. - -### SetErrorsNil - -`func (o *GetCompanionsData401Response) SetErrorsNil(b bool)` - - SetErrorsNil sets the value for Errors to be an explicit nil - -### UnsetErrors -`func (o *GetCompanionsData401Response) UnsetErrors()` - -UnsetErrors ensures that no value is present for Errors, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/plextv/docs/GetGeoData200Response.md b/plextv/docs/GetGeoData200Response.md deleted file mode 100644 index 01a0330..0000000 --- a/plextv/docs/GetGeoData200Response.md +++ /dev/null @@ -1,246 +0,0 @@ -# GetGeoData200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **interface{}** | | [optional] -**Name** | Pointer to **interface{}** | | [optional] -**GuestUserID** | Pointer to **interface{}** | | [optional] -**GuestUserUUID** | Pointer to **interface{}** | | [optional] -**GuestEnabled** | Pointer to **interface{}** | | [optional] -**Subscription** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetGeoData200Response - -`func NewGetGeoData200Response() *GetGeoData200Response` - -NewGetGeoData200Response instantiates a new GetGeoData200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetGeoData200ResponseWithDefaults - -`func NewGetGeoData200ResponseWithDefaults() *GetGeoData200Response` - -NewGetGeoData200ResponseWithDefaults instantiates a new GetGeoData200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *GetGeoData200Response) GetId() interface{}` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetGeoData200Response) GetIdOk() (*interface{}, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetGeoData200Response) SetId(v interface{})` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetGeoData200Response) HasId() bool` - -HasId returns a boolean if a field has been set. - -### SetIdNil - -`func (o *GetGeoData200Response) SetIdNil(b bool)` - - SetIdNil sets the value for Id to be an explicit nil - -### UnsetId -`func (o *GetGeoData200Response) UnsetId()` - -UnsetId ensures that no value is present for Id, not even an explicit nil -### GetName - -`func (o *GetGeoData200Response) GetName() interface{}` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetGeoData200Response) GetNameOk() (*interface{}, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *GetGeoData200Response) SetName(v interface{})` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetGeoData200Response) HasName() bool` - -HasName returns a boolean if a field has been set. - -### SetNameNil - -`func (o *GetGeoData200Response) SetNameNil(b bool)` - - SetNameNil sets the value for Name to be an explicit nil - -### UnsetName -`func (o *GetGeoData200Response) UnsetName()` - -UnsetName ensures that no value is present for Name, not even an explicit nil -### GetGuestUserID - -`func (o *GetGeoData200Response) GetGuestUserID() interface{}` - -GetGuestUserID returns the GuestUserID field if non-nil, zero value otherwise. - -### GetGuestUserIDOk - -`func (o *GetGeoData200Response) GetGuestUserIDOk() (*interface{}, bool)` - -GetGuestUserIDOk returns a tuple with the GuestUserID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGuestUserID - -`func (o *GetGeoData200Response) SetGuestUserID(v interface{})` - -SetGuestUserID sets GuestUserID field to given value. - -### HasGuestUserID - -`func (o *GetGeoData200Response) HasGuestUserID() bool` - -HasGuestUserID returns a boolean if a field has been set. - -### SetGuestUserIDNil - -`func (o *GetGeoData200Response) SetGuestUserIDNil(b bool)` - - SetGuestUserIDNil sets the value for GuestUserID to be an explicit nil - -### UnsetGuestUserID -`func (o *GetGeoData200Response) UnsetGuestUserID()` - -UnsetGuestUserID ensures that no value is present for GuestUserID, not even an explicit nil -### GetGuestUserUUID - -`func (o *GetGeoData200Response) GetGuestUserUUID() interface{}` - -GetGuestUserUUID returns the GuestUserUUID field if non-nil, zero value otherwise. - -### GetGuestUserUUIDOk - -`func (o *GetGeoData200Response) GetGuestUserUUIDOk() (*interface{}, bool)` - -GetGuestUserUUIDOk returns a tuple with the GuestUserUUID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGuestUserUUID - -`func (o *GetGeoData200Response) SetGuestUserUUID(v interface{})` - -SetGuestUserUUID sets GuestUserUUID field to given value. - -### HasGuestUserUUID - -`func (o *GetGeoData200Response) HasGuestUserUUID() bool` - -HasGuestUserUUID returns a boolean if a field has been set. - -### SetGuestUserUUIDNil - -`func (o *GetGeoData200Response) SetGuestUserUUIDNil(b bool)` - - SetGuestUserUUIDNil sets the value for GuestUserUUID to be an explicit nil - -### UnsetGuestUserUUID -`func (o *GetGeoData200Response) UnsetGuestUserUUID()` - -UnsetGuestUserUUID ensures that no value is present for GuestUserUUID, not even an explicit nil -### GetGuestEnabled - -`func (o *GetGeoData200Response) GetGuestEnabled() interface{}` - -GetGuestEnabled returns the GuestEnabled field if non-nil, zero value otherwise. - -### GetGuestEnabledOk - -`func (o *GetGeoData200Response) GetGuestEnabledOk() (*interface{}, bool)` - -GetGuestEnabledOk returns a tuple with the GuestEnabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGuestEnabled - -`func (o *GetGeoData200Response) SetGuestEnabled(v interface{})` - -SetGuestEnabled sets GuestEnabled field to given value. - -### HasGuestEnabled - -`func (o *GetGeoData200Response) HasGuestEnabled() bool` - -HasGuestEnabled returns a boolean if a field has been set. - -### SetGuestEnabledNil - -`func (o *GetGeoData200Response) SetGuestEnabledNil(b bool)` - - SetGuestEnabledNil sets the value for GuestEnabled to be an explicit nil - -### UnsetGuestEnabled -`func (o *GetGeoData200Response) UnsetGuestEnabled()` - -UnsetGuestEnabled ensures that no value is present for GuestEnabled, not even an explicit nil -### GetSubscription - -`func (o *GetGeoData200Response) GetSubscription() interface{}` - -GetSubscription returns the Subscription field if non-nil, zero value otherwise. - -### GetSubscriptionOk - -`func (o *GetGeoData200Response) GetSubscriptionOk() (*interface{}, bool)` - -GetSubscriptionOk returns a tuple with the Subscription field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubscription - -`func (o *GetGeoData200Response) SetSubscription(v interface{})` - -SetSubscription sets Subscription field to given value. - -### HasSubscription - -`func (o *GetGeoData200Response) HasSubscription() bool` - -HasSubscription returns a boolean if a field has been set. - -### SetSubscriptionNil - -`func (o *GetGeoData200Response) SetSubscriptionNil(b bool)` - - SetSubscriptionNil sets the value for Subscription to be an explicit nil - -### UnsetSubscription -`func (o *GetGeoData200Response) UnsetSubscription()` - -UnsetSubscription ensures that no value is present for Subscription, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/plextv/docs/GetPin200Response.md b/plextv/docs/GetPin200Response.md deleted file mode 100644 index c273172..0000000 --- a/plextv/docs/GetPin200Response.md +++ /dev/null @@ -1,452 +0,0 @@ -# GetPin200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **interface{}** | PinID for use with authentication | [optional] -**Code** | Pointer to **interface{}** | | [optional] -**Product** | Pointer to **interface{}** | | [optional] -**Trusted** | Pointer to **interface{}** | | [optional] -**Qr** | Pointer to **interface{}** | a link to a QR code hosted on plex.tv The QR code redirects to the relevant `plex.tv/link` authentication page Which then prompts the user for the 4 Digit Link Pin | [optional] -**ClientIdentifier** | Pointer to **interface{}** | | [optional] -**Location** | Pointer to [**GetPin200ResponseLocation**](GetPin200ResponseLocation.md) | | [optional] -**ExpiresIn** | Pointer to **interface{}** | | [optional] -**CreatedAt** | Pointer to **interface{}** | | [optional] -**ExpiresAt** | Pointer to **interface{}** | | [optional] -**AuthToken** | Pointer to **interface{}** | | [optional] -**NewRegistration** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetPin200Response - -`func NewGetPin200Response() *GetPin200Response` - -NewGetPin200Response instantiates a new GetPin200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetPin200ResponseWithDefaults - -`func NewGetPin200ResponseWithDefaults() *GetPin200Response` - -NewGetPin200ResponseWithDefaults instantiates a new GetPin200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *GetPin200Response) GetId() interface{}` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetPin200Response) GetIdOk() (*interface{}, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetPin200Response) SetId(v interface{})` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetPin200Response) HasId() bool` - -HasId returns a boolean if a field has been set. - -### SetIdNil - -`func (o *GetPin200Response) SetIdNil(b bool)` - - SetIdNil sets the value for Id to be an explicit nil - -### UnsetId -`func (o *GetPin200Response) UnsetId()` - -UnsetId ensures that no value is present for Id, not even an explicit nil -### GetCode - -`func (o *GetPin200Response) GetCode() interface{}` - -GetCode returns the Code field if non-nil, zero value otherwise. - -### GetCodeOk - -`func (o *GetPin200Response) GetCodeOk() (*interface{}, bool)` - -GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCode - -`func (o *GetPin200Response) SetCode(v interface{})` - -SetCode sets Code field to given value. - -### HasCode - -`func (o *GetPin200Response) HasCode() bool` - -HasCode returns a boolean if a field has been set. - -### SetCodeNil - -`func (o *GetPin200Response) SetCodeNil(b bool)` - - SetCodeNil sets the value for Code to be an explicit nil - -### UnsetCode -`func (o *GetPin200Response) UnsetCode()` - -UnsetCode ensures that no value is present for Code, not even an explicit nil -### GetProduct - -`func (o *GetPin200Response) GetProduct() interface{}` - -GetProduct returns the Product field if non-nil, zero value otherwise. - -### GetProductOk - -`func (o *GetPin200Response) GetProductOk() (*interface{}, bool)` - -GetProductOk returns a tuple with the Product field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProduct - -`func (o *GetPin200Response) SetProduct(v interface{})` - -SetProduct sets Product field to given value. - -### HasProduct - -`func (o *GetPin200Response) HasProduct() bool` - -HasProduct returns a boolean if a field has been set. - -### SetProductNil - -`func (o *GetPin200Response) SetProductNil(b bool)` - - SetProductNil sets the value for Product to be an explicit nil - -### UnsetProduct -`func (o *GetPin200Response) UnsetProduct()` - -UnsetProduct ensures that no value is present for Product, not even an explicit nil -### GetTrusted - -`func (o *GetPin200Response) GetTrusted() interface{}` - -GetTrusted returns the Trusted field if non-nil, zero value otherwise. - -### GetTrustedOk - -`func (o *GetPin200Response) GetTrustedOk() (*interface{}, bool)` - -GetTrustedOk returns a tuple with the Trusted field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTrusted - -`func (o *GetPin200Response) SetTrusted(v interface{})` - -SetTrusted sets Trusted field to given value. - -### HasTrusted - -`func (o *GetPin200Response) HasTrusted() bool` - -HasTrusted returns a boolean if a field has been set. - -### SetTrustedNil - -`func (o *GetPin200Response) SetTrustedNil(b bool)` - - SetTrustedNil sets the value for Trusted to be an explicit nil - -### UnsetTrusted -`func (o *GetPin200Response) UnsetTrusted()` - -UnsetTrusted ensures that no value is present for Trusted, not even an explicit nil -### GetQr - -`func (o *GetPin200Response) GetQr() interface{}` - -GetQr returns the Qr field if non-nil, zero value otherwise. - -### GetQrOk - -`func (o *GetPin200Response) GetQrOk() (*interface{}, bool)` - -GetQrOk returns a tuple with the Qr field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetQr - -`func (o *GetPin200Response) SetQr(v interface{})` - -SetQr sets Qr field to given value. - -### HasQr - -`func (o *GetPin200Response) HasQr() bool` - -HasQr returns a boolean if a field has been set. - -### SetQrNil - -`func (o *GetPin200Response) SetQrNil(b bool)` - - SetQrNil sets the value for Qr to be an explicit nil - -### UnsetQr -`func (o *GetPin200Response) UnsetQr()` - -UnsetQr ensures that no value is present for Qr, not even an explicit nil -### GetClientIdentifier - -`func (o *GetPin200Response) GetClientIdentifier() interface{}` - -GetClientIdentifier returns the ClientIdentifier field if non-nil, zero value otherwise. - -### GetClientIdentifierOk - -`func (o *GetPin200Response) GetClientIdentifierOk() (*interface{}, bool)` - -GetClientIdentifierOk returns a tuple with the ClientIdentifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClientIdentifier - -`func (o *GetPin200Response) SetClientIdentifier(v interface{})` - -SetClientIdentifier sets ClientIdentifier field to given value. - -### HasClientIdentifier - -`func (o *GetPin200Response) HasClientIdentifier() bool` - -HasClientIdentifier returns a boolean if a field has been set. - -### SetClientIdentifierNil - -`func (o *GetPin200Response) SetClientIdentifierNil(b bool)` - - SetClientIdentifierNil sets the value for ClientIdentifier to be an explicit nil - -### UnsetClientIdentifier -`func (o *GetPin200Response) UnsetClientIdentifier()` - -UnsetClientIdentifier ensures that no value is present for ClientIdentifier, not even an explicit nil -### GetLocation - -`func (o *GetPin200Response) GetLocation() GetPin200ResponseLocation` - -GetLocation returns the Location field if non-nil, zero value otherwise. - -### GetLocationOk - -`func (o *GetPin200Response) GetLocationOk() (*GetPin200ResponseLocation, bool)` - -GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLocation - -`func (o *GetPin200Response) SetLocation(v GetPin200ResponseLocation)` - -SetLocation sets Location field to given value. - -### HasLocation - -`func (o *GetPin200Response) HasLocation() bool` - -HasLocation returns a boolean if a field has been set. - -### GetExpiresIn - -`func (o *GetPin200Response) GetExpiresIn() interface{}` - -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. - -### GetExpiresInOk - -`func (o *GetPin200Response) GetExpiresInOk() (*interface{}, bool)` - -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresIn - -`func (o *GetPin200Response) SetExpiresIn(v interface{})` - -SetExpiresIn sets ExpiresIn field to given value. - -### HasExpiresIn - -`func (o *GetPin200Response) HasExpiresIn() bool` - -HasExpiresIn returns a boolean if a field has been set. - -### SetExpiresInNil - -`func (o *GetPin200Response) SetExpiresInNil(b bool)` - - SetExpiresInNil sets the value for ExpiresIn to be an explicit nil - -### UnsetExpiresIn -`func (o *GetPin200Response) UnsetExpiresIn()` - -UnsetExpiresIn ensures that no value is present for ExpiresIn, not even an explicit nil -### GetCreatedAt - -`func (o *GetPin200Response) GetCreatedAt() interface{}` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *GetPin200Response) GetCreatedAtOk() (*interface{}, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *GetPin200Response) SetCreatedAt(v interface{})` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *GetPin200Response) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### SetCreatedAtNil - -`func (o *GetPin200Response) SetCreatedAtNil(b bool)` - - SetCreatedAtNil sets the value for CreatedAt to be an explicit nil - -### UnsetCreatedAt -`func (o *GetPin200Response) UnsetCreatedAt()` - -UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil -### GetExpiresAt - -`func (o *GetPin200Response) GetExpiresAt() interface{}` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *GetPin200Response) GetExpiresAtOk() (*interface{}, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *GetPin200Response) SetExpiresAt(v interface{})` - -SetExpiresAt sets ExpiresAt field to given value. - -### HasExpiresAt - -`func (o *GetPin200Response) HasExpiresAt() bool` - -HasExpiresAt returns a boolean if a field has been set. - -### SetExpiresAtNil - -`func (o *GetPin200Response) SetExpiresAtNil(b bool)` - - SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil - -### UnsetExpiresAt -`func (o *GetPin200Response) UnsetExpiresAt()` - -UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -### GetAuthToken - -`func (o *GetPin200Response) GetAuthToken() interface{}` - -GetAuthToken returns the AuthToken field if non-nil, zero value otherwise. - -### GetAuthTokenOk - -`func (o *GetPin200Response) GetAuthTokenOk() (*interface{}, bool)` - -GetAuthTokenOk returns a tuple with the AuthToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthToken - -`func (o *GetPin200Response) SetAuthToken(v interface{})` - -SetAuthToken sets AuthToken field to given value. - -### HasAuthToken - -`func (o *GetPin200Response) HasAuthToken() bool` - -HasAuthToken returns a boolean if a field has been set. - -### SetAuthTokenNil - -`func (o *GetPin200Response) SetAuthTokenNil(b bool)` - - SetAuthTokenNil sets the value for AuthToken to be an explicit nil - -### UnsetAuthToken -`func (o *GetPin200Response) UnsetAuthToken()` - -UnsetAuthToken ensures that no value is present for AuthToken, not even an explicit nil -### GetNewRegistration - -`func (o *GetPin200Response) GetNewRegistration() interface{}` - -GetNewRegistration returns the NewRegistration field if non-nil, zero value otherwise. - -### GetNewRegistrationOk - -`func (o *GetPin200Response) GetNewRegistrationOk() (*interface{}, bool)` - -GetNewRegistrationOk returns a tuple with the NewRegistration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNewRegistration - -`func (o *GetPin200Response) SetNewRegistration(v interface{})` - -SetNewRegistration sets NewRegistration field to given value. - -### HasNewRegistration - -`func (o *GetPin200Response) HasNewRegistration() bool` - -HasNewRegistration returns a boolean if a field has been set. - -### SetNewRegistrationNil - -`func (o *GetPin200Response) SetNewRegistrationNil(b bool)` - - SetNewRegistrationNil sets the value for NewRegistration to be an explicit nil - -### UnsetNewRegistration -`func (o *GetPin200Response) UnsetNewRegistration()` - -UnsetNewRegistration ensures that no value is present for NewRegistration, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/plextv/docs/GetPin200ResponseLocation.md b/plextv/docs/GetPin200ResponseLocation.md deleted file mode 100644 index 6a27645..0000000 --- a/plextv/docs/GetPin200ResponseLocation.md +++ /dev/null @@ -1,390 +0,0 @@ -# GetPin200ResponseLocation - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | Pointer to **interface{}** | | [optional] -**EuropeanUnionMember** | Pointer to **interface{}** | | [optional] -**ContinentCode** | Pointer to **interface{}** | | [optional] -**Country** | Pointer to **interface{}** | | [optional] -**City** | Pointer to **interface{}** | | [optional] -**TimeZone** | Pointer to **interface{}** | | [optional] -**PostalCode** | Pointer to **interface{}** | | [optional] -**InPrivacyRestrictedCountry** | Pointer to **interface{}** | | [optional] -**Subdivisions** | Pointer to **interface{}** | | [optional] -**Coordinates** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetPin200ResponseLocation - -`func NewGetPin200ResponseLocation() *GetPin200ResponseLocation` - -NewGetPin200ResponseLocation instantiates a new GetPin200ResponseLocation object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetPin200ResponseLocationWithDefaults - -`func NewGetPin200ResponseLocationWithDefaults() *GetPin200ResponseLocation` - -NewGetPin200ResponseLocationWithDefaults instantiates a new GetPin200ResponseLocation object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCode - -`func (o *GetPin200ResponseLocation) GetCode() interface{}` - -GetCode returns the Code field if non-nil, zero value otherwise. - -### GetCodeOk - -`func (o *GetPin200ResponseLocation) GetCodeOk() (*interface{}, bool)` - -GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCode - -`func (o *GetPin200ResponseLocation) SetCode(v interface{})` - -SetCode sets Code field to given value. - -### HasCode - -`func (o *GetPin200ResponseLocation) HasCode() bool` - -HasCode returns a boolean if a field has been set. - -### SetCodeNil - -`func (o *GetPin200ResponseLocation) SetCodeNil(b bool)` - - SetCodeNil sets the value for Code to be an explicit nil - -### UnsetCode -`func (o *GetPin200ResponseLocation) UnsetCode()` - -UnsetCode ensures that no value is present for Code, not even an explicit nil -### GetEuropeanUnionMember - -`func (o *GetPin200ResponseLocation) GetEuropeanUnionMember() interface{}` - -GetEuropeanUnionMember returns the EuropeanUnionMember field if non-nil, zero value otherwise. - -### GetEuropeanUnionMemberOk - -`func (o *GetPin200ResponseLocation) GetEuropeanUnionMemberOk() (*interface{}, bool)` - -GetEuropeanUnionMemberOk returns a tuple with the EuropeanUnionMember field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEuropeanUnionMember - -`func (o *GetPin200ResponseLocation) SetEuropeanUnionMember(v interface{})` - -SetEuropeanUnionMember sets EuropeanUnionMember field to given value. - -### HasEuropeanUnionMember - -`func (o *GetPin200ResponseLocation) HasEuropeanUnionMember() bool` - -HasEuropeanUnionMember returns a boolean if a field has been set. - -### SetEuropeanUnionMemberNil - -`func (o *GetPin200ResponseLocation) SetEuropeanUnionMemberNil(b bool)` - - SetEuropeanUnionMemberNil sets the value for EuropeanUnionMember to be an explicit nil - -### UnsetEuropeanUnionMember -`func (o *GetPin200ResponseLocation) UnsetEuropeanUnionMember()` - -UnsetEuropeanUnionMember ensures that no value is present for EuropeanUnionMember, not even an explicit nil -### GetContinentCode - -`func (o *GetPin200ResponseLocation) GetContinentCode() interface{}` - -GetContinentCode returns the ContinentCode field if non-nil, zero value otherwise. - -### GetContinentCodeOk - -`func (o *GetPin200ResponseLocation) GetContinentCodeOk() (*interface{}, bool)` - -GetContinentCodeOk returns a tuple with the ContinentCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContinentCode - -`func (o *GetPin200ResponseLocation) SetContinentCode(v interface{})` - -SetContinentCode sets ContinentCode field to given value. - -### HasContinentCode - -`func (o *GetPin200ResponseLocation) HasContinentCode() bool` - -HasContinentCode returns a boolean if a field has been set. - -### SetContinentCodeNil - -`func (o *GetPin200ResponseLocation) SetContinentCodeNil(b bool)` - - SetContinentCodeNil sets the value for ContinentCode to be an explicit nil - -### UnsetContinentCode -`func (o *GetPin200ResponseLocation) UnsetContinentCode()` - -UnsetContinentCode ensures that no value is present for ContinentCode, not even an explicit nil -### GetCountry - -`func (o *GetPin200ResponseLocation) GetCountry() interface{}` - -GetCountry returns the Country field if non-nil, zero value otherwise. - -### GetCountryOk - -`func (o *GetPin200ResponseLocation) GetCountryOk() (*interface{}, bool)` - -GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCountry - -`func (o *GetPin200ResponseLocation) SetCountry(v interface{})` - -SetCountry sets Country field to given value. - -### HasCountry - -`func (o *GetPin200ResponseLocation) HasCountry() bool` - -HasCountry returns a boolean if a field has been set. - -### SetCountryNil - -`func (o *GetPin200ResponseLocation) SetCountryNil(b bool)` - - SetCountryNil sets the value for Country to be an explicit nil - -### UnsetCountry -`func (o *GetPin200ResponseLocation) UnsetCountry()` - -UnsetCountry ensures that no value is present for Country, not even an explicit nil -### GetCity - -`func (o *GetPin200ResponseLocation) GetCity() interface{}` - -GetCity returns the City field if non-nil, zero value otherwise. - -### GetCityOk - -`func (o *GetPin200ResponseLocation) GetCityOk() (*interface{}, bool)` - -GetCityOk returns a tuple with the City field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCity - -`func (o *GetPin200ResponseLocation) SetCity(v interface{})` - -SetCity sets City field to given value. - -### HasCity - -`func (o *GetPin200ResponseLocation) HasCity() bool` - -HasCity returns a boolean if a field has been set. - -### SetCityNil - -`func (o *GetPin200ResponseLocation) SetCityNil(b bool)` - - SetCityNil sets the value for City to be an explicit nil - -### UnsetCity -`func (o *GetPin200ResponseLocation) UnsetCity()` - -UnsetCity ensures that no value is present for City, not even an explicit nil -### GetTimeZone - -`func (o *GetPin200ResponseLocation) GetTimeZone() interface{}` - -GetTimeZone returns the TimeZone field if non-nil, zero value otherwise. - -### GetTimeZoneOk - -`func (o *GetPin200ResponseLocation) GetTimeZoneOk() (*interface{}, bool)` - -GetTimeZoneOk returns a tuple with the TimeZone field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTimeZone - -`func (o *GetPin200ResponseLocation) SetTimeZone(v interface{})` - -SetTimeZone sets TimeZone field to given value. - -### HasTimeZone - -`func (o *GetPin200ResponseLocation) HasTimeZone() bool` - -HasTimeZone returns a boolean if a field has been set. - -### SetTimeZoneNil - -`func (o *GetPin200ResponseLocation) SetTimeZoneNil(b bool)` - - SetTimeZoneNil sets the value for TimeZone to be an explicit nil - -### UnsetTimeZone -`func (o *GetPin200ResponseLocation) UnsetTimeZone()` - -UnsetTimeZone ensures that no value is present for TimeZone, not even an explicit nil -### GetPostalCode - -`func (o *GetPin200ResponseLocation) GetPostalCode() interface{}` - -GetPostalCode returns the PostalCode field if non-nil, zero value otherwise. - -### GetPostalCodeOk - -`func (o *GetPin200ResponseLocation) GetPostalCodeOk() (*interface{}, bool)` - -GetPostalCodeOk returns a tuple with the PostalCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPostalCode - -`func (o *GetPin200ResponseLocation) SetPostalCode(v interface{})` - -SetPostalCode sets PostalCode field to given value. - -### HasPostalCode - -`func (o *GetPin200ResponseLocation) HasPostalCode() bool` - -HasPostalCode returns a boolean if a field has been set. - -### SetPostalCodeNil - -`func (o *GetPin200ResponseLocation) SetPostalCodeNil(b bool)` - - SetPostalCodeNil sets the value for PostalCode to be an explicit nil - -### UnsetPostalCode -`func (o *GetPin200ResponseLocation) UnsetPostalCode()` - -UnsetPostalCode ensures that no value is present for PostalCode, not even an explicit nil -### GetInPrivacyRestrictedCountry - -`func (o *GetPin200ResponseLocation) GetInPrivacyRestrictedCountry() interface{}` - -GetInPrivacyRestrictedCountry returns the InPrivacyRestrictedCountry field if non-nil, zero value otherwise. - -### GetInPrivacyRestrictedCountryOk - -`func (o *GetPin200ResponseLocation) GetInPrivacyRestrictedCountryOk() (*interface{}, bool)` - -GetInPrivacyRestrictedCountryOk returns a tuple with the InPrivacyRestrictedCountry field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInPrivacyRestrictedCountry - -`func (o *GetPin200ResponseLocation) SetInPrivacyRestrictedCountry(v interface{})` - -SetInPrivacyRestrictedCountry sets InPrivacyRestrictedCountry field to given value. - -### HasInPrivacyRestrictedCountry - -`func (o *GetPin200ResponseLocation) HasInPrivacyRestrictedCountry() bool` - -HasInPrivacyRestrictedCountry returns a boolean if a field has been set. - -### SetInPrivacyRestrictedCountryNil - -`func (o *GetPin200ResponseLocation) SetInPrivacyRestrictedCountryNil(b bool)` - - SetInPrivacyRestrictedCountryNil sets the value for InPrivacyRestrictedCountry to be an explicit nil - -### UnsetInPrivacyRestrictedCountry -`func (o *GetPin200ResponseLocation) UnsetInPrivacyRestrictedCountry()` - -UnsetInPrivacyRestrictedCountry ensures that no value is present for InPrivacyRestrictedCountry, not even an explicit nil -### GetSubdivisions - -`func (o *GetPin200ResponseLocation) GetSubdivisions() interface{}` - -GetSubdivisions returns the Subdivisions field if non-nil, zero value otherwise. - -### GetSubdivisionsOk - -`func (o *GetPin200ResponseLocation) GetSubdivisionsOk() (*interface{}, bool)` - -GetSubdivisionsOk returns a tuple with the Subdivisions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubdivisions - -`func (o *GetPin200ResponseLocation) SetSubdivisions(v interface{})` - -SetSubdivisions sets Subdivisions field to given value. - -### HasSubdivisions - -`func (o *GetPin200ResponseLocation) HasSubdivisions() bool` - -HasSubdivisions returns a boolean if a field has been set. - -### SetSubdivisionsNil - -`func (o *GetPin200ResponseLocation) SetSubdivisionsNil(b bool)` - - SetSubdivisionsNil sets the value for Subdivisions to be an explicit nil - -### UnsetSubdivisions -`func (o *GetPin200ResponseLocation) UnsetSubdivisions()` - -UnsetSubdivisions ensures that no value is present for Subdivisions, not even an explicit nil -### GetCoordinates - -`func (o *GetPin200ResponseLocation) GetCoordinates() interface{}` - -GetCoordinates returns the Coordinates field if non-nil, zero value otherwise. - -### GetCoordinatesOk - -`func (o *GetPin200ResponseLocation) GetCoordinatesOk() (*interface{}, bool)` - -GetCoordinatesOk returns a tuple with the Coordinates field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCoordinates - -`func (o *GetPin200ResponseLocation) SetCoordinates(v interface{})` - -SetCoordinates sets Coordinates field to given value. - -### HasCoordinates - -`func (o *GetPin200ResponseLocation) HasCoordinates() bool` - -HasCoordinates returns a boolean if a field has been set. - -### SetCoordinatesNil - -`func (o *GetPin200ResponseLocation) SetCoordinatesNil(b bool)` - - SetCoordinatesNil sets the value for Coordinates to be an explicit nil - -### UnsetCoordinates -`func (o *GetPin200ResponseLocation) UnsetCoordinates()` - -UnsetCoordinates ensures that no value is present for Coordinates, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/plextv/docs/GetPin400Response.md b/plextv/docs/GetPin400Response.md deleted file mode 100644 index 4cee576..0000000 --- a/plextv/docs/GetPin400Response.md +++ /dev/null @@ -1,66 +0,0 @@ -# GetPin400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetPin400Response - -`func NewGetPin400Response() *GetPin400Response` - -NewGetPin400Response instantiates a new GetPin400Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetPin400ResponseWithDefaults - -`func NewGetPin400ResponseWithDefaults() *GetPin400Response` - -NewGetPin400ResponseWithDefaults instantiates a new GetPin400Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetErrors - -`func (o *GetPin400Response) GetErrors() interface{}` - -GetErrors returns the Errors field if non-nil, zero value otherwise. - -### GetErrorsOk - -`func (o *GetPin400Response) GetErrorsOk() (*interface{}, bool)` - -GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrors - -`func (o *GetPin400Response) SetErrors(v interface{})` - -SetErrors sets Errors field to given value. - -### HasErrors - -`func (o *GetPin400Response) HasErrors() bool` - -HasErrors returns a boolean if a field has been set. - -### SetErrorsNil - -`func (o *GetPin400Response) SetErrorsNil(b bool)` - - SetErrorsNil sets the value for Errors to be an explicit nil - -### UnsetErrors -`func (o *GetPin400Response) UnsetErrors()` - -UnsetErrors ensures that no value is present for Errors, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/plextv/docs/GetUserOptOutSettings200Response.md b/plextv/docs/GetUserOptOutSettings200Response.md deleted file mode 100644 index 4915700..0000000 --- a/plextv/docs/GetUserOptOutSettings200Response.md +++ /dev/null @@ -1,246 +0,0 @@ -# GetUserOptOutSettings200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TvPlexProviderPodcasts** | Pointer to **interface{}** | | [optional] -**TvPlexProviderNews** | Pointer to **interface{}** | | [optional] -**TvPlexProviderWebshows** | Pointer to **interface{}** | | [optional] -**TvPlexProviderMusic** | Pointer to **interface{}** | | [optional] -**TvPlexProviderVod** | Pointer to **interface{}** | | [optional] -**Scrobbling** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetUserOptOutSettings200Response - -`func NewGetUserOptOutSettings200Response() *GetUserOptOutSettings200Response` - -NewGetUserOptOutSettings200Response instantiates a new GetUserOptOutSettings200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetUserOptOutSettings200ResponseWithDefaults - -`func NewGetUserOptOutSettings200ResponseWithDefaults() *GetUserOptOutSettings200Response` - -NewGetUserOptOutSettings200ResponseWithDefaults instantiates a new GetUserOptOutSettings200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetTvPlexProviderPodcasts - -`func (o *GetUserOptOutSettings200Response) GetTvPlexProviderPodcasts() interface{}` - -GetTvPlexProviderPodcasts returns the TvPlexProviderPodcasts field if non-nil, zero value otherwise. - -### GetTvPlexProviderPodcastsOk - -`func (o *GetUserOptOutSettings200Response) GetTvPlexProviderPodcastsOk() (*interface{}, bool)` - -GetTvPlexProviderPodcastsOk returns a tuple with the TvPlexProviderPodcasts field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTvPlexProviderPodcasts - -`func (o *GetUserOptOutSettings200Response) SetTvPlexProviderPodcasts(v interface{})` - -SetTvPlexProviderPodcasts sets TvPlexProviderPodcasts field to given value. - -### HasTvPlexProviderPodcasts - -`func (o *GetUserOptOutSettings200Response) HasTvPlexProviderPodcasts() bool` - -HasTvPlexProviderPodcasts returns a boolean if a field has been set. - -### SetTvPlexProviderPodcastsNil - -`func (o *GetUserOptOutSettings200Response) SetTvPlexProviderPodcastsNil(b bool)` - - SetTvPlexProviderPodcastsNil sets the value for TvPlexProviderPodcasts to be an explicit nil - -### UnsetTvPlexProviderPodcasts -`func (o *GetUserOptOutSettings200Response) UnsetTvPlexProviderPodcasts()` - -UnsetTvPlexProviderPodcasts ensures that no value is present for TvPlexProviderPodcasts, not even an explicit nil -### GetTvPlexProviderNews - -`func (o *GetUserOptOutSettings200Response) GetTvPlexProviderNews() interface{}` - -GetTvPlexProviderNews returns the TvPlexProviderNews field if non-nil, zero value otherwise. - -### GetTvPlexProviderNewsOk - -`func (o *GetUserOptOutSettings200Response) GetTvPlexProviderNewsOk() (*interface{}, bool)` - -GetTvPlexProviderNewsOk returns a tuple with the TvPlexProviderNews field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTvPlexProviderNews - -`func (o *GetUserOptOutSettings200Response) SetTvPlexProviderNews(v interface{})` - -SetTvPlexProviderNews sets TvPlexProviderNews field to given value. - -### HasTvPlexProviderNews - -`func (o *GetUserOptOutSettings200Response) HasTvPlexProviderNews() bool` - -HasTvPlexProviderNews returns a boolean if a field has been set. - -### SetTvPlexProviderNewsNil - -`func (o *GetUserOptOutSettings200Response) SetTvPlexProviderNewsNil(b bool)` - - SetTvPlexProviderNewsNil sets the value for TvPlexProviderNews to be an explicit nil - -### UnsetTvPlexProviderNews -`func (o *GetUserOptOutSettings200Response) UnsetTvPlexProviderNews()` - -UnsetTvPlexProviderNews ensures that no value is present for TvPlexProviderNews, not even an explicit nil -### GetTvPlexProviderWebshows - -`func (o *GetUserOptOutSettings200Response) GetTvPlexProviderWebshows() interface{}` - -GetTvPlexProviderWebshows returns the TvPlexProviderWebshows field if non-nil, zero value otherwise. - -### GetTvPlexProviderWebshowsOk - -`func (o *GetUserOptOutSettings200Response) GetTvPlexProviderWebshowsOk() (*interface{}, bool)` - -GetTvPlexProviderWebshowsOk returns a tuple with the TvPlexProviderWebshows field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTvPlexProviderWebshows - -`func (o *GetUserOptOutSettings200Response) SetTvPlexProviderWebshows(v interface{})` - -SetTvPlexProviderWebshows sets TvPlexProviderWebshows field to given value. - -### HasTvPlexProviderWebshows - -`func (o *GetUserOptOutSettings200Response) HasTvPlexProviderWebshows() bool` - -HasTvPlexProviderWebshows returns a boolean if a field has been set. - -### SetTvPlexProviderWebshowsNil - -`func (o *GetUserOptOutSettings200Response) SetTvPlexProviderWebshowsNil(b bool)` - - SetTvPlexProviderWebshowsNil sets the value for TvPlexProviderWebshows to be an explicit nil - -### UnsetTvPlexProviderWebshows -`func (o *GetUserOptOutSettings200Response) UnsetTvPlexProviderWebshows()` - -UnsetTvPlexProviderWebshows ensures that no value is present for TvPlexProviderWebshows, not even an explicit nil -### GetTvPlexProviderMusic - -`func (o *GetUserOptOutSettings200Response) GetTvPlexProviderMusic() interface{}` - -GetTvPlexProviderMusic returns the TvPlexProviderMusic field if non-nil, zero value otherwise. - -### GetTvPlexProviderMusicOk - -`func (o *GetUserOptOutSettings200Response) GetTvPlexProviderMusicOk() (*interface{}, bool)` - -GetTvPlexProviderMusicOk returns a tuple with the TvPlexProviderMusic field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTvPlexProviderMusic - -`func (o *GetUserOptOutSettings200Response) SetTvPlexProviderMusic(v interface{})` - -SetTvPlexProviderMusic sets TvPlexProviderMusic field to given value. - -### HasTvPlexProviderMusic - -`func (o *GetUserOptOutSettings200Response) HasTvPlexProviderMusic() bool` - -HasTvPlexProviderMusic returns a boolean if a field has been set. - -### SetTvPlexProviderMusicNil - -`func (o *GetUserOptOutSettings200Response) SetTvPlexProviderMusicNil(b bool)` - - SetTvPlexProviderMusicNil sets the value for TvPlexProviderMusic to be an explicit nil - -### UnsetTvPlexProviderMusic -`func (o *GetUserOptOutSettings200Response) UnsetTvPlexProviderMusic()` - -UnsetTvPlexProviderMusic ensures that no value is present for TvPlexProviderMusic, not even an explicit nil -### GetTvPlexProviderVod - -`func (o *GetUserOptOutSettings200Response) GetTvPlexProviderVod() interface{}` - -GetTvPlexProviderVod returns the TvPlexProviderVod field if non-nil, zero value otherwise. - -### GetTvPlexProviderVodOk - -`func (o *GetUserOptOutSettings200Response) GetTvPlexProviderVodOk() (*interface{}, bool)` - -GetTvPlexProviderVodOk returns a tuple with the TvPlexProviderVod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTvPlexProviderVod - -`func (o *GetUserOptOutSettings200Response) SetTvPlexProviderVod(v interface{})` - -SetTvPlexProviderVod sets TvPlexProviderVod field to given value. - -### HasTvPlexProviderVod - -`func (o *GetUserOptOutSettings200Response) HasTvPlexProviderVod() bool` - -HasTvPlexProviderVod returns a boolean if a field has been set. - -### SetTvPlexProviderVodNil - -`func (o *GetUserOptOutSettings200Response) SetTvPlexProviderVodNil(b bool)` - - SetTvPlexProviderVodNil sets the value for TvPlexProviderVod to be an explicit nil - -### UnsetTvPlexProviderVod -`func (o *GetUserOptOutSettings200Response) UnsetTvPlexProviderVod()` - -UnsetTvPlexProviderVod ensures that no value is present for TvPlexProviderVod, not even an explicit nil -### GetScrobbling - -`func (o *GetUserOptOutSettings200Response) GetScrobbling() interface{}` - -GetScrobbling returns the Scrobbling field if non-nil, zero value otherwise. - -### GetScrobblingOk - -`func (o *GetUserOptOutSettings200Response) GetScrobblingOk() (*interface{}, bool)` - -GetScrobblingOk returns a tuple with the Scrobbling field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScrobbling - -`func (o *GetUserOptOutSettings200Response) SetScrobbling(v interface{})` - -SetScrobbling sets Scrobbling field to given value. - -### HasScrobbling - -`func (o *GetUserOptOutSettings200Response) HasScrobbling() bool` - -HasScrobbling returns a boolean if a field has been set. - -### SetScrobblingNil - -`func (o *GetUserOptOutSettings200Response) SetScrobblingNil(b bool)` - - SetScrobblingNil sets the value for Scrobbling to be an explicit nil - -### UnsetScrobbling -`func (o *GetUserOptOutSettings200Response) UnsetScrobbling()` - -UnsetScrobbling ensures that no value is present for Scrobbling, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/plextv/docs/PlexTvApi.md b/plextv/docs/PlexTvApi.md deleted file mode 100644 index cc912c4..0000000 --- a/plextv/docs/PlexTvApi.md +++ /dev/null @@ -1,585 +0,0 @@ -# \PlexTvApi - -All URIs are relative to *https://plex.tv/api/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetCompanionsData**](PlexTvApi.md#GetCompanionsData) | **Get** /companions | Get Companions Data -[**GetDevices**](PlexTvApi.md#GetDevices) | **Get** /resources | Get Devices -[**GetGeoData**](PlexTvApi.md#GetGeoData) | **Get** /geoip | Get Geo Data -[**GetHomeData**](PlexTvApi.md#GetHomeData) | **Get** /home | Get Home Data -[**GetPin**](PlexTvApi.md#GetPin) | **Post** /pins | Get a Pin -[**GetToken**](PlexTvApi.md#GetToken) | **Get** /pins/{pinID} | Get Access Token -[**GetUserDetails**](PlexTvApi.md#GetUserDetails) | **Get** /user | Get Logged in User -[**GetUserOptOutSettings**](PlexTvApi.md#GetUserOptOutSettings) | **Get** /user/settings/opt_outs | Get User Opt Out Settings -[**GetUserSettings**](PlexTvApi.md#GetUserSettings) | **Get** /user/settings | Get User Settings - - - -## GetCompanionsData - -> interface{} GetCompanionsData(ctx).Execute() - -Get Companions Data - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlexTvApi.GetCompanionsData(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetCompanionsData``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetCompanionsData`: interface{} - fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetCompanionsData`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetCompanionsDataRequest struct via the builder pattern - - -### Return type - -**interface{}** - -### Authorization - -[PlatformVersion](../README.md#PlatformVersion), [ClientIdentifier](../README.md#ClientIdentifier), [Platform](../README.md#Platform), [Version](../README.md#Version), [Device](../README.md#Device), [Product](../README.md#Product), [Token](../README.md#Token), [DeviceName](../README.md#DeviceName) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetDevices - -> interface{} GetDevices(ctx).IncludeHttps(includeHttps).IncludeRelay(includeRelay).IncludeIPv6(includeIPv6).Execute() - -Get Devices - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - includeHttps := TODO // interface{} | Include Https entries in the results (optional) - includeRelay := TODO // interface{} | Include Relay addresses in the results (optional) - includeIPv6 := TODO // interface{} | Include IPv6 entries in the results (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlexTvApi.GetDevices(context.Background()).IncludeHttps(includeHttps).IncludeRelay(includeRelay).IncludeIPv6(includeIPv6).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetDevices``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetDevices`: interface{} - fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetDevices`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetDevicesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **includeHttps** | [**interface{}**](interface{}.md) | Include Https entries in the results | - **includeRelay** | [**interface{}**](interface{}.md) | Include Relay addresses in the results | - **includeIPv6** | [**interface{}**](interface{}.md) | Include IPv6 entries in the results | - -### Return type - -**interface{}** - -### Authorization - -[PlatformVersion](../README.md#PlatformVersion), [ClientIdentifier](../README.md#ClientIdentifier), [Platform](../README.md#Platform), [Version](../README.md#Version), [Device](../README.md#Device), [Product](../README.md#Product), [Token](../README.md#Token), [DeviceName](../README.md#DeviceName) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGeoData - -> GetGeoData200Response GetGeoData(ctx).Execute() - -Get Geo Data - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlexTvApi.GetGeoData(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetGeoData``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGeoData`: GetGeoData200Response - fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetGeoData`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGeoDataRequest struct via the builder pattern - - -### Return type - -[**GetGeoData200Response**](GetGeoData200Response.md) - -### Authorization - -[PlatformVersion](../README.md#PlatformVersion), [ClientIdentifier](../README.md#ClientIdentifier), [Platform](../README.md#Platform), [Version](../README.md#Version), [Device](../README.md#Device), [Product](../README.md#Product), [Token](../README.md#Token), [DeviceName](../README.md#DeviceName) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetHomeData - -> GetGeoData200Response GetHomeData(ctx).Execute() - -Get Home Data - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlexTvApi.GetHomeData(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetHomeData``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetHomeData`: GetGeoData200Response - fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetHomeData`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetHomeDataRequest struct via the builder pattern - - -### Return type - -[**GetGeoData200Response**](GetGeoData200Response.md) - -### Authorization - -[PlatformVersion](../README.md#PlatformVersion), [ClientIdentifier](../README.md#ClientIdentifier), [Platform](../README.md#Platform), [Version](../README.md#Version), [Device](../README.md#Device), [Product](../README.md#Product), [Token](../README.md#Token), [DeviceName](../README.md#DeviceName) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetPin - -> GetPin200Response GetPin(ctx).Strong(strong).Execute() - -Get a Pin - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - strong := TODO // interface{} | Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for `Plex.tv/link` (optional) (default to false) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlexTvApi.GetPin(context.Background()).Strong(strong).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetPin``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetPin`: GetPin200Response - fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetPin`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetPinRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **strong** | [**interface{}**](interface{}.md) | Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for `Plex.tv/link` | [default to false] - -### Return type - -[**GetPin200Response**](GetPin200Response.md) - -### Authorization - -[ClientIdentifier](../README.md#ClientIdentifier) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetToken - -> GetToken(ctx, pinID).Execute() - -Get Access Token - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - pinID := TODO // interface{} | The PinID to retrieve an access token for - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlexTvApi.GetToken(context.Background(), pinID).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetToken``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**pinID** | [**interface{}**](.md) | The PinID to retrieve an access token for | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetTokenRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[ClientIdentifier](../README.md#ClientIdentifier) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserDetails - -> GetUserDetails(ctx).Execute() - -Get Logged in User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlexTvApi.GetUserDetails(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetUserDetails``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserDetailsRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -[PlatformVersion](../README.md#PlatformVersion), [ClientIdentifier](../README.md#ClientIdentifier), [Platform](../README.md#Platform), [Version](../README.md#Version), [Device](../README.md#Device), [Product](../README.md#Product), [Token](../README.md#Token), [DeviceName](../README.md#DeviceName) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserOptOutSettings - -> GetUserOptOutSettings200Response GetUserOptOutSettings(ctx).Execute() - -Get User Opt Out Settings - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlexTvApi.GetUserOptOutSettings(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetUserOptOutSettings``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserOptOutSettings`: GetUserOptOutSettings200Response - fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetUserOptOutSettings`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserOptOutSettingsRequest struct via the builder pattern - - -### Return type - -[**GetUserOptOutSettings200Response**](GetUserOptOutSettings200Response.md) - -### Authorization - -[PlatformVersion](../README.md#PlatformVersion), [ClientIdentifier](../README.md#ClientIdentifier), [Platform](../README.md#Platform), [Version](../README.md#Version), [Device](../README.md#Device), [Product](../README.md#Product), [Token](../README.md#Token), [DeviceName](../README.md#DeviceName) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserSettings - -> interface{} GetUserSettings(ctx).Execute() - -Get User Settings - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlexTvApi.GetUserSettings(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlexTvApi.GetUserSettings``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserSettings`: interface{} - fmt.Fprintf(os.Stdout, "Response from `PlexTvApi.GetUserSettings`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserSettingsRequest struct via the builder pattern - - -### Return type - -**interface{}** - -### Authorization - -[PlatformVersion](../README.md#PlatformVersion), [ClientIdentifier](../README.md#ClientIdentifier), [Platform](../README.md#Platform), [Version](../README.md#Version), [Device](../README.md#Device), [Product](../README.md#Product), [Token](../README.md#Token), [DeviceName](../README.md#DeviceName) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/plextv/git_push.sh b/plextv/git_push.sh deleted file mode 100644 index 4d884b3..0000000 --- a/plextv/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="lukehagar" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="plexgo" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/plextv/go.mod b/plextv/go.mod deleted file mode 100644 index ee64514..0000000 --- a/plextv/go.mod +++ /dev/null @@ -1,7 +0,0 @@ -module github.com/sailpoint-oss/golang-sdk/sdk-output/v3 - -go 1.13 - -require ( - github.com/hashicorp/go-retryablehttp v0.7.2 // indirect -) diff --git a/plextv/go.sum b/plextv/go.sum deleted file mode 100644 index c966c8d..0000000 --- a/plextv/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/plextv/model_get_companions_data_401_response.go b/plextv/model_get_companions_data_401_response.go deleted file mode 100644 index fe6593d..0000000 --- a/plextv/model_get_companions_data_401_response.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package plextv - -import ( - "encoding/json" -) - -// checks if the GetCompanionsData401Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetCompanionsData401Response{} - -// GetCompanionsData401Response struct for GetCompanionsData401Response -type GetCompanionsData401Response struct { - Errors interface{} `json:"errors,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetCompanionsData401Response GetCompanionsData401Response - -// NewGetCompanionsData401Response instantiates a new GetCompanionsData401Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetCompanionsData401Response() *GetCompanionsData401Response { - this := GetCompanionsData401Response{} - return &this -} - -// NewGetCompanionsData401ResponseWithDefaults instantiates a new GetCompanionsData401Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetCompanionsData401ResponseWithDefaults() *GetCompanionsData401Response { - this := GetCompanionsData401Response{} - return &this -} - -// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetCompanionsData401Response) GetErrors() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Errors -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetCompanionsData401Response) GetErrorsOk() (*interface{}, bool) { - if o == nil || isNil(o.Errors) { - return nil, false - } - return &o.Errors, true -} - -// HasErrors returns a boolean if a field has been set. -func (o *GetCompanionsData401Response) HasErrors() bool { - if o != nil && isNil(o.Errors) { - return true - } - - return false -} - -// SetErrors gets a reference to the given interface{} and assigns it to the Errors field. -func (o *GetCompanionsData401Response) SetErrors(v interface{}) { - o.Errors = v -} - -func (o GetCompanionsData401Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetCompanionsData401Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Errors != nil { - toSerialize["errors"] = o.Errors - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetCompanionsData401Response) UnmarshalJSON(bytes []byte) (err error) { - varGetCompanionsData401Response := _GetCompanionsData401Response{} - - if err = json.Unmarshal(bytes, &varGetCompanionsData401Response); err == nil { - *o = GetCompanionsData401Response(varGetCompanionsData401Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "errors") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetCompanionsData401Response struct { - value *GetCompanionsData401Response - isSet bool -} - -func (v NullableGetCompanionsData401Response) Get() *GetCompanionsData401Response { - return v.value -} - -func (v *NullableGetCompanionsData401Response) Set(val *GetCompanionsData401Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetCompanionsData401Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetCompanionsData401Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetCompanionsData401Response(val *GetCompanionsData401Response) *NullableGetCompanionsData401Response { - return &NullableGetCompanionsData401Response{value: val, isSet: true} -} - -func (v NullableGetCompanionsData401Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetCompanionsData401Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/plextv/model_get_geo_data_200_response.go b/plextv/model_get_geo_data_200_response.go deleted file mode 100644 index 65e3ebb..0000000 --- a/plextv/model_get_geo_data_200_response.go +++ /dev/null @@ -1,343 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package plextv - -import ( - "encoding/json" -) - -// checks if the GetGeoData200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetGeoData200Response{} - -// GetGeoData200Response struct for GetGeoData200Response -type GetGeoData200Response struct { - Id interface{} `json:"id,omitempty"` - Name interface{} `json:"name,omitempty"` - GuestUserID interface{} `json:"guestUserID,omitempty"` - GuestUserUUID interface{} `json:"guestUserUUID,omitempty"` - GuestEnabled interface{} `json:"guestEnabled,omitempty"` - Subscription interface{} `json:"subscription,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetGeoData200Response GetGeoData200Response - -// NewGetGeoData200Response instantiates a new GetGeoData200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetGeoData200Response() *GetGeoData200Response { - this := GetGeoData200Response{} - return &this -} - -// NewGetGeoData200ResponseWithDefaults instantiates a new GetGeoData200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetGeoData200ResponseWithDefaults() *GetGeoData200Response { - this := GetGeoData200Response{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetGeoData200Response) GetId() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetGeoData200Response) GetIdOk() (*interface{}, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return &o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetGeoData200Response) HasId() bool { - if o != nil && isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given interface{} and assigns it to the Id field. -func (o *GetGeoData200Response) SetId(v interface{}) { - o.Id = v -} - -// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetGeoData200Response) GetName() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetGeoData200Response) GetNameOk() (*interface{}, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return &o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetGeoData200Response) HasName() bool { - if o != nil && isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given interface{} and assigns it to the Name field. -func (o *GetGeoData200Response) SetName(v interface{}) { - o.Name = v -} - -// GetGuestUserID returns the GuestUserID field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetGeoData200Response) GetGuestUserID() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.GuestUserID -} - -// GetGuestUserIDOk returns a tuple with the GuestUserID field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetGeoData200Response) GetGuestUserIDOk() (*interface{}, bool) { - if o == nil || isNil(o.GuestUserID) { - return nil, false - } - return &o.GuestUserID, true -} - -// HasGuestUserID returns a boolean if a field has been set. -func (o *GetGeoData200Response) HasGuestUserID() bool { - if o != nil && isNil(o.GuestUserID) { - return true - } - - return false -} - -// SetGuestUserID gets a reference to the given interface{} and assigns it to the GuestUserID field. -func (o *GetGeoData200Response) SetGuestUserID(v interface{}) { - o.GuestUserID = v -} - -// GetGuestUserUUID returns the GuestUserUUID field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetGeoData200Response) GetGuestUserUUID() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.GuestUserUUID -} - -// GetGuestUserUUIDOk returns a tuple with the GuestUserUUID field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetGeoData200Response) GetGuestUserUUIDOk() (*interface{}, bool) { - if o == nil || isNil(o.GuestUserUUID) { - return nil, false - } - return &o.GuestUserUUID, true -} - -// HasGuestUserUUID returns a boolean if a field has been set. -func (o *GetGeoData200Response) HasGuestUserUUID() bool { - if o != nil && isNil(o.GuestUserUUID) { - return true - } - - return false -} - -// SetGuestUserUUID gets a reference to the given interface{} and assigns it to the GuestUserUUID field. -func (o *GetGeoData200Response) SetGuestUserUUID(v interface{}) { - o.GuestUserUUID = v -} - -// GetGuestEnabled returns the GuestEnabled field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetGeoData200Response) GetGuestEnabled() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.GuestEnabled -} - -// GetGuestEnabledOk returns a tuple with the GuestEnabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetGeoData200Response) GetGuestEnabledOk() (*interface{}, bool) { - if o == nil || isNil(o.GuestEnabled) { - return nil, false - } - return &o.GuestEnabled, true -} - -// HasGuestEnabled returns a boolean if a field has been set. -func (o *GetGeoData200Response) HasGuestEnabled() bool { - if o != nil && isNil(o.GuestEnabled) { - return true - } - - return false -} - -// SetGuestEnabled gets a reference to the given interface{} and assigns it to the GuestEnabled field. -func (o *GetGeoData200Response) SetGuestEnabled(v interface{}) { - o.GuestEnabled = v -} - -// GetSubscription returns the Subscription field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetGeoData200Response) GetSubscription() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Subscription -} - -// GetSubscriptionOk returns a tuple with the Subscription field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetGeoData200Response) GetSubscriptionOk() (*interface{}, bool) { - if o == nil || isNil(o.Subscription) { - return nil, false - } - return &o.Subscription, true -} - -// HasSubscription returns a boolean if a field has been set. -func (o *GetGeoData200Response) HasSubscription() bool { - if o != nil && isNil(o.Subscription) { - return true - } - - return false -} - -// SetSubscription gets a reference to the given interface{} and assigns it to the Subscription field. -func (o *GetGeoData200Response) SetSubscription(v interface{}) { - o.Subscription = v -} - -func (o GetGeoData200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetGeoData200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.GuestUserID != nil { - toSerialize["guestUserID"] = o.GuestUserID - } - if o.GuestUserUUID != nil { - toSerialize["guestUserUUID"] = o.GuestUserUUID - } - if o.GuestEnabled != nil { - toSerialize["guestEnabled"] = o.GuestEnabled - } - if o.Subscription != nil { - toSerialize["subscription"] = o.Subscription - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetGeoData200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetGeoData200Response := _GetGeoData200Response{} - - if err = json.Unmarshal(bytes, &varGetGeoData200Response); err == nil { - *o = GetGeoData200Response(varGetGeoData200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "id") - delete(additionalProperties, "name") - delete(additionalProperties, "guestUserID") - delete(additionalProperties, "guestUserUUID") - delete(additionalProperties, "guestEnabled") - delete(additionalProperties, "subscription") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetGeoData200Response struct { - value *GetGeoData200Response - isSet bool -} - -func (v NullableGetGeoData200Response) Get() *GetGeoData200Response { - return v.value -} - -func (v *NullableGetGeoData200Response) Set(val *GetGeoData200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetGeoData200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetGeoData200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetGeoData200Response(val *GetGeoData200Response) *NullableGetGeoData200Response { - return &NullableGetGeoData200Response{value: val, isSet: true} -} - -func (v NullableGetGeoData200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetGeoData200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/plextv/model_get_pin_200_response.go b/plextv/model_get_pin_200_response.go deleted file mode 100644 index 509dca0..0000000 --- a/plextv/model_get_pin_200_response.go +++ /dev/null @@ -1,572 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package plextv - -import ( - "encoding/json" -) - -// checks if the GetPin200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetPin200Response{} - -// GetPin200Response struct for GetPin200Response -type GetPin200Response struct { - // PinID for use with authentication - Id interface{} `json:"id,omitempty"` - Code interface{} `json:"code,omitempty"` - Product interface{} `json:"product,omitempty"` - Trusted interface{} `json:"trusted,omitempty"` - // a link to a QR code hosted on plex.tv The QR code redirects to the relevant `plex.tv/link` authentication page Which then prompts the user for the 4 Digit Link Pin - Qr interface{} `json:"qr,omitempty"` - ClientIdentifier interface{} `json:"clientIdentifier,omitempty"` - Location *GetPin200ResponseLocation `json:"location,omitempty"` - ExpiresIn interface{} `json:"expiresIn,omitempty"` - CreatedAt interface{} `json:"createdAt,omitempty"` - ExpiresAt interface{} `json:"expiresAt,omitempty"` - AuthToken interface{} `json:"authToken,omitempty"` - NewRegistration interface{} `json:"newRegistration,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetPin200Response GetPin200Response - -// NewGetPin200Response instantiates a new GetPin200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetPin200Response() *GetPin200Response { - this := GetPin200Response{} - return &this -} - -// NewGetPin200ResponseWithDefaults instantiates a new GetPin200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetPin200ResponseWithDefaults() *GetPin200Response { - this := GetPin200Response{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200Response) GetId() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200Response) GetIdOk() (*interface{}, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return &o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetPin200Response) HasId() bool { - if o != nil && isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given interface{} and assigns it to the Id field. -func (o *GetPin200Response) SetId(v interface{}) { - o.Id = v -} - -// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200Response) GetCode() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Code -} - -// GetCodeOk returns a tuple with the Code field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200Response) GetCodeOk() (*interface{}, bool) { - if o == nil || isNil(o.Code) { - return nil, false - } - return &o.Code, true -} - -// HasCode returns a boolean if a field has been set. -func (o *GetPin200Response) HasCode() bool { - if o != nil && isNil(o.Code) { - return true - } - - return false -} - -// SetCode gets a reference to the given interface{} and assigns it to the Code field. -func (o *GetPin200Response) SetCode(v interface{}) { - o.Code = v -} - -// GetProduct returns the Product field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200Response) GetProduct() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Product -} - -// GetProductOk returns a tuple with the Product field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200Response) GetProductOk() (*interface{}, bool) { - if o == nil || isNil(o.Product) { - return nil, false - } - return &o.Product, true -} - -// HasProduct returns a boolean if a field has been set. -func (o *GetPin200Response) HasProduct() bool { - if o != nil && isNil(o.Product) { - return true - } - - return false -} - -// SetProduct gets a reference to the given interface{} and assigns it to the Product field. -func (o *GetPin200Response) SetProduct(v interface{}) { - o.Product = v -} - -// GetTrusted returns the Trusted field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200Response) GetTrusted() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Trusted -} - -// GetTrustedOk returns a tuple with the Trusted field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200Response) GetTrustedOk() (*interface{}, bool) { - if o == nil || isNil(o.Trusted) { - return nil, false - } - return &o.Trusted, true -} - -// HasTrusted returns a boolean if a field has been set. -func (o *GetPin200Response) HasTrusted() bool { - if o != nil && isNil(o.Trusted) { - return true - } - - return false -} - -// SetTrusted gets a reference to the given interface{} and assigns it to the Trusted field. -func (o *GetPin200Response) SetTrusted(v interface{}) { - o.Trusted = v -} - -// GetQr returns the Qr field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200Response) GetQr() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Qr -} - -// GetQrOk returns a tuple with the Qr field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200Response) GetQrOk() (*interface{}, bool) { - if o == nil || isNil(o.Qr) { - return nil, false - } - return &o.Qr, true -} - -// HasQr returns a boolean if a field has been set. -func (o *GetPin200Response) HasQr() bool { - if o != nil && isNil(o.Qr) { - return true - } - - return false -} - -// SetQr gets a reference to the given interface{} and assigns it to the Qr field. -func (o *GetPin200Response) SetQr(v interface{}) { - o.Qr = v -} - -// GetClientIdentifier returns the ClientIdentifier field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200Response) GetClientIdentifier() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.ClientIdentifier -} - -// GetClientIdentifierOk returns a tuple with the ClientIdentifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200Response) GetClientIdentifierOk() (*interface{}, bool) { - if o == nil || isNil(o.ClientIdentifier) { - return nil, false - } - return &o.ClientIdentifier, true -} - -// HasClientIdentifier returns a boolean if a field has been set. -func (o *GetPin200Response) HasClientIdentifier() bool { - if o != nil && isNil(o.ClientIdentifier) { - return true - } - - return false -} - -// SetClientIdentifier gets a reference to the given interface{} and assigns it to the ClientIdentifier field. -func (o *GetPin200Response) SetClientIdentifier(v interface{}) { - o.ClientIdentifier = v -} - -// GetLocation returns the Location field value if set, zero value otherwise. -func (o *GetPin200Response) GetLocation() GetPin200ResponseLocation { - if o == nil || isNil(o.Location) { - var ret GetPin200ResponseLocation - return ret - } - return *o.Location -} - -// GetLocationOk returns a tuple with the Location field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetPin200Response) GetLocationOk() (*GetPin200ResponseLocation, bool) { - if o == nil || isNil(o.Location) { - return nil, false - } - return o.Location, true -} - -// HasLocation returns a boolean if a field has been set. -func (o *GetPin200Response) HasLocation() bool { - if o != nil && !isNil(o.Location) { - return true - } - - return false -} - -// SetLocation gets a reference to the given GetPin200ResponseLocation and assigns it to the Location field. -func (o *GetPin200Response) SetLocation(v GetPin200ResponseLocation) { - o.Location = &v -} - -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200Response) GetExpiresIn() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200Response) GetExpiresInOk() (*interface{}, bool) { - if o == nil || isNil(o.ExpiresIn) { - return nil, false - } - return &o.ExpiresIn, true -} - -// HasExpiresIn returns a boolean if a field has been set. -func (o *GetPin200Response) HasExpiresIn() bool { - if o != nil && isNil(o.ExpiresIn) { - return true - } - - return false -} - -// SetExpiresIn gets a reference to the given interface{} and assigns it to the ExpiresIn field. -func (o *GetPin200Response) SetExpiresIn(v interface{}) { - o.ExpiresIn = v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200Response) GetCreatedAt() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200Response) GetCreatedAtOk() (*interface{}, bool) { - if o == nil || isNil(o.CreatedAt) { - return nil, false - } - return &o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *GetPin200Response) HasCreatedAt() bool { - if o != nil && isNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given interface{} and assigns it to the CreatedAt field. -func (o *GetPin200Response) SetCreatedAt(v interface{}) { - o.CreatedAt = v -} - -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200Response) GetExpiresAt() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200Response) GetExpiresAtOk() (*interface{}, bool) { - if o == nil || isNil(o.ExpiresAt) { - return nil, false - } - return &o.ExpiresAt, true -} - -// HasExpiresAt returns a boolean if a field has been set. -func (o *GetPin200Response) HasExpiresAt() bool { - if o != nil && isNil(o.ExpiresAt) { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given interface{} and assigns it to the ExpiresAt field. -func (o *GetPin200Response) SetExpiresAt(v interface{}) { - o.ExpiresAt = v -} - -// GetAuthToken returns the AuthToken field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200Response) GetAuthToken() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.AuthToken -} - -// GetAuthTokenOk returns a tuple with the AuthToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200Response) GetAuthTokenOk() (*interface{}, bool) { - if o == nil || isNil(o.AuthToken) { - return nil, false - } - return &o.AuthToken, true -} - -// HasAuthToken returns a boolean if a field has been set. -func (o *GetPin200Response) HasAuthToken() bool { - if o != nil && isNil(o.AuthToken) { - return true - } - - return false -} - -// SetAuthToken gets a reference to the given interface{} and assigns it to the AuthToken field. -func (o *GetPin200Response) SetAuthToken(v interface{}) { - o.AuthToken = v -} - -// GetNewRegistration returns the NewRegistration field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200Response) GetNewRegistration() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.NewRegistration -} - -// GetNewRegistrationOk returns a tuple with the NewRegistration field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200Response) GetNewRegistrationOk() (*interface{}, bool) { - if o == nil || isNil(o.NewRegistration) { - return nil, false - } - return &o.NewRegistration, true -} - -// HasNewRegistration returns a boolean if a field has been set. -func (o *GetPin200Response) HasNewRegistration() bool { - if o != nil && isNil(o.NewRegistration) { - return true - } - - return false -} - -// SetNewRegistration gets a reference to the given interface{} and assigns it to the NewRegistration field. -func (o *GetPin200Response) SetNewRegistration(v interface{}) { - o.NewRegistration = v -} - -func (o GetPin200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetPin200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Code != nil { - toSerialize["code"] = o.Code - } - if o.Product != nil { - toSerialize["product"] = o.Product - } - if o.Trusted != nil { - toSerialize["trusted"] = o.Trusted - } - if o.Qr != nil { - toSerialize["qr"] = o.Qr - } - if o.ClientIdentifier != nil { - toSerialize["clientIdentifier"] = o.ClientIdentifier - } - if !isNil(o.Location) { - toSerialize["location"] = o.Location - } - if o.ExpiresIn != nil { - toSerialize["expiresIn"] = o.ExpiresIn - } - if o.CreatedAt != nil { - toSerialize["createdAt"] = o.CreatedAt - } - if o.ExpiresAt != nil { - toSerialize["expiresAt"] = o.ExpiresAt - } - if o.AuthToken != nil { - toSerialize["authToken"] = o.AuthToken - } - if o.NewRegistration != nil { - toSerialize["newRegistration"] = o.NewRegistration - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetPin200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetPin200Response := _GetPin200Response{} - - if err = json.Unmarshal(bytes, &varGetPin200Response); err == nil { - *o = GetPin200Response(varGetPin200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "id") - delete(additionalProperties, "code") - delete(additionalProperties, "product") - delete(additionalProperties, "trusted") - delete(additionalProperties, "qr") - delete(additionalProperties, "clientIdentifier") - delete(additionalProperties, "location") - delete(additionalProperties, "expiresIn") - delete(additionalProperties, "createdAt") - delete(additionalProperties, "expiresAt") - delete(additionalProperties, "authToken") - delete(additionalProperties, "newRegistration") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetPin200Response struct { - value *GetPin200Response - isSet bool -} - -func (v NullableGetPin200Response) Get() *GetPin200Response { - return v.value -} - -func (v *NullableGetPin200Response) Set(val *GetPin200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetPin200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetPin200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetPin200Response(val *GetPin200Response) *NullableGetPin200Response { - return &NullableGetPin200Response{value: val, isSet: true} -} - -func (v NullableGetPin200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetPin200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/plextv/model_get_pin_200_response_location.go b/plextv/model_get_pin_200_response_location.go deleted file mode 100644 index 8711821..0000000 --- a/plextv/model_get_pin_200_response_location.go +++ /dev/null @@ -1,495 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package plextv - -import ( - "encoding/json" -) - -// checks if the GetPin200ResponseLocation type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetPin200ResponseLocation{} - -// GetPin200ResponseLocation struct for GetPin200ResponseLocation -type GetPin200ResponseLocation struct { - Code interface{} `json:"code,omitempty"` - EuropeanUnionMember interface{} `json:"european_union_member,omitempty"` - ContinentCode interface{} `json:"continent_code,omitempty"` - Country interface{} `json:"country,omitempty"` - City interface{} `json:"city,omitempty"` - TimeZone interface{} `json:"time_zone,omitempty"` - PostalCode interface{} `json:"postal_code,omitempty"` - InPrivacyRestrictedCountry interface{} `json:"in_privacy_restricted_country,omitempty"` - Subdivisions interface{} `json:"subdivisions,omitempty"` - Coordinates interface{} `json:"coordinates,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetPin200ResponseLocation GetPin200ResponseLocation - -// NewGetPin200ResponseLocation instantiates a new GetPin200ResponseLocation object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetPin200ResponseLocation() *GetPin200ResponseLocation { - this := GetPin200ResponseLocation{} - return &this -} - -// NewGetPin200ResponseLocationWithDefaults instantiates a new GetPin200ResponseLocation object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetPin200ResponseLocationWithDefaults() *GetPin200ResponseLocation { - this := GetPin200ResponseLocation{} - return &this -} - -// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200ResponseLocation) GetCode() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Code -} - -// GetCodeOk returns a tuple with the Code field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200ResponseLocation) GetCodeOk() (*interface{}, bool) { - if o == nil || isNil(o.Code) { - return nil, false - } - return &o.Code, true -} - -// HasCode returns a boolean if a field has been set. -func (o *GetPin200ResponseLocation) HasCode() bool { - if o != nil && isNil(o.Code) { - return true - } - - return false -} - -// SetCode gets a reference to the given interface{} and assigns it to the Code field. -func (o *GetPin200ResponseLocation) SetCode(v interface{}) { - o.Code = v -} - -// GetEuropeanUnionMember returns the EuropeanUnionMember field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200ResponseLocation) GetEuropeanUnionMember() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.EuropeanUnionMember -} - -// GetEuropeanUnionMemberOk returns a tuple with the EuropeanUnionMember field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200ResponseLocation) GetEuropeanUnionMemberOk() (*interface{}, bool) { - if o == nil || isNil(o.EuropeanUnionMember) { - return nil, false - } - return &o.EuropeanUnionMember, true -} - -// HasEuropeanUnionMember returns a boolean if a field has been set. -func (o *GetPin200ResponseLocation) HasEuropeanUnionMember() bool { - if o != nil && isNil(o.EuropeanUnionMember) { - return true - } - - return false -} - -// SetEuropeanUnionMember gets a reference to the given interface{} and assigns it to the EuropeanUnionMember field. -func (o *GetPin200ResponseLocation) SetEuropeanUnionMember(v interface{}) { - o.EuropeanUnionMember = v -} - -// GetContinentCode returns the ContinentCode field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200ResponseLocation) GetContinentCode() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.ContinentCode -} - -// GetContinentCodeOk returns a tuple with the ContinentCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200ResponseLocation) GetContinentCodeOk() (*interface{}, bool) { - if o == nil || isNil(o.ContinentCode) { - return nil, false - } - return &o.ContinentCode, true -} - -// HasContinentCode returns a boolean if a field has been set. -func (o *GetPin200ResponseLocation) HasContinentCode() bool { - if o != nil && isNil(o.ContinentCode) { - return true - } - - return false -} - -// SetContinentCode gets a reference to the given interface{} and assigns it to the ContinentCode field. -func (o *GetPin200ResponseLocation) SetContinentCode(v interface{}) { - o.ContinentCode = v -} - -// GetCountry returns the Country field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200ResponseLocation) GetCountry() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Country -} - -// GetCountryOk returns a tuple with the Country field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200ResponseLocation) GetCountryOk() (*interface{}, bool) { - if o == nil || isNil(o.Country) { - return nil, false - } - return &o.Country, true -} - -// HasCountry returns a boolean if a field has been set. -func (o *GetPin200ResponseLocation) HasCountry() bool { - if o != nil && isNil(o.Country) { - return true - } - - return false -} - -// SetCountry gets a reference to the given interface{} and assigns it to the Country field. -func (o *GetPin200ResponseLocation) SetCountry(v interface{}) { - o.Country = v -} - -// GetCity returns the City field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200ResponseLocation) GetCity() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.City -} - -// GetCityOk returns a tuple with the City field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200ResponseLocation) GetCityOk() (*interface{}, bool) { - if o == nil || isNil(o.City) { - return nil, false - } - return &o.City, true -} - -// HasCity returns a boolean if a field has been set. -func (o *GetPin200ResponseLocation) HasCity() bool { - if o != nil && isNil(o.City) { - return true - } - - return false -} - -// SetCity gets a reference to the given interface{} and assigns it to the City field. -func (o *GetPin200ResponseLocation) SetCity(v interface{}) { - o.City = v -} - -// GetTimeZone returns the TimeZone field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200ResponseLocation) GetTimeZone() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TimeZone -} - -// GetTimeZoneOk returns a tuple with the TimeZone field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200ResponseLocation) GetTimeZoneOk() (*interface{}, bool) { - if o == nil || isNil(o.TimeZone) { - return nil, false - } - return &o.TimeZone, true -} - -// HasTimeZone returns a boolean if a field has been set. -func (o *GetPin200ResponseLocation) HasTimeZone() bool { - if o != nil && isNil(o.TimeZone) { - return true - } - - return false -} - -// SetTimeZone gets a reference to the given interface{} and assigns it to the TimeZone field. -func (o *GetPin200ResponseLocation) SetTimeZone(v interface{}) { - o.TimeZone = v -} - -// GetPostalCode returns the PostalCode field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200ResponseLocation) GetPostalCode() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.PostalCode -} - -// GetPostalCodeOk returns a tuple with the PostalCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200ResponseLocation) GetPostalCodeOk() (*interface{}, bool) { - if o == nil || isNil(o.PostalCode) { - return nil, false - } - return &o.PostalCode, true -} - -// HasPostalCode returns a boolean if a field has been set. -func (o *GetPin200ResponseLocation) HasPostalCode() bool { - if o != nil && isNil(o.PostalCode) { - return true - } - - return false -} - -// SetPostalCode gets a reference to the given interface{} and assigns it to the PostalCode field. -func (o *GetPin200ResponseLocation) SetPostalCode(v interface{}) { - o.PostalCode = v -} - -// GetInPrivacyRestrictedCountry returns the InPrivacyRestrictedCountry field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200ResponseLocation) GetInPrivacyRestrictedCountry() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.InPrivacyRestrictedCountry -} - -// GetInPrivacyRestrictedCountryOk returns a tuple with the InPrivacyRestrictedCountry field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200ResponseLocation) GetInPrivacyRestrictedCountryOk() (*interface{}, bool) { - if o == nil || isNil(o.InPrivacyRestrictedCountry) { - return nil, false - } - return &o.InPrivacyRestrictedCountry, true -} - -// HasInPrivacyRestrictedCountry returns a boolean if a field has been set. -func (o *GetPin200ResponseLocation) HasInPrivacyRestrictedCountry() bool { - if o != nil && isNil(o.InPrivacyRestrictedCountry) { - return true - } - - return false -} - -// SetInPrivacyRestrictedCountry gets a reference to the given interface{} and assigns it to the InPrivacyRestrictedCountry field. -func (o *GetPin200ResponseLocation) SetInPrivacyRestrictedCountry(v interface{}) { - o.InPrivacyRestrictedCountry = v -} - -// GetSubdivisions returns the Subdivisions field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200ResponseLocation) GetSubdivisions() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Subdivisions -} - -// GetSubdivisionsOk returns a tuple with the Subdivisions field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200ResponseLocation) GetSubdivisionsOk() (*interface{}, bool) { - if o == nil || isNil(o.Subdivisions) { - return nil, false - } - return &o.Subdivisions, true -} - -// HasSubdivisions returns a boolean if a field has been set. -func (o *GetPin200ResponseLocation) HasSubdivisions() bool { - if o != nil && isNil(o.Subdivisions) { - return true - } - - return false -} - -// SetSubdivisions gets a reference to the given interface{} and assigns it to the Subdivisions field. -func (o *GetPin200ResponseLocation) SetSubdivisions(v interface{}) { - o.Subdivisions = v -} - -// GetCoordinates returns the Coordinates field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin200ResponseLocation) GetCoordinates() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Coordinates -} - -// GetCoordinatesOk returns a tuple with the Coordinates field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin200ResponseLocation) GetCoordinatesOk() (*interface{}, bool) { - if o == nil || isNil(o.Coordinates) { - return nil, false - } - return &o.Coordinates, true -} - -// HasCoordinates returns a boolean if a field has been set. -func (o *GetPin200ResponseLocation) HasCoordinates() bool { - if o != nil && isNil(o.Coordinates) { - return true - } - - return false -} - -// SetCoordinates gets a reference to the given interface{} and assigns it to the Coordinates field. -func (o *GetPin200ResponseLocation) SetCoordinates(v interface{}) { - o.Coordinates = v -} - -func (o GetPin200ResponseLocation) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetPin200ResponseLocation) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Code != nil { - toSerialize["code"] = o.Code - } - if o.EuropeanUnionMember != nil { - toSerialize["european_union_member"] = o.EuropeanUnionMember - } - if o.ContinentCode != nil { - toSerialize["continent_code"] = o.ContinentCode - } - if o.Country != nil { - toSerialize["country"] = o.Country - } - if o.City != nil { - toSerialize["city"] = o.City - } - if o.TimeZone != nil { - toSerialize["time_zone"] = o.TimeZone - } - if o.PostalCode != nil { - toSerialize["postal_code"] = o.PostalCode - } - if o.InPrivacyRestrictedCountry != nil { - toSerialize["in_privacy_restricted_country"] = o.InPrivacyRestrictedCountry - } - if o.Subdivisions != nil { - toSerialize["subdivisions"] = o.Subdivisions - } - if o.Coordinates != nil { - toSerialize["coordinates"] = o.Coordinates - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetPin200ResponseLocation) UnmarshalJSON(bytes []byte) (err error) { - varGetPin200ResponseLocation := _GetPin200ResponseLocation{} - - if err = json.Unmarshal(bytes, &varGetPin200ResponseLocation); err == nil { - *o = GetPin200ResponseLocation(varGetPin200ResponseLocation) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "code") - delete(additionalProperties, "european_union_member") - delete(additionalProperties, "continent_code") - delete(additionalProperties, "country") - delete(additionalProperties, "city") - delete(additionalProperties, "time_zone") - delete(additionalProperties, "postal_code") - delete(additionalProperties, "in_privacy_restricted_country") - delete(additionalProperties, "subdivisions") - delete(additionalProperties, "coordinates") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetPin200ResponseLocation struct { - value *GetPin200ResponseLocation - isSet bool -} - -func (v NullableGetPin200ResponseLocation) Get() *GetPin200ResponseLocation { - return v.value -} - -func (v *NullableGetPin200ResponseLocation) Set(val *GetPin200ResponseLocation) { - v.value = val - v.isSet = true -} - -func (v NullableGetPin200ResponseLocation) IsSet() bool { - return v.isSet -} - -func (v *NullableGetPin200ResponseLocation) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetPin200ResponseLocation(val *GetPin200ResponseLocation) *NullableGetPin200ResponseLocation { - return &NullableGetPin200ResponseLocation{value: val, isSet: true} -} - -func (v NullableGetPin200ResponseLocation) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetPin200ResponseLocation) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/plextv/model_get_pin_400_response.go b/plextv/model_get_pin_400_response.go deleted file mode 100644 index 58efd52..0000000 --- a/plextv/model_get_pin_400_response.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package plextv - -import ( - "encoding/json" -) - -// checks if the GetPin400Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetPin400Response{} - -// GetPin400Response struct for GetPin400Response -type GetPin400Response struct { - Errors interface{} `json:"errors,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetPin400Response GetPin400Response - -// NewGetPin400Response instantiates a new GetPin400Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetPin400Response() *GetPin400Response { - this := GetPin400Response{} - return &this -} - -// NewGetPin400ResponseWithDefaults instantiates a new GetPin400Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetPin400ResponseWithDefaults() *GetPin400Response { - this := GetPin400Response{} - return &this -} - -// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetPin400Response) GetErrors() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Errors -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetPin400Response) GetErrorsOk() (*interface{}, bool) { - if o == nil || isNil(o.Errors) { - return nil, false - } - return &o.Errors, true -} - -// HasErrors returns a boolean if a field has been set. -func (o *GetPin400Response) HasErrors() bool { - if o != nil && isNil(o.Errors) { - return true - } - - return false -} - -// SetErrors gets a reference to the given interface{} and assigns it to the Errors field. -func (o *GetPin400Response) SetErrors(v interface{}) { - o.Errors = v -} - -func (o GetPin400Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetPin400Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Errors != nil { - toSerialize["errors"] = o.Errors - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetPin400Response) UnmarshalJSON(bytes []byte) (err error) { - varGetPin400Response := _GetPin400Response{} - - if err = json.Unmarshal(bytes, &varGetPin400Response); err == nil { - *o = GetPin400Response(varGetPin400Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "errors") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetPin400Response struct { - value *GetPin400Response - isSet bool -} - -func (v NullableGetPin400Response) Get() *GetPin400Response { - return v.value -} - -func (v *NullableGetPin400Response) Set(val *GetPin400Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetPin400Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetPin400Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetPin400Response(val *GetPin400Response) *NullableGetPin400Response { - return &NullableGetPin400Response{value: val, isSet: true} -} - -func (v NullableGetPin400Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetPin400Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/plextv/model_get_user_opt_out_settings_200_response.go b/plextv/model_get_user_opt_out_settings_200_response.go deleted file mode 100644 index 6225c59..0000000 --- a/plextv/model_get_user_opt_out_settings_200_response.go +++ /dev/null @@ -1,343 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package plextv - -import ( - "encoding/json" -) - -// checks if the GetUserOptOutSettings200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetUserOptOutSettings200Response{} - -// GetUserOptOutSettings200Response struct for GetUserOptOutSettings200Response -type GetUserOptOutSettings200Response struct { - TvPlexProviderPodcasts interface{} `json:"tv.plex.provider.podcasts,omitempty"` - TvPlexProviderNews interface{} `json:"tv.plex.provider.news,omitempty"` - TvPlexProviderWebshows interface{} `json:"tv.plex.provider.webshows,omitempty"` - TvPlexProviderMusic interface{} `json:"tv.plex.provider.music,omitempty"` - TvPlexProviderVod interface{} `json:"tv.plex.provider.vod,omitempty"` - Scrobbling interface{} `json:"scrobbling,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetUserOptOutSettings200Response GetUserOptOutSettings200Response - -// NewGetUserOptOutSettings200Response instantiates a new GetUserOptOutSettings200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetUserOptOutSettings200Response() *GetUserOptOutSettings200Response { - this := GetUserOptOutSettings200Response{} - return &this -} - -// NewGetUserOptOutSettings200ResponseWithDefaults instantiates a new GetUserOptOutSettings200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetUserOptOutSettings200ResponseWithDefaults() *GetUserOptOutSettings200Response { - this := GetUserOptOutSettings200Response{} - return &this -} - -// GetTvPlexProviderPodcasts returns the TvPlexProviderPodcasts field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetUserOptOutSettings200Response) GetTvPlexProviderPodcasts() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TvPlexProviderPodcasts -} - -// GetTvPlexProviderPodcastsOk returns a tuple with the TvPlexProviderPodcasts field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetUserOptOutSettings200Response) GetTvPlexProviderPodcastsOk() (*interface{}, bool) { - if o == nil || isNil(o.TvPlexProviderPodcasts) { - return nil, false - } - return &o.TvPlexProviderPodcasts, true -} - -// HasTvPlexProviderPodcasts returns a boolean if a field has been set. -func (o *GetUserOptOutSettings200Response) HasTvPlexProviderPodcasts() bool { - if o != nil && isNil(o.TvPlexProviderPodcasts) { - return true - } - - return false -} - -// SetTvPlexProviderPodcasts gets a reference to the given interface{} and assigns it to the TvPlexProviderPodcasts field. -func (o *GetUserOptOutSettings200Response) SetTvPlexProviderPodcasts(v interface{}) { - o.TvPlexProviderPodcasts = v -} - -// GetTvPlexProviderNews returns the TvPlexProviderNews field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetUserOptOutSettings200Response) GetTvPlexProviderNews() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TvPlexProviderNews -} - -// GetTvPlexProviderNewsOk returns a tuple with the TvPlexProviderNews field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetUserOptOutSettings200Response) GetTvPlexProviderNewsOk() (*interface{}, bool) { - if o == nil || isNil(o.TvPlexProviderNews) { - return nil, false - } - return &o.TvPlexProviderNews, true -} - -// HasTvPlexProviderNews returns a boolean if a field has been set. -func (o *GetUserOptOutSettings200Response) HasTvPlexProviderNews() bool { - if o != nil && isNil(o.TvPlexProviderNews) { - return true - } - - return false -} - -// SetTvPlexProviderNews gets a reference to the given interface{} and assigns it to the TvPlexProviderNews field. -func (o *GetUserOptOutSettings200Response) SetTvPlexProviderNews(v interface{}) { - o.TvPlexProviderNews = v -} - -// GetTvPlexProviderWebshows returns the TvPlexProviderWebshows field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetUserOptOutSettings200Response) GetTvPlexProviderWebshows() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TvPlexProviderWebshows -} - -// GetTvPlexProviderWebshowsOk returns a tuple with the TvPlexProviderWebshows field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetUserOptOutSettings200Response) GetTvPlexProviderWebshowsOk() (*interface{}, bool) { - if o == nil || isNil(o.TvPlexProviderWebshows) { - return nil, false - } - return &o.TvPlexProviderWebshows, true -} - -// HasTvPlexProviderWebshows returns a boolean if a field has been set. -func (o *GetUserOptOutSettings200Response) HasTvPlexProviderWebshows() bool { - if o != nil && isNil(o.TvPlexProviderWebshows) { - return true - } - - return false -} - -// SetTvPlexProviderWebshows gets a reference to the given interface{} and assigns it to the TvPlexProviderWebshows field. -func (o *GetUserOptOutSettings200Response) SetTvPlexProviderWebshows(v interface{}) { - o.TvPlexProviderWebshows = v -} - -// GetTvPlexProviderMusic returns the TvPlexProviderMusic field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetUserOptOutSettings200Response) GetTvPlexProviderMusic() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TvPlexProviderMusic -} - -// GetTvPlexProviderMusicOk returns a tuple with the TvPlexProviderMusic field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetUserOptOutSettings200Response) GetTvPlexProviderMusicOk() (*interface{}, bool) { - if o == nil || isNil(o.TvPlexProviderMusic) { - return nil, false - } - return &o.TvPlexProviderMusic, true -} - -// HasTvPlexProviderMusic returns a boolean if a field has been set. -func (o *GetUserOptOutSettings200Response) HasTvPlexProviderMusic() bool { - if o != nil && isNil(o.TvPlexProviderMusic) { - return true - } - - return false -} - -// SetTvPlexProviderMusic gets a reference to the given interface{} and assigns it to the TvPlexProviderMusic field. -func (o *GetUserOptOutSettings200Response) SetTvPlexProviderMusic(v interface{}) { - o.TvPlexProviderMusic = v -} - -// GetTvPlexProviderVod returns the TvPlexProviderVod field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetUserOptOutSettings200Response) GetTvPlexProviderVod() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TvPlexProviderVod -} - -// GetTvPlexProviderVodOk returns a tuple with the TvPlexProviderVod field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetUserOptOutSettings200Response) GetTvPlexProviderVodOk() (*interface{}, bool) { - if o == nil || isNil(o.TvPlexProviderVod) { - return nil, false - } - return &o.TvPlexProviderVod, true -} - -// HasTvPlexProviderVod returns a boolean if a field has been set. -func (o *GetUserOptOutSettings200Response) HasTvPlexProviderVod() bool { - if o != nil && isNil(o.TvPlexProviderVod) { - return true - } - - return false -} - -// SetTvPlexProviderVod gets a reference to the given interface{} and assigns it to the TvPlexProviderVod field. -func (o *GetUserOptOutSettings200Response) SetTvPlexProviderVod(v interface{}) { - o.TvPlexProviderVod = v -} - -// GetScrobbling returns the Scrobbling field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetUserOptOutSettings200Response) GetScrobbling() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Scrobbling -} - -// GetScrobblingOk returns a tuple with the Scrobbling field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetUserOptOutSettings200Response) GetScrobblingOk() (*interface{}, bool) { - if o == nil || isNil(o.Scrobbling) { - return nil, false - } - return &o.Scrobbling, true -} - -// HasScrobbling returns a boolean if a field has been set. -func (o *GetUserOptOutSettings200Response) HasScrobbling() bool { - if o != nil && isNil(o.Scrobbling) { - return true - } - - return false -} - -// SetScrobbling gets a reference to the given interface{} and assigns it to the Scrobbling field. -func (o *GetUserOptOutSettings200Response) SetScrobbling(v interface{}) { - o.Scrobbling = v -} - -func (o GetUserOptOutSettings200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetUserOptOutSettings200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.TvPlexProviderPodcasts != nil { - toSerialize["tv.plex.provider.podcasts"] = o.TvPlexProviderPodcasts - } - if o.TvPlexProviderNews != nil { - toSerialize["tv.plex.provider.news"] = o.TvPlexProviderNews - } - if o.TvPlexProviderWebshows != nil { - toSerialize["tv.plex.provider.webshows"] = o.TvPlexProviderWebshows - } - if o.TvPlexProviderMusic != nil { - toSerialize["tv.plex.provider.music"] = o.TvPlexProviderMusic - } - if o.TvPlexProviderVod != nil { - toSerialize["tv.plex.provider.vod"] = o.TvPlexProviderVod - } - if o.Scrobbling != nil { - toSerialize["scrobbling"] = o.Scrobbling - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetUserOptOutSettings200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetUserOptOutSettings200Response := _GetUserOptOutSettings200Response{} - - if err = json.Unmarshal(bytes, &varGetUserOptOutSettings200Response); err == nil { - *o = GetUserOptOutSettings200Response(varGetUserOptOutSettings200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "tv.plex.provider.podcasts") - delete(additionalProperties, "tv.plex.provider.news") - delete(additionalProperties, "tv.plex.provider.webshows") - delete(additionalProperties, "tv.plex.provider.music") - delete(additionalProperties, "tv.plex.provider.vod") - delete(additionalProperties, "scrobbling") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetUserOptOutSettings200Response struct { - value *GetUserOptOutSettings200Response - isSet bool -} - -func (v NullableGetUserOptOutSettings200Response) Get() *GetUserOptOutSettings200Response { - return v.value -} - -func (v *NullableGetUserOptOutSettings200Response) Set(val *GetUserOptOutSettings200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetUserOptOutSettings200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetUserOptOutSettings200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetUserOptOutSettings200Response(val *GetUserOptOutSettings200Response) *NullableGetUserOptOutSettings200Response { - return &NullableGetUserOptOutSettings200Response{value: val, isSet: true} -} - -func (v NullableGetUserOptOutSettings200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetUserOptOutSettings200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/plextv/response.go b/plextv/response.go deleted file mode 100644 index 5c73ef0..0000000 --- a/plextv/response.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package plextv - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/plextv/test/api_plex_tv_test.go b/plextv/test/api_plex_tv_test.go deleted file mode 100644 index 498efdb..0000000 --- a/plextv/test/api_plex_tv_test.go +++ /dev/null @@ -1,133 +0,0 @@ -/* -Plex-API - -Testing PlexTvApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package plextv - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_plextv_PlexTvApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test PlexTvApiService GetCompanionsData", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PLEXTV.PlexTvApi.GetCompanionsData(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlexTvApiService GetDevices", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PLEXTV.PlexTvApi.GetDevices(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlexTvApiService GetGeoData", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PLEXTV.PlexTvApi.GetGeoData(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlexTvApiService GetHomeData", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PLEXTV.PlexTvApi.GetHomeData(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlexTvApiService GetPin", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PLEXTV.PlexTvApi.GetPin(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlexTvApiService GetToken", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var pinID interface{} - - httpRes, err := apiClient.PLEXTV.PlexTvApi.GetToken(context.Background(), pinID).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlexTvApiService GetUserDetails", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PLEXTV.PlexTvApi.GetUserDetails(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlexTvApiService GetUserOptOutSettings", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PLEXTV.PlexTvApi.GetUserOptOutSettings(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlexTvApiService GetUserSettings", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PLEXTV.PlexTvApi.GetUserSettings(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/plextv/utils.go b/plextv/utils.go deleted file mode 100644 index 60b5e03..0000000 --- a/plextv/utils.go +++ /dev/null @@ -1,348 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package plextv - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// isNil checks if an input is nil -func isNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/pms/.gitignore b/pms/.gitignore deleted file mode 100644 index daf913b..0000000 --- a/pms/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/pms/.openapi-generator-ignore b/pms/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/pms/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/pms/.openapi-generator/FILES b/pms/.openapi-generator/FILES deleted file mode 100644 index 173ef5f..0000000 --- a/pms/.openapi-generator/FILES +++ /dev/null @@ -1,83 +0,0 @@ -.gitignore -.travis.yml -README.md -api/openapi.yaml -api_activities.go -api_butler.go -api_hubs.go -api_library.go -api_log.go -api_media.go -api_playlists.go -api_search.go -api_security.go -api_server.go -api_sessions.go -api_updater.go -api_video.go -client.go -configuration.go -docs/ActivitiesApi.md -docs/ButlerApi.md -docs/GetButlerTasks200Response.md -docs/GetButlerTasks200ResponseButlerTasks.md -docs/GetDevices200Response.md -docs/GetDevices200ResponseMediaContainer.md -docs/GetMyPlexAccount200Response.md -docs/GetMyPlexAccount200ResponseMyPlex.md -docs/GetOnDeck200Response.md -docs/GetOnDeck200ResponseMediaContainer.md -docs/GetRecentlyAdded200Response.md -docs/GetRecentlyAdded200ResponseMediaContainer.md -docs/GetSearchResults200Response.md -docs/GetSearchResults200ResponseMediaContainer.md -docs/GetServerActivities200Response.md -docs/GetServerActivities200ResponseMediaContainer.md -docs/GetServerCapabilities200Response.md -docs/GetServerCapabilities200ResponseMediaContainer.md -docs/GetServerCapabilities401Response.md -docs/GetServerIdentity200Response.md -docs/GetServerIdentity200ResponseMediaContainer.md -docs/GetServerList200Response.md -docs/GetServerList200ResponseMediaContainer.md -docs/GetTranscodeSessions200Response.md -docs/GetTranscodeSessions200ResponseMediaContainer.md -docs/HubsApi.md -docs/LibraryApi.md -docs/LogApi.md -docs/MediaApi.md -docs/PlaylistsApi.md -docs/SearchApi.md -docs/SecurityApi.md -docs/ServerApi.md -docs/SessionsApi.md -docs/UpdaterApi.md -docs/VideoApi.md -git_push.sh -go.mod -go.sum -model_get_butler_tasks_200_response.go -model_get_butler_tasks_200_response_butler_tasks.go -model_get_devices_200_response.go -model_get_devices_200_response_media_container.go -model_get_my_plex_account_200_response.go -model_get_my_plex_account_200_response_my_plex.go -model_get_on_deck_200_response.go -model_get_on_deck_200_response_media_container.go -model_get_recently_added_200_response.go -model_get_recently_added_200_response_media_container.go -model_get_search_results_200_response.go -model_get_search_results_200_response_media_container.go -model_get_server_activities_200_response.go -model_get_server_activities_200_response_media_container.go -model_get_server_capabilities_200_response.go -model_get_server_capabilities_200_response_media_container.go -model_get_server_capabilities_401_response.go -model_get_server_identity_200_response.go -model_get_server_identity_200_response_media_container.go -model_get_server_list_200_response.go -model_get_server_list_200_response_media_container.go -model_get_transcode_sessions_200_response.go -model_get_transcode_sessions_200_response_media_container.go -response.go -utils.go diff --git a/pms/.openapi-generator/VERSION b/pms/.openapi-generator/VERSION deleted file mode 100644 index cd802a1..0000000 --- a/pms/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/pms/.travis.yml b/pms/.travis.yml deleted file mode 100644 index f5cb2ce..0000000 --- a/pms/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/pms/README.md b/pms/README.md deleted file mode 100644 index a4e80a0..0000000 --- a/pms/README.md +++ /dev/null @@ -1,200 +0,0 @@ -# Go API client for pms - -An Open API Spec for interacting with Plex.tv and Plex Servers - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 0.0.3 -- Package version: 1.1.6 -- Build package: org.openapitools.codegen.languages.GoClientCodegen -For more information, please visit [https://www.LukeHagar.com](https://www.LukeHagar.com) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import pms "github.com/lukehagar/plexgo" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), pms.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), pms.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), pms.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), pms.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://10.10.10.47:32400* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ActivitiesApi* | [**CancelServerActivities**](docs/ActivitiesApi.md#cancelserveractivities) | **Delete** /activities/{activityUUID} | Cancel Server Activities -*ActivitiesApi* | [**GetServerActivities**](docs/ActivitiesApi.md#getserveractivities) | **Get** /activities | Get Server Activities -*ButlerApi* | [**GetButlerTasks**](docs/ButlerApi.md#getbutlertasks) | **Get** /butler | Get Butler tasks -*ButlerApi* | [**StartAllTasks**](docs/ButlerApi.md#startalltasks) | **Post** /butler | Start all Butler tasks -*ButlerApi* | [**StartTask**](docs/ButlerApi.md#starttask) | **Post** /butler/{taskName} | Start a single Butler task -*ButlerApi* | [**StopAllTasks**](docs/ButlerApi.md#stopalltasks) | **Delete** /butler | Stop all Butler tasks -*ButlerApi* | [**StopTask**](docs/ButlerApi.md#stoptask) | **Delete** /butler/{taskName} | Stop a single Butler task -*HubsApi* | [**GetGlobalHubs**](docs/HubsApi.md#getglobalhubs) | **Get** /hubs | Get Global Hubs -*HubsApi* | [**GetLibraryHubs**](docs/HubsApi.md#getlibraryhubs) | **Get** /hubs/sections/{sectionId} | Get library specific hubs -*LibraryApi* | [**DeleteLibrary**](docs/LibraryApi.md#deletelibrary) | **Delete** /library/sections/{sectionId} | Delete Library Section -*LibraryApi* | [**GetCommonLibraryItems**](docs/LibraryApi.md#getcommonlibraryitems) | **Get** /library/sections/{sectionId}/common | Get Common Library Items -*LibraryApi* | [**GetFileHash**](docs/LibraryApi.md#getfilehash) | **Get** /library/hashes | Get Hash Value -*LibraryApi* | [**GetLatestLibraryItems**](docs/LibraryApi.md#getlatestlibraryitems) | **Get** /library/sections/{sectionId}/latest | Get Latest Library Items -*LibraryApi* | [**GetLibraries**](docs/LibraryApi.md#getlibraries) | **Get** /library/sections | Get All Libraries -*LibraryApi* | [**GetLibrary**](docs/LibraryApi.md#getlibrary) | **Get** /library/sections/{sectionId} | Get Library Details -*LibraryApi* | [**GetLibraryItems**](docs/LibraryApi.md#getlibraryitems) | **Get** /library/sections/{sectionId}/all | Get Library Items -*LibraryApi* | [**GetMetadata**](docs/LibraryApi.md#getmetadata) | **Get** /library/metadata/{ratingKey} | Get Items Metadata -*LibraryApi* | [**GetMetadataChildren**](docs/LibraryApi.md#getmetadatachildren) | **Get** /library/metadata/{ratingKey}/children | Get Items Children -*LibraryApi* | [**GetOnDeck**](docs/LibraryApi.md#getondeck) | **Get** /library/onDeck | Get On Deck -*LibraryApi* | [**GetRecentlyAdded**](docs/LibraryApi.md#getrecentlyadded) | **Get** /library/recentlyAdded | Get Recently Added -*LibraryApi* | [**RefreshLibrary**](docs/LibraryApi.md#refreshlibrary) | **Get** /library/sections/{sectionId}/refresh | Refresh Library -*LogApi* | [**EnablePaperTrail**](docs/LogApi.md#enablepapertrail) | **Get** /log/networked | Enabling Papertrail -*LogApi* | [**LogLine**](docs/LogApi.md#logline) | **Get** /log | Logging a single line message. -*LogApi* | [**LogMultiLine**](docs/LogApi.md#logmultiline) | **Post** /log | Logging a multi-line message -*MediaApi* | [**MarkPlayed**](docs/MediaApi.md#markplayed) | **Get** /:/scrobble | Mark Media Played -*MediaApi* | [**MarkUnplayed**](docs/MediaApi.md#markunplayed) | **Get** /:/unscrobble | Mark Media Unplayed -*MediaApi* | [**UpdatePlayProgress**](docs/MediaApi.md#updateplayprogress) | **Post** /:/progress | Update Media Play Progress -*PlaylistsApi* | [**AddPlaylistContents**](docs/PlaylistsApi.md#addplaylistcontents) | **Put** /playlists/{playlistID}/items | Adding to a Playlist -*PlaylistsApi* | [**ClearPlaylistContents**](docs/PlaylistsApi.md#clearplaylistcontents) | **Delete** /playlists/{playlistID}/items | Delete Playlist Contents -*PlaylistsApi* | [**CreatePlaylist**](docs/PlaylistsApi.md#createplaylist) | **Post** /playlists | Create a Playlist -*PlaylistsApi* | [**DeletePlaylist**](docs/PlaylistsApi.md#deleteplaylist) | **Delete** /playlists/{playlistID} | Deletes a Playlist -*PlaylistsApi* | [**GetPlaylist**](docs/PlaylistsApi.md#getplaylist) | **Get** /playlists/{playlistID} | Retrieve Playlist -*PlaylistsApi* | [**GetPlaylistContents**](docs/PlaylistsApi.md#getplaylistcontents) | **Get** /playlists/{playlistID}/items | Retrieve Playlist Contents -*PlaylistsApi* | [**GetPlaylists**](docs/PlaylistsApi.md#getplaylists) | **Get** /playlists/all | Get All Playlists -*PlaylistsApi* | [**UpdatePlaylist**](docs/PlaylistsApi.md#updateplaylist) | **Put** /playlists/{playlistID} | Update a Playlist -*PlaylistsApi* | [**UploadPlaylist**](docs/PlaylistsApi.md#uploadplaylist) | **Post** /playlists/upload | Upload Playlist -*SearchApi* | [**GetSearchResults**](docs/SearchApi.md#getsearchresults) | **Get** /search | Get Search Results -*SearchApi* | [**PerformSearch**](docs/SearchApi.md#performsearch) | **Get** /hubs/search | Perform a search -*SearchApi* | [**PerformVoiceSearch**](docs/SearchApi.md#performvoicesearch) | **Get** /hubs/search/voice | Perform a voice search -*SecurityApi* | [**GetSourceConnectionInformation**](docs/SecurityApi.md#getsourceconnectioninformation) | **Get** /security/resources | Get Source Connection Information -*SecurityApi* | [**GetTransientToken**](docs/SecurityApi.md#gettransienttoken) | **Get** /security/token | Get a Transient Token. -*ServerApi* | [**GetAvailableClients**](docs/ServerApi.md#getavailableclients) | **Get** /clients | Get Available Clients -*ServerApi* | [**GetDevices**](docs/ServerApi.md#getdevices) | **Get** /devices | Get Devices -*ServerApi* | [**GetMyPlexAccount**](docs/ServerApi.md#getmyplexaccount) | **Get** /myplex/account | Get MyPlex Account -*ServerApi* | [**GetResizedPhoto**](docs/ServerApi.md#getresizedphoto) | **Get** /photo/:/transcode | Get a Resized Photo -*ServerApi* | [**GetServerCapabilities**](docs/ServerApi.md#getservercapabilities) | **Get** / | Server Capabilities -*ServerApi* | [**GetServerIdentity**](docs/ServerApi.md#getserveridentity) | **Get** /identity | Get Server Identity -*ServerApi* | [**GetServerList**](docs/ServerApi.md#getserverlist) | **Get** /servers | Get Server List -*ServerApi* | [**GetServerPreferences**](docs/ServerApi.md#getserverpreferences) | **Get** /:/prefs | Get Server Preferences -*SessionsApi* | [**GetSessionHistory**](docs/SessionsApi.md#getsessionhistory) | **Get** /status/sessions/history/all | Get Session History -*SessionsApi* | [**GetSessions**](docs/SessionsApi.md#getsessions) | **Get** /status/sessions | Get Active Sessions -*SessionsApi* | [**GetTranscodeSessions**](docs/SessionsApi.md#gettranscodesessions) | **Get** /transcode/sessions | Get Transcode Sessions -*SessionsApi* | [**StopTranscodeSession**](docs/SessionsApi.md#stoptranscodesession) | **Delete** /transcode/sessions/{sessionKey} | Stop a Transcode Session -*UpdaterApi* | [**ApplyUpdates**](docs/UpdaterApi.md#applyupdates) | **Put** /updater/apply | Apply Updates -*UpdaterApi* | [**CheckForUpdates**](docs/UpdaterApi.md#checkforupdates) | **Put** /updater/check | Checking for updates -*UpdaterApi* | [**GetUpdateStatus**](docs/UpdaterApi.md#getupdatestatus) | **Get** /updater/status | Querying status of updates -*VideoApi* | [**GetTimeline**](docs/VideoApi.md#gettimeline) | **Get** /:/timeline | Get the timeline for a media item -*VideoApi* | [**StartUniversalTranscode**](docs/VideoApi.md#startuniversaltranscode) | **Get** /video/:/transcode/universal/start.mpd | Start Universal Transcode - - -## Documentation For Models - - - [GetButlerTasks200Response](docs/GetButlerTasks200Response.md) - - [GetButlerTasks200ResponseButlerTasks](docs/GetButlerTasks200ResponseButlerTasks.md) - - [GetDevices200Response](docs/GetDevices200Response.md) - - [GetDevices200ResponseMediaContainer](docs/GetDevices200ResponseMediaContainer.md) - - [GetMyPlexAccount200Response](docs/GetMyPlexAccount200Response.md) - - [GetMyPlexAccount200ResponseMyPlex](docs/GetMyPlexAccount200ResponseMyPlex.md) - - [GetOnDeck200Response](docs/GetOnDeck200Response.md) - - [GetOnDeck200ResponseMediaContainer](docs/GetOnDeck200ResponseMediaContainer.md) - - [GetRecentlyAdded200Response](docs/GetRecentlyAdded200Response.md) - - [GetRecentlyAdded200ResponseMediaContainer](docs/GetRecentlyAdded200ResponseMediaContainer.md) - - [GetSearchResults200Response](docs/GetSearchResults200Response.md) - - [GetSearchResults200ResponseMediaContainer](docs/GetSearchResults200ResponseMediaContainer.md) - - [GetServerActivities200Response](docs/GetServerActivities200Response.md) - - [GetServerActivities200ResponseMediaContainer](docs/GetServerActivities200ResponseMediaContainer.md) - - [GetServerCapabilities200Response](docs/GetServerCapabilities200Response.md) - - [GetServerCapabilities200ResponseMediaContainer](docs/GetServerCapabilities200ResponseMediaContainer.md) - - [GetServerCapabilities401Response](docs/GetServerCapabilities401Response.md) - - [GetServerIdentity200Response](docs/GetServerIdentity200Response.md) - - [GetServerIdentity200ResponseMediaContainer](docs/GetServerIdentity200ResponseMediaContainer.md) - - [GetServerList200Response](docs/GetServerList200Response.md) - - [GetServerList200ResponseMediaContainer](docs/GetServerList200ResponseMediaContainer.md) - - [GetTranscodeSessions200Response](docs/GetTranscodeSessions200Response.md) - - [GetTranscodeSessions200ResponseMediaContainer](docs/GetTranscodeSessions200ResponseMediaContainer.md) - - -## Documentation For Authorization - - - -### accessToken - -- **Type**: API key -- **API key parameter name**: X-Plex-Token -- **Location**: HTTP header - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Plex-Token and passed in as the auth context for each request. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - -Lukeslakemail@gmail.com - diff --git a/pms/api/openapi.yaml b/pms/api/openapi.yaml deleted file mode 100644 index 0452573..0000000 --- a/pms/api/openapi.yaml +++ /dev/null @@ -1,3294 +0,0 @@ -openapi: 3.1.0 -info: - contact: - email: Lukeslakemail@gmail.com - name: Luke Hagar - url: https://www.LukeHagar.com - description: An Open API Spec for interacting with Plex.tv and Plex Servers - license: - name: MIT - title: Plex-API - version: 0.0.3 -servers: -- description: The full address of your Plex Server - url: "{protocol}://{ip}:{port}" - variables: - protocol: - default: http - description: The protocol to use when connecting to your plex server. - enum: - - http - - https - ip: - default: 10.10.10.47 - description: The Local IP Address of your plex server. - port: - default: "32400" - description: The port to access your plex server. -security: -- accessToken: [] -tags: -- description: | - Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints. - Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity. - Activities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint. Other details: - - They can contain a `progress` (from 0 to 100) marking the percent completion of the activity. - - They must contain an `type` which is used by clients to distinguish the specific activity. - - They may contain a `Context` object with attributes which associate the activity with various specific entities (items, libraries, etc.) - - The may contain a `Response` object which attributes which represent the result of the asynchronous operation. - name: Activities -- description: | - API Calls regarding authentication for Plex Media Server - name: Authentication -- description: | - Butler is the task manager of the Plex Media Server Ecosystem. - name: Butler -- description: | - Operations against the Plex Media Server System. - name: Server -- description: | - This describes the API for searching and applying updates to the Plex Media Server. - Updates to the status can be observed via the Event API. - name: Updater -- description: | - Submit logs to the Log Handler for Plex Media Server - name: Log -- description: | - API Calls against Security for Plex Media Server - name: Security -- description: | - API Calls interacting with Plex Media Server Libraries - name: Library -- description: | - API Calls interacting with Plex Media Server Media - name: Media -- description: | - Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows. - name: Hubs -- description: "Playlists are ordered collections of media. They can be dumb (just\ - \ a list of media) or smart (based on a media query, such as \"all albums from\ - \ 2017\"). \nThey can be organized in (optionally nesting) folders.\nRetrieving\ - \ a playlist, or its items, will trigger a refresh of its metadata. \nThis may\ - \ cause the duration and number of items to change.\n" - name: Playlists -- description: | - API Calls that perform search operations with Plex Media Server - name: Search -- description: | - API Calls that perform search operations with Plex Media Server Sessions - name: Sessions -- description: | - API Calls that perform operations with Plex Media Server Users - name: User -- description: | - API Calls that perform operations with Plex Media Server Video - name: Video -paths: - /: - get: - description: Server Capabilities - operationId: getServerCapabilities - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_200_response' - description: The Server Capabilities - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Server Capabilities - tags: - - Server - /:/prefs: - get: - description: Get Server Preferences - operationId: getServerPreferences - responses: - "200": - description: Server Preferences - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Server Preferences - tags: - - Server - /:/scrobble: - get: - description: This will mark the provided media key as Played. - operationId: markPlayed - parameters: - - description: The media key to mark as played - explode: true - in: query - name: key - required: true - schema: - example: 59398 - style: form - responses: - "200": - description: Media is marked Played - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Mark Media Played - tags: - - Media - /:/unscrobble: - get: - description: This will mark the provided media key as Unplayed. - operationId: markUnplayed - parameters: - - description: The media key to mark as Unplayed - explode: true - in: query - name: key - required: true - schema: - example: 59398 - style: form - responses: - "200": - description: Media is marked Unplayed - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Mark Media Unplayed - tags: - - Media - /:/progress: - post: - description: | - This API command can be used to update the play progress of a media item. - operationId: updatePlayProgress - parameters: - - description: the media key - explode: true - in: query - name: key - required: true - schema: {} - style: form - - description: "The time, in milliseconds, used to set the media playback progress." - example: 90000 - explode: true - in: query - name: time - required: true - schema: {} - style: form - - description: The playback state of the media item. - example: played - explode: true - in: query - name: state - required: true - schema: {} - style: form - responses: - "200": - description: Success - The request was successful. - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Update Media Play Progress - tags: - - Media - /activities: - get: - description: Get Server Activities - operationId: getServerActivities - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerActivities_200_response' - description: The Server Activities - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Server Activities - tags: - - Activities - /activities/{activityUUID}: - delete: - description: Cancel Server Activities - operationId: cancelServerActivities - parameters: - - description: The UUID of the activity to cancel. - example: 25b71ed5-0f9d-461c-baa7-d404e9e10d3e - explode: false - in: path - name: activityUUID - required: true - schema: {} - style: simple - responses: - "200": - description: The Server Activity was canceled - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Cancel Server Activities - tags: - - Activities - /butler: - delete: - description: | - This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. - operationId: stopAllTasks - responses: - "200": - description: All tasks were stopped - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Stop all Butler tasks - tags: - - Butler - get: - description: Returns a list of butler tasks - operationId: getButlerTasks - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getButlerTasks_200_response' - description: All butler tasks - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Butler tasks - tags: - - Butler - post: - description: | - This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - 1. Any tasks not scheduled to run on the current day will be skipped. - 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - 4. If we are outside the configured window, the task will start immediately. - operationId: startAllTasks - responses: - "200": - description: All tasks were started - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Start all Butler tasks - tags: - - Butler - /butler/{taskName}: - delete: - description: | - This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. - operationId: stopTask - parameters: - - description: The name of the task to be started. - explode: false - in: path - name: taskName - required: true - schema: - enum: - - BackupDatabase - - BuildGracenoteCollections - - CheckForUpdates - - CleanOldBundles - - CleanOldCacheFiles - - DeepMediaAnalysis - - GenerateAutoTags - - GenerateChapterThumbs - - GenerateMediaIndexFiles - - OptimizeDatabase - - RefreshLibraries - - RefreshLocalMedia - - RefreshPeriodicMetadata - - UpgradeMediaAnalysis - style: simple - responses: - "200": - description: The task was stopped - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - "404": - description: The task was not running - summary: Stop a single Butler task - tags: - - Butler - post: - description: | - This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - 1. Any tasks not scheduled to run on the current day will be skipped. - 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - 4. If we are outside the configured window, the task will start immediately. - operationId: startTask - parameters: - - description: the name of the task to be started. - explode: false - in: path - name: taskName - required: true - schema: - enum: - - BackupDatabase - - BuildGracenoteCollections - - CheckForUpdates - - CleanOldBundles - - CleanOldCacheFiles - - DeepMediaAnalysis - - GenerateAutoTags - - GenerateChapterThumbs - - GenerateMediaIndexFiles - - OptimizeDatabase - - RefreshLibraries - - RefreshLocalMedia - - RefreshPeriodicMetadata - - UpgradeMediaAnalysis - style: simple - responses: - "200": - description: The task was started successfully - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - "202": - description: The task was already running. - summary: Start a single Butler task - tags: - - Butler - /clients: - get: - description: Get Available Clients - operationId: getAvailableClients - responses: - "200": - content: - application/json: - schema: - items: - properties: - MediaContainer: - properties: - size: - example: 1 - Server: - items: - properties: - name: - example: iPad - host: - example: 10.10.10.102 - address: - example: 10.10.10.102 - port: - example: 32500 - machineIdentifier: - example: A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05 - version: - example: "8.17" - protocol: - example: plex - product: - example: Plex for iOS - deviceClass: - example: tablet - protocolVersion: - example: 2 - protocolCapabilities: - example: "playback,playqueues,timeline,provider-playback" - description: Available Clients - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Available Clients - tags: - - Server - /devices: - get: - description: Get Devices - operationId: getDevices - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getDevices_200_response' - description: Devices - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Devices - tags: - - Server - /hubs: - get: - description: Get Global Hubs filtered by the parameters provided. - operationId: getGlobalHubs - parameters: - - description: The number of items to return with each hub. - explode: true - in: query - name: count - required: false - schema: {} - style: form - - description: "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)." - explode: true - in: query - name: onlyTransient - required: false - schema: - enum: - - 0 - - 1 - style: form - responses: - "200": - description: returns global hubs - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Global Hubs - tags: - - Hubs - /hubs/search: - get: - description: | - This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). - - In the response's items, the following extra attributes are returned to further describe or disambiguate the result: - - - `reason`: The reason for the result, if not because of a direct search term match; can be either: - - `section`: There are multiple identical results from different sections. - - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). - - ``: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor` - - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold"). - - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. - - This request is intended to be very fast, and called as the user types. - operationId: performSearch - parameters: - - description: The query term - explode: true - in: query - name: query - required: true - schema: {} - style: form - - description: "This gives context to the search, and can result in re-ordering\ - \ of search result hubs" - explode: true - in: query - name: sectionId - required: false - schema: {} - style: form - - description: The number of items to return per hub - explode: true - in: query - name: limit - required: false - schema: - default: 3 - example: 5 - style: form - responses: - "200": - description: The search results - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Perform a search - tags: - - Search - /hubs/search/voice: - get: - description: "This endpoint performs a search specifically tailored towards\ - \ voice or other imprecise input which may work badly with the substring and\ - \ spell-checking heuristics used by the `/hubs/search` endpoint. \nIt uses\ - \ a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance)\ - \ heuristic to search titles, and as such is much slower than the other search\ - \ endpoint. \nWhenever possible, clients should limit the search to the appropriate\ - \ type. \nResults, as well as their containing per-type hubs, contain a `distance`\ - \ attribute which can be used to judge result quality.\n" - operationId: performVoiceSearch - parameters: - - description: The query term - explode: true - in: query - name: query - required: true - schema: {} - style: form - - description: "This gives context to the search, and can result in re-ordering\ - \ of search result hubs" - explode: true - in: query - name: sectionId - required: false - schema: {} - style: form - - description: The number of items to return per hub - explode: true - in: query - name: limit - required: false - schema: - default: 3 - example: 5 - style: form - responses: - "200": - description: The search results - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Perform a voice search - tags: - - Search - /hubs/sections/{sectionId}: - get: - description: | - This endpoint will return a list of library specific hubs - operationId: getLibraryHubs - parameters: - - description: the Id of the library to query - explode: false - in: path - name: sectionId - required: true - schema: {} - style: simple - - description: The number of items to return with each hub. - explode: true - in: query - name: count - required: false - schema: {} - style: form - - description: "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)." - explode: true - in: query - name: onlyTransient - required: false - schema: - enum: - - 0 - - 1 - style: form - responses: - "200": - description: The hubs specific to the library - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get library specific hubs - tags: - - Hubs - /identity: - get: - description: Get Server Identity - operationId: getServerIdentity - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerIdentity_200_response' - description: The Transcode Sessions - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Server Identity - tags: - - Server - /library/hashes: - get: - description: This resource returns hash values for local files - operationId: getFileHash - parameters: - - description: "This is the path to the local file, must be prefixed by `file://`" - explode: true - in: query - name: url - required: true - schema: - example: file://C:\Image.png&type=13 - style: form - - description: Item type - explode: true - in: query - name: type - required: false - schema: {} - style: form - responses: - "200": - description: The hash of the file - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Hash Value - tags: - - Library - /library/recentlyAdded: - get: - description: | - This endpoint will return the recently added content. - operationId: getRecentlyAdded - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getRecentlyAdded_200_response' - description: The recently added content - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Recently Added - tags: - - Library - /library/sections: - get: - description: "A library section (commonly referred to as just a library) is\ - \ a collection of media. \nLibraries are typed, and depending on their type\ - \ provide either a flat or a hierarchical view of the media. \nFor example,\ - \ a music library has an artist > albums > tracks structure, whereas a movie\ - \ library is flat.\n\nLibraries have features beyond just being a collection\ - \ of media; for starters, they include information about supported types,\ - \ filters and sorts. \nThis allows a client to provide a rich interface around\ - \ the media (e.g. allow sorting movies by release year).\n" - operationId: getLibraries - responses: - "200": - description: The libraries available on the Server - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get All Libraries - tags: - - Library - /library/sections/{sectionId}: - delete: - description: Delate a library using a specific section - operationId: deleteLibrary - parameters: - - description: the Id of the library to query - explode: false - in: path - name: sectionId - required: true - schema: - example: 1000 - style: simple - responses: - "200": - description: The library is deleted - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Delete Library Section - tags: - - Library - get: - description: | - Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are: - - - A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here: - - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. - - Secondary: These are marked with `secondary="1"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. - - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `search="1"` which used to be used to allow clients to build search dialogs on the fly. - - A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won't render any filtering controls. The `Type` object contains: - - `key`: This provides the root endpoint returning the actual media list for the type. - - `type`: This is the metadata type for the type (if a standard Plex type). - - `title`: The title for for the content of this type (e.g. "Movies"). - - Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API. - - `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with. - - `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. - - `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. - - `title`: The title for the filter. - - Each `Sort` object contains a description of the sort field. - - `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending). - - `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort. - - `title`: The title of the field. - operationId: getLibrary - parameters: - - description: the Id of the library to query - explode: false - in: path - name: sectionId - required: true - schema: - example: 1000 - style: simple - - description: "Whether or not to include details for a section (types, filters,\ - \ and sorts). \nOnly exists for backwards compatibility, media providers\ - \ other than the server libraries have it on always.\n" - explode: true - in: query - name: includeDetails - required: false - schema: - default: 0 - enum: - - 0 - - 1 - style: form - responses: - "200": - description: The details of the library - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Library Details - tags: - - Library - /library/sections/{sectionId}/all: - get: - description: | - This endpoint will return a list of library items filtered by the filter and type provided - operationId: getLibraryItems - parameters: - - description: the Id of the library to query - explode: false - in: path - name: sectionId - required: true - schema: {} - style: simple - - description: item type - explode: true - in: query - name: type - required: false - schema: {} - style: form - - description: the filter parameter - explode: true - in: query - name: filter - required: false - schema: {} - style: form - responses: - "200": - description: The details of the library - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Library Items - tags: - - Library - /library/sections/{sectionId}/refresh: - get: - description: | - This endpoint Refreshes the library. - operationId: refreshLibrary - parameters: - - description: the Id of the library to refresh - explode: false - in: path - name: sectionId - required: true - schema: {} - style: simple - responses: - "200": - description: The library is refreshing - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Refresh Library - tags: - - Library - /library/sections/{sectionId}/latest: - get: - description: | - This endpoint will return a list of the latest library items filtered by the filter and type provided - operationId: getLatestLibraryItems - parameters: - - description: the Id of the library to query - explode: false - in: path - name: sectionId - required: true - schema: {} - style: simple - - description: item type - explode: true - in: query - name: type - required: true - schema: {} - style: form - - description: the filter parameter - explode: true - in: query - name: filter - required: false - schema: {} - style: form - responses: - "200": - description: The details of the library - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Latest Library Items - tags: - - Library - /library/sections/{sectionId}/common: - get: - description: | - Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter - operationId: getCommonLibraryItems - parameters: - - description: the Id of the library to query - explode: false - in: path - name: sectionId - required: true - schema: {} - style: simple - - description: item type - explode: true - in: query - name: type - required: true - schema: {} - style: form - - description: the filter parameter - explode: true - in: query - name: filter - required: false - schema: {} - style: form - responses: - "200": - description: The details of the library - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - "404": - description: In response to a non-existant sectionId. - summary: Get Common Library Items - tags: - - Library - /library/metadata/{ratingKey}: - get: - description: | - This endpoint will return the metadata of a library item specified with the ratingKey. - operationId: getMetadata - parameters: - - description: the id of the library item to return the children of. - explode: false - in: path - name: ratingKey - required: true - schema: {} - style: simple - responses: - "200": - description: The children of the library item. - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Items Metadata - tags: - - Library - /library/metadata/{ratingKey}/children: - get: - description: | - This endpoint will return the children of of a library item specified with the ratingKey. - operationId: getMetadataChildren - parameters: - - description: the id of the library item to return the children of. - explode: false - in: path - name: ratingKey - required: true - schema: {} - style: simple - responses: - "200": - description: The children of the library item. - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Items Children - tags: - - Library - /library/onDeck: - get: - description: | - This endpoint will return the on deck content. - operationId: getOnDeck - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getOnDeck_200_response' - description: The on Deck content - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get On Deck - tags: - - Library - /log: - get: - description: | - This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. - operationId: logLine - parameters: - - description: "An integer log level to write to the PMS log with. \n0: Error\ - \ \n1: Warning \n2: Info \n3: Debug \n4: Verbose\n" - explode: true - in: query - name: level - required: true - schema: - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - style: form - - description: The text of the message to write to the log. - explode: true - in: query - name: message - required: true - schema: - example: "" - style: form - - description: a string indicating the source of the message. - explode: true - in: query - name: source - required: true - schema: - example: "" - style: form - responses: - "200": - description: Log Line submitted successfully - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Logging a single line message. - tags: - - Log - post: - description: | - This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. - operationId: logMultiLine - responses: - "200": - description: Multi-Line Log Message Posted successfully - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Logging a multi-line message - tags: - - Log - /log/networked: - get: - description: | - This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. - operationId: enablePaperTrail - responses: - "200": - description: Papertrail enabled successfully - "403": - description: the user was not signed in - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Enabling Papertrail - tags: - - Log - /myplex/account: - get: - description: Returns MyPlex Account Information - operationId: getMyPlexAccount - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getMyPlexAccount_200_response' - description: MyPlex Account - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get MyPlex Account - tags: - - Server - /photo/:/transcode: - get: - description: | - Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - operationId: getResizedPhoto - parameters: - - description: The width for the resized photo - explode: true - in: query - name: width - required: true - schema: - example: 110 - style: form - - description: The height for the resized photo - explode: true - in: query - name: height - required: true - schema: - example: 165 - style: form - - description: The opacity for the resized photo - explode: true - in: query - name: opacity - required: true - schema: - default: 100 - maximum: 100 - minimum: 1 - style: form - - description: The width for the resized photo - explode: true - in: query - name: blur - required: true - schema: {} - style: form - - description: images are always scaled proportionally. A value of '1' in minSize - will make the smaller native dimension the dimension resized against. - explode: true - in: query - name: minSize - required: true - schema: - enum: - - 0 - - 1 - style: form - - description: allow images to be resized beyond native dimensions. - explode: true - in: query - name: upscale - required: true - schema: - enum: - - 0 - - 1 - style: form - - description: path to image within Plex - explode: true - in: query - name: url - required: true - schema: - example: /library/metadata/49564/thumb/1654258204 - style: form - responses: - "200": - description: Resized Image - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get a Resized Photo - tags: - - Server - /playlists: - post: - description: | - Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: - - `uri` - The content URI for what we're playing (e.g. `library://...`). - - `playQueueID` - To create a playlist from an existing play queue. - operationId: createPlaylist - parameters: - - description: name of the playlist - explode: true - in: query - name: title - required: true - schema: {} - style: form - - description: type of playlist to create - explode: true - in: query - name: type - required: true - schema: - enum: - - audio - - video - - photo - style: form - - description: whether the playlist is smart or not - explode: true - in: query - name: smart - required: true - schema: - enum: - - 0 - - 1 - style: form - - description: the content URI for the playlist - explode: true - in: query - name: uri - required: false - schema: {} - style: form - - description: the play queue to copy to a playlist - explode: true - in: query - name: playQueueID - required: false - schema: {} - style: form - responses: - "200": - description: returns all playlists - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Create a Playlist - tags: - - Playlists - /playlists/all: - get: - description: Get All Playlists given the specified filters. - operationId: getPlaylists - parameters: - - description: limit to a type of playlist. - explode: true - in: query - name: playlistType - required: false - schema: - enum: - - audio - - video - - photo - style: form - - description: type of playlists to return (default is all). - explode: true - in: query - name: smart - required: false - schema: - enum: - - 0 - - 1 - style: form - responses: - "200": - description: returns all playlists - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get All Playlists - tags: - - Playlists - /playlists/{playlistID}: - delete: - description: | - This endpoint will delete a playlist - operationId: deletePlaylist - parameters: - - description: the ID of the playlist - explode: false - in: path - name: playlistID - required: true - schema: {} - style: simple - responses: - "200": - description: The playlist is deleted - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Deletes a Playlist - tags: - - Playlists - get: - description: | - Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: - Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. - operationId: getPlaylist - parameters: - - description: the ID of the playlist - explode: false - in: path - name: playlistID - required: true - schema: {} - style: simple - responses: - "200": - description: The playlist - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Retrieve Playlist - tags: - - Playlists - put: - description: | - From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - operationId: updatePlaylist - parameters: - - description: the ID of the playlist - explode: false - in: path - name: playlistID - required: true - schema: {} - style: simple - responses: - "200": - description: The playlist is deleted - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Update a Playlist - tags: - - Playlists - /playlists/{playlistID}/items: - delete: - description: | - Clears a playlist, only works with dumb playlists. Returns the playlist. - operationId: clearPlaylistContents - parameters: - - description: the ID of the playlist - explode: false - in: path - name: playlistID - required: true - schema: {} - style: simple - responses: - "200": - description: The playlist contents are cleared - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Delete Playlist Contents - tags: - - Playlists - get: - description: "Gets the contents of a playlist. Should be paged by clients via\ - \ standard mechanisms. \nBy default leaves are returned (e.g. episodes, movies).\ - \ In order to return other types you can use the `type` parameter. \nFor example,\ - \ you could use this to display a list of recently added albums vis a smart\ - \ playlist. \nNote that for dumb playlists, items have a `playlistItemID`\ - \ attribute which is used for deleting or moving items.\n" - operationId: getPlaylistContents - parameters: - - description: the ID of the playlist - explode: false - in: path - name: playlistID - required: true - schema: {} - style: simple - - description: the metadata type of the item to return - explode: true - in: query - name: type - required: true - schema: {} - style: form - responses: - "200": - description: The playlist contents - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Retrieve Playlist Contents - tags: - - Playlists - put: - description: "Adds a generator to a playlist, same parameters as the POST above.\ - \ With a dumb playlist, this adds the specified items to the playlist. \n\ - With a smart playlist, passing a new `uri` parameter replaces the rules for\ - \ the playlist. Returns the playlist.\n" - operationId: addPlaylistContents - parameters: - - description: the ID of the playlist - explode: false - in: path - name: playlistID - required: true - schema: {} - style: simple - - description: the content URI for the playlist - explode: true - in: query - name: uri - required: true - schema: - example: library://.. - style: form - - description: the play queue to add to a playlist - explode: true - in: query - name: playQueueID - required: true - schema: - example: 123 - style: form - responses: - "200": - description: Playlist Updated - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Adding to a Playlist - tags: - - Playlists - /playlists/upload: - post: - description: | - Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. - operationId: uploadPlaylist - parameters: - - description: "absolute path to a directory on the server where m3u files are\ - \ stored, or the absolute path to a playlist file on the server. \nIf the\ - \ `path` argument is a directory, that path will be scanned for playlist\ - \ files to be processed. \nEach file in that directory creates a separate\ - \ playlist, with a name based on the filename of the file that created it.\ - \ \nThe GUID of each playlist is based on the filename. \nIf 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. \nThe GUID\ - \ of each playlist is based on the filename.\n" - explode: true - in: query - name: path - required: true - schema: - example: /home/barkley/playlist.m3u - style: form - - description: "force overwriting of duplicate playlists. By default, a playlist\ - \ file uploaded with the same path will overwrite the existing playlist.\ - \ \nThe `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.\n" - explode: true - in: query - name: force - required: true - schema: - enum: - - 0 - - 1 - style: form - responses: - "200": - description: The playlist is uploaded - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Upload Playlist - tags: - - Playlists - /search: - get: - description: This will search the database for the string provided. - operationId: getSearchResults - parameters: - - description: The search query string to use - explode: true - in: query - name: query - required: true - schema: - example: "110" - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getSearchResults_200_response' - description: Search Results - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Search Results - tags: - - Search - /security/token: - get: - description: | - This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. - operationId: getTransientToken - parameters: - - description: '`delegation` - This is the only supported `type` parameter.' - explode: true - in: query - name: type - required: true - schema: - enum: - - delegation - style: form - - description: '`all` - This is the only supported `scope` parameter.' - explode: true - in: query - name: scope - required: true - schema: - enum: - - all - style: form - responses: - "200": - description: A Transient Token - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get a Transient Token. - tags: - - Security - /security/resources: - get: - description: | - If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. - Note: requires Plex Media Server >= 1.15.4. - operationId: getSourceConnectionInformation - parameters: - - description: The source identifier with an included prefix. - explode: true - in: query - name: source - required: true - schema: {} - style: form - responses: - "200": - description: Source Connection Information - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Source Connection Information - tags: - - Security - /servers: - get: - description: Get Server List - operationId: getServerList - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerList_200_response' - description: List of Servers - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Server List - tags: - - Server - /status/sessions: - get: - description: This will retrieve the "Now Playing" Information of the PMS. - operationId: getSessions - responses: - "200": - description: List of Active Plex Sessions - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Active Sessions - tags: - - Sessions - /status/sessions/history/all: - get: - description: This will Retrieve a listing of all history views. - operationId: getSessionHistory - responses: - "200": - description: List of Plex Sessions - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Session History - tags: - - Sessions - /transcode/sessions: - get: - description: Get Transcode Sessions - operationId: getTranscodeSessions - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getTranscodeSessions_200_response' - description: The Transcode Sessions - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get Transcode Sessions - tags: - - Sessions - /transcode/sessions/{sessionKey}: - delete: - description: Stop a Transcode Session - operationId: stopTranscodeSession - parameters: - - description: the Key of the transcode session to stop - explode: false - in: path - name: sessionKey - required: true - schema: - example: zz7llzqlx8w9vnrsbnwhbmep - style: simple - responses: - "200": - description: The Transcode Session ended - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Stop a Transcode Session - tags: - - Sessions - /updater/status: - get: - description: Querying status of updates - operationId: getUpdateStatus - responses: - "200": - description: The Server Updates - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Querying status of updates - tags: - - Updater - /updater/check: - put: - description: Checking for updates - operationId: checkForUpdates - parameters: - - description: Indicate that you want to start download any updates found. - example: 1 - explode: true - in: query - name: download - required: false - schema: - enum: - - 0 - - 1 - style: form - responses: - "200": - description: "" - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Checking for updates - tags: - - Updater - /updater/apply: - put: - description: | - Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed - operationId: applyUpdates - parameters: - - description: 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 - example: 1 - explode: true - in: query - name: tonight - required: false - schema: - enum: - - 0 - - 1 - style: form - - description: Indicate that the latest version should be marked as skipped. - The entry for this version will have the `state` set to `skipped`. - example: 1 - explode: true - in: query - name: skip - required: false - schema: - enum: - - 0 - - 1 - style: form - responses: - "200": - description: If the update process started correctly - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - "500": - description: If the update process failed to start - summary: Apply Updates - tags: - - Updater - /video/:/transcode/universal/start.mpd: - get: - description: Begin a Universal Transcode Session - operationId: startUniversalTranscode - parameters: - - description: Whether the media item has MDE - example: 1 - explode: true - in: query - name: hasMDE - required: true - schema: {} - style: form - - description: The path to the media item to transcode - example: /library/metadata/23409 - explode: true - in: query - name: path - required: true - schema: {} - style: form - - description: The index of the media item to transcode - example: 0 - explode: true - in: query - name: mediaIndex - required: true - schema: {} - style: form - - description: The index of the part to transcode - example: 0 - explode: true - in: query - name: partIndex - required: true - schema: {} - style: form - - description: The protocol to use for the transcode session - example: hls - explode: true - in: query - name: protocol - required: true - schema: {} - style: form - - description: Whether to use fast seek or not - example: 0 - explode: true - in: query - name: fastSeek - required: false - schema: {} - style: form - - description: Whether to use direct play or not - example: 0 - explode: true - in: query - name: directPlay - required: false - schema: {} - style: form - - description: Whether to use direct stream or not - example: 0 - explode: true - in: query - name: directStream - required: false - schema: {} - style: form - - description: The size of the subtitles - example: 100 - explode: true - in: query - name: subtitleSize - required: false - schema: {} - style: form - - description: The subtitles - example: burn - explode: true - in: query - name: subtites - required: false - schema: {} - style: form - - description: The audio boost - example: 100 - explode: true - in: query - name: audioBoost - required: false - schema: {} - style: form - - description: The location of the transcode session - example: lan - explode: true - in: query - name: location - required: false - schema: {} - style: form - - description: The size of the media buffer - example: 102400 - explode: true - in: query - name: mediaBufferSize - required: false - schema: {} - style: form - - description: The session ID - example: zvcage8b7rkioqcm8f4uns4c - explode: true - in: query - name: session - required: false - schema: {} - style: form - - description: Whether to add a debug overlay or not - example: 0 - explode: true - in: query - name: addDebugOverlay - required: false - schema: {} - style: form - - description: Whether to auto adjust quality or not - example: 0 - explode: true - in: query - name: autoAdjustQuality - required: false - schema: {} - style: form - responses: - "200": - description: The transcode session has started - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Start Universal Transcode - tags: - - Video - /:/timeline: - get: - description: Get the timeline for a media item - operationId: getTimeline - parameters: - - description: The rating key of the media item - example: 23409 - explode: true - in: query - name: ratingKey - required: true - schema: {} - style: form - - description: The key of the media item to get the timeline for - example: /library/metadata/23409 - explode: true - in: query - name: key - required: true - schema: {} - style: form - - description: The state of the media item - example: playing - explode: true - in: query - name: state - required: true - schema: - enum: - - playing - - paused - - stopped - style: form - - description: Whether the media item has MDE - example: 1 - explode: true - in: query - name: hasMDE - required: true - schema: {} - style: form - - description: The time of the media item - example: 2000 - explode: true - in: query - name: time - required: true - schema: {} - style: form - - description: The duration of the media item - example: 10000 - explode: true - in: query - name: duration - required: true - schema: {} - style: form - - description: The context of the media item - example: home:hub.continueWatching - explode: true - in: query - name: context - required: true - schema: {} - style: form - - description: The play queue item ID of the media item - example: 1 - explode: true - in: query - name: playQueueItemID - required: true - schema: {} - style: form - - description: The playback time of the media item - example: 2000 - explode: true - in: query - name: playBackTime - required: true - schema: {} - style: form - - description: The row of the media item - example: 1 - explode: true - in: query - name: row - required: true - schema: {} - style: form - responses: - "200": - description: The timeline for the media item - "400": - description: "Bad Request - A parameter was not specified, or was specified\ - \ incorrectly." - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/getServerCapabilities_401_response' - description: Unauthorized - Returned if the X-Plex-Token is missing from - the header or query. - summary: Get the timeline for a media item - tags: - - Video -components: - schemas: - getServerCapabilities_200_response: - example: - MediaContainer: - transcoderSubtitles: "" - readOnlyLibraries: "" - photoAutoTag: "" - myPlexMappingState: "" - transcoderVideoQualities: "" - allowCameraUpload: "" - pluginHost: "" - multiuser: "" - allowSharing: "" - myPlexUsername: "" - updatedAt: "" - myPlexSubscription: "" - livetv: "" - allowSync: "" - sync: "" - version: "" - itemClusters: "" - transcoderLyrics: "" - ownerFeatures: "" - transcoderVideoResolutions: "" - allowChannelAccess: "" - size: "" - myPlex: "" - musicAnalysis: "" - companionProxy: "" - transcoderVideo: "" - hubSearch: "" - allowMediaDeletion: "" - allowTuners: "" - certificate: "" - myPlexSigninState: "" - platform: "" - transcoderAudio: "" - updater: "" - transcoderPhoto: "" - streamingBrainABRVersion: "" - countryCode: "" - platformVersion: "" - eventStream: "" - friendlyName: "" - Directory: "" - machineIdentifier: "" - backgroundProcessing: "" - voiceSearch: "" - offlineTranscode: "" - streamingBrainVersion: "" - mediaProviders: "" - transcoderVideoBitrates: "" - diagnostics: "" - pushNotifications: "" - transcoderActiveVideoSessions: "" - properties: - MediaContainer: - $ref: '#/components/schemas/getServerCapabilities_200_response_MediaContainer' - getRecentlyAdded_200_response: - example: - MediaContainer: - mediaTagPrefix: /system/bundle/media/flags/ - identifier: com.plexapp.plugins.library - size: 50 - allowSync: "" - Metadata: "" - mediaTagVersion: 1680021154 - mixedParents: "" - properties: - MediaContainer: - $ref: '#/components/schemas/getRecentlyAdded_200_response_MediaContainer' - getServerList_200_response: - example: - MediaContainer: - size: 1 - Server: "" - properties: - MediaContainer: - $ref: '#/components/schemas/getServerList_200_response_MediaContainer' - getSearchResults_200_response_MediaContainer: - example: - mediaTagPrefix: /system/bundle/media/flags/ - identifier: com.plexapp.plugins.library - size: 26 - Metadata: "" - mediaTagVersion: 1680021154 - Provider: "" - properties: - size: - example: 26 - identifier: - example: com.plexapp.plugins.library - mediaTagPrefix: - example: /system/bundle/media/flags/ - mediaTagVersion: - example: 1680021154 - Metadata: - items: - properties: - allowSync: {} - librarySectionID: - example: 1 - librarySectionTitle: - example: Movies - librarySectionUUID: - example: 322a231a-b7f7-49f5-920f-14c61199cd30 - personal: {} - sourceTitle: - example: Hera - ratingKey: - example: 10398 - key: - example: /library/metadata/10398 - guid: - example: plex://movie/5d7768284de0ee001fcc8f52 - studio: - example: Paramount - type: - example: movie - title: - example: "Mission: Impossible" - contentRating: - example: PG-13 - summary: - example: When Ethan Hunt the leader of a crack espionage team whose - perilous operation has gone awry with no explanation discovers that - a mole has penetrated the CIA he's surprised to learn that he's - the No. 1 suspect. To clear his name Hunt now must ferret out the - real double agent and in the process even the score. - rating: - example: 6.6 - audienceRating: - example: 7.1 - year: - example: 1996 - tagline: - example: Expect the impossible. - thumb: - example: /library/metadata/10398/thumb/1679505055 - art: - example: /library/metadata/10398/art/1679505055 - duration: - example: 6612628 - originallyAvailableAt: - example: 1996-05-22 - format: date - addedAt: - example: 1589234571 - updatedAt: - example: 1679505055 - audienceRatingImage: - example: rottentomatoes://image.rating.upright - chapterSource: - example: media - primaryExtraKey: - example: /library/metadata/10501 - ratingImage: - example: rottentomatoes://image.rating.ripe - Media: - items: - properties: - id: - example: 26610 - duration: - example: 6612628 - bitrate: - example: 4751 - width: - example: 1916 - height: - example: 796 - aspectRatio: - example: 2.35 - audioChannels: - example: 6 - audioCodec: - example: aac - videoCodec: - example: hevc - videoResolution: - example: 1080 - container: - example: mkv - videoFrameRate: - example: 24p - audioProfile: - example: lc - videoProfile: - example: main 10 - Part: - items: - properties: - id: - example: 26610 - key: - example: /library/parts/26610/1589234571/file.mkv - duration: - example: 6612628 - file: - example: /movies/Mission Impossible (1996)/Mission Impossible - (1996) Bluray-1080p.mkv - size: - example: 3926903851 - audioProfile: - example: lc - container: - example: mkv - videoProfile: - example: main 10 - Genre: - items: - properties: - tag: - example: Action - Director: - items: - properties: - tag: - example: Brian De Palma - Writer: - items: - properties: - tag: - example: David Koepp - Country: - items: - properties: - tag: - example: United States of America - Role: - items: - properties: - tag: - example: Tom Cruise - Provider: - items: - properties: - key: - example: /system/search - title: - example: Local Network - type: - example: mixed - getDevices_200_response_MediaContainer: - example: - identifier: com.plexapp.system.devices - size: 151 - Device: "" - properties: - size: - example: 151 - identifier: - example: com.plexapp.system.devices - Device: - items: - properties: - id: - example: 1 - name: - example: iPhone - platform: - example: iOS - clientIdentifier: {} - createdAt: - example: 1654131230 - getOnDeck_200_response: - example: - MediaContainer: - mediaTagPrefix: /system/bundle/media/flags/ - identifier: com.plexapp.plugins.library - size: 16 - allowSync: "" - Metadata: "" - mediaTagVersion: 1680021154 - mixedParents: "" - properties: - MediaContainer: - $ref: '#/components/schemas/getOnDeck_200_response_MediaContainer' - getServerIdentity_200_response: - example: - MediaContainer: - size: 0 - machineIdentifier: 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 - claimed: "" - version: 1.31.3.6868-28fc46b27 - properties: - MediaContainer: - $ref: '#/components/schemas/getServerIdentity_200_response_MediaContainer' - getRecentlyAdded_200_response_MediaContainer: - example: - mediaTagPrefix: /system/bundle/media/flags/ - identifier: com.plexapp.plugins.library - size: 50 - allowSync: "" - Metadata: "" - mediaTagVersion: 1680021154 - mixedParents: "" - properties: - size: - example: 50 - allowSync: {} - identifier: - example: com.plexapp.plugins.library - mediaTagPrefix: - example: /system/bundle/media/flags/ - mediaTagVersion: - example: 1680021154 - mixedParents: {} - Metadata: - items: - properties: - allowSync: {} - librarySectionID: - example: 1 - librarySectionTitle: - example: Movies - librarySectionUUID: - example: 322a231a-b7f7-49f5-920f-14c61199cd30 - ratingKey: - example: 59398 - key: - example: /library/metadata/59398 - guid: - example: plex://movie/5e161a83bea6ac004126e148 - studio: - example: Marvel Studios - type: - example: movie - title: - example: "Ant-Man and the Wasp: Quantumania" - contentRating: - example: PG-13 - summary: - example: Scott Lang and Hope Van Dyne along with Hank Pym and Janet - Van Dyne explore the Quantum Realm where they interact with strange - creatures and embark on an adventure that goes beyond the limits - of what they thought was possible. - rating: - example: 4.7 - audienceRating: - example: 8.3 - year: - example: 2023 - tagline: - example: Witness the beginning of a new dynasty. - thumb: - example: /library/metadata/59398/thumb/1681888010 - art: - example: /library/metadata/59398/art/1681888010 - duration: - example: 7474422 - originallyAvailableAt: - example: 2023-02-15 - format: date - addedAt: - example: 1681803215 - updatedAt: - example: 1681888010 - audienceRatingImage: - example: rottentomatoes://image.rating.upright - chapterSource: - example: media - primaryExtraKey: - example: /library/metadata/59399 - ratingImage: - example: rottentomatoes://image.rating.rotten - Media: - items: - properties: - id: - example: 120345 - duration: - example: 7474422 - bitrate: - example: 3623 - width: - example: 1920 - height: - example: 804 - aspectRatio: - example: 2.35 - audioChannels: - example: 6 - audioCodec: - example: ac3 - videoCodec: - example: h264 - videoResolution: - example: 1080 - container: - example: mp4 - videoFrameRate: - example: 24p - optimizedForStreaming: - example: 0 - has64bitOffsets: {} - videoProfile: - example: high - Part: - items: - properties: - id: - example: 120353 - key: - example: /library/parts/120353/1681803203/file.mp4 - duration: - example: 7474422 - file: - example: /movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4 - size: - example: 3395307162 - container: - example: mp4 - has64bitOffsets: {} - hasThumbnail: - example: 1 - optimizedForStreaming: {} - videoProfile: - example: high - Genre: - items: - properties: - tag: - example: Comedy - Director: - items: - properties: - tag: - example: Peyton Reed - Writer: - items: - properties: - tag: - example: Jeff Loveness - Country: - items: - properties: - tag: - example: United States of America - Role: - items: - properties: - tag: - example: Paul Rudd - getButlerTasks_200_response_ButlerTasks: - example: - ButlerTask: "" - properties: - ButlerTask: - items: - properties: - name: - example: BackupDatabase - interval: - example: 3 - scheduleRandomized: {} - enabled: {} - title: - example: Backup Database - description: - example: Create a backup copy of the server's database in the configured - backup directory - getMyPlexAccount_200_response: - example: - MyPlex: - mappingError: "" - mappingState: mapped - privateAddress: 10.10.10.47 - signInState: ok - privatePort: 32400 - authToken: Z5v-PrNASDFpsaCi3CPK7 - publicPort: 32400 - subscriptionState: Active - publicAddress: 140.20.68.140 - subscriptionActive: "" - username: example.email@mail.com - subscriptionFeatures: "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks" - properties: - MyPlex: - $ref: '#/components/schemas/getMyPlexAccount_200_response_MyPlex' - getServerList_200_response_MediaContainer: - example: - size: 1 - Server: "" - properties: - size: - example: 1 - Server: - items: - properties: - name: - example: Hera - host: - example: 10.10.10.47 - address: - example: 10.10.10.47 - port: - example: 32400 - machineIdentifier: - example: 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 - version: - example: 1.31.3.6868-28fc46b27 - getDevices_200_response: - example: - MediaContainer: - identifier: com.plexapp.system.devices - size: 151 - Device: "" - properties: - MediaContainer: - $ref: '#/components/schemas/getDevices_200_response_MediaContainer' - getServerCapabilities_401_response: - properties: - errors: - items: - properties: - code: - example: 1001 - message: - example: User could not be authenticated - status: - example: 401 - getTranscodeSessions_200_response: - example: - MediaContainer: - size: 1 - TranscodeSession: "" - properties: - MediaContainer: - $ref: '#/components/schemas/getTranscodeSessions_200_response_MediaContainer' - getServerActivities_200_response: - example: - MediaContainer: - size: "" - Activity: "" - properties: - MediaContainer: - $ref: '#/components/schemas/getServerActivities_200_response_MediaContainer' - getOnDeck_200_response_MediaContainer: - example: - mediaTagPrefix: /system/bundle/media/flags/ - identifier: com.plexapp.plugins.library - size: 16 - allowSync: "" - Metadata: "" - mediaTagVersion: 1680021154 - mixedParents: "" - properties: - size: - example: 16 - allowSync: {} - identifier: - example: com.plexapp.plugins.library - mediaTagPrefix: - example: /system/bundle/media/flags/ - mediaTagVersion: - example: 1680021154 - mixedParents: {} - Metadata: - items: - properties: - allowSync: {} - librarySectionID: - example: 2 - librarySectionTitle: - example: TV Shows - librarySectionUUID: - example: 4bb2521c-8ba9-459b-aaee-8ab8bc35eabd - ratingKey: - example: 49564 - key: - example: /library/metadata/49564 - parentRatingKey: - example: 49557 - grandparentRatingKey: - example: 49556 - guid: - example: plex://episode/5ea7d7402e7ab10042e74d4f - parentGuid: - example: plex://season/602e754d67f4c8002ce54b3d - grandparentGuid: - example: plex://show/5d9c090e705e7a001e6e94d8 - type: - example: episode - title: - example: Circus - grandparentKey: - example: /library/metadata/49556 - parentKey: - example: /library/metadata/49557 - librarySectionKey: - example: /library/sections/2 - grandparentTitle: - example: Bluey (2018) - parentTitle: - example: Season 2 - contentRating: - example: TV-Y - summary: - example: Bluey is the ringmaster in a game of circus with her friends - but Hercules wants to play his motorcycle game instead. Luckily - Bluey has a solution to keep everyone happy. - index: - example: 33 - parentIndex: - example: 2 - lastViewedAt: - example: 1681908352 - year: - example: 2018 - thumb: - example: /library/metadata/49564/thumb/1654258204 - art: - example: /library/metadata/49556/art/1680939546 - parentThumb: - example: /library/metadata/49557/thumb/1654258204 - grandparentThumb: - example: /library/metadata/49556/thumb/1680939546 - grandparentArt: - example: /library/metadata/49556/art/1680939546 - grandparentTheme: - example: /library/metadata/49556/theme/1680939546 - duration: - example: 420080 - originallyAvailableAt: - example: 2020-10-31 - format: date - addedAt: - example: 1654258196 - updatedAt: - example: 1654258204 - Media: - items: - properties: - id: - example: 80994 - duration: - example: 420080 - bitrate: - example: 1046 - width: - example: 1920 - height: - example: 1080 - aspectRatio: - example: 1.78 - audioChannels: - example: 2 - audioCodec: - example: aac - videoCodec: - example: hevc - videoResolution: - example: "1080" - container: - example: mkv - videoFrameRate: - example: PAL - audioProfile: - example: lc - videoProfile: - example: main - Part: - items: - properties: - id: - example: 80994 - key: - example: /library/parts/80994/1655007810/file.mkv - duration: - example: 420080 - file: - example: /tvshows/Bluey (2018)/Bluey (2018) - S02E33 - - Circus.mkv - size: - example: 55148931 - audioProfile: - example: lc - container: - example: mkv - videoProfile: - example: main - Stream: - items: - properties: - id: - example: 211234 - streamType: - example: 1 - default: {} - codec: - example: hevc - index: - example: 0 - bitrate: - example: 918 - language: - example: English - languageTag: - example: en - languageCode: - example: eng - bitDepth: - example: 8 - chromaLocation: - example: left - chromaSubsampling: - example: 4:2:0 - codedHeight: - example: 1080 - codedWidth: - example: 1920 - colorRange: - example: tv - frameRate: - example: 25 - height: - example: 1080 - level: - example: 120 - profile: - example: main - refFrames: - example: 1 - width: - example: 1920 - displayTitle: - example: 1080p (HEVC Main) - extendedDisplayTitle: - example: 1080p (HEVC Main) - Guid: - items: - properties: - id: - example: imdb://tt13303712 - getServerCapabilities_200_response_MediaContainer: - example: - transcoderSubtitles: "" - readOnlyLibraries: "" - photoAutoTag: "" - myPlexMappingState: "" - transcoderVideoQualities: "" - allowCameraUpload: "" - pluginHost: "" - multiuser: "" - allowSharing: "" - myPlexUsername: "" - updatedAt: "" - myPlexSubscription: "" - livetv: "" - allowSync: "" - sync: "" - version: "" - itemClusters: "" - transcoderLyrics: "" - ownerFeatures: "" - transcoderVideoResolutions: "" - allowChannelAccess: "" - size: "" - myPlex: "" - musicAnalysis: "" - companionProxy: "" - transcoderVideo: "" - hubSearch: "" - allowMediaDeletion: "" - allowTuners: "" - certificate: "" - myPlexSigninState: "" - platform: "" - transcoderAudio: "" - updater: "" - transcoderPhoto: "" - streamingBrainABRVersion: "" - countryCode: "" - platformVersion: "" - eventStream: "" - friendlyName: "" - Directory: "" - machineIdentifier: "" - backgroundProcessing: "" - voiceSearch: "" - offlineTranscode: "" - streamingBrainVersion: "" - mediaProviders: "" - transcoderVideoBitrates: "" - diagnostics: "" - pushNotifications: "" - transcoderActiveVideoSessions: "" - properties: - size: {} - allowCameraUpload: {} - allowChannelAccess: {} - allowMediaDeletion: {} - allowSharing: {} - allowSync: {} - allowTuners: {} - backgroundProcessing: {} - certificate: {} - companionProxy: {} - countryCode: {} - diagnostics: {} - eventStream: {} - friendlyName: {} - hubSearch: {} - itemClusters: {} - livetv: {} - machineIdentifier: {} - mediaProviders: {} - multiuser: {} - musicAnalysis: {} - myPlex: {} - myPlexMappingState: {} - myPlexSigninState: {} - myPlexSubscription: {} - myPlexUsername: {} - offlineTranscode: {} - ownerFeatures: {} - photoAutoTag: {} - platform: {} - platformVersion: {} - pluginHost: {} - pushNotifications: {} - readOnlyLibraries: {} - streamingBrainABRVersion: {} - streamingBrainVersion: {} - sync: {} - transcoderActiveVideoSessions: {} - transcoderAudio: {} - transcoderLyrics: {} - transcoderPhoto: {} - transcoderSubtitles: {} - transcoderVideo: {} - transcoderVideoBitrates: {} - transcoderVideoQualities: {} - transcoderVideoResolutions: {} - updatedAt: {} - updater: {} - version: {} - voiceSearch: {} - Directory: - items: - properties: - count: {} - key: {} - title: {} - getTranscodeSessions_200_response_MediaContainer: - example: - size: 1 - TranscodeSession: "" - properties: - size: - example: 1 - TranscodeSession: - items: - properties: - key: - example: zz7llzqlx8w9vnrsbnwhbmep - throttled: {} - complete: {} - progress: - example: 0.4000000059604645 - size: - example: -22 - speed: - example: 22.399999618530273 - error: {} - duration: - example: 2561768 - context: - example: streaming - sourceVideoCodec: - example: h264 - sourceAudioCodec: - example: ac3 - videoDecision: - example: transcode - audioDecision: - example: transcode - protocol: - example: http - container: - example: mkv - videoCodec: - example: h264 - audioCodec: - example: opus - audioChannels: - example: 2 - transcodeHwRequested: {} - timeStamp: - example: 1681869535.7764285 - maxOffsetAvailable: - example: 861.778 - minOffsetAvailable: - example: 0 - getButlerTasks_200_response: - example: - ButlerTasks: - ButlerTask: "" - properties: - ButlerTasks: - $ref: '#/components/schemas/getButlerTasks_200_response_ButlerTasks' - getMyPlexAccount_200_response_MyPlex: - example: - mappingError: "" - mappingState: mapped - privateAddress: 10.10.10.47 - signInState: ok - privatePort: 32400 - authToken: Z5v-PrNASDFpsaCi3CPK7 - publicPort: 32400 - subscriptionState: Active - publicAddress: 140.20.68.140 - subscriptionActive: "" - username: example.email@mail.com - subscriptionFeatures: "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks" - properties: - authToken: - example: Z5v-PrNASDFpsaCi3CPK7 - username: - example: example.email@mail.com - mappingState: - example: mapped - mappingError: {} - signInState: - example: ok - publicAddress: - example: 140.20.68.140 - publicPort: - example: 32400 - privateAddress: - example: 10.10.10.47 - privatePort: - example: 32400 - subscriptionFeatures: - example: "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks" - subscriptionActive: {} - subscriptionState: - example: Active - getServerActivities_200_response_MediaContainer: - example: - size: "" - Activity: "" - properties: - size: {} - Activity: - items: - properties: - uuid: {} - type: {} - cancellable: {} - userID: {} - title: {} - subtitle: {} - progress: {} - Context: - properties: - librarySectionID: {} - getSearchResults_200_response: - example: - MediaContainer: - mediaTagPrefix: /system/bundle/media/flags/ - identifier: com.plexapp.plugins.library - size: 26 - Metadata: "" - mediaTagVersion: 1680021154 - Provider: "" - properties: - MediaContainer: - $ref: '#/components/schemas/getSearchResults_200_response_MediaContainer' - getServerIdentity_200_response_MediaContainer: - example: - size: 0 - machineIdentifier: 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 - claimed: "" - version: 1.31.3.6868-28fc46b27 - properties: - size: - example: 0 - claimed: {} - machineIdentifier: - example: 96f2fe7a78c9dc1f16a16bedbe90f98149be16b4 - version: - example: 1.31.3.6868-28fc46b27 - securitySchemes: - accessToken: - description: Plex Authentication Token - in: header - name: X-Plex-Token - type: apiKey diff --git a/pms/api_activities.go b/pms/api_activities.go deleted file mode 100644 index 94d3456..0000000 --- a/pms/api_activities.go +++ /dev/null @@ -1,264 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// ActivitiesApiService ActivitiesApi service -type ActivitiesApiService service - -type ApiCancelServerActivitiesRequest struct { - ctx context.Context - ApiService *ActivitiesApiService - activityUUID interface{} -} - -func (r ApiCancelServerActivitiesRequest) Execute() (*http.Response, error) { - return r.ApiService.CancelServerActivitiesExecute(r) -} - -/* -CancelServerActivities Cancel Server Activities - -Cancel Server Activities - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param activityUUID The UUID of the activity to cancel. - @return ApiCancelServerActivitiesRequest -*/ -func (a *ActivitiesApiService) CancelServerActivities(ctx context.Context, activityUUID interface{}) ApiCancelServerActivitiesRequest { - return ApiCancelServerActivitiesRequest{ - ApiService: a, - ctx: ctx, - activityUUID: activityUUID, - } -} - -// Execute executes the request -func (a *ActivitiesApiService) CancelServerActivitiesExecute(r ApiCancelServerActivitiesRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActivitiesApiService.CancelServerActivities") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/activities/{activityUUID}" - localVarPath = strings.Replace(localVarPath, "{"+"activityUUID"+"}", url.PathEscape(parameterValueToString(r.activityUUID, "activityUUID")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetServerActivitiesRequest struct { - ctx context.Context - ApiService *ActivitiesApiService -} - -func (r ApiGetServerActivitiesRequest) Execute() (*GetServerActivities200Response, *http.Response, error) { - return r.ApiService.GetServerActivitiesExecute(r) -} - -/* -GetServerActivities Get Server Activities - -Get Server Activities - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetServerActivitiesRequest -*/ -func (a *ActivitiesApiService) GetServerActivities(ctx context.Context) ApiGetServerActivitiesRequest { - return ApiGetServerActivitiesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetServerActivities200Response -func (a *ActivitiesApiService) GetServerActivitiesExecute(r ApiGetServerActivitiesRequest) (*GetServerActivities200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetServerActivities200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ActivitiesApiService.GetServerActivities") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/activities" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/pms/api_butler.go b/pms/api_butler.go deleted file mode 100644 index 61fd9ee..0000000 --- a/pms/api_butler.go +++ /dev/null @@ -1,618 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// ButlerApiService ButlerApi service -type ButlerApiService service - -type ApiGetButlerTasksRequest struct { - ctx context.Context - ApiService *ButlerApiService -} - -func (r ApiGetButlerTasksRequest) Execute() (*GetButlerTasks200Response, *http.Response, error) { - return r.ApiService.GetButlerTasksExecute(r) -} - -/* -GetButlerTasks Get Butler tasks - -Returns a list of butler tasks - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetButlerTasksRequest -*/ -func (a *ButlerApiService) GetButlerTasks(ctx context.Context) ApiGetButlerTasksRequest { - return ApiGetButlerTasksRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetButlerTasks200Response -func (a *ButlerApiService) GetButlerTasksExecute(r ApiGetButlerTasksRequest) (*GetButlerTasks200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetButlerTasks200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ButlerApiService.GetButlerTasks") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/butler" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiStartAllTasksRequest struct { - ctx context.Context - ApiService *ButlerApiService -} - -func (r ApiStartAllTasksRequest) Execute() (*http.Response, error) { - return r.ApiService.StartAllTasksExecute(r) -} - -/* -StartAllTasks Start all Butler tasks - -This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: -1. Any tasks not scheduled to run on the current day will be skipped. -2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. -3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. -4. If we are outside the configured window, the task will start immediately. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiStartAllTasksRequest -*/ -func (a *ButlerApiService) StartAllTasks(ctx context.Context) ApiStartAllTasksRequest { - return ApiStartAllTasksRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *ButlerApiService) StartAllTasksExecute(r ApiStartAllTasksRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ButlerApiService.StartAllTasks") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/butler" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiStartTaskRequest struct { - ctx context.Context - ApiService *ButlerApiService - taskName interface{} -} - -func (r ApiStartTaskRequest) Execute() (*http.Response, error) { - return r.ApiService.StartTaskExecute(r) -} - -/* -StartTask Start a single Butler task - -This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: -1. Any tasks not scheduled to run on the current day will be skipped. -2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. -3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. -4. If we are outside the configured window, the task will start immediately. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param taskName the name of the task to be started. - @return ApiStartTaskRequest -*/ -func (a *ButlerApiService) StartTask(ctx context.Context, taskName interface{}) ApiStartTaskRequest { - return ApiStartTaskRequest{ - ApiService: a, - ctx: ctx, - taskName: taskName, - } -} - -// Execute executes the request -func (a *ButlerApiService) StartTaskExecute(r ApiStartTaskRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ButlerApiService.StartTask") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/butler/{taskName}" - localVarPath = strings.Replace(localVarPath, "{"+"taskName"+"}", url.PathEscape(parameterValueToString(r.taskName, "taskName")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiStopAllTasksRequest struct { - ctx context.Context - ApiService *ButlerApiService -} - -func (r ApiStopAllTasksRequest) Execute() (*http.Response, error) { - return r.ApiService.StopAllTasksExecute(r) -} - -/* -StopAllTasks Stop all Butler tasks - -This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiStopAllTasksRequest -*/ -func (a *ButlerApiService) StopAllTasks(ctx context.Context) ApiStopAllTasksRequest { - return ApiStopAllTasksRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *ButlerApiService) StopAllTasksExecute(r ApiStopAllTasksRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ButlerApiService.StopAllTasks") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/butler" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiStopTaskRequest struct { - ctx context.Context - ApiService *ButlerApiService - taskName interface{} -} - -func (r ApiStopTaskRequest) Execute() (*http.Response, error) { - return r.ApiService.StopTaskExecute(r) -} - -/* -StopTask Stop a single Butler task - -This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param taskName The name of the task to be started. - @return ApiStopTaskRequest -*/ -func (a *ButlerApiService) StopTask(ctx context.Context, taskName interface{}) ApiStopTaskRequest { - return ApiStopTaskRequest{ - ApiService: a, - ctx: ctx, - taskName: taskName, - } -} - -// Execute executes the request -func (a *ButlerApiService) StopTaskExecute(r ApiStopTaskRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ButlerApiService.StopTask") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/butler/{taskName}" - localVarPath = strings.Replace(localVarPath, "{"+"taskName"+"}", url.PathEscape(parameterValueToString(r.taskName, "taskName")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/api_hubs.go b/pms/api_hubs.go deleted file mode 100644 index a60550a..0000000 --- a/pms/api_hubs.go +++ /dev/null @@ -1,294 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// HubsApiService HubsApi service -type HubsApiService service - -type ApiGetGlobalHubsRequest struct { - ctx context.Context - ApiService *HubsApiService - count *interface{} - onlyTransient *interface{} -} - -// The number of items to return with each hub. -func (r ApiGetGlobalHubsRequest) Count(count interface{}) ApiGetGlobalHubsRequest { - r.count = &count - return r -} - -// 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). -func (r ApiGetGlobalHubsRequest) OnlyTransient(onlyTransient interface{}) ApiGetGlobalHubsRequest { - r.onlyTransient = &onlyTransient - return r -} - -func (r ApiGetGlobalHubsRequest) Execute() (*http.Response, error) { - return r.ApiService.GetGlobalHubsExecute(r) -} - -/* -GetGlobalHubs Get Global Hubs - -Get Global Hubs filtered by the parameters provided. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetGlobalHubsRequest -*/ -func (a *HubsApiService) GetGlobalHubs(ctx context.Context) ApiGetGlobalHubsRequest { - return ApiGetGlobalHubsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *HubsApiService) GetGlobalHubsExecute(r ApiGetGlobalHubsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HubsApiService.GetGlobalHubs") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/hubs" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.count != nil { - parameterAddToQuery(localVarQueryParams, "count", r.count, "") - } - if r.onlyTransient != nil { - parameterAddToQuery(localVarQueryParams, "onlyTransient", r.onlyTransient, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetLibraryHubsRequest struct { - ctx context.Context - ApiService *HubsApiService - sectionId interface{} - count *interface{} - onlyTransient *interface{} -} - -// The number of items to return with each hub. -func (r ApiGetLibraryHubsRequest) Count(count interface{}) ApiGetLibraryHubsRequest { - r.count = &count - return r -} - -// 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). -func (r ApiGetLibraryHubsRequest) OnlyTransient(onlyTransient interface{}) ApiGetLibraryHubsRequest { - r.onlyTransient = &onlyTransient - return r -} - -func (r ApiGetLibraryHubsRequest) Execute() (*http.Response, error) { - return r.ApiService.GetLibraryHubsExecute(r) -} - -/* -GetLibraryHubs Get library specific hubs - -This endpoint will return a list of library specific hubs - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param sectionId the Id of the library to query - @return ApiGetLibraryHubsRequest -*/ -func (a *HubsApiService) GetLibraryHubs(ctx context.Context, sectionId interface{}) ApiGetLibraryHubsRequest { - return ApiGetLibraryHubsRequest{ - ApiService: a, - ctx: ctx, - sectionId: sectionId, - } -} - -// Execute executes the request -func (a *HubsApiService) GetLibraryHubsExecute(r ApiGetLibraryHubsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "HubsApiService.GetLibraryHubs") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/hubs/sections/{sectionId}" - localVarPath = strings.Replace(localVarPath, "{"+"sectionId"+"}", url.PathEscape(parameterValueToString(r.sectionId, "sectionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.count != nil { - parameterAddToQuery(localVarQueryParams, "count", r.count, "") - } - if r.onlyTransient != nil { - parameterAddToQuery(localVarQueryParams, "onlyTransient", r.onlyTransient, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/api_library.go b/pms/api_library.go deleted file mode 100644 index 958c358..0000000 --- a/pms/api_library.go +++ /dev/null @@ -1,1550 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// LibraryApiService LibraryApi service -type LibraryApiService service - -type ApiDeleteLibraryRequest struct { - ctx context.Context - ApiService *LibraryApiService - sectionId interface{} -} - -func (r ApiDeleteLibraryRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteLibraryExecute(r) -} - -/* -DeleteLibrary Delete Library Section - -Delate a library using a specific section - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param sectionId the Id of the library to query - @return ApiDeleteLibraryRequest -*/ -func (a *LibraryApiService) DeleteLibrary(ctx context.Context, sectionId interface{}) ApiDeleteLibraryRequest { - return ApiDeleteLibraryRequest{ - ApiService: a, - ctx: ctx, - sectionId: sectionId, - } -} - -// Execute executes the request -func (a *LibraryApiService) DeleteLibraryExecute(r ApiDeleteLibraryRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.DeleteLibrary") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/sections/{sectionId}" - localVarPath = strings.Replace(localVarPath, "{"+"sectionId"+"}", url.PathEscape(parameterValueToString(r.sectionId, "sectionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetCommonLibraryItemsRequest struct { - ctx context.Context - ApiService *LibraryApiService - sectionId interface{} - type_ *interface{} - filter *interface{} -} - -// item type -func (r ApiGetCommonLibraryItemsRequest) Type_(type_ interface{}) ApiGetCommonLibraryItemsRequest { - r.type_ = &type_ - return r -} - -// the filter parameter -func (r ApiGetCommonLibraryItemsRequest) Filter(filter interface{}) ApiGetCommonLibraryItemsRequest { - r.filter = &filter - return r -} - -func (r ApiGetCommonLibraryItemsRequest) Execute() (*http.Response, error) { - return r.ApiService.GetCommonLibraryItemsExecute(r) -} - -/* -GetCommonLibraryItems Get Common Library Items - -Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param sectionId the Id of the library to query - @return ApiGetCommonLibraryItemsRequest -*/ -func (a *LibraryApiService) GetCommonLibraryItems(ctx context.Context, sectionId interface{}) ApiGetCommonLibraryItemsRequest { - return ApiGetCommonLibraryItemsRequest{ - ApiService: a, - ctx: ctx, - sectionId: sectionId, - } -} - -// Execute executes the request -func (a *LibraryApiService) GetCommonLibraryItemsExecute(r ApiGetCommonLibraryItemsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.GetCommonLibraryItems") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/sections/{sectionId}/common" - localVarPath = strings.Replace(localVarPath, "{"+"sectionId"+"}", url.PathEscape(parameterValueToString(r.sectionId, "sectionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.type_ == nil { - return nil, reportError("type_ is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "type", r.type_, "") - if r.filter != nil { - parameterAddToQuery(localVarQueryParams, "filter", r.filter, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetFileHashRequest struct { - ctx context.Context - ApiService *LibraryApiService - url *interface{} - type_ *interface{} -} - -// This is the path to the local file, must be prefixed by `file://` -func (r ApiGetFileHashRequest) Url(url interface{}) ApiGetFileHashRequest { - r.url = &url - return r -} - -// Item type -func (r ApiGetFileHashRequest) Type_(type_ interface{}) ApiGetFileHashRequest { - r.type_ = &type_ - return r -} - -func (r ApiGetFileHashRequest) Execute() (*http.Response, error) { - return r.ApiService.GetFileHashExecute(r) -} - -/* -GetFileHash Get Hash Value - -This resource returns hash values for local files - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetFileHashRequest -*/ -func (a *LibraryApiService) GetFileHash(ctx context.Context) ApiGetFileHashRequest { - return ApiGetFileHashRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *LibraryApiService) GetFileHashExecute(r ApiGetFileHashRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.GetFileHash") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/hashes" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.url == nil { - return nil, reportError("url is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "url", r.url, "") - if r.type_ != nil { - parameterAddToQuery(localVarQueryParams, "type", r.type_, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetLatestLibraryItemsRequest struct { - ctx context.Context - ApiService *LibraryApiService - sectionId interface{} - type_ *interface{} - filter *interface{} -} - -// item type -func (r ApiGetLatestLibraryItemsRequest) Type_(type_ interface{}) ApiGetLatestLibraryItemsRequest { - r.type_ = &type_ - return r -} - -// the filter parameter -func (r ApiGetLatestLibraryItemsRequest) Filter(filter interface{}) ApiGetLatestLibraryItemsRequest { - r.filter = &filter - return r -} - -func (r ApiGetLatestLibraryItemsRequest) Execute() (*http.Response, error) { - return r.ApiService.GetLatestLibraryItemsExecute(r) -} - -/* -GetLatestLibraryItems Get Latest Library Items - -This endpoint will return a list of the latest library items filtered by the filter and type provided - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param sectionId the Id of the library to query - @return ApiGetLatestLibraryItemsRequest -*/ -func (a *LibraryApiService) GetLatestLibraryItems(ctx context.Context, sectionId interface{}) ApiGetLatestLibraryItemsRequest { - return ApiGetLatestLibraryItemsRequest{ - ApiService: a, - ctx: ctx, - sectionId: sectionId, - } -} - -// Execute executes the request -func (a *LibraryApiService) GetLatestLibraryItemsExecute(r ApiGetLatestLibraryItemsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.GetLatestLibraryItems") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/sections/{sectionId}/latest" - localVarPath = strings.Replace(localVarPath, "{"+"sectionId"+"}", url.PathEscape(parameterValueToString(r.sectionId, "sectionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.type_ == nil { - return nil, reportError("type_ is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "type", r.type_, "") - if r.filter != nil { - parameterAddToQuery(localVarQueryParams, "filter", r.filter, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetLibrariesRequest struct { - ctx context.Context - ApiService *LibraryApiService -} - -func (r ApiGetLibrariesRequest) Execute() (*http.Response, error) { - return r.ApiService.GetLibrariesExecute(r) -} - -/* -GetLibraries Get All Libraries - -A library section (commonly referred to as just a library) is a collection of media. -Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. -For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. - -Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. -This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetLibrariesRequest -*/ -func (a *LibraryApiService) GetLibraries(ctx context.Context) ApiGetLibrariesRequest { - return ApiGetLibrariesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *LibraryApiService) GetLibrariesExecute(r ApiGetLibrariesRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.GetLibraries") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/sections" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetLibraryRequest struct { - ctx context.Context - ApiService *LibraryApiService - sectionId interface{} - includeDetails *interface{} -} - -// 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. -func (r ApiGetLibraryRequest) IncludeDetails(includeDetails interface{}) ApiGetLibraryRequest { - r.includeDetails = &includeDetails - return r -} - -func (r ApiGetLibraryRequest) Execute() (*http.Response, error) { - return r.ApiService.GetLibraryExecute(r) -} - -/* -GetLibrary Get Library Details - -Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. These details are: - -- A list of `Directory` objects: These used to be used by clients to build a menuing system. There are four flavors of directory found here: - - Primary: (e.g. all, On Deck) These are still used in some clients to provide "shortcuts" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users. - - Secondary: These are marked with `secondary="1"` and were used by old clients to provide nested menus allowing for primative (but structured) navigation. - - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `search="1"` which used to be used to allow clients to build search dialogs on the fly. -- A list of `Type` objects: These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won't render any filtering controls. The `Type` object contains: - - `key`: This provides the root endpoint returning the actual media list for the type. - - `type`: This is the metadata type for the type (if a standard Plex type). - - `title`: The title for for the content of this type (e.g. "Movies"). -- Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an inportant subset useful for top-level API. - - `filter`: This represents the filter name used for the filter, which can be used to construct complex media queries with. - - `filterType`: This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter. - - `key`: This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a "Genre" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element. - - `title`: The title for the filter. -- Each `Sort` object contains a description of the sort field. - - `defaultDirection`: Can be either `asc` or `desc`, and specifies the default direction for the sort field (e.g. titles default to alphabetically ascending). - - `descKey` and `key`: Contains the parameters passed to the `sort=...` media query for each direction of the sort. - - `title`: The title of the field. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param sectionId the Id of the library to query - @return ApiGetLibraryRequest -*/ -func (a *LibraryApiService) GetLibrary(ctx context.Context, sectionId interface{}) ApiGetLibraryRequest { - return ApiGetLibraryRequest{ - ApiService: a, - ctx: ctx, - sectionId: sectionId, - } -} - -// Execute executes the request -func (a *LibraryApiService) GetLibraryExecute(r ApiGetLibraryRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.GetLibrary") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/sections/{sectionId}" - localVarPath = strings.Replace(localVarPath, "{"+"sectionId"+"}", url.PathEscape(parameterValueToString(r.sectionId, "sectionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.includeDetails != nil { - parameterAddToQuery(localVarQueryParams, "includeDetails", r.includeDetails, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetLibraryItemsRequest struct { - ctx context.Context - ApiService *LibraryApiService - sectionId interface{} - type_ *interface{} - filter *interface{} -} - -// item type -func (r ApiGetLibraryItemsRequest) Type_(type_ interface{}) ApiGetLibraryItemsRequest { - r.type_ = &type_ - return r -} - -// the filter parameter -func (r ApiGetLibraryItemsRequest) Filter(filter interface{}) ApiGetLibraryItemsRequest { - r.filter = &filter - return r -} - -func (r ApiGetLibraryItemsRequest) Execute() (*http.Response, error) { - return r.ApiService.GetLibraryItemsExecute(r) -} - -/* -GetLibraryItems Get Library Items - -This endpoint will return a list of library items filtered by the filter and type provided - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param sectionId the Id of the library to query - @return ApiGetLibraryItemsRequest -*/ -func (a *LibraryApiService) GetLibraryItems(ctx context.Context, sectionId interface{}) ApiGetLibraryItemsRequest { - return ApiGetLibraryItemsRequest{ - ApiService: a, - ctx: ctx, - sectionId: sectionId, - } -} - -// Execute executes the request -func (a *LibraryApiService) GetLibraryItemsExecute(r ApiGetLibraryItemsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.GetLibraryItems") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/sections/{sectionId}/all" - localVarPath = strings.Replace(localVarPath, "{"+"sectionId"+"}", url.PathEscape(parameterValueToString(r.sectionId, "sectionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.type_ != nil { - parameterAddToQuery(localVarQueryParams, "type", r.type_, "") - } - if r.filter != nil { - parameterAddToQuery(localVarQueryParams, "filter", r.filter, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetMetadataRequest struct { - ctx context.Context - ApiService *LibraryApiService - ratingKey interface{} -} - -func (r ApiGetMetadataRequest) Execute() (*http.Response, error) { - return r.ApiService.GetMetadataExecute(r) -} - -/* -GetMetadata Get Items Metadata - -This endpoint will return the metadata of a library item specified with the ratingKey. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ratingKey the id of the library item to return the children of. - @return ApiGetMetadataRequest -*/ -func (a *LibraryApiService) GetMetadata(ctx context.Context, ratingKey interface{}) ApiGetMetadataRequest { - return ApiGetMetadataRequest{ - ApiService: a, - ctx: ctx, - ratingKey: ratingKey, - } -} - -// Execute executes the request -func (a *LibraryApiService) GetMetadataExecute(r ApiGetMetadataRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.GetMetadata") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/metadata/{ratingKey}" - localVarPath = strings.Replace(localVarPath, "{"+"ratingKey"+"}", url.PathEscape(parameterValueToString(r.ratingKey, "ratingKey")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetMetadataChildrenRequest struct { - ctx context.Context - ApiService *LibraryApiService - ratingKey interface{} -} - -func (r ApiGetMetadataChildrenRequest) Execute() (*http.Response, error) { - return r.ApiService.GetMetadataChildrenExecute(r) -} - -/* -GetMetadataChildren Get Items Children - -This endpoint will return the children of of a library item specified with the ratingKey. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ratingKey the id of the library item to return the children of. - @return ApiGetMetadataChildrenRequest -*/ -func (a *LibraryApiService) GetMetadataChildren(ctx context.Context, ratingKey interface{}) ApiGetMetadataChildrenRequest { - return ApiGetMetadataChildrenRequest{ - ApiService: a, - ctx: ctx, - ratingKey: ratingKey, - } -} - -// Execute executes the request -func (a *LibraryApiService) GetMetadataChildrenExecute(r ApiGetMetadataChildrenRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.GetMetadataChildren") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/metadata/{ratingKey}/children" - localVarPath = strings.Replace(localVarPath, "{"+"ratingKey"+"}", url.PathEscape(parameterValueToString(r.ratingKey, "ratingKey")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetOnDeckRequest struct { - ctx context.Context - ApiService *LibraryApiService -} - -func (r ApiGetOnDeckRequest) Execute() (*GetOnDeck200Response, *http.Response, error) { - return r.ApiService.GetOnDeckExecute(r) -} - -/* -GetOnDeck Get On Deck - -This endpoint will return the on deck content. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetOnDeckRequest -*/ -func (a *LibraryApiService) GetOnDeck(ctx context.Context) ApiGetOnDeckRequest { - return ApiGetOnDeckRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetOnDeck200Response -func (a *LibraryApiService) GetOnDeckExecute(r ApiGetOnDeckRequest) (*GetOnDeck200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetOnDeck200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.GetOnDeck") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/onDeck" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRecentlyAddedRequest struct { - ctx context.Context - ApiService *LibraryApiService -} - -func (r ApiGetRecentlyAddedRequest) Execute() (*GetRecentlyAdded200Response, *http.Response, error) { - return r.ApiService.GetRecentlyAddedExecute(r) -} - -/* -GetRecentlyAdded Get Recently Added - -This endpoint will return the recently added content. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetRecentlyAddedRequest -*/ -func (a *LibraryApiService) GetRecentlyAdded(ctx context.Context) ApiGetRecentlyAddedRequest { - return ApiGetRecentlyAddedRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetRecentlyAdded200Response -func (a *LibraryApiService) GetRecentlyAddedExecute(r ApiGetRecentlyAddedRequest) (*GetRecentlyAdded200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetRecentlyAdded200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.GetRecentlyAdded") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/recentlyAdded" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRefreshLibraryRequest struct { - ctx context.Context - ApiService *LibraryApiService - sectionId interface{} -} - -func (r ApiRefreshLibraryRequest) Execute() (*http.Response, error) { - return r.ApiService.RefreshLibraryExecute(r) -} - -/* -RefreshLibrary Refresh Library - -This endpoint Refreshes the library. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param sectionId the Id of the library to refresh - @return ApiRefreshLibraryRequest -*/ -func (a *LibraryApiService) RefreshLibrary(ctx context.Context, sectionId interface{}) ApiRefreshLibraryRequest { - return ApiRefreshLibraryRequest{ - ApiService: a, - ctx: ctx, - sectionId: sectionId, - } -} - -// Execute executes the request -func (a *LibraryApiService) RefreshLibraryExecute(r ApiRefreshLibraryRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LibraryApiService.RefreshLibrary") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/library/sections/{sectionId}/refresh" - localVarPath = strings.Replace(localVarPath, "{"+"sectionId"+"}", url.PathEscape(parameterValueToString(r.sectionId, "sectionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/api_log.go b/pms/api_log.go deleted file mode 100644 index bcb1d40..0000000 --- a/pms/api_log.go +++ /dev/null @@ -1,396 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// LogApiService LogApi service -type LogApiService service - -type ApiEnablePaperTrailRequest struct { - ctx context.Context - ApiService *LogApiService -} - -func (r ApiEnablePaperTrailRequest) Execute() (*http.Response, error) { - return r.ApiService.EnablePaperTrailExecute(r) -} - -/* -EnablePaperTrail Enabling Papertrail - -This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiEnablePaperTrailRequest -*/ -func (a *LogApiService) EnablePaperTrail(ctx context.Context) ApiEnablePaperTrailRequest { - return ApiEnablePaperTrailRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *LogApiService) EnablePaperTrailExecute(r ApiEnablePaperTrailRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogApiService.EnablePaperTrail") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/log/networked" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiLogLineRequest struct { - ctx context.Context - ApiService *LogApiService - level *interface{} - message *interface{} - source *interface{} -} - -// An integer log level to write to the PMS log with. 0: Error 1: Warning 2: Info 3: Debug 4: Verbose -func (r ApiLogLineRequest) Level(level interface{}) ApiLogLineRequest { - r.level = &level - return r -} - -// The text of the message to write to the log. -func (r ApiLogLineRequest) Message(message interface{}) ApiLogLineRequest { - r.message = &message - return r -} - -// a string indicating the source of the message. -func (r ApiLogLineRequest) Source(source interface{}) ApiLogLineRequest { - r.source = &source - return r -} - -func (r ApiLogLineRequest) Execute() (*http.Response, error) { - return r.ApiService.LogLineExecute(r) -} - -/* -LogLine Logging a single line message. - -This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLogLineRequest -*/ -func (a *LogApiService) LogLine(ctx context.Context) ApiLogLineRequest { - return ApiLogLineRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *LogApiService) LogLineExecute(r ApiLogLineRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogApiService.LogLine") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/log" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.level == nil { - return nil, reportError("level is required and must be specified") - } - if r.message == nil { - return nil, reportError("message is required and must be specified") - } - if r.source == nil { - return nil, reportError("source is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "level", r.level, "") - parameterAddToQuery(localVarQueryParams, "message", r.message, "") - parameterAddToQuery(localVarQueryParams, "source", r.source, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiLogMultiLineRequest struct { - ctx context.Context - ApiService *LogApiService -} - -func (r ApiLogMultiLineRequest) Execute() (*http.Response, error) { - return r.ApiService.LogMultiLineExecute(r) -} - -/* -LogMultiLine Logging a multi-line message - -This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above GET endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLogMultiLineRequest -*/ -func (a *LogApiService) LogMultiLine(ctx context.Context) ApiLogMultiLineRequest { - return ApiLogMultiLineRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *LogApiService) LogMultiLineExecute(r ApiLogMultiLineRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogApiService.LogMultiLine") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/log" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/api_media.go b/pms/api_media.go deleted file mode 100644 index f4f86f1..0000000 --- a/pms/api_media.go +++ /dev/null @@ -1,416 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// MediaApiService MediaApi service -type MediaApiService service - -type ApiMarkPlayedRequest struct { - ctx context.Context - ApiService *MediaApiService - key *interface{} -} - -// The media key to mark as played -func (r ApiMarkPlayedRequest) Key(key interface{}) ApiMarkPlayedRequest { - r.key = &key - return r -} - -func (r ApiMarkPlayedRequest) Execute() (*http.Response, error) { - return r.ApiService.MarkPlayedExecute(r) -} - -/* -MarkPlayed Mark Media Played - -This will mark the provided media key as Played. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiMarkPlayedRequest -*/ -func (a *MediaApiService) MarkPlayed(ctx context.Context) ApiMarkPlayedRequest { - return ApiMarkPlayedRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *MediaApiService) MarkPlayedExecute(r ApiMarkPlayedRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MediaApiService.MarkPlayed") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/:/scrobble" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.key == nil { - return nil, reportError("key is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "key", r.key, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiMarkUnplayedRequest struct { - ctx context.Context - ApiService *MediaApiService - key *interface{} -} - -// The media key to mark as Unplayed -func (r ApiMarkUnplayedRequest) Key(key interface{}) ApiMarkUnplayedRequest { - r.key = &key - return r -} - -func (r ApiMarkUnplayedRequest) Execute() (*http.Response, error) { - return r.ApiService.MarkUnplayedExecute(r) -} - -/* -MarkUnplayed Mark Media Unplayed - -This will mark the provided media key as Unplayed. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiMarkUnplayedRequest -*/ -func (a *MediaApiService) MarkUnplayed(ctx context.Context) ApiMarkUnplayedRequest { - return ApiMarkUnplayedRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *MediaApiService) MarkUnplayedExecute(r ApiMarkUnplayedRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MediaApiService.MarkUnplayed") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/:/unscrobble" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.key == nil { - return nil, reportError("key is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "key", r.key, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiUpdatePlayProgressRequest struct { - ctx context.Context - ApiService *MediaApiService - key *interface{} - time *interface{} - state *interface{} -} - -// the media key -func (r ApiUpdatePlayProgressRequest) Key(key interface{}) ApiUpdatePlayProgressRequest { - r.key = &key - return r -} - -// The time, in milliseconds, used to set the media playback progress. -func (r ApiUpdatePlayProgressRequest) Time(time interface{}) ApiUpdatePlayProgressRequest { - r.time = &time - return r -} - -// The playback state of the media item. -func (r ApiUpdatePlayProgressRequest) State(state interface{}) ApiUpdatePlayProgressRequest { - r.state = &state - return r -} - -func (r ApiUpdatePlayProgressRequest) Execute() (*http.Response, error) { - return r.ApiService.UpdatePlayProgressExecute(r) -} - -/* -UpdatePlayProgress Update Media Play Progress - -This API command can be used to update the play progress of a media item. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUpdatePlayProgressRequest -*/ -func (a *MediaApiService) UpdatePlayProgress(ctx context.Context) ApiUpdatePlayProgressRequest { - return ApiUpdatePlayProgressRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *MediaApiService) UpdatePlayProgressExecute(r ApiUpdatePlayProgressRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MediaApiService.UpdatePlayProgress") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/:/progress" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.key == nil { - return nil, reportError("key is required and must be specified") - } - if r.time == nil { - return nil, reportError("time is required and must be specified") - } - if r.state == nil { - return nil, reportError("state is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "key", r.key, "") - parameterAddToQuery(localVarQueryParams, "time", r.time, "") - parameterAddToQuery(localVarQueryParams, "state", r.state, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/api_playlists.go b/pms/api_playlists.go deleted file mode 100644 index 554de82..0000000 --- a/pms/api_playlists.go +++ /dev/null @@ -1,1200 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// PlaylistsApiService PlaylistsApi service -type PlaylistsApiService service - -type ApiAddPlaylistContentsRequest struct { - ctx context.Context - ApiService *PlaylistsApiService - playlistID interface{} - uri *interface{} - playQueueID *interface{} -} - -// the content URI for the playlist -func (r ApiAddPlaylistContentsRequest) Uri(uri interface{}) ApiAddPlaylistContentsRequest { - r.uri = &uri - return r -} - -// the play queue to add to a playlist -func (r ApiAddPlaylistContentsRequest) PlayQueueID(playQueueID interface{}) ApiAddPlaylistContentsRequest { - r.playQueueID = &playQueueID - return r -} - -func (r ApiAddPlaylistContentsRequest) Execute() (*http.Response, error) { - return r.ApiService.AddPlaylistContentsExecute(r) -} - -/* -AddPlaylistContents Adding to a Playlist - -Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. -With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param playlistID the ID of the playlist - @return ApiAddPlaylistContentsRequest -*/ -func (a *PlaylistsApiService) AddPlaylistContents(ctx context.Context, playlistID interface{}) ApiAddPlaylistContentsRequest { - return ApiAddPlaylistContentsRequest{ - ApiService: a, - ctx: ctx, - playlistID: playlistID, - } -} - -// Execute executes the request -func (a *PlaylistsApiService) AddPlaylistContentsExecute(r ApiAddPlaylistContentsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlaylistsApiService.AddPlaylistContents") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/playlists/{playlistID}/items" - localVarPath = strings.Replace(localVarPath, "{"+"playlistID"+"}", url.PathEscape(parameterValueToString(r.playlistID, "playlistID")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.uri == nil { - return nil, reportError("uri is required and must be specified") - } - if r.playQueueID == nil { - return nil, reportError("playQueueID is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "uri", r.uri, "") - parameterAddToQuery(localVarQueryParams, "playQueueID", r.playQueueID, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiClearPlaylistContentsRequest struct { - ctx context.Context - ApiService *PlaylistsApiService - playlistID interface{} -} - -func (r ApiClearPlaylistContentsRequest) Execute() (*http.Response, error) { - return r.ApiService.ClearPlaylistContentsExecute(r) -} - -/* -ClearPlaylistContents Delete Playlist Contents - -Clears a playlist, only works with dumb playlists. Returns the playlist. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param playlistID the ID of the playlist - @return ApiClearPlaylistContentsRequest -*/ -func (a *PlaylistsApiService) ClearPlaylistContents(ctx context.Context, playlistID interface{}) ApiClearPlaylistContentsRequest { - return ApiClearPlaylistContentsRequest{ - ApiService: a, - ctx: ctx, - playlistID: playlistID, - } -} - -// Execute executes the request -func (a *PlaylistsApiService) ClearPlaylistContentsExecute(r ApiClearPlaylistContentsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlaylistsApiService.ClearPlaylistContents") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/playlists/{playlistID}/items" - localVarPath = strings.Replace(localVarPath, "{"+"playlistID"+"}", url.PathEscape(parameterValueToString(r.playlistID, "playlistID")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiCreatePlaylistRequest struct { - ctx context.Context - ApiService *PlaylistsApiService - title *interface{} - type_ *interface{} - smart *interface{} - uri *interface{} - playQueueID *interface{} -} - -// name of the playlist -func (r ApiCreatePlaylistRequest) Title(title interface{}) ApiCreatePlaylistRequest { - r.title = &title - return r -} - -// type of playlist to create -func (r ApiCreatePlaylistRequest) Type_(type_ interface{}) ApiCreatePlaylistRequest { - r.type_ = &type_ - return r -} - -// whether the playlist is smart or not -func (r ApiCreatePlaylistRequest) Smart(smart interface{}) ApiCreatePlaylistRequest { - r.smart = &smart - return r -} - -// the content URI for the playlist -func (r ApiCreatePlaylistRequest) Uri(uri interface{}) ApiCreatePlaylistRequest { - r.uri = &uri - return r -} - -// the play queue to copy to a playlist -func (r ApiCreatePlaylistRequest) PlayQueueID(playQueueID interface{}) ApiCreatePlaylistRequest { - r.playQueueID = &playQueueID - return r -} - -func (r ApiCreatePlaylistRequest) Execute() (*http.Response, error) { - return r.ApiService.CreatePlaylistExecute(r) -} - -/* -CreatePlaylist Create a Playlist - -Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: -- `uri` - The content URI for what we're playing (e.g. `library://...`). -- `playQueueID` - To create a playlist from an existing play queue. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreatePlaylistRequest -*/ -func (a *PlaylistsApiService) CreatePlaylist(ctx context.Context) ApiCreatePlaylistRequest { - return ApiCreatePlaylistRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *PlaylistsApiService) CreatePlaylistExecute(r ApiCreatePlaylistRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlaylistsApiService.CreatePlaylist") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/playlists" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.title == nil { - return nil, reportError("title is required and must be specified") - } - if r.type_ == nil { - return nil, reportError("type_ is required and must be specified") - } - if r.smart == nil { - return nil, reportError("smart is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "title", r.title, "") - parameterAddToQuery(localVarQueryParams, "type", r.type_, "") - parameterAddToQuery(localVarQueryParams, "smart", r.smart, "") - if r.uri != nil { - parameterAddToQuery(localVarQueryParams, "uri", r.uri, "") - } - if r.playQueueID != nil { - parameterAddToQuery(localVarQueryParams, "playQueueID", r.playQueueID, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeletePlaylistRequest struct { - ctx context.Context - ApiService *PlaylistsApiService - playlistID interface{} -} - -func (r ApiDeletePlaylistRequest) Execute() (*http.Response, error) { - return r.ApiService.DeletePlaylistExecute(r) -} - -/* -DeletePlaylist Deletes a Playlist - -This endpoint will delete a playlist - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param playlistID the ID of the playlist - @return ApiDeletePlaylistRequest -*/ -func (a *PlaylistsApiService) DeletePlaylist(ctx context.Context, playlistID interface{}) ApiDeletePlaylistRequest { - return ApiDeletePlaylistRequest{ - ApiService: a, - ctx: ctx, - playlistID: playlistID, - } -} - -// Execute executes the request -func (a *PlaylistsApiService) DeletePlaylistExecute(r ApiDeletePlaylistRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlaylistsApiService.DeletePlaylist") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/playlists/{playlistID}" - localVarPath = strings.Replace(localVarPath, "{"+"playlistID"+"}", url.PathEscape(parameterValueToString(r.playlistID, "playlistID")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetPlaylistRequest struct { - ctx context.Context - ApiService *PlaylistsApiService - playlistID interface{} -} - -func (r ApiGetPlaylistRequest) Execute() (*http.Response, error) { - return r.ApiService.GetPlaylistExecute(r) -} - -/* -GetPlaylist Retrieve Playlist - -Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: -Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param playlistID the ID of the playlist - @return ApiGetPlaylistRequest -*/ -func (a *PlaylistsApiService) GetPlaylist(ctx context.Context, playlistID interface{}) ApiGetPlaylistRequest { - return ApiGetPlaylistRequest{ - ApiService: a, - ctx: ctx, - playlistID: playlistID, - } -} - -// Execute executes the request -func (a *PlaylistsApiService) GetPlaylistExecute(r ApiGetPlaylistRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlaylistsApiService.GetPlaylist") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/playlists/{playlistID}" - localVarPath = strings.Replace(localVarPath, "{"+"playlistID"+"}", url.PathEscape(parameterValueToString(r.playlistID, "playlistID")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetPlaylistContentsRequest struct { - ctx context.Context - ApiService *PlaylistsApiService - playlistID interface{} - type_ *interface{} -} - -// the metadata type of the item to return -func (r ApiGetPlaylistContentsRequest) Type_(type_ interface{}) ApiGetPlaylistContentsRequest { - r.type_ = &type_ - return r -} - -func (r ApiGetPlaylistContentsRequest) Execute() (*http.Response, error) { - return r.ApiService.GetPlaylistContentsExecute(r) -} - -/* -GetPlaylistContents Retrieve Playlist Contents - -Gets the contents of a playlist. Should be paged by clients via standard mechanisms. -By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. -For example, you could use this to display a list of recently added albums vis a smart playlist. -Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param playlistID the ID of the playlist - @return ApiGetPlaylistContentsRequest -*/ -func (a *PlaylistsApiService) GetPlaylistContents(ctx context.Context, playlistID interface{}) ApiGetPlaylistContentsRequest { - return ApiGetPlaylistContentsRequest{ - ApiService: a, - ctx: ctx, - playlistID: playlistID, - } -} - -// Execute executes the request -func (a *PlaylistsApiService) GetPlaylistContentsExecute(r ApiGetPlaylistContentsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlaylistsApiService.GetPlaylistContents") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/playlists/{playlistID}/items" - localVarPath = strings.Replace(localVarPath, "{"+"playlistID"+"}", url.PathEscape(parameterValueToString(r.playlistID, "playlistID")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.type_ == nil { - return nil, reportError("type_ is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "type", r.type_, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetPlaylistsRequest struct { - ctx context.Context - ApiService *PlaylistsApiService - playlistType *interface{} - smart *interface{} -} - -// limit to a type of playlist. -func (r ApiGetPlaylistsRequest) PlaylistType(playlistType interface{}) ApiGetPlaylistsRequest { - r.playlistType = &playlistType - return r -} - -// type of playlists to return (default is all). -func (r ApiGetPlaylistsRequest) Smart(smart interface{}) ApiGetPlaylistsRequest { - r.smart = &smart - return r -} - -func (r ApiGetPlaylistsRequest) Execute() (*http.Response, error) { - return r.ApiService.GetPlaylistsExecute(r) -} - -/* -GetPlaylists Get All Playlists - -Get All Playlists given the specified filters. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetPlaylistsRequest -*/ -func (a *PlaylistsApiService) GetPlaylists(ctx context.Context) ApiGetPlaylistsRequest { - return ApiGetPlaylistsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *PlaylistsApiService) GetPlaylistsExecute(r ApiGetPlaylistsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlaylistsApiService.GetPlaylists") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/playlists/all" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.playlistType != nil { - parameterAddToQuery(localVarQueryParams, "playlistType", r.playlistType, "") - } - if r.smart != nil { - parameterAddToQuery(localVarQueryParams, "smart", r.smart, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiUpdatePlaylistRequest struct { - ctx context.Context - ApiService *PlaylistsApiService - playlistID interface{} -} - -func (r ApiUpdatePlaylistRequest) Execute() (*http.Response, error) { - return r.ApiService.UpdatePlaylistExecute(r) -} - -/* -UpdatePlaylist Update a Playlist - -From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param playlistID the ID of the playlist - @return ApiUpdatePlaylistRequest -*/ -func (a *PlaylistsApiService) UpdatePlaylist(ctx context.Context, playlistID interface{}) ApiUpdatePlaylistRequest { - return ApiUpdatePlaylistRequest{ - ApiService: a, - ctx: ctx, - playlistID: playlistID, - } -} - -// Execute executes the request -func (a *PlaylistsApiService) UpdatePlaylistExecute(r ApiUpdatePlaylistRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlaylistsApiService.UpdatePlaylist") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/playlists/{playlistID}" - localVarPath = strings.Replace(localVarPath, "{"+"playlistID"+"}", url.PathEscape(parameterValueToString(r.playlistID, "playlistID")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiUploadPlaylistRequest struct { - ctx context.Context - ApiService *PlaylistsApiService - path *interface{} - force *interface{} -} - -// 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. -func (r ApiUploadPlaylistRequest) Path(path interface{}) ApiUploadPlaylistRequest { - r.path = &path - return r -} - -// 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. -func (r ApiUploadPlaylistRequest) Force(force interface{}) ApiUploadPlaylistRequest { - r.force = &force - return r -} - -func (r ApiUploadPlaylistRequest) Execute() (*http.Response, error) { - return r.ApiService.UploadPlaylistExecute(r) -} - -/* -UploadPlaylist Upload Playlist - -Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUploadPlaylistRequest -*/ -func (a *PlaylistsApiService) UploadPlaylist(ctx context.Context) ApiUploadPlaylistRequest { - return ApiUploadPlaylistRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *PlaylistsApiService) UploadPlaylistExecute(r ApiUploadPlaylistRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlaylistsApiService.UploadPlaylist") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/playlists/upload" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.path == nil { - return nil, reportError("path is required and must be specified") - } - if r.force == nil { - return nil, reportError("force is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "path", r.path, "") - parameterAddToQuery(localVarQueryParams, "force", r.force, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/api_search.go b/pms/api_search.go deleted file mode 100644 index 4a31384..0000000 --- a/pms/api_search.go +++ /dev/null @@ -1,460 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// SearchApiService SearchApi service -type SearchApiService service - -type ApiGetSearchResultsRequest struct { - ctx context.Context - ApiService *SearchApiService - query *interface{} -} - -// The search query string to use -func (r ApiGetSearchResultsRequest) Query(query interface{}) ApiGetSearchResultsRequest { - r.query = &query - return r -} - -func (r ApiGetSearchResultsRequest) Execute() (*GetSearchResults200Response, *http.Response, error) { - return r.ApiService.GetSearchResultsExecute(r) -} - -/* -GetSearchResults Get Search Results - -This will search the database for the string provided. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetSearchResultsRequest -*/ -func (a *SearchApiService) GetSearchResults(ctx context.Context) ApiGetSearchResultsRequest { - return ApiGetSearchResultsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetSearchResults200Response -func (a *SearchApiService) GetSearchResultsExecute(r ApiGetSearchResultsRequest) (*GetSearchResults200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetSearchResults200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SearchApiService.GetSearchResults") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/search" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.query == nil { - return localVarReturnValue, nil, reportError("query is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "query", r.query, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPerformSearchRequest struct { - ctx context.Context - ApiService *SearchApiService - query *interface{} - sectionId *interface{} - limit *interface{} -} - -// The query term -func (r ApiPerformSearchRequest) Query(query interface{}) ApiPerformSearchRequest { - r.query = &query - return r -} - -// This gives context to the search, and can result in re-ordering of search result hubs -func (r ApiPerformSearchRequest) SectionId(sectionId interface{}) ApiPerformSearchRequest { - r.sectionId = §ionId - return r -} - -// The number of items to return per hub -func (r ApiPerformSearchRequest) Limit(limit interface{}) ApiPerformSearchRequest { - r.limit = &limit - return r -} - -func (r ApiPerformSearchRequest) Execute() (*http.Response, error) { - return r.ApiService.PerformSearchExecute(r) -} - -/* -PerformSearch Perform a search - -This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). - -In the response's items, the following extra attributes are returned to further describe or disambiguate the result: - -- `reason`: The reason for the result, if not because of a direct search term match; can be either: - - `section`: There are multiple identical results from different sections. - - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). - - ``: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor` -- `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold"). -- `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. - -This request is intended to be very fast, and called as the user types. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPerformSearchRequest -*/ -func (a *SearchApiService) PerformSearch(ctx context.Context) ApiPerformSearchRequest { - return ApiPerformSearchRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *SearchApiService) PerformSearchExecute(r ApiPerformSearchRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SearchApiService.PerformSearch") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/hubs/search" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.query == nil { - return nil, reportError("query is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "query", r.query, "") - if r.sectionId != nil { - parameterAddToQuery(localVarQueryParams, "sectionId", r.sectionId, "") - } - if r.limit != nil { - parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiPerformVoiceSearchRequest struct { - ctx context.Context - ApiService *SearchApiService - query *interface{} - sectionId *interface{} - limit *interface{} -} - -// The query term -func (r ApiPerformVoiceSearchRequest) Query(query interface{}) ApiPerformVoiceSearchRequest { - r.query = &query - return r -} - -// This gives context to the search, and can result in re-ordering of search result hubs -func (r ApiPerformVoiceSearchRequest) SectionId(sectionId interface{}) ApiPerformVoiceSearchRequest { - r.sectionId = §ionId - return r -} - -// The number of items to return per hub -func (r ApiPerformVoiceSearchRequest) Limit(limit interface{}) ApiPerformVoiceSearchRequest { - r.limit = &limit - return r -} - -func (r ApiPerformVoiceSearchRequest) Execute() (*http.Response, error) { - return r.ApiService.PerformVoiceSearchExecute(r) -} - -/* -PerformVoiceSearch Perform a voice search - -This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. -It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. -Whenever possible, clients should limit the search to the appropriate type. -Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPerformVoiceSearchRequest -*/ -func (a *SearchApiService) PerformVoiceSearch(ctx context.Context) ApiPerformVoiceSearchRequest { - return ApiPerformVoiceSearchRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *SearchApiService) PerformVoiceSearchExecute(r ApiPerformVoiceSearchRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SearchApiService.PerformVoiceSearch") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/hubs/search/voice" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.query == nil { - return nil, reportError("query is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "query", r.query, "") - if r.sectionId != nil { - parameterAddToQuery(localVarQueryParams, "sectionId", r.sectionId, "") - } - if r.limit != nil { - parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/api_security.go b/pms/api_security.go deleted file mode 100644 index af014eb..0000000 --- a/pms/api_security.go +++ /dev/null @@ -1,284 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// SecurityApiService SecurityApi service -type SecurityApiService service - -type ApiGetSourceConnectionInformationRequest struct { - ctx context.Context - ApiService *SecurityApiService - source *interface{} -} - -// The source identifier with an included prefix. -func (r ApiGetSourceConnectionInformationRequest) Source(source interface{}) ApiGetSourceConnectionInformationRequest { - r.source = &source - return r -} - -func (r ApiGetSourceConnectionInformationRequest) Execute() (*http.Response, error) { - return r.ApiService.GetSourceConnectionInformationExecute(r) -} - -/* -GetSourceConnectionInformation Get Source Connection Information - -If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. -Note: requires Plex Media Server >= 1.15.4. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetSourceConnectionInformationRequest -*/ -func (a *SecurityApiService) GetSourceConnectionInformation(ctx context.Context) ApiGetSourceConnectionInformationRequest { - return ApiGetSourceConnectionInformationRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *SecurityApiService) GetSourceConnectionInformationExecute(r ApiGetSourceConnectionInformationRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SecurityApiService.GetSourceConnectionInformation") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/security/resources" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.source == nil { - return nil, reportError("source is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "source", r.source, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetTransientTokenRequest struct { - ctx context.Context - ApiService *SecurityApiService - type_ *interface{} - scope *interface{} -} - -// `delegation` - This is the only supported `type` parameter. -func (r ApiGetTransientTokenRequest) Type_(type_ interface{}) ApiGetTransientTokenRequest { - r.type_ = &type_ - return r -} - -// `all` - This is the only supported `scope` parameter. -func (r ApiGetTransientTokenRequest) Scope(scope interface{}) ApiGetTransientTokenRequest { - r.scope = &scope - return r -} - -func (r ApiGetTransientTokenRequest) Execute() (*http.Response, error) { - return r.ApiService.GetTransientTokenExecute(r) -} - -/* -GetTransientToken Get a Transient Token. - -This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetTransientTokenRequest -*/ -func (a *SecurityApiService) GetTransientToken(ctx context.Context) ApiGetTransientTokenRequest { - return ApiGetTransientTokenRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *SecurityApiService) GetTransientTokenExecute(r ApiGetTransientTokenRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SecurityApiService.GetTransientToken") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/security/token" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.type_ == nil { - return nil, reportError("type_ is required and must be specified") - } - if r.scope == nil { - return nil, reportError("scope is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "type", r.type_, "") - parameterAddToQuery(localVarQueryParams, "scope", r.scope, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/api_server.go b/pms/api_server.go deleted file mode 100644 index 79c9b94..0000000 --- a/pms/api_server.go +++ /dev/null @@ -1,1070 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// ServerApiService ServerApi service -type ServerApiService service - -type ApiGetAvailableClientsRequest struct { - ctx context.Context - ApiService *ServerApiService -} - -func (r ApiGetAvailableClientsRequest) Execute() (interface{}, *http.Response, error) { - return r.ApiService.GetAvailableClientsExecute(r) -} - -/* -GetAvailableClients Get Available Clients - -Get Available Clients - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetAvailableClientsRequest -*/ -func (a *ServerApiService) GetAvailableClients(ctx context.Context) ApiGetAvailableClientsRequest { - return ApiGetAvailableClientsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return interface{} -func (a *ServerApiService) GetAvailableClientsExecute(r ApiGetAvailableClientsRequest) (interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServerApiService.GetAvailableClients") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/clients" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetDevicesRequest struct { - ctx context.Context - ApiService *ServerApiService -} - -func (r ApiGetDevicesRequest) Execute() (*GetDevices200Response, *http.Response, error) { - return r.ApiService.GetDevicesExecute(r) -} - -/* -GetDevices Get Devices - -Get Devices - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetDevicesRequest -*/ -func (a *ServerApiService) GetDevices(ctx context.Context) ApiGetDevicesRequest { - return ApiGetDevicesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetDevices200Response -func (a *ServerApiService) GetDevicesExecute(r ApiGetDevicesRequest) (*GetDevices200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetDevices200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServerApiService.GetDevices") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/devices" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetMyPlexAccountRequest struct { - ctx context.Context - ApiService *ServerApiService -} - -func (r ApiGetMyPlexAccountRequest) Execute() (*GetMyPlexAccount200Response, *http.Response, error) { - return r.ApiService.GetMyPlexAccountExecute(r) -} - -/* -GetMyPlexAccount Get MyPlex Account - -Returns MyPlex Account Information - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetMyPlexAccountRequest -*/ -func (a *ServerApiService) GetMyPlexAccount(ctx context.Context) ApiGetMyPlexAccountRequest { - return ApiGetMyPlexAccountRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetMyPlexAccount200Response -func (a *ServerApiService) GetMyPlexAccountExecute(r ApiGetMyPlexAccountRequest) (*GetMyPlexAccount200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetMyPlexAccount200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServerApiService.GetMyPlexAccount") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/myplex/account" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetResizedPhotoRequest struct { - ctx context.Context - ApiService *ServerApiService - width *interface{} - height *interface{} - opacity *interface{} - blur *interface{} - minSize *interface{} - upscale *interface{} - url *interface{} -} - -// The width for the resized photo -func (r ApiGetResizedPhotoRequest) Width(width interface{}) ApiGetResizedPhotoRequest { - r.width = &width - return r -} - -// The height for the resized photo -func (r ApiGetResizedPhotoRequest) Height(height interface{}) ApiGetResizedPhotoRequest { - r.height = &height - return r -} - -// The opacity for the resized photo -func (r ApiGetResizedPhotoRequest) Opacity(opacity interface{}) ApiGetResizedPhotoRequest { - r.opacity = &opacity - return r -} - -// The width for the resized photo -func (r ApiGetResizedPhotoRequest) Blur(blur interface{}) ApiGetResizedPhotoRequest { - r.blur = &blur - return r -} - -// images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. -func (r ApiGetResizedPhotoRequest) MinSize(minSize interface{}) ApiGetResizedPhotoRequest { - r.minSize = &minSize - return r -} - -// allow images to be resized beyond native dimensions. -func (r ApiGetResizedPhotoRequest) Upscale(upscale interface{}) ApiGetResizedPhotoRequest { - r.upscale = &upscale - return r -} - -// path to image within Plex -func (r ApiGetResizedPhotoRequest) Url(url interface{}) ApiGetResizedPhotoRequest { - r.url = &url - return r -} - -func (r ApiGetResizedPhotoRequest) Execute() (*http.Response, error) { - return r.ApiService.GetResizedPhotoExecute(r) -} - -/* -GetResizedPhoto Get a Resized Photo - -Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetResizedPhotoRequest -*/ -func (a *ServerApiService) GetResizedPhoto(ctx context.Context) ApiGetResizedPhotoRequest { - return ApiGetResizedPhotoRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *ServerApiService) GetResizedPhotoExecute(r ApiGetResizedPhotoRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServerApiService.GetResizedPhoto") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/photo/:/transcode" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.width == nil { - return nil, reportError("width is required and must be specified") - } - if r.height == nil { - return nil, reportError("height is required and must be specified") - } - if r.opacity == nil { - return nil, reportError("opacity is required and must be specified") - } - if *r.opacity < 1 { - return nil, reportError("opacity must be greater than 1") - } - if *r.opacity > 100 { - return nil, reportError("opacity must be less than 100") - } - if r.blur == nil { - return nil, reportError("blur is required and must be specified") - } - if r.minSize == nil { - return nil, reportError("minSize is required and must be specified") - } - if r.upscale == nil { - return nil, reportError("upscale is required and must be specified") - } - if r.url == nil { - return nil, reportError("url is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "width", r.width, "") - parameterAddToQuery(localVarQueryParams, "height", r.height, "") - parameterAddToQuery(localVarQueryParams, "opacity", r.opacity, "") - parameterAddToQuery(localVarQueryParams, "blur", r.blur, "") - parameterAddToQuery(localVarQueryParams, "minSize", r.minSize, "") - parameterAddToQuery(localVarQueryParams, "upscale", r.upscale, "") - parameterAddToQuery(localVarQueryParams, "url", r.url, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetServerCapabilitiesRequest struct { - ctx context.Context - ApiService *ServerApiService -} - -func (r ApiGetServerCapabilitiesRequest) Execute() (*GetServerCapabilities200Response, *http.Response, error) { - return r.ApiService.GetServerCapabilitiesExecute(r) -} - -/* -GetServerCapabilities Server Capabilities - -Server Capabilities - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetServerCapabilitiesRequest -*/ -func (a *ServerApiService) GetServerCapabilities(ctx context.Context) ApiGetServerCapabilitiesRequest { - return ApiGetServerCapabilitiesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetServerCapabilities200Response -func (a *ServerApiService) GetServerCapabilitiesExecute(r ApiGetServerCapabilitiesRequest) (*GetServerCapabilities200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetServerCapabilities200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServerApiService.GetServerCapabilities") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetServerIdentityRequest struct { - ctx context.Context - ApiService *ServerApiService -} - -func (r ApiGetServerIdentityRequest) Execute() (*GetServerIdentity200Response, *http.Response, error) { - return r.ApiService.GetServerIdentityExecute(r) -} - -/* -GetServerIdentity Get Server Identity - -Get Server Identity - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetServerIdentityRequest -*/ -func (a *ServerApiService) GetServerIdentity(ctx context.Context) ApiGetServerIdentityRequest { - return ApiGetServerIdentityRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetServerIdentity200Response -func (a *ServerApiService) GetServerIdentityExecute(r ApiGetServerIdentityRequest) (*GetServerIdentity200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetServerIdentity200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServerApiService.GetServerIdentity") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/identity" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetServerListRequest struct { - ctx context.Context - ApiService *ServerApiService -} - -func (r ApiGetServerListRequest) Execute() (*GetServerList200Response, *http.Response, error) { - return r.ApiService.GetServerListExecute(r) -} - -/* -GetServerList Get Server List - -Get Server List - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetServerListRequest -*/ -func (a *ServerApiService) GetServerList(ctx context.Context) ApiGetServerListRequest { - return ApiGetServerListRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetServerList200Response -func (a *ServerApiService) GetServerListExecute(r ApiGetServerListRequest) (*GetServerList200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetServerList200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServerApiService.GetServerList") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/servers" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetServerPreferencesRequest struct { - ctx context.Context - ApiService *ServerApiService -} - -func (r ApiGetServerPreferencesRequest) Execute() (*http.Response, error) { - return r.ApiService.GetServerPreferencesExecute(r) -} - -/* -GetServerPreferences Get Server Preferences - -Get Server Preferences - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetServerPreferencesRequest -*/ -func (a *ServerApiService) GetServerPreferences(ctx context.Context) ApiGetServerPreferencesRequest { - return ApiGetServerPreferencesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *ServerApiService) GetServerPreferencesExecute(r ApiGetServerPreferencesRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ServerApiService.GetServerPreferences") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/:/prefs" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/api_sessions.go b/pms/api_sessions.go deleted file mode 100644 index 4b3dd11..0000000 --- a/pms/api_sessions.go +++ /dev/null @@ -1,488 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// SessionsApiService SessionsApi service -type SessionsApiService service - -type ApiGetSessionHistoryRequest struct { - ctx context.Context - ApiService *SessionsApiService -} - -func (r ApiGetSessionHistoryRequest) Execute() (*http.Response, error) { - return r.ApiService.GetSessionHistoryExecute(r) -} - -/* -GetSessionHistory Get Session History - -This will Retrieve a listing of all history views. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetSessionHistoryRequest -*/ -func (a *SessionsApiService) GetSessionHistory(ctx context.Context) ApiGetSessionHistoryRequest { - return ApiGetSessionHistoryRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *SessionsApiService) GetSessionHistoryExecute(r ApiGetSessionHistoryRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SessionsApiService.GetSessionHistory") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/status/sessions/history/all" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetSessionsRequest struct { - ctx context.Context - ApiService *SessionsApiService -} - -func (r ApiGetSessionsRequest) Execute() (*http.Response, error) { - return r.ApiService.GetSessionsExecute(r) -} - -/* -GetSessions Get Active Sessions - -This will retrieve the "Now Playing" Information of the PMS. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetSessionsRequest -*/ -func (a *SessionsApiService) GetSessions(ctx context.Context) ApiGetSessionsRequest { - return ApiGetSessionsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *SessionsApiService) GetSessionsExecute(r ApiGetSessionsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SessionsApiService.GetSessions") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/status/sessions" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetTranscodeSessionsRequest struct { - ctx context.Context - ApiService *SessionsApiService -} - -func (r ApiGetTranscodeSessionsRequest) Execute() (*GetTranscodeSessions200Response, *http.Response, error) { - return r.ApiService.GetTranscodeSessionsExecute(r) -} - -/* -GetTranscodeSessions Get Transcode Sessions - -Get Transcode Sessions - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetTranscodeSessionsRequest -*/ -func (a *SessionsApiService) GetTranscodeSessions(ctx context.Context) ApiGetTranscodeSessionsRequest { - return ApiGetTranscodeSessionsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetTranscodeSessions200Response -func (a *SessionsApiService) GetTranscodeSessionsExecute(r ApiGetTranscodeSessionsRequest) (*GetTranscodeSessions200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetTranscodeSessions200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SessionsApiService.GetTranscodeSessions") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/transcode/sessions" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiStopTranscodeSessionRequest struct { - ctx context.Context - ApiService *SessionsApiService - sessionKey interface{} -} - -func (r ApiStopTranscodeSessionRequest) Execute() (*http.Response, error) { - return r.ApiService.StopTranscodeSessionExecute(r) -} - -/* -StopTranscodeSession Stop a Transcode Session - -Stop a Transcode Session - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param sessionKey the Key of the transcode session to stop - @return ApiStopTranscodeSessionRequest -*/ -func (a *SessionsApiService) StopTranscodeSession(ctx context.Context, sessionKey interface{}) ApiStopTranscodeSessionRequest { - return ApiStopTranscodeSessionRequest{ - ApiService: a, - ctx: ctx, - sessionKey: sessionKey, - } -} - -// Execute executes the request -func (a *SessionsApiService) StopTranscodeSessionExecute(r ApiStopTranscodeSessionRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SessionsApiService.StopTranscodeSession") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/transcode/sessions/{sessionKey}" - localVarPath = strings.Replace(localVarPath, "{"+"sessionKey"+"}", url.PathEscape(parameterValueToString(r.sessionKey, "sessionKey")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/api_updater.go b/pms/api_updater.go deleted file mode 100644 index be4f3bb..0000000 --- a/pms/api_updater.go +++ /dev/null @@ -1,392 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// UpdaterApiService UpdaterApi service -type UpdaterApiService service - -type ApiApplyUpdatesRequest struct { - ctx context.Context - ApiService *UpdaterApiService - tonight *interface{} - skip *interface{} -} - -// 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 -func (r ApiApplyUpdatesRequest) Tonight(tonight interface{}) ApiApplyUpdatesRequest { - r.tonight = &tonight - return r -} - -// Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. -func (r ApiApplyUpdatesRequest) Skip(skip interface{}) ApiApplyUpdatesRequest { - r.skip = &skip - return r -} - -func (r ApiApplyUpdatesRequest) Execute() (*http.Response, error) { - return r.ApiService.ApplyUpdatesExecute(r) -} - -/* -ApplyUpdates Apply Updates - -Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiApplyUpdatesRequest -*/ -func (a *UpdaterApiService) ApplyUpdates(ctx context.Context) ApiApplyUpdatesRequest { - return ApiApplyUpdatesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *UpdaterApiService) ApplyUpdatesExecute(r ApiApplyUpdatesRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UpdaterApiService.ApplyUpdates") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/updater/apply" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.tonight != nil { - parameterAddToQuery(localVarQueryParams, "tonight", r.tonight, "") - } - if r.skip != nil { - parameterAddToQuery(localVarQueryParams, "skip", r.skip, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiCheckForUpdatesRequest struct { - ctx context.Context - ApiService *UpdaterApiService - download *interface{} -} - -// Indicate that you want to start download any updates found. -func (r ApiCheckForUpdatesRequest) Download(download interface{}) ApiCheckForUpdatesRequest { - r.download = &download - return r -} - -func (r ApiCheckForUpdatesRequest) Execute() (*http.Response, error) { - return r.ApiService.CheckForUpdatesExecute(r) -} - -/* -CheckForUpdates Checking for updates - -Checking for updates - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCheckForUpdatesRequest -*/ -func (a *UpdaterApiService) CheckForUpdates(ctx context.Context) ApiCheckForUpdatesRequest { - return ApiCheckForUpdatesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *UpdaterApiService) CheckForUpdatesExecute(r ApiCheckForUpdatesRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UpdaterApiService.CheckForUpdates") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/updater/check" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.download != nil { - parameterAddToQuery(localVarQueryParams, "download", r.download, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetUpdateStatusRequest struct { - ctx context.Context - ApiService *UpdaterApiService -} - -func (r ApiGetUpdateStatusRequest) Execute() (*http.Response, error) { - return r.ApiService.GetUpdateStatusExecute(r) -} - -/* -GetUpdateStatus Querying status of updates - -Querying status of updates - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetUpdateStatusRequest -*/ -func (a *UpdaterApiService) GetUpdateStatus(ctx context.Context) ApiGetUpdateStatusRequest { - return ApiGetUpdateStatusRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *UpdaterApiService) GetUpdateStatusExecute(r ApiGetUpdateStatusRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UpdaterApiService.GetUpdateStatus") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/updater/status" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/api_video.go b/pms/api_video.go deleted file mode 100644 index ed473d1..0000000 --- a/pms/api_video.go +++ /dev/null @@ -1,523 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// VideoApiService VideoApi service -type VideoApiService service - -type ApiGetTimelineRequest struct { - ctx context.Context - ApiService *VideoApiService - ratingKey *interface{} - key *interface{} - state *interface{} - hasMDE *interface{} - time *interface{} - duration *interface{} - context *interface{} - playQueueItemID *interface{} - playBackTime *interface{} - row *interface{} -} - -// The rating key of the media item -func (r ApiGetTimelineRequest) RatingKey(ratingKey interface{}) ApiGetTimelineRequest { - r.ratingKey = &ratingKey - return r -} - -// The key of the media item to get the timeline for -func (r ApiGetTimelineRequest) Key(key interface{}) ApiGetTimelineRequest { - r.key = &key - return r -} - -// The state of the media item -func (r ApiGetTimelineRequest) State(state interface{}) ApiGetTimelineRequest { - r.state = &state - return r -} - -// Whether the media item has MDE -func (r ApiGetTimelineRequest) HasMDE(hasMDE interface{}) ApiGetTimelineRequest { - r.hasMDE = &hasMDE - return r -} - -// The time of the media item -func (r ApiGetTimelineRequest) Time(time interface{}) ApiGetTimelineRequest { - r.time = &time - return r -} - -// The duration of the media item -func (r ApiGetTimelineRequest) Duration(duration interface{}) ApiGetTimelineRequest { - r.duration = &duration - return r -} - -// The context of the media item -func (r ApiGetTimelineRequest) Context(context interface{}) ApiGetTimelineRequest { - r.context = &context - return r -} - -// The play queue item ID of the media item -func (r ApiGetTimelineRequest) PlayQueueItemID(playQueueItemID interface{}) ApiGetTimelineRequest { - r.playQueueItemID = &playQueueItemID - return r -} - -// The playback time of the media item -func (r ApiGetTimelineRequest) PlayBackTime(playBackTime interface{}) ApiGetTimelineRequest { - r.playBackTime = &playBackTime - return r -} - -// The row of the media item -func (r ApiGetTimelineRequest) Row(row interface{}) ApiGetTimelineRequest { - r.row = &row - return r -} - -func (r ApiGetTimelineRequest) Execute() (*http.Response, error) { - return r.ApiService.GetTimelineExecute(r) -} - -/* -GetTimeline Get the timeline for a media item - -Get the timeline for a media item - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetTimelineRequest -*/ -func (a *VideoApiService) GetTimeline(ctx context.Context) ApiGetTimelineRequest { - return ApiGetTimelineRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *VideoApiService) GetTimelineExecute(r ApiGetTimelineRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VideoApiService.GetTimeline") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/:/timeline" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.ratingKey == nil { - return nil, reportError("ratingKey is required and must be specified") - } - if r.key == nil { - return nil, reportError("key is required and must be specified") - } - if r.state == nil { - return nil, reportError("state is required and must be specified") - } - if r.hasMDE == nil { - return nil, reportError("hasMDE is required and must be specified") - } - if r.time == nil { - return nil, reportError("time is required and must be specified") - } - if r.duration == nil { - return nil, reportError("duration is required and must be specified") - } - if r.context == nil { - return nil, reportError("context is required and must be specified") - } - if r.playQueueItemID == nil { - return nil, reportError("playQueueItemID is required and must be specified") - } - if r.playBackTime == nil { - return nil, reportError("playBackTime is required and must be specified") - } - if r.row == nil { - return nil, reportError("row is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "ratingKey", r.ratingKey, "") - parameterAddToQuery(localVarQueryParams, "key", r.key, "") - parameterAddToQuery(localVarQueryParams, "state", r.state, "") - parameterAddToQuery(localVarQueryParams, "hasMDE", r.hasMDE, "") - parameterAddToQuery(localVarQueryParams, "time", r.time, "") - parameterAddToQuery(localVarQueryParams, "duration", r.duration, "") - parameterAddToQuery(localVarQueryParams, "context", r.context, "") - parameterAddToQuery(localVarQueryParams, "playQueueItemID", r.playQueueItemID, "") - parameterAddToQuery(localVarQueryParams, "playBackTime", r.playBackTime, "") - parameterAddToQuery(localVarQueryParams, "row", r.row, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiStartUniversalTranscodeRequest struct { - ctx context.Context - ApiService *VideoApiService - hasMDE *interface{} - path *interface{} - mediaIndex *interface{} - partIndex *interface{} - protocol *interface{} - fastSeek *interface{} - directPlay *interface{} - directStream *interface{} - subtitleSize *interface{} - subtites *interface{} - audioBoost *interface{} - location *interface{} - mediaBufferSize *interface{} - session *interface{} - addDebugOverlay *interface{} - autoAdjustQuality *interface{} -} - -// Whether the media item has MDE -func (r ApiStartUniversalTranscodeRequest) HasMDE(hasMDE interface{}) ApiStartUniversalTranscodeRequest { - r.hasMDE = &hasMDE - return r -} - -// The path to the media item to transcode -func (r ApiStartUniversalTranscodeRequest) Path(path interface{}) ApiStartUniversalTranscodeRequest { - r.path = &path - return r -} - -// The index of the media item to transcode -func (r ApiStartUniversalTranscodeRequest) MediaIndex(mediaIndex interface{}) ApiStartUniversalTranscodeRequest { - r.mediaIndex = &mediaIndex - return r -} - -// The index of the part to transcode -func (r ApiStartUniversalTranscodeRequest) PartIndex(partIndex interface{}) ApiStartUniversalTranscodeRequest { - r.partIndex = &partIndex - return r -} - -// The protocol to use for the transcode session -func (r ApiStartUniversalTranscodeRequest) Protocol(protocol interface{}) ApiStartUniversalTranscodeRequest { - r.protocol = &protocol - return r -} - -// Whether to use fast seek or not -func (r ApiStartUniversalTranscodeRequest) FastSeek(fastSeek interface{}) ApiStartUniversalTranscodeRequest { - r.fastSeek = &fastSeek - return r -} - -// Whether to use direct play or not -func (r ApiStartUniversalTranscodeRequest) DirectPlay(directPlay interface{}) ApiStartUniversalTranscodeRequest { - r.directPlay = &directPlay - return r -} - -// Whether to use direct stream or not -func (r ApiStartUniversalTranscodeRequest) DirectStream(directStream interface{}) ApiStartUniversalTranscodeRequest { - r.directStream = &directStream - return r -} - -// The size of the subtitles -func (r ApiStartUniversalTranscodeRequest) SubtitleSize(subtitleSize interface{}) ApiStartUniversalTranscodeRequest { - r.subtitleSize = &subtitleSize - return r -} - -// The subtitles -func (r ApiStartUniversalTranscodeRequest) Subtites(subtites interface{}) ApiStartUniversalTranscodeRequest { - r.subtites = &subtites - return r -} - -// The audio boost -func (r ApiStartUniversalTranscodeRequest) AudioBoost(audioBoost interface{}) ApiStartUniversalTranscodeRequest { - r.audioBoost = &audioBoost - return r -} - -// The location of the transcode session -func (r ApiStartUniversalTranscodeRequest) Location(location interface{}) ApiStartUniversalTranscodeRequest { - r.location = &location - return r -} - -// The size of the media buffer -func (r ApiStartUniversalTranscodeRequest) MediaBufferSize(mediaBufferSize interface{}) ApiStartUniversalTranscodeRequest { - r.mediaBufferSize = &mediaBufferSize - return r -} - -// The session ID -func (r ApiStartUniversalTranscodeRequest) Session(session interface{}) ApiStartUniversalTranscodeRequest { - r.session = &session - return r -} - -// Whether to add a debug overlay or not -func (r ApiStartUniversalTranscodeRequest) AddDebugOverlay(addDebugOverlay interface{}) ApiStartUniversalTranscodeRequest { - r.addDebugOverlay = &addDebugOverlay - return r -} - -// Whether to auto adjust quality or not -func (r ApiStartUniversalTranscodeRequest) AutoAdjustQuality(autoAdjustQuality interface{}) ApiStartUniversalTranscodeRequest { - r.autoAdjustQuality = &autoAdjustQuality - return r -} - -func (r ApiStartUniversalTranscodeRequest) Execute() (*http.Response, error) { - return r.ApiService.StartUniversalTranscodeExecute(r) -} - -/* -StartUniversalTranscode Start Universal Transcode - -Begin a Universal Transcode Session - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiStartUniversalTranscodeRequest -*/ -func (a *VideoApiService) StartUniversalTranscode(ctx context.Context) ApiStartUniversalTranscodeRequest { - return ApiStartUniversalTranscodeRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *VideoApiService) StartUniversalTranscodeExecute(r ApiStartUniversalTranscodeRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VideoApiService.StartUniversalTranscode") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/video/:/transcode/universal/start.mpd" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.hasMDE == nil { - return nil, reportError("hasMDE is required and must be specified") - } - if r.path == nil { - return nil, reportError("path is required and must be specified") - } - if r.mediaIndex == nil { - return nil, reportError("mediaIndex is required and must be specified") - } - if r.partIndex == nil { - return nil, reportError("partIndex is required and must be specified") - } - if r.protocol == nil { - return nil, reportError("protocol is required and must be specified") - } - - parameterAddToQuery(localVarQueryParams, "hasMDE", r.hasMDE, "") - parameterAddToQuery(localVarQueryParams, "path", r.path, "") - parameterAddToQuery(localVarQueryParams, "mediaIndex", r.mediaIndex, "") - parameterAddToQuery(localVarQueryParams, "partIndex", r.partIndex, "") - parameterAddToQuery(localVarQueryParams, "protocol", r.protocol, "") - if r.fastSeek != nil { - parameterAddToQuery(localVarQueryParams, "fastSeek", r.fastSeek, "") - } - if r.directPlay != nil { - parameterAddToQuery(localVarQueryParams, "directPlay", r.directPlay, "") - } - if r.directStream != nil { - parameterAddToQuery(localVarQueryParams, "directStream", r.directStream, "") - } - if r.subtitleSize != nil { - parameterAddToQuery(localVarQueryParams, "subtitleSize", r.subtitleSize, "") - } - if r.subtites != nil { - parameterAddToQuery(localVarQueryParams, "subtites", r.subtites, "") - } - if r.audioBoost != nil { - parameterAddToQuery(localVarQueryParams, "audioBoost", r.audioBoost, "") - } - if r.location != nil { - parameterAddToQuery(localVarQueryParams, "location", r.location, "") - } - if r.mediaBufferSize != nil { - parameterAddToQuery(localVarQueryParams, "mediaBufferSize", r.mediaBufferSize, "") - } - if r.session != nil { - parameterAddToQuery(localVarQueryParams, "session", r.session, "") - } - if r.addDebugOverlay != nil { - parameterAddToQuery(localVarQueryParams, "addDebugOverlay", r.addDebugOverlay, "") - } - if r.autoAdjustQuality != nil { - parameterAddToQuery(localVarQueryParams, "autoAdjustQuality", r.autoAdjustQuality, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["accessToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-Plex-Token"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v GetServerCapabilities401Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/pms/client.go b/pms/client.go deleted file mode 100644 index 14648f4..0000000 --- a/pms/client.go +++ /dev/null @@ -1,746 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "io/ioutil" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - - retryablehttp "github.com/hashicorp/go-retryablehttp" -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the Plex-API API v0.0.3 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - ActivitiesApi *ActivitiesApiService - - ButlerApi *ButlerApiService - - HubsApi *HubsApiService - - LibraryApi *LibraryApiService - - LogApi *LogApiService - - MediaApi *MediaApiService - - PlaylistsApi *PlaylistsApiService - - SearchApi *SearchApiService - - SecurityApi *SecurityApiService - - ServerApi *ServerApiService - - SessionsApi *SessionsApiService - - UpdaterApi *UpdaterApiService - - VideoApi *VideoApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = retryablehttp.NewClient() - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.ActivitiesApi = (*ActivitiesApiService)(&c.common) - c.ButlerApi = (*ButlerApiService)(&c.common) - c.HubsApi = (*HubsApiService)(&c.common) - c.LibraryApi = (*LibraryApiService)(&c.common) - c.LogApi = (*LogApiService)(&c.common) - c.MediaApi = (*MediaApiService)(&c.common) - c.PlaylistsApi = (*PlaylistsApiService)(&c.common) - c.SearchApi = (*SearchApiService)(&c.common) - c.SecurityApi = (*SecurityApiService)(&c.common) - c.ServerApi = (*ServerApiService)(&c.common) - c.SessionsApi = (*SessionsApiService)(&c.common) - c.UpdaterApi = (*UpdaterApiService)(&c.common) - c.VideoApi = (*VideoApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToQuery adds the provided object to the url query supporting deep object syntax -func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToQuery(queryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToQuery(queryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - localVarRequest.Header.Add("X-SailPoint-SDK", "1.1.6") - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -type AccessToken struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - ExpiresIn int `json:"expires_in"` - Scope string `json:"scope"` - TenantId string `json:"tenant_id"` - Pod string `json:"pod"` - StrongAuthSupported bool `json:"strong_auth_supported"` - Org string `json:"org"` - IdentityId string `json:"identity_id"` - UserName string `json:"user_name"` - StrongAuth bool `json:"strong_auth"` - Jti string `json:"jti"` -} - -func getAccessToken(clientId string, clientSecret string, tokenURL string) (string, error) { - url := tokenURL + "?grant_type=client_credentials&client_id=" + clientId + "&client_secret=" + clientSecret - method := "POST" - client := &http.Client{} - req, err := http.NewRequest(method, url, nil) - - if err != nil { - fmt.Println(err) - return "", err - } - res, err := client.Do(req) - if err != nil { - fmt.Println(err) - return "", err - } - defer res.Body.Close() - - body, err := ioutil.ReadAll(res.Body) - if err != nil { - fmt.Println(err) - return "", err - } - - var jsonMap AccessToken - json.Unmarshal([]byte(body), &jsonMap) - - return jsonMap.AccessToken, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = ioutil.TempFile("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - - // status title (detail) - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/pms/configuration.go b/pms/configuration.go deleted file mode 100644 index d0fbecb..0000000 --- a/pms/configuration.go +++ /dev/null @@ -1,248 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "context" - "fmt" - "strings" - - retryablehttp "github.com/hashicorp/go-retryablehttp" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextAPIKeys takes a string apikey as authentication for the request - ContextAPIKeys = contextKey("apiKeys") - - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *retryablehttp.Client - ClientId string - ClientSecret string - BaseURL string - TokenURL string - Token string -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration(clientId string, clientSecret string, baseURL string, tokenURL string, token string) *Configuration { - cfg := &Configuration{ - ClientId: clientId, - ClientSecret: clientSecret, - BaseURL: baseURL, - TokenURL: tokenURL, - Token: token, - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.1.6/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: baseURL, - Description: "The full address of your Plex Server", - Variables: map[string]ServerVariable{ - "protocol": ServerVariable{ - Description: "The protocol to use when connecting to your plex server.", - DefaultValue: "http", - EnumValues: []string{ - "http", - "https", - }, - }, - "ip": ServerVariable{ - Description: "The Local IP Address of your plex server.", - DefaultValue: "10.10.10.47", - }, - "port": ServerVariable{ - Description: "The port to access your plex server.", - DefaultValue: "32400", - }, - }, - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/pms/docs/ActivitiesApi.md b/pms/docs/ActivitiesApi.md deleted file mode 100644 index 8bbd023..0000000 --- a/pms/docs/ActivitiesApi.md +++ /dev/null @@ -1,139 +0,0 @@ -# \ActivitiesApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CancelServerActivities**](ActivitiesApi.md#CancelServerActivities) | **Delete** /activities/{activityUUID} | Cancel Server Activities -[**GetServerActivities**](ActivitiesApi.md#GetServerActivities) | **Get** /activities | Get Server Activities - - - -## CancelServerActivities - -> CancelServerActivities(ctx, activityUUID).Execute() - -Cancel Server Activities - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - activityUUID := TODO // interface{} | The UUID of the activity to cancel. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ActivitiesApi.CancelServerActivities(context.Background(), activityUUID).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ActivitiesApi.CancelServerActivities``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**activityUUID** | [**interface{}**](.md) | The UUID of the activity to cancel. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCancelServerActivitiesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetServerActivities - -> GetServerActivities200Response GetServerActivities(ctx).Execute() - -Get Server Activities - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ActivitiesApi.GetServerActivities(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ActivitiesApi.GetServerActivities``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetServerActivities`: GetServerActivities200Response - fmt.Fprintf(os.Stdout, "Response from `ActivitiesApi.GetServerActivities`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetServerActivitiesRequest struct via the builder pattern - - -### Return type - -[**GetServerActivities200Response**](GetServerActivities200Response.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/ButlerApi.md b/pms/docs/ButlerApi.md deleted file mode 100644 index b33885c..0000000 --- a/pms/docs/ButlerApi.md +++ /dev/null @@ -1,328 +0,0 @@ -# \ButlerApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetButlerTasks**](ButlerApi.md#GetButlerTasks) | **Get** /butler | Get Butler tasks -[**StartAllTasks**](ButlerApi.md#StartAllTasks) | **Post** /butler | Start all Butler tasks -[**StartTask**](ButlerApi.md#StartTask) | **Post** /butler/{taskName} | Start a single Butler task -[**StopAllTasks**](ButlerApi.md#StopAllTasks) | **Delete** /butler | Stop all Butler tasks -[**StopTask**](ButlerApi.md#StopTask) | **Delete** /butler/{taskName} | Stop a single Butler task - - - -## GetButlerTasks - -> GetButlerTasks200Response GetButlerTasks(ctx).Execute() - -Get Butler tasks - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ButlerApi.GetButlerTasks(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ButlerApi.GetButlerTasks``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetButlerTasks`: GetButlerTasks200Response - fmt.Fprintf(os.Stdout, "Response from `ButlerApi.GetButlerTasks`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetButlerTasksRequest struct via the builder pattern - - -### Return type - -[**GetButlerTasks200Response**](GetButlerTasks200Response.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## StartAllTasks - -> StartAllTasks(ctx).Execute() - -Start all Butler tasks - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ButlerApi.StartAllTasks(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ButlerApi.StartAllTasks``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiStartAllTasksRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## StartTask - -> StartTask(ctx, taskName).Execute() - -Start a single Butler task - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - taskName := TODO // interface{} | the name of the task to be started. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ButlerApi.StartTask(context.Background(), taskName).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ButlerApi.StartTask``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**taskName** | [**interface{}**](.md) | the name of the task to be started. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiStartTaskRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## StopAllTasks - -> StopAllTasks(ctx).Execute() - -Stop all Butler tasks - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ButlerApi.StopAllTasks(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ButlerApi.StopAllTasks``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiStopAllTasksRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## StopTask - -> StopTask(ctx, taskName).Execute() - -Stop a single Butler task - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - taskName := TODO // interface{} | The name of the task to be started. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ButlerApi.StopTask(context.Background(), taskName).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ButlerApi.StopTask``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**taskName** | [**interface{}**](.md) | The name of the task to be started. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiStopTaskRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/GetButlerTasks200Response.md b/pms/docs/GetButlerTasks200Response.md deleted file mode 100644 index 8654309..0000000 --- a/pms/docs/GetButlerTasks200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetButlerTasks200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ButlerTasks** | Pointer to [**GetButlerTasks200ResponseButlerTasks**](GetButlerTasks200ResponseButlerTasks.md) | | [optional] - -## Methods - -### NewGetButlerTasks200Response - -`func NewGetButlerTasks200Response() *GetButlerTasks200Response` - -NewGetButlerTasks200Response instantiates a new GetButlerTasks200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetButlerTasks200ResponseWithDefaults - -`func NewGetButlerTasks200ResponseWithDefaults() *GetButlerTasks200Response` - -NewGetButlerTasks200ResponseWithDefaults instantiates a new GetButlerTasks200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetButlerTasks - -`func (o *GetButlerTasks200Response) GetButlerTasks() GetButlerTasks200ResponseButlerTasks` - -GetButlerTasks returns the ButlerTasks field if non-nil, zero value otherwise. - -### GetButlerTasksOk - -`func (o *GetButlerTasks200Response) GetButlerTasksOk() (*GetButlerTasks200ResponseButlerTasks, bool)` - -GetButlerTasksOk returns a tuple with the ButlerTasks field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetButlerTasks - -`func (o *GetButlerTasks200Response) SetButlerTasks(v GetButlerTasks200ResponseButlerTasks)` - -SetButlerTasks sets ButlerTasks field to given value. - -### HasButlerTasks - -`func (o *GetButlerTasks200Response) HasButlerTasks() bool` - -HasButlerTasks returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetButlerTasks200ResponseButlerTasks.md b/pms/docs/GetButlerTasks200ResponseButlerTasks.md deleted file mode 100644 index aa82c99..0000000 --- a/pms/docs/GetButlerTasks200ResponseButlerTasks.md +++ /dev/null @@ -1,66 +0,0 @@ -# GetButlerTasks200ResponseButlerTasks - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ButlerTask** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetButlerTasks200ResponseButlerTasks - -`func NewGetButlerTasks200ResponseButlerTasks() *GetButlerTasks200ResponseButlerTasks` - -NewGetButlerTasks200ResponseButlerTasks instantiates a new GetButlerTasks200ResponseButlerTasks object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetButlerTasks200ResponseButlerTasksWithDefaults - -`func NewGetButlerTasks200ResponseButlerTasksWithDefaults() *GetButlerTasks200ResponseButlerTasks` - -NewGetButlerTasks200ResponseButlerTasksWithDefaults instantiates a new GetButlerTasks200ResponseButlerTasks object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetButlerTask - -`func (o *GetButlerTasks200ResponseButlerTasks) GetButlerTask() interface{}` - -GetButlerTask returns the ButlerTask field if non-nil, zero value otherwise. - -### GetButlerTaskOk - -`func (o *GetButlerTasks200ResponseButlerTasks) GetButlerTaskOk() (*interface{}, bool)` - -GetButlerTaskOk returns a tuple with the ButlerTask field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetButlerTask - -`func (o *GetButlerTasks200ResponseButlerTasks) SetButlerTask(v interface{})` - -SetButlerTask sets ButlerTask field to given value. - -### HasButlerTask - -`func (o *GetButlerTasks200ResponseButlerTasks) HasButlerTask() bool` - -HasButlerTask returns a boolean if a field has been set. - -### SetButlerTaskNil - -`func (o *GetButlerTasks200ResponseButlerTasks) SetButlerTaskNil(b bool)` - - SetButlerTaskNil sets the value for ButlerTask to be an explicit nil - -### UnsetButlerTask -`func (o *GetButlerTasks200ResponseButlerTasks) UnsetButlerTask()` - -UnsetButlerTask ensures that no value is present for ButlerTask, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetDevices200Response.md b/pms/docs/GetDevices200Response.md deleted file mode 100644 index 94836c7..0000000 --- a/pms/docs/GetDevices200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetDevices200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MediaContainer** | Pointer to [**GetDevices200ResponseMediaContainer**](GetDevices200ResponseMediaContainer.md) | | [optional] - -## Methods - -### NewGetDevices200Response - -`func NewGetDevices200Response() *GetDevices200Response` - -NewGetDevices200Response instantiates a new GetDevices200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetDevices200ResponseWithDefaults - -`func NewGetDevices200ResponseWithDefaults() *GetDevices200Response` - -NewGetDevices200ResponseWithDefaults instantiates a new GetDevices200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMediaContainer - -`func (o *GetDevices200Response) GetMediaContainer() GetDevices200ResponseMediaContainer` - -GetMediaContainer returns the MediaContainer field if non-nil, zero value otherwise. - -### GetMediaContainerOk - -`func (o *GetDevices200Response) GetMediaContainerOk() (*GetDevices200ResponseMediaContainer, bool)` - -GetMediaContainerOk returns a tuple with the MediaContainer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaContainer - -`func (o *GetDevices200Response) SetMediaContainer(v GetDevices200ResponseMediaContainer)` - -SetMediaContainer sets MediaContainer field to given value. - -### HasMediaContainer - -`func (o *GetDevices200Response) HasMediaContainer() bool` - -HasMediaContainer returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetDevices200ResponseMediaContainer.md b/pms/docs/GetDevices200ResponseMediaContainer.md deleted file mode 100644 index 387b046..0000000 --- a/pms/docs/GetDevices200ResponseMediaContainer.md +++ /dev/null @@ -1,138 +0,0 @@ -# GetDevices200ResponseMediaContainer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Size** | Pointer to **interface{}** | | [optional] -**Identifier** | Pointer to **interface{}** | | [optional] -**Device** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetDevices200ResponseMediaContainer - -`func NewGetDevices200ResponseMediaContainer() *GetDevices200ResponseMediaContainer` - -NewGetDevices200ResponseMediaContainer instantiates a new GetDevices200ResponseMediaContainer object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetDevices200ResponseMediaContainerWithDefaults - -`func NewGetDevices200ResponseMediaContainerWithDefaults() *GetDevices200ResponseMediaContainer` - -NewGetDevices200ResponseMediaContainerWithDefaults instantiates a new GetDevices200ResponseMediaContainer object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSize - -`func (o *GetDevices200ResponseMediaContainer) GetSize() interface{}` - -GetSize returns the Size field if non-nil, zero value otherwise. - -### GetSizeOk - -`func (o *GetDevices200ResponseMediaContainer) GetSizeOk() (*interface{}, bool)` - -GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSize - -`func (o *GetDevices200ResponseMediaContainer) SetSize(v interface{})` - -SetSize sets Size field to given value. - -### HasSize - -`func (o *GetDevices200ResponseMediaContainer) HasSize() bool` - -HasSize returns a boolean if a field has been set. - -### SetSizeNil - -`func (o *GetDevices200ResponseMediaContainer) SetSizeNil(b bool)` - - SetSizeNil sets the value for Size to be an explicit nil - -### UnsetSize -`func (o *GetDevices200ResponseMediaContainer) UnsetSize()` - -UnsetSize ensures that no value is present for Size, not even an explicit nil -### GetIdentifier - -`func (o *GetDevices200ResponseMediaContainer) GetIdentifier() interface{}` - -GetIdentifier returns the Identifier field if non-nil, zero value otherwise. - -### GetIdentifierOk - -`func (o *GetDevices200ResponseMediaContainer) GetIdentifierOk() (*interface{}, bool)` - -GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentifier - -`func (o *GetDevices200ResponseMediaContainer) SetIdentifier(v interface{})` - -SetIdentifier sets Identifier field to given value. - -### HasIdentifier - -`func (o *GetDevices200ResponseMediaContainer) HasIdentifier() bool` - -HasIdentifier returns a boolean if a field has been set. - -### SetIdentifierNil - -`func (o *GetDevices200ResponseMediaContainer) SetIdentifierNil(b bool)` - - SetIdentifierNil sets the value for Identifier to be an explicit nil - -### UnsetIdentifier -`func (o *GetDevices200ResponseMediaContainer) UnsetIdentifier()` - -UnsetIdentifier ensures that no value is present for Identifier, not even an explicit nil -### GetDevice - -`func (o *GetDevices200ResponseMediaContainer) GetDevice() interface{}` - -GetDevice returns the Device field if non-nil, zero value otherwise. - -### GetDeviceOk - -`func (o *GetDevices200ResponseMediaContainer) GetDeviceOk() (*interface{}, bool)` - -GetDeviceOk returns a tuple with the Device field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDevice - -`func (o *GetDevices200ResponseMediaContainer) SetDevice(v interface{})` - -SetDevice sets Device field to given value. - -### HasDevice - -`func (o *GetDevices200ResponseMediaContainer) HasDevice() bool` - -HasDevice returns a boolean if a field has been set. - -### SetDeviceNil - -`func (o *GetDevices200ResponseMediaContainer) SetDeviceNil(b bool)` - - SetDeviceNil sets the value for Device to be an explicit nil - -### UnsetDevice -`func (o *GetDevices200ResponseMediaContainer) UnsetDevice()` - -UnsetDevice ensures that no value is present for Device, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetMyPlexAccount200Response.md b/pms/docs/GetMyPlexAccount200Response.md deleted file mode 100644 index 0946b30..0000000 --- a/pms/docs/GetMyPlexAccount200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetMyPlexAccount200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MyPlex** | Pointer to [**GetMyPlexAccount200ResponseMyPlex**](GetMyPlexAccount200ResponseMyPlex.md) | | [optional] - -## Methods - -### NewGetMyPlexAccount200Response - -`func NewGetMyPlexAccount200Response() *GetMyPlexAccount200Response` - -NewGetMyPlexAccount200Response instantiates a new GetMyPlexAccount200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetMyPlexAccount200ResponseWithDefaults - -`func NewGetMyPlexAccount200ResponseWithDefaults() *GetMyPlexAccount200Response` - -NewGetMyPlexAccount200ResponseWithDefaults instantiates a new GetMyPlexAccount200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMyPlex - -`func (o *GetMyPlexAccount200Response) GetMyPlex() GetMyPlexAccount200ResponseMyPlex` - -GetMyPlex returns the MyPlex field if non-nil, zero value otherwise. - -### GetMyPlexOk - -`func (o *GetMyPlexAccount200Response) GetMyPlexOk() (*GetMyPlexAccount200ResponseMyPlex, bool)` - -GetMyPlexOk returns a tuple with the MyPlex field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMyPlex - -`func (o *GetMyPlexAccount200Response) SetMyPlex(v GetMyPlexAccount200ResponseMyPlex)` - -SetMyPlex sets MyPlex field to given value. - -### HasMyPlex - -`func (o *GetMyPlexAccount200Response) HasMyPlex() bool` - -HasMyPlex returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetMyPlexAccount200ResponseMyPlex.md b/pms/docs/GetMyPlexAccount200ResponseMyPlex.md deleted file mode 100644 index 0569687..0000000 --- a/pms/docs/GetMyPlexAccount200ResponseMyPlex.md +++ /dev/null @@ -1,462 +0,0 @@ -# GetMyPlexAccount200ResponseMyPlex - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AuthToken** | Pointer to **interface{}** | | [optional] -**Username** | Pointer to **interface{}** | | [optional] -**MappingState** | Pointer to **interface{}** | | [optional] -**MappingError** | Pointer to **interface{}** | | [optional] -**SignInState** | Pointer to **interface{}** | | [optional] -**PublicAddress** | Pointer to **interface{}** | | [optional] -**PublicPort** | Pointer to **interface{}** | | [optional] -**PrivateAddress** | Pointer to **interface{}** | | [optional] -**PrivatePort** | Pointer to **interface{}** | | [optional] -**SubscriptionFeatures** | Pointer to **interface{}** | | [optional] -**SubscriptionActive** | Pointer to **interface{}** | | [optional] -**SubscriptionState** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetMyPlexAccount200ResponseMyPlex - -`func NewGetMyPlexAccount200ResponseMyPlex() *GetMyPlexAccount200ResponseMyPlex` - -NewGetMyPlexAccount200ResponseMyPlex instantiates a new GetMyPlexAccount200ResponseMyPlex object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetMyPlexAccount200ResponseMyPlexWithDefaults - -`func NewGetMyPlexAccount200ResponseMyPlexWithDefaults() *GetMyPlexAccount200ResponseMyPlex` - -NewGetMyPlexAccount200ResponseMyPlexWithDefaults instantiates a new GetMyPlexAccount200ResponseMyPlex object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAuthToken - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetAuthToken() interface{}` - -GetAuthToken returns the AuthToken field if non-nil, zero value otherwise. - -### GetAuthTokenOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetAuthTokenOk() (*interface{}, bool)` - -GetAuthTokenOk returns a tuple with the AuthToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthToken - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetAuthToken(v interface{})` - -SetAuthToken sets AuthToken field to given value. - -### HasAuthToken - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasAuthToken() bool` - -HasAuthToken returns a boolean if a field has been set. - -### SetAuthTokenNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetAuthTokenNil(b bool)` - - SetAuthTokenNil sets the value for AuthToken to be an explicit nil - -### UnsetAuthToken -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetAuthToken()` - -UnsetAuthToken ensures that no value is present for AuthToken, not even an explicit nil -### GetUsername - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetUsername() interface{}` - -GetUsername returns the Username field if non-nil, zero value otherwise. - -### GetUsernameOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetUsernameOk() (*interface{}, bool)` - -GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsername - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetUsername(v interface{})` - -SetUsername sets Username field to given value. - -### HasUsername - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasUsername() bool` - -HasUsername returns a boolean if a field has been set. - -### SetUsernameNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetUsernameNil(b bool)` - - SetUsernameNil sets the value for Username to be an explicit nil - -### UnsetUsername -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetUsername()` - -UnsetUsername ensures that no value is present for Username, not even an explicit nil -### GetMappingState - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetMappingState() interface{}` - -GetMappingState returns the MappingState field if non-nil, zero value otherwise. - -### GetMappingStateOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetMappingStateOk() (*interface{}, bool)` - -GetMappingStateOk returns a tuple with the MappingState field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMappingState - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetMappingState(v interface{})` - -SetMappingState sets MappingState field to given value. - -### HasMappingState - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasMappingState() bool` - -HasMappingState returns a boolean if a field has been set. - -### SetMappingStateNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetMappingStateNil(b bool)` - - SetMappingStateNil sets the value for MappingState to be an explicit nil - -### UnsetMappingState -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetMappingState()` - -UnsetMappingState ensures that no value is present for MappingState, not even an explicit nil -### GetMappingError - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetMappingError() interface{}` - -GetMappingError returns the MappingError field if non-nil, zero value otherwise. - -### GetMappingErrorOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetMappingErrorOk() (*interface{}, bool)` - -GetMappingErrorOk returns a tuple with the MappingError field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMappingError - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetMappingError(v interface{})` - -SetMappingError sets MappingError field to given value. - -### HasMappingError - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasMappingError() bool` - -HasMappingError returns a boolean if a field has been set. - -### SetMappingErrorNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetMappingErrorNil(b bool)` - - SetMappingErrorNil sets the value for MappingError to be an explicit nil - -### UnsetMappingError -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetMappingError()` - -UnsetMappingError ensures that no value is present for MappingError, not even an explicit nil -### GetSignInState - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetSignInState() interface{}` - -GetSignInState returns the SignInState field if non-nil, zero value otherwise. - -### GetSignInStateOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetSignInStateOk() (*interface{}, bool)` - -GetSignInStateOk returns a tuple with the SignInState field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSignInState - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetSignInState(v interface{})` - -SetSignInState sets SignInState field to given value. - -### HasSignInState - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasSignInState() bool` - -HasSignInState returns a boolean if a field has been set. - -### SetSignInStateNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetSignInStateNil(b bool)` - - SetSignInStateNil sets the value for SignInState to be an explicit nil - -### UnsetSignInState -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetSignInState()` - -UnsetSignInState ensures that no value is present for SignInState, not even an explicit nil -### GetPublicAddress - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetPublicAddress() interface{}` - -GetPublicAddress returns the PublicAddress field if non-nil, zero value otherwise. - -### GetPublicAddressOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetPublicAddressOk() (*interface{}, bool)` - -GetPublicAddressOk returns a tuple with the PublicAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPublicAddress - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetPublicAddress(v interface{})` - -SetPublicAddress sets PublicAddress field to given value. - -### HasPublicAddress - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasPublicAddress() bool` - -HasPublicAddress returns a boolean if a field has been set. - -### SetPublicAddressNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetPublicAddressNil(b bool)` - - SetPublicAddressNil sets the value for PublicAddress to be an explicit nil - -### UnsetPublicAddress -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetPublicAddress()` - -UnsetPublicAddress ensures that no value is present for PublicAddress, not even an explicit nil -### GetPublicPort - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetPublicPort() interface{}` - -GetPublicPort returns the PublicPort field if non-nil, zero value otherwise. - -### GetPublicPortOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetPublicPortOk() (*interface{}, bool)` - -GetPublicPortOk returns a tuple with the PublicPort field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPublicPort - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetPublicPort(v interface{})` - -SetPublicPort sets PublicPort field to given value. - -### HasPublicPort - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasPublicPort() bool` - -HasPublicPort returns a boolean if a field has been set. - -### SetPublicPortNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetPublicPortNil(b bool)` - - SetPublicPortNil sets the value for PublicPort to be an explicit nil - -### UnsetPublicPort -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetPublicPort()` - -UnsetPublicPort ensures that no value is present for PublicPort, not even an explicit nil -### GetPrivateAddress - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetPrivateAddress() interface{}` - -GetPrivateAddress returns the PrivateAddress field if non-nil, zero value otherwise. - -### GetPrivateAddressOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetPrivateAddressOk() (*interface{}, bool)` - -GetPrivateAddressOk returns a tuple with the PrivateAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrivateAddress - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetPrivateAddress(v interface{})` - -SetPrivateAddress sets PrivateAddress field to given value. - -### HasPrivateAddress - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasPrivateAddress() bool` - -HasPrivateAddress returns a boolean if a field has been set. - -### SetPrivateAddressNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetPrivateAddressNil(b bool)` - - SetPrivateAddressNil sets the value for PrivateAddress to be an explicit nil - -### UnsetPrivateAddress -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetPrivateAddress()` - -UnsetPrivateAddress ensures that no value is present for PrivateAddress, not even an explicit nil -### GetPrivatePort - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetPrivatePort() interface{}` - -GetPrivatePort returns the PrivatePort field if non-nil, zero value otherwise. - -### GetPrivatePortOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetPrivatePortOk() (*interface{}, bool)` - -GetPrivatePortOk returns a tuple with the PrivatePort field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrivatePort - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetPrivatePort(v interface{})` - -SetPrivatePort sets PrivatePort field to given value. - -### HasPrivatePort - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasPrivatePort() bool` - -HasPrivatePort returns a boolean if a field has been set. - -### SetPrivatePortNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetPrivatePortNil(b bool)` - - SetPrivatePortNil sets the value for PrivatePort to be an explicit nil - -### UnsetPrivatePort -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetPrivatePort()` - -UnsetPrivatePort ensures that no value is present for PrivatePort, not even an explicit nil -### GetSubscriptionFeatures - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionFeatures() interface{}` - -GetSubscriptionFeatures returns the SubscriptionFeatures field if non-nil, zero value otherwise. - -### GetSubscriptionFeaturesOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionFeaturesOk() (*interface{}, bool)` - -GetSubscriptionFeaturesOk returns a tuple with the SubscriptionFeatures field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubscriptionFeatures - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetSubscriptionFeatures(v interface{})` - -SetSubscriptionFeatures sets SubscriptionFeatures field to given value. - -### HasSubscriptionFeatures - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasSubscriptionFeatures() bool` - -HasSubscriptionFeatures returns a boolean if a field has been set. - -### SetSubscriptionFeaturesNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetSubscriptionFeaturesNil(b bool)` - - SetSubscriptionFeaturesNil sets the value for SubscriptionFeatures to be an explicit nil - -### UnsetSubscriptionFeatures -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetSubscriptionFeatures()` - -UnsetSubscriptionFeatures ensures that no value is present for SubscriptionFeatures, not even an explicit nil -### GetSubscriptionActive - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionActive() interface{}` - -GetSubscriptionActive returns the SubscriptionActive field if non-nil, zero value otherwise. - -### GetSubscriptionActiveOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionActiveOk() (*interface{}, bool)` - -GetSubscriptionActiveOk returns a tuple with the SubscriptionActive field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubscriptionActive - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetSubscriptionActive(v interface{})` - -SetSubscriptionActive sets SubscriptionActive field to given value. - -### HasSubscriptionActive - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasSubscriptionActive() bool` - -HasSubscriptionActive returns a boolean if a field has been set. - -### SetSubscriptionActiveNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetSubscriptionActiveNil(b bool)` - - SetSubscriptionActiveNil sets the value for SubscriptionActive to be an explicit nil - -### UnsetSubscriptionActive -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetSubscriptionActive()` - -UnsetSubscriptionActive ensures that no value is present for SubscriptionActive, not even an explicit nil -### GetSubscriptionState - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionState() interface{}` - -GetSubscriptionState returns the SubscriptionState field if non-nil, zero value otherwise. - -### GetSubscriptionStateOk - -`func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionStateOk() (*interface{}, bool)` - -GetSubscriptionStateOk returns a tuple with the SubscriptionState field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubscriptionState - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetSubscriptionState(v interface{})` - -SetSubscriptionState sets SubscriptionState field to given value. - -### HasSubscriptionState - -`func (o *GetMyPlexAccount200ResponseMyPlex) HasSubscriptionState() bool` - -HasSubscriptionState returns a boolean if a field has been set. - -### SetSubscriptionStateNil - -`func (o *GetMyPlexAccount200ResponseMyPlex) SetSubscriptionStateNil(b bool)` - - SetSubscriptionStateNil sets the value for SubscriptionState to be an explicit nil - -### UnsetSubscriptionState -`func (o *GetMyPlexAccount200ResponseMyPlex) UnsetSubscriptionState()` - -UnsetSubscriptionState ensures that no value is present for SubscriptionState, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetOnDeck200Response.md b/pms/docs/GetOnDeck200Response.md deleted file mode 100644 index c49b992..0000000 --- a/pms/docs/GetOnDeck200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetOnDeck200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MediaContainer** | Pointer to [**GetOnDeck200ResponseMediaContainer**](GetOnDeck200ResponseMediaContainer.md) | | [optional] - -## Methods - -### NewGetOnDeck200Response - -`func NewGetOnDeck200Response() *GetOnDeck200Response` - -NewGetOnDeck200Response instantiates a new GetOnDeck200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetOnDeck200ResponseWithDefaults - -`func NewGetOnDeck200ResponseWithDefaults() *GetOnDeck200Response` - -NewGetOnDeck200ResponseWithDefaults instantiates a new GetOnDeck200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMediaContainer - -`func (o *GetOnDeck200Response) GetMediaContainer() GetOnDeck200ResponseMediaContainer` - -GetMediaContainer returns the MediaContainer field if non-nil, zero value otherwise. - -### GetMediaContainerOk - -`func (o *GetOnDeck200Response) GetMediaContainerOk() (*GetOnDeck200ResponseMediaContainer, bool)` - -GetMediaContainerOk returns a tuple with the MediaContainer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaContainer - -`func (o *GetOnDeck200Response) SetMediaContainer(v GetOnDeck200ResponseMediaContainer)` - -SetMediaContainer sets MediaContainer field to given value. - -### HasMediaContainer - -`func (o *GetOnDeck200Response) HasMediaContainer() bool` - -HasMediaContainer returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetOnDeck200ResponseMediaContainer.md b/pms/docs/GetOnDeck200ResponseMediaContainer.md deleted file mode 100644 index 08252de..0000000 --- a/pms/docs/GetOnDeck200ResponseMediaContainer.md +++ /dev/null @@ -1,282 +0,0 @@ -# GetOnDeck200ResponseMediaContainer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Size** | Pointer to **interface{}** | | [optional] -**AllowSync** | Pointer to **interface{}** | | [optional] -**Identifier** | Pointer to **interface{}** | | [optional] -**MediaTagPrefix** | Pointer to **interface{}** | | [optional] -**MediaTagVersion** | Pointer to **interface{}** | | [optional] -**MixedParents** | Pointer to **interface{}** | | [optional] -**Metadata** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetOnDeck200ResponseMediaContainer - -`func NewGetOnDeck200ResponseMediaContainer() *GetOnDeck200ResponseMediaContainer` - -NewGetOnDeck200ResponseMediaContainer instantiates a new GetOnDeck200ResponseMediaContainer object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetOnDeck200ResponseMediaContainerWithDefaults - -`func NewGetOnDeck200ResponseMediaContainerWithDefaults() *GetOnDeck200ResponseMediaContainer` - -NewGetOnDeck200ResponseMediaContainerWithDefaults instantiates a new GetOnDeck200ResponseMediaContainer object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSize - -`func (o *GetOnDeck200ResponseMediaContainer) GetSize() interface{}` - -GetSize returns the Size field if non-nil, zero value otherwise. - -### GetSizeOk - -`func (o *GetOnDeck200ResponseMediaContainer) GetSizeOk() (*interface{}, bool)` - -GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSize - -`func (o *GetOnDeck200ResponseMediaContainer) SetSize(v interface{})` - -SetSize sets Size field to given value. - -### HasSize - -`func (o *GetOnDeck200ResponseMediaContainer) HasSize() bool` - -HasSize returns a boolean if a field has been set. - -### SetSizeNil - -`func (o *GetOnDeck200ResponseMediaContainer) SetSizeNil(b bool)` - - SetSizeNil sets the value for Size to be an explicit nil - -### UnsetSize -`func (o *GetOnDeck200ResponseMediaContainer) UnsetSize()` - -UnsetSize ensures that no value is present for Size, not even an explicit nil -### GetAllowSync - -`func (o *GetOnDeck200ResponseMediaContainer) GetAllowSync() interface{}` - -GetAllowSync returns the AllowSync field if non-nil, zero value otherwise. - -### GetAllowSyncOk - -`func (o *GetOnDeck200ResponseMediaContainer) GetAllowSyncOk() (*interface{}, bool)` - -GetAllowSyncOk returns a tuple with the AllowSync field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowSync - -`func (o *GetOnDeck200ResponseMediaContainer) SetAllowSync(v interface{})` - -SetAllowSync sets AllowSync field to given value. - -### HasAllowSync - -`func (o *GetOnDeck200ResponseMediaContainer) HasAllowSync() bool` - -HasAllowSync returns a boolean if a field has been set. - -### SetAllowSyncNil - -`func (o *GetOnDeck200ResponseMediaContainer) SetAllowSyncNil(b bool)` - - SetAllowSyncNil sets the value for AllowSync to be an explicit nil - -### UnsetAllowSync -`func (o *GetOnDeck200ResponseMediaContainer) UnsetAllowSync()` - -UnsetAllowSync ensures that no value is present for AllowSync, not even an explicit nil -### GetIdentifier - -`func (o *GetOnDeck200ResponseMediaContainer) GetIdentifier() interface{}` - -GetIdentifier returns the Identifier field if non-nil, zero value otherwise. - -### GetIdentifierOk - -`func (o *GetOnDeck200ResponseMediaContainer) GetIdentifierOk() (*interface{}, bool)` - -GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentifier - -`func (o *GetOnDeck200ResponseMediaContainer) SetIdentifier(v interface{})` - -SetIdentifier sets Identifier field to given value. - -### HasIdentifier - -`func (o *GetOnDeck200ResponseMediaContainer) HasIdentifier() bool` - -HasIdentifier returns a boolean if a field has been set. - -### SetIdentifierNil - -`func (o *GetOnDeck200ResponseMediaContainer) SetIdentifierNil(b bool)` - - SetIdentifierNil sets the value for Identifier to be an explicit nil - -### UnsetIdentifier -`func (o *GetOnDeck200ResponseMediaContainer) UnsetIdentifier()` - -UnsetIdentifier ensures that no value is present for Identifier, not even an explicit nil -### GetMediaTagPrefix - -`func (o *GetOnDeck200ResponseMediaContainer) GetMediaTagPrefix() interface{}` - -GetMediaTagPrefix returns the MediaTagPrefix field if non-nil, zero value otherwise. - -### GetMediaTagPrefixOk - -`func (o *GetOnDeck200ResponseMediaContainer) GetMediaTagPrefixOk() (*interface{}, bool)` - -GetMediaTagPrefixOk returns a tuple with the MediaTagPrefix field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaTagPrefix - -`func (o *GetOnDeck200ResponseMediaContainer) SetMediaTagPrefix(v interface{})` - -SetMediaTagPrefix sets MediaTagPrefix field to given value. - -### HasMediaTagPrefix - -`func (o *GetOnDeck200ResponseMediaContainer) HasMediaTagPrefix() bool` - -HasMediaTagPrefix returns a boolean if a field has been set. - -### SetMediaTagPrefixNil - -`func (o *GetOnDeck200ResponseMediaContainer) SetMediaTagPrefixNil(b bool)` - - SetMediaTagPrefixNil sets the value for MediaTagPrefix to be an explicit nil - -### UnsetMediaTagPrefix -`func (o *GetOnDeck200ResponseMediaContainer) UnsetMediaTagPrefix()` - -UnsetMediaTagPrefix ensures that no value is present for MediaTagPrefix, not even an explicit nil -### GetMediaTagVersion - -`func (o *GetOnDeck200ResponseMediaContainer) GetMediaTagVersion() interface{}` - -GetMediaTagVersion returns the MediaTagVersion field if non-nil, zero value otherwise. - -### GetMediaTagVersionOk - -`func (o *GetOnDeck200ResponseMediaContainer) GetMediaTagVersionOk() (*interface{}, bool)` - -GetMediaTagVersionOk returns a tuple with the MediaTagVersion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaTagVersion - -`func (o *GetOnDeck200ResponseMediaContainer) SetMediaTagVersion(v interface{})` - -SetMediaTagVersion sets MediaTagVersion field to given value. - -### HasMediaTagVersion - -`func (o *GetOnDeck200ResponseMediaContainer) HasMediaTagVersion() bool` - -HasMediaTagVersion returns a boolean if a field has been set. - -### SetMediaTagVersionNil - -`func (o *GetOnDeck200ResponseMediaContainer) SetMediaTagVersionNil(b bool)` - - SetMediaTagVersionNil sets the value for MediaTagVersion to be an explicit nil - -### UnsetMediaTagVersion -`func (o *GetOnDeck200ResponseMediaContainer) UnsetMediaTagVersion()` - -UnsetMediaTagVersion ensures that no value is present for MediaTagVersion, not even an explicit nil -### GetMixedParents - -`func (o *GetOnDeck200ResponseMediaContainer) GetMixedParents() interface{}` - -GetMixedParents returns the MixedParents field if non-nil, zero value otherwise. - -### GetMixedParentsOk - -`func (o *GetOnDeck200ResponseMediaContainer) GetMixedParentsOk() (*interface{}, bool)` - -GetMixedParentsOk returns a tuple with the MixedParents field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMixedParents - -`func (o *GetOnDeck200ResponseMediaContainer) SetMixedParents(v interface{})` - -SetMixedParents sets MixedParents field to given value. - -### HasMixedParents - -`func (o *GetOnDeck200ResponseMediaContainer) HasMixedParents() bool` - -HasMixedParents returns a boolean if a field has been set. - -### SetMixedParentsNil - -`func (o *GetOnDeck200ResponseMediaContainer) SetMixedParentsNil(b bool)` - - SetMixedParentsNil sets the value for MixedParents to be an explicit nil - -### UnsetMixedParents -`func (o *GetOnDeck200ResponseMediaContainer) UnsetMixedParents()` - -UnsetMixedParents ensures that no value is present for MixedParents, not even an explicit nil -### GetMetadata - -`func (o *GetOnDeck200ResponseMediaContainer) GetMetadata() interface{}` - -GetMetadata returns the Metadata field if non-nil, zero value otherwise. - -### GetMetadataOk - -`func (o *GetOnDeck200ResponseMediaContainer) GetMetadataOk() (*interface{}, bool)` - -GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetadata - -`func (o *GetOnDeck200ResponseMediaContainer) SetMetadata(v interface{})` - -SetMetadata sets Metadata field to given value. - -### HasMetadata - -`func (o *GetOnDeck200ResponseMediaContainer) HasMetadata() bool` - -HasMetadata returns a boolean if a field has been set. - -### SetMetadataNil - -`func (o *GetOnDeck200ResponseMediaContainer) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *GetOnDeck200ResponseMediaContainer) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetRecentlyAdded200Response.md b/pms/docs/GetRecentlyAdded200Response.md deleted file mode 100644 index bb5478c..0000000 --- a/pms/docs/GetRecentlyAdded200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetRecentlyAdded200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MediaContainer** | Pointer to [**GetRecentlyAdded200ResponseMediaContainer**](GetRecentlyAdded200ResponseMediaContainer.md) | | [optional] - -## Methods - -### NewGetRecentlyAdded200Response - -`func NewGetRecentlyAdded200Response() *GetRecentlyAdded200Response` - -NewGetRecentlyAdded200Response instantiates a new GetRecentlyAdded200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRecentlyAdded200ResponseWithDefaults - -`func NewGetRecentlyAdded200ResponseWithDefaults() *GetRecentlyAdded200Response` - -NewGetRecentlyAdded200ResponseWithDefaults instantiates a new GetRecentlyAdded200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMediaContainer - -`func (o *GetRecentlyAdded200Response) GetMediaContainer() GetRecentlyAdded200ResponseMediaContainer` - -GetMediaContainer returns the MediaContainer field if non-nil, zero value otherwise. - -### GetMediaContainerOk - -`func (o *GetRecentlyAdded200Response) GetMediaContainerOk() (*GetRecentlyAdded200ResponseMediaContainer, bool)` - -GetMediaContainerOk returns a tuple with the MediaContainer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaContainer - -`func (o *GetRecentlyAdded200Response) SetMediaContainer(v GetRecentlyAdded200ResponseMediaContainer)` - -SetMediaContainer sets MediaContainer field to given value. - -### HasMediaContainer - -`func (o *GetRecentlyAdded200Response) HasMediaContainer() bool` - -HasMediaContainer returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetRecentlyAdded200ResponseMediaContainer.md b/pms/docs/GetRecentlyAdded200ResponseMediaContainer.md deleted file mode 100644 index 4fb13ff..0000000 --- a/pms/docs/GetRecentlyAdded200ResponseMediaContainer.md +++ /dev/null @@ -1,282 +0,0 @@ -# GetRecentlyAdded200ResponseMediaContainer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Size** | Pointer to **interface{}** | | [optional] -**AllowSync** | Pointer to **interface{}** | | [optional] -**Identifier** | Pointer to **interface{}** | | [optional] -**MediaTagPrefix** | Pointer to **interface{}** | | [optional] -**MediaTagVersion** | Pointer to **interface{}** | | [optional] -**MixedParents** | Pointer to **interface{}** | | [optional] -**Metadata** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetRecentlyAdded200ResponseMediaContainer - -`func NewGetRecentlyAdded200ResponseMediaContainer() *GetRecentlyAdded200ResponseMediaContainer` - -NewGetRecentlyAdded200ResponseMediaContainer instantiates a new GetRecentlyAdded200ResponseMediaContainer object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetRecentlyAdded200ResponseMediaContainerWithDefaults - -`func NewGetRecentlyAdded200ResponseMediaContainerWithDefaults() *GetRecentlyAdded200ResponseMediaContainer` - -NewGetRecentlyAdded200ResponseMediaContainerWithDefaults instantiates a new GetRecentlyAdded200ResponseMediaContainer object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSize - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetSize() interface{}` - -GetSize returns the Size field if non-nil, zero value otherwise. - -### GetSizeOk - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetSizeOk() (*interface{}, bool)` - -GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSize - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetSize(v interface{})` - -SetSize sets Size field to given value. - -### HasSize - -`func (o *GetRecentlyAdded200ResponseMediaContainer) HasSize() bool` - -HasSize returns a boolean if a field has been set. - -### SetSizeNil - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetSizeNil(b bool)` - - SetSizeNil sets the value for Size to be an explicit nil - -### UnsetSize -`func (o *GetRecentlyAdded200ResponseMediaContainer) UnsetSize()` - -UnsetSize ensures that no value is present for Size, not even an explicit nil -### GetAllowSync - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetAllowSync() interface{}` - -GetAllowSync returns the AllowSync field if non-nil, zero value otherwise. - -### GetAllowSyncOk - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetAllowSyncOk() (*interface{}, bool)` - -GetAllowSyncOk returns a tuple with the AllowSync field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowSync - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetAllowSync(v interface{})` - -SetAllowSync sets AllowSync field to given value. - -### HasAllowSync - -`func (o *GetRecentlyAdded200ResponseMediaContainer) HasAllowSync() bool` - -HasAllowSync returns a boolean if a field has been set. - -### SetAllowSyncNil - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetAllowSyncNil(b bool)` - - SetAllowSyncNil sets the value for AllowSync to be an explicit nil - -### UnsetAllowSync -`func (o *GetRecentlyAdded200ResponseMediaContainer) UnsetAllowSync()` - -UnsetAllowSync ensures that no value is present for AllowSync, not even an explicit nil -### GetIdentifier - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetIdentifier() interface{}` - -GetIdentifier returns the Identifier field if non-nil, zero value otherwise. - -### GetIdentifierOk - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetIdentifierOk() (*interface{}, bool)` - -GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentifier - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetIdentifier(v interface{})` - -SetIdentifier sets Identifier field to given value. - -### HasIdentifier - -`func (o *GetRecentlyAdded200ResponseMediaContainer) HasIdentifier() bool` - -HasIdentifier returns a boolean if a field has been set. - -### SetIdentifierNil - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetIdentifierNil(b bool)` - - SetIdentifierNil sets the value for Identifier to be an explicit nil - -### UnsetIdentifier -`func (o *GetRecentlyAdded200ResponseMediaContainer) UnsetIdentifier()` - -UnsetIdentifier ensures that no value is present for Identifier, not even an explicit nil -### GetMediaTagPrefix - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetMediaTagPrefix() interface{}` - -GetMediaTagPrefix returns the MediaTagPrefix field if non-nil, zero value otherwise. - -### GetMediaTagPrefixOk - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetMediaTagPrefixOk() (*interface{}, bool)` - -GetMediaTagPrefixOk returns a tuple with the MediaTagPrefix field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaTagPrefix - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetMediaTagPrefix(v interface{})` - -SetMediaTagPrefix sets MediaTagPrefix field to given value. - -### HasMediaTagPrefix - -`func (o *GetRecentlyAdded200ResponseMediaContainer) HasMediaTagPrefix() bool` - -HasMediaTagPrefix returns a boolean if a field has been set. - -### SetMediaTagPrefixNil - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetMediaTagPrefixNil(b bool)` - - SetMediaTagPrefixNil sets the value for MediaTagPrefix to be an explicit nil - -### UnsetMediaTagPrefix -`func (o *GetRecentlyAdded200ResponseMediaContainer) UnsetMediaTagPrefix()` - -UnsetMediaTagPrefix ensures that no value is present for MediaTagPrefix, not even an explicit nil -### GetMediaTagVersion - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetMediaTagVersion() interface{}` - -GetMediaTagVersion returns the MediaTagVersion field if non-nil, zero value otherwise. - -### GetMediaTagVersionOk - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetMediaTagVersionOk() (*interface{}, bool)` - -GetMediaTagVersionOk returns a tuple with the MediaTagVersion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaTagVersion - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetMediaTagVersion(v interface{})` - -SetMediaTagVersion sets MediaTagVersion field to given value. - -### HasMediaTagVersion - -`func (o *GetRecentlyAdded200ResponseMediaContainer) HasMediaTagVersion() bool` - -HasMediaTagVersion returns a boolean if a field has been set. - -### SetMediaTagVersionNil - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetMediaTagVersionNil(b bool)` - - SetMediaTagVersionNil sets the value for MediaTagVersion to be an explicit nil - -### UnsetMediaTagVersion -`func (o *GetRecentlyAdded200ResponseMediaContainer) UnsetMediaTagVersion()` - -UnsetMediaTagVersion ensures that no value is present for MediaTagVersion, not even an explicit nil -### GetMixedParents - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetMixedParents() interface{}` - -GetMixedParents returns the MixedParents field if non-nil, zero value otherwise. - -### GetMixedParentsOk - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetMixedParentsOk() (*interface{}, bool)` - -GetMixedParentsOk returns a tuple with the MixedParents field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMixedParents - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetMixedParents(v interface{})` - -SetMixedParents sets MixedParents field to given value. - -### HasMixedParents - -`func (o *GetRecentlyAdded200ResponseMediaContainer) HasMixedParents() bool` - -HasMixedParents returns a boolean if a field has been set. - -### SetMixedParentsNil - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetMixedParentsNil(b bool)` - - SetMixedParentsNil sets the value for MixedParents to be an explicit nil - -### UnsetMixedParents -`func (o *GetRecentlyAdded200ResponseMediaContainer) UnsetMixedParents()` - -UnsetMixedParents ensures that no value is present for MixedParents, not even an explicit nil -### GetMetadata - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetMetadata() interface{}` - -GetMetadata returns the Metadata field if non-nil, zero value otherwise. - -### GetMetadataOk - -`func (o *GetRecentlyAdded200ResponseMediaContainer) GetMetadataOk() (*interface{}, bool)` - -GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetadata - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetMetadata(v interface{})` - -SetMetadata sets Metadata field to given value. - -### HasMetadata - -`func (o *GetRecentlyAdded200ResponseMediaContainer) HasMetadata() bool` - -HasMetadata returns a boolean if a field has been set. - -### SetMetadataNil - -`func (o *GetRecentlyAdded200ResponseMediaContainer) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *GetRecentlyAdded200ResponseMediaContainer) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetSearchResults200Response.md b/pms/docs/GetSearchResults200Response.md deleted file mode 100644 index 8c44885..0000000 --- a/pms/docs/GetSearchResults200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetSearchResults200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MediaContainer** | Pointer to [**GetSearchResults200ResponseMediaContainer**](GetSearchResults200ResponseMediaContainer.md) | | [optional] - -## Methods - -### NewGetSearchResults200Response - -`func NewGetSearchResults200Response() *GetSearchResults200Response` - -NewGetSearchResults200Response instantiates a new GetSearchResults200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetSearchResults200ResponseWithDefaults - -`func NewGetSearchResults200ResponseWithDefaults() *GetSearchResults200Response` - -NewGetSearchResults200ResponseWithDefaults instantiates a new GetSearchResults200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMediaContainer - -`func (o *GetSearchResults200Response) GetMediaContainer() GetSearchResults200ResponseMediaContainer` - -GetMediaContainer returns the MediaContainer field if non-nil, zero value otherwise. - -### GetMediaContainerOk - -`func (o *GetSearchResults200Response) GetMediaContainerOk() (*GetSearchResults200ResponseMediaContainer, bool)` - -GetMediaContainerOk returns a tuple with the MediaContainer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaContainer - -`func (o *GetSearchResults200Response) SetMediaContainer(v GetSearchResults200ResponseMediaContainer)` - -SetMediaContainer sets MediaContainer field to given value. - -### HasMediaContainer - -`func (o *GetSearchResults200Response) HasMediaContainer() bool` - -HasMediaContainer returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetSearchResults200ResponseMediaContainer.md b/pms/docs/GetSearchResults200ResponseMediaContainer.md deleted file mode 100644 index 8607c32..0000000 --- a/pms/docs/GetSearchResults200ResponseMediaContainer.md +++ /dev/null @@ -1,246 +0,0 @@ -# GetSearchResults200ResponseMediaContainer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Size** | Pointer to **interface{}** | | [optional] -**Identifier** | Pointer to **interface{}** | | [optional] -**MediaTagPrefix** | Pointer to **interface{}** | | [optional] -**MediaTagVersion** | Pointer to **interface{}** | | [optional] -**Metadata** | Pointer to **interface{}** | | [optional] -**Provider** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetSearchResults200ResponseMediaContainer - -`func NewGetSearchResults200ResponseMediaContainer() *GetSearchResults200ResponseMediaContainer` - -NewGetSearchResults200ResponseMediaContainer instantiates a new GetSearchResults200ResponseMediaContainer object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetSearchResults200ResponseMediaContainerWithDefaults - -`func NewGetSearchResults200ResponseMediaContainerWithDefaults() *GetSearchResults200ResponseMediaContainer` - -NewGetSearchResults200ResponseMediaContainerWithDefaults instantiates a new GetSearchResults200ResponseMediaContainer object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSize - -`func (o *GetSearchResults200ResponseMediaContainer) GetSize() interface{}` - -GetSize returns the Size field if non-nil, zero value otherwise. - -### GetSizeOk - -`func (o *GetSearchResults200ResponseMediaContainer) GetSizeOk() (*interface{}, bool)` - -GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSize - -`func (o *GetSearchResults200ResponseMediaContainer) SetSize(v interface{})` - -SetSize sets Size field to given value. - -### HasSize - -`func (o *GetSearchResults200ResponseMediaContainer) HasSize() bool` - -HasSize returns a boolean if a field has been set. - -### SetSizeNil - -`func (o *GetSearchResults200ResponseMediaContainer) SetSizeNil(b bool)` - - SetSizeNil sets the value for Size to be an explicit nil - -### UnsetSize -`func (o *GetSearchResults200ResponseMediaContainer) UnsetSize()` - -UnsetSize ensures that no value is present for Size, not even an explicit nil -### GetIdentifier - -`func (o *GetSearchResults200ResponseMediaContainer) GetIdentifier() interface{}` - -GetIdentifier returns the Identifier field if non-nil, zero value otherwise. - -### GetIdentifierOk - -`func (o *GetSearchResults200ResponseMediaContainer) GetIdentifierOk() (*interface{}, bool)` - -GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentifier - -`func (o *GetSearchResults200ResponseMediaContainer) SetIdentifier(v interface{})` - -SetIdentifier sets Identifier field to given value. - -### HasIdentifier - -`func (o *GetSearchResults200ResponseMediaContainer) HasIdentifier() bool` - -HasIdentifier returns a boolean if a field has been set. - -### SetIdentifierNil - -`func (o *GetSearchResults200ResponseMediaContainer) SetIdentifierNil(b bool)` - - SetIdentifierNil sets the value for Identifier to be an explicit nil - -### UnsetIdentifier -`func (o *GetSearchResults200ResponseMediaContainer) UnsetIdentifier()` - -UnsetIdentifier ensures that no value is present for Identifier, not even an explicit nil -### GetMediaTagPrefix - -`func (o *GetSearchResults200ResponseMediaContainer) GetMediaTagPrefix() interface{}` - -GetMediaTagPrefix returns the MediaTagPrefix field if non-nil, zero value otherwise. - -### GetMediaTagPrefixOk - -`func (o *GetSearchResults200ResponseMediaContainer) GetMediaTagPrefixOk() (*interface{}, bool)` - -GetMediaTagPrefixOk returns a tuple with the MediaTagPrefix field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaTagPrefix - -`func (o *GetSearchResults200ResponseMediaContainer) SetMediaTagPrefix(v interface{})` - -SetMediaTagPrefix sets MediaTagPrefix field to given value. - -### HasMediaTagPrefix - -`func (o *GetSearchResults200ResponseMediaContainer) HasMediaTagPrefix() bool` - -HasMediaTagPrefix returns a boolean if a field has been set. - -### SetMediaTagPrefixNil - -`func (o *GetSearchResults200ResponseMediaContainer) SetMediaTagPrefixNil(b bool)` - - SetMediaTagPrefixNil sets the value for MediaTagPrefix to be an explicit nil - -### UnsetMediaTagPrefix -`func (o *GetSearchResults200ResponseMediaContainer) UnsetMediaTagPrefix()` - -UnsetMediaTagPrefix ensures that no value is present for MediaTagPrefix, not even an explicit nil -### GetMediaTagVersion - -`func (o *GetSearchResults200ResponseMediaContainer) GetMediaTagVersion() interface{}` - -GetMediaTagVersion returns the MediaTagVersion field if non-nil, zero value otherwise. - -### GetMediaTagVersionOk - -`func (o *GetSearchResults200ResponseMediaContainer) GetMediaTagVersionOk() (*interface{}, bool)` - -GetMediaTagVersionOk returns a tuple with the MediaTagVersion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaTagVersion - -`func (o *GetSearchResults200ResponseMediaContainer) SetMediaTagVersion(v interface{})` - -SetMediaTagVersion sets MediaTagVersion field to given value. - -### HasMediaTagVersion - -`func (o *GetSearchResults200ResponseMediaContainer) HasMediaTagVersion() bool` - -HasMediaTagVersion returns a boolean if a field has been set. - -### SetMediaTagVersionNil - -`func (o *GetSearchResults200ResponseMediaContainer) SetMediaTagVersionNil(b bool)` - - SetMediaTagVersionNil sets the value for MediaTagVersion to be an explicit nil - -### UnsetMediaTagVersion -`func (o *GetSearchResults200ResponseMediaContainer) UnsetMediaTagVersion()` - -UnsetMediaTagVersion ensures that no value is present for MediaTagVersion, not even an explicit nil -### GetMetadata - -`func (o *GetSearchResults200ResponseMediaContainer) GetMetadata() interface{}` - -GetMetadata returns the Metadata field if non-nil, zero value otherwise. - -### GetMetadataOk - -`func (o *GetSearchResults200ResponseMediaContainer) GetMetadataOk() (*interface{}, bool)` - -GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetadata - -`func (o *GetSearchResults200ResponseMediaContainer) SetMetadata(v interface{})` - -SetMetadata sets Metadata field to given value. - -### HasMetadata - -`func (o *GetSearchResults200ResponseMediaContainer) HasMetadata() bool` - -HasMetadata returns a boolean if a field has been set. - -### SetMetadataNil - -`func (o *GetSearchResults200ResponseMediaContainer) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *GetSearchResults200ResponseMediaContainer) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil -### GetProvider - -`func (o *GetSearchResults200ResponseMediaContainer) GetProvider() interface{}` - -GetProvider returns the Provider field if non-nil, zero value otherwise. - -### GetProviderOk - -`func (o *GetSearchResults200ResponseMediaContainer) GetProviderOk() (*interface{}, bool)` - -GetProviderOk returns a tuple with the Provider field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProvider - -`func (o *GetSearchResults200ResponseMediaContainer) SetProvider(v interface{})` - -SetProvider sets Provider field to given value. - -### HasProvider - -`func (o *GetSearchResults200ResponseMediaContainer) HasProvider() bool` - -HasProvider returns a boolean if a field has been set. - -### SetProviderNil - -`func (o *GetSearchResults200ResponseMediaContainer) SetProviderNil(b bool)` - - SetProviderNil sets the value for Provider to be an explicit nil - -### UnsetProvider -`func (o *GetSearchResults200ResponseMediaContainer) UnsetProvider()` - -UnsetProvider ensures that no value is present for Provider, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetServerActivities200Response.md b/pms/docs/GetServerActivities200Response.md deleted file mode 100644 index 4ac0fff..0000000 --- a/pms/docs/GetServerActivities200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetServerActivities200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MediaContainer** | Pointer to [**GetServerActivities200ResponseMediaContainer**](GetServerActivities200ResponseMediaContainer.md) | | [optional] - -## Methods - -### NewGetServerActivities200Response - -`func NewGetServerActivities200Response() *GetServerActivities200Response` - -NewGetServerActivities200Response instantiates a new GetServerActivities200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetServerActivities200ResponseWithDefaults - -`func NewGetServerActivities200ResponseWithDefaults() *GetServerActivities200Response` - -NewGetServerActivities200ResponseWithDefaults instantiates a new GetServerActivities200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMediaContainer - -`func (o *GetServerActivities200Response) GetMediaContainer() GetServerActivities200ResponseMediaContainer` - -GetMediaContainer returns the MediaContainer field if non-nil, zero value otherwise. - -### GetMediaContainerOk - -`func (o *GetServerActivities200Response) GetMediaContainerOk() (*GetServerActivities200ResponseMediaContainer, bool)` - -GetMediaContainerOk returns a tuple with the MediaContainer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaContainer - -`func (o *GetServerActivities200Response) SetMediaContainer(v GetServerActivities200ResponseMediaContainer)` - -SetMediaContainer sets MediaContainer field to given value. - -### HasMediaContainer - -`func (o *GetServerActivities200Response) HasMediaContainer() bool` - -HasMediaContainer returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetServerActivities200ResponseMediaContainer.md b/pms/docs/GetServerActivities200ResponseMediaContainer.md deleted file mode 100644 index 85ea211..0000000 --- a/pms/docs/GetServerActivities200ResponseMediaContainer.md +++ /dev/null @@ -1,102 +0,0 @@ -# GetServerActivities200ResponseMediaContainer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Size** | Pointer to **interface{}** | | [optional] -**Activity** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetServerActivities200ResponseMediaContainer - -`func NewGetServerActivities200ResponseMediaContainer() *GetServerActivities200ResponseMediaContainer` - -NewGetServerActivities200ResponseMediaContainer instantiates a new GetServerActivities200ResponseMediaContainer object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetServerActivities200ResponseMediaContainerWithDefaults - -`func NewGetServerActivities200ResponseMediaContainerWithDefaults() *GetServerActivities200ResponseMediaContainer` - -NewGetServerActivities200ResponseMediaContainerWithDefaults instantiates a new GetServerActivities200ResponseMediaContainer object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSize - -`func (o *GetServerActivities200ResponseMediaContainer) GetSize() interface{}` - -GetSize returns the Size field if non-nil, zero value otherwise. - -### GetSizeOk - -`func (o *GetServerActivities200ResponseMediaContainer) GetSizeOk() (*interface{}, bool)` - -GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSize - -`func (o *GetServerActivities200ResponseMediaContainer) SetSize(v interface{})` - -SetSize sets Size field to given value. - -### HasSize - -`func (o *GetServerActivities200ResponseMediaContainer) HasSize() bool` - -HasSize returns a boolean if a field has been set. - -### SetSizeNil - -`func (o *GetServerActivities200ResponseMediaContainer) SetSizeNil(b bool)` - - SetSizeNil sets the value for Size to be an explicit nil - -### UnsetSize -`func (o *GetServerActivities200ResponseMediaContainer) UnsetSize()` - -UnsetSize ensures that no value is present for Size, not even an explicit nil -### GetActivity - -`func (o *GetServerActivities200ResponseMediaContainer) GetActivity() interface{}` - -GetActivity returns the Activity field if non-nil, zero value otherwise. - -### GetActivityOk - -`func (o *GetServerActivities200ResponseMediaContainer) GetActivityOk() (*interface{}, bool)` - -GetActivityOk returns a tuple with the Activity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActivity - -`func (o *GetServerActivities200ResponseMediaContainer) SetActivity(v interface{})` - -SetActivity sets Activity field to given value. - -### HasActivity - -`func (o *GetServerActivities200ResponseMediaContainer) HasActivity() bool` - -HasActivity returns a boolean if a field has been set. - -### SetActivityNil - -`func (o *GetServerActivities200ResponseMediaContainer) SetActivityNil(b bool)` - - SetActivityNil sets the value for Activity to be an explicit nil - -### UnsetActivity -`func (o *GetServerActivities200ResponseMediaContainer) UnsetActivity()` - -UnsetActivity ensures that no value is present for Activity, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetServerCapabilities200Response.md b/pms/docs/GetServerCapabilities200Response.md deleted file mode 100644 index dfb40a1..0000000 --- a/pms/docs/GetServerCapabilities200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetServerCapabilities200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MediaContainer** | Pointer to [**GetServerCapabilities200ResponseMediaContainer**](GetServerCapabilities200ResponseMediaContainer.md) | | [optional] - -## Methods - -### NewGetServerCapabilities200Response - -`func NewGetServerCapabilities200Response() *GetServerCapabilities200Response` - -NewGetServerCapabilities200Response instantiates a new GetServerCapabilities200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetServerCapabilities200ResponseWithDefaults - -`func NewGetServerCapabilities200ResponseWithDefaults() *GetServerCapabilities200Response` - -NewGetServerCapabilities200ResponseWithDefaults instantiates a new GetServerCapabilities200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMediaContainer - -`func (o *GetServerCapabilities200Response) GetMediaContainer() GetServerCapabilities200ResponseMediaContainer` - -GetMediaContainer returns the MediaContainer field if non-nil, zero value otherwise. - -### GetMediaContainerOk - -`func (o *GetServerCapabilities200Response) GetMediaContainerOk() (*GetServerCapabilities200ResponseMediaContainer, bool)` - -GetMediaContainerOk returns a tuple with the MediaContainer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaContainer - -`func (o *GetServerCapabilities200Response) SetMediaContainer(v GetServerCapabilities200ResponseMediaContainer)` - -SetMediaContainer sets MediaContainer field to given value. - -### HasMediaContainer - -`func (o *GetServerCapabilities200Response) HasMediaContainer() bool` - -HasMediaContainer returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetServerCapabilities200ResponseMediaContainer.md b/pms/docs/GetServerCapabilities200ResponseMediaContainer.md deleted file mode 100644 index a654259..0000000 --- a/pms/docs/GetServerCapabilities200ResponseMediaContainer.md +++ /dev/null @@ -1,1866 +0,0 @@ -# GetServerCapabilities200ResponseMediaContainer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Size** | Pointer to **interface{}** | | [optional] -**AllowCameraUpload** | Pointer to **interface{}** | | [optional] -**AllowChannelAccess** | Pointer to **interface{}** | | [optional] -**AllowMediaDeletion** | Pointer to **interface{}** | | [optional] -**AllowSharing** | Pointer to **interface{}** | | [optional] -**AllowSync** | Pointer to **interface{}** | | [optional] -**AllowTuners** | Pointer to **interface{}** | | [optional] -**BackgroundProcessing** | Pointer to **interface{}** | | [optional] -**Certificate** | Pointer to **interface{}** | | [optional] -**CompanionProxy** | Pointer to **interface{}** | | [optional] -**CountryCode** | Pointer to **interface{}** | | [optional] -**Diagnostics** | Pointer to **interface{}** | | [optional] -**EventStream** | Pointer to **interface{}** | | [optional] -**FriendlyName** | Pointer to **interface{}** | | [optional] -**HubSearch** | Pointer to **interface{}** | | [optional] -**ItemClusters** | Pointer to **interface{}** | | [optional] -**Livetv** | Pointer to **interface{}** | | [optional] -**MachineIdentifier** | Pointer to **interface{}** | | [optional] -**MediaProviders** | Pointer to **interface{}** | | [optional] -**Multiuser** | Pointer to **interface{}** | | [optional] -**MusicAnalysis** | Pointer to **interface{}** | | [optional] -**MyPlex** | Pointer to **interface{}** | | [optional] -**MyPlexMappingState** | Pointer to **interface{}** | | [optional] -**MyPlexSigninState** | Pointer to **interface{}** | | [optional] -**MyPlexSubscription** | Pointer to **interface{}** | | [optional] -**MyPlexUsername** | Pointer to **interface{}** | | [optional] -**OfflineTranscode** | Pointer to **interface{}** | | [optional] -**OwnerFeatures** | Pointer to **interface{}** | | [optional] -**PhotoAutoTag** | Pointer to **interface{}** | | [optional] -**Platform** | Pointer to **interface{}** | | [optional] -**PlatformVersion** | Pointer to **interface{}** | | [optional] -**PluginHost** | Pointer to **interface{}** | | [optional] -**PushNotifications** | Pointer to **interface{}** | | [optional] -**ReadOnlyLibraries** | Pointer to **interface{}** | | [optional] -**StreamingBrainABRVersion** | Pointer to **interface{}** | | [optional] -**StreamingBrainVersion** | Pointer to **interface{}** | | [optional] -**Sync** | Pointer to **interface{}** | | [optional] -**TranscoderActiveVideoSessions** | Pointer to **interface{}** | | [optional] -**TranscoderAudio** | Pointer to **interface{}** | | [optional] -**TranscoderLyrics** | Pointer to **interface{}** | | [optional] -**TranscoderPhoto** | Pointer to **interface{}** | | [optional] -**TranscoderSubtitles** | Pointer to **interface{}** | | [optional] -**TranscoderVideo** | Pointer to **interface{}** | | [optional] -**TranscoderVideoBitrates** | Pointer to **interface{}** | | [optional] -**TranscoderVideoQualities** | Pointer to **interface{}** | | [optional] -**TranscoderVideoResolutions** | Pointer to **interface{}** | | [optional] -**UpdatedAt** | Pointer to **interface{}** | | [optional] -**Updater** | Pointer to **interface{}** | | [optional] -**Version** | Pointer to **interface{}** | | [optional] -**VoiceSearch** | Pointer to **interface{}** | | [optional] -**Directory** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetServerCapabilities200ResponseMediaContainer - -`func NewGetServerCapabilities200ResponseMediaContainer() *GetServerCapabilities200ResponseMediaContainer` - -NewGetServerCapabilities200ResponseMediaContainer instantiates a new GetServerCapabilities200ResponseMediaContainer object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetServerCapabilities200ResponseMediaContainerWithDefaults - -`func NewGetServerCapabilities200ResponseMediaContainerWithDefaults() *GetServerCapabilities200ResponseMediaContainer` - -NewGetServerCapabilities200ResponseMediaContainerWithDefaults instantiates a new GetServerCapabilities200ResponseMediaContainer object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSize - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetSize() interface{}` - -GetSize returns the Size field if non-nil, zero value otherwise. - -### GetSizeOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetSizeOk() (*interface{}, bool)` - -GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSize - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetSize(v interface{})` - -SetSize sets Size field to given value. - -### HasSize - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasSize() bool` - -HasSize returns a boolean if a field has been set. - -### SetSizeNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetSizeNil(b bool)` - - SetSizeNil sets the value for Size to be an explicit nil - -### UnsetSize -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetSize()` - -UnsetSize ensures that no value is present for Size, not even an explicit nil -### GetAllowCameraUpload - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowCameraUpload() interface{}` - -GetAllowCameraUpload returns the AllowCameraUpload field if non-nil, zero value otherwise. - -### GetAllowCameraUploadOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowCameraUploadOk() (*interface{}, bool)` - -GetAllowCameraUploadOk returns a tuple with the AllowCameraUpload field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowCameraUpload - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowCameraUpload(v interface{})` - -SetAllowCameraUpload sets AllowCameraUpload field to given value. - -### HasAllowCameraUpload - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowCameraUpload() bool` - -HasAllowCameraUpload returns a boolean if a field has been set. - -### SetAllowCameraUploadNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowCameraUploadNil(b bool)` - - SetAllowCameraUploadNil sets the value for AllowCameraUpload to be an explicit nil - -### UnsetAllowCameraUpload -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetAllowCameraUpload()` - -UnsetAllowCameraUpload ensures that no value is present for AllowCameraUpload, not even an explicit nil -### GetAllowChannelAccess - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowChannelAccess() interface{}` - -GetAllowChannelAccess returns the AllowChannelAccess field if non-nil, zero value otherwise. - -### GetAllowChannelAccessOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowChannelAccessOk() (*interface{}, bool)` - -GetAllowChannelAccessOk returns a tuple with the AllowChannelAccess field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowChannelAccess - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowChannelAccess(v interface{})` - -SetAllowChannelAccess sets AllowChannelAccess field to given value. - -### HasAllowChannelAccess - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowChannelAccess() bool` - -HasAllowChannelAccess returns a boolean if a field has been set. - -### SetAllowChannelAccessNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowChannelAccessNil(b bool)` - - SetAllowChannelAccessNil sets the value for AllowChannelAccess to be an explicit nil - -### UnsetAllowChannelAccess -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetAllowChannelAccess()` - -UnsetAllowChannelAccess ensures that no value is present for AllowChannelAccess, not even an explicit nil -### GetAllowMediaDeletion - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowMediaDeletion() interface{}` - -GetAllowMediaDeletion returns the AllowMediaDeletion field if non-nil, zero value otherwise. - -### GetAllowMediaDeletionOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowMediaDeletionOk() (*interface{}, bool)` - -GetAllowMediaDeletionOk returns a tuple with the AllowMediaDeletion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowMediaDeletion - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowMediaDeletion(v interface{})` - -SetAllowMediaDeletion sets AllowMediaDeletion field to given value. - -### HasAllowMediaDeletion - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowMediaDeletion() bool` - -HasAllowMediaDeletion returns a boolean if a field has been set. - -### SetAllowMediaDeletionNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowMediaDeletionNil(b bool)` - - SetAllowMediaDeletionNil sets the value for AllowMediaDeletion to be an explicit nil - -### UnsetAllowMediaDeletion -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetAllowMediaDeletion()` - -UnsetAllowMediaDeletion ensures that no value is present for AllowMediaDeletion, not even an explicit nil -### GetAllowSharing - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowSharing() interface{}` - -GetAllowSharing returns the AllowSharing field if non-nil, zero value otherwise. - -### GetAllowSharingOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowSharingOk() (*interface{}, bool)` - -GetAllowSharingOk returns a tuple with the AllowSharing field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowSharing - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowSharing(v interface{})` - -SetAllowSharing sets AllowSharing field to given value. - -### HasAllowSharing - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowSharing() bool` - -HasAllowSharing returns a boolean if a field has been set. - -### SetAllowSharingNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowSharingNil(b bool)` - - SetAllowSharingNil sets the value for AllowSharing to be an explicit nil - -### UnsetAllowSharing -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetAllowSharing()` - -UnsetAllowSharing ensures that no value is present for AllowSharing, not even an explicit nil -### GetAllowSync - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowSync() interface{}` - -GetAllowSync returns the AllowSync field if non-nil, zero value otherwise. - -### GetAllowSyncOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowSyncOk() (*interface{}, bool)` - -GetAllowSyncOk returns a tuple with the AllowSync field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowSync - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowSync(v interface{})` - -SetAllowSync sets AllowSync field to given value. - -### HasAllowSync - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowSync() bool` - -HasAllowSync returns a boolean if a field has been set. - -### SetAllowSyncNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowSyncNil(b bool)` - - SetAllowSyncNil sets the value for AllowSync to be an explicit nil - -### UnsetAllowSync -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetAllowSync()` - -UnsetAllowSync ensures that no value is present for AllowSync, not even an explicit nil -### GetAllowTuners - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowTuners() interface{}` - -GetAllowTuners returns the AllowTuners field if non-nil, zero value otherwise. - -### GetAllowTunersOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowTunersOk() (*interface{}, bool)` - -GetAllowTunersOk returns a tuple with the AllowTuners field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowTuners - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowTuners(v interface{})` - -SetAllowTuners sets AllowTuners field to given value. - -### HasAllowTuners - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowTuners() bool` - -HasAllowTuners returns a boolean if a field has been set. - -### SetAllowTunersNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowTunersNil(b bool)` - - SetAllowTunersNil sets the value for AllowTuners to be an explicit nil - -### UnsetAllowTuners -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetAllowTuners()` - -UnsetAllowTuners ensures that no value is present for AllowTuners, not even an explicit nil -### GetBackgroundProcessing - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetBackgroundProcessing() interface{}` - -GetBackgroundProcessing returns the BackgroundProcessing field if non-nil, zero value otherwise. - -### GetBackgroundProcessingOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetBackgroundProcessingOk() (*interface{}, bool)` - -GetBackgroundProcessingOk returns a tuple with the BackgroundProcessing field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBackgroundProcessing - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetBackgroundProcessing(v interface{})` - -SetBackgroundProcessing sets BackgroundProcessing field to given value. - -### HasBackgroundProcessing - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasBackgroundProcessing() bool` - -HasBackgroundProcessing returns a boolean if a field has been set. - -### SetBackgroundProcessingNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetBackgroundProcessingNil(b bool)` - - SetBackgroundProcessingNil sets the value for BackgroundProcessing to be an explicit nil - -### UnsetBackgroundProcessing -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetBackgroundProcessing()` - -UnsetBackgroundProcessing ensures that no value is present for BackgroundProcessing, not even an explicit nil -### GetCertificate - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetCertificate() interface{}` - -GetCertificate returns the Certificate field if non-nil, zero value otherwise. - -### GetCertificateOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetCertificateOk() (*interface{}, bool)` - -GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCertificate - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetCertificate(v interface{})` - -SetCertificate sets Certificate field to given value. - -### HasCertificate - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasCertificate() bool` - -HasCertificate returns a boolean if a field has been set. - -### SetCertificateNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetCertificateNil(b bool)` - - SetCertificateNil sets the value for Certificate to be an explicit nil - -### UnsetCertificate -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetCertificate()` - -UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil -### GetCompanionProxy - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetCompanionProxy() interface{}` - -GetCompanionProxy returns the CompanionProxy field if non-nil, zero value otherwise. - -### GetCompanionProxyOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetCompanionProxyOk() (*interface{}, bool)` - -GetCompanionProxyOk returns a tuple with the CompanionProxy field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCompanionProxy - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetCompanionProxy(v interface{})` - -SetCompanionProxy sets CompanionProxy field to given value. - -### HasCompanionProxy - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasCompanionProxy() bool` - -HasCompanionProxy returns a boolean if a field has been set. - -### SetCompanionProxyNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetCompanionProxyNil(b bool)` - - SetCompanionProxyNil sets the value for CompanionProxy to be an explicit nil - -### UnsetCompanionProxy -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetCompanionProxy()` - -UnsetCompanionProxy ensures that no value is present for CompanionProxy, not even an explicit nil -### GetCountryCode - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetCountryCode() interface{}` - -GetCountryCode returns the CountryCode field if non-nil, zero value otherwise. - -### GetCountryCodeOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetCountryCodeOk() (*interface{}, bool)` - -GetCountryCodeOk returns a tuple with the CountryCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCountryCode - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetCountryCode(v interface{})` - -SetCountryCode sets CountryCode field to given value. - -### HasCountryCode - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasCountryCode() bool` - -HasCountryCode returns a boolean if a field has been set. - -### SetCountryCodeNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetCountryCodeNil(b bool)` - - SetCountryCodeNil sets the value for CountryCode to be an explicit nil - -### UnsetCountryCode -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetCountryCode()` - -UnsetCountryCode ensures that no value is present for CountryCode, not even an explicit nil -### GetDiagnostics - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetDiagnostics() interface{}` - -GetDiagnostics returns the Diagnostics field if non-nil, zero value otherwise. - -### GetDiagnosticsOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetDiagnosticsOk() (*interface{}, bool)` - -GetDiagnosticsOk returns a tuple with the Diagnostics field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDiagnostics - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetDiagnostics(v interface{})` - -SetDiagnostics sets Diagnostics field to given value. - -### HasDiagnostics - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasDiagnostics() bool` - -HasDiagnostics returns a boolean if a field has been set. - -### SetDiagnosticsNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetDiagnosticsNil(b bool)` - - SetDiagnosticsNil sets the value for Diagnostics to be an explicit nil - -### UnsetDiagnostics -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetDiagnostics()` - -UnsetDiagnostics ensures that no value is present for Diagnostics, not even an explicit nil -### GetEventStream - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetEventStream() interface{}` - -GetEventStream returns the EventStream field if non-nil, zero value otherwise. - -### GetEventStreamOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetEventStreamOk() (*interface{}, bool)` - -GetEventStreamOk returns a tuple with the EventStream field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEventStream - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetEventStream(v interface{})` - -SetEventStream sets EventStream field to given value. - -### HasEventStream - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasEventStream() bool` - -HasEventStream returns a boolean if a field has been set. - -### SetEventStreamNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetEventStreamNil(b bool)` - - SetEventStreamNil sets the value for EventStream to be an explicit nil - -### UnsetEventStream -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetEventStream()` - -UnsetEventStream ensures that no value is present for EventStream, not even an explicit nil -### GetFriendlyName - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetFriendlyName() interface{}` - -GetFriendlyName returns the FriendlyName field if non-nil, zero value otherwise. - -### GetFriendlyNameOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetFriendlyNameOk() (*interface{}, bool)` - -GetFriendlyNameOk returns a tuple with the FriendlyName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFriendlyName - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetFriendlyName(v interface{})` - -SetFriendlyName sets FriendlyName field to given value. - -### HasFriendlyName - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasFriendlyName() bool` - -HasFriendlyName returns a boolean if a field has been set. - -### SetFriendlyNameNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetFriendlyNameNil(b bool)` - - SetFriendlyNameNil sets the value for FriendlyName to be an explicit nil - -### UnsetFriendlyName -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetFriendlyName()` - -UnsetFriendlyName ensures that no value is present for FriendlyName, not even an explicit nil -### GetHubSearch - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetHubSearch() interface{}` - -GetHubSearch returns the HubSearch field if non-nil, zero value otherwise. - -### GetHubSearchOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetHubSearchOk() (*interface{}, bool)` - -GetHubSearchOk returns a tuple with the HubSearch field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHubSearch - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetHubSearch(v interface{})` - -SetHubSearch sets HubSearch field to given value. - -### HasHubSearch - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasHubSearch() bool` - -HasHubSearch returns a boolean if a field has been set. - -### SetHubSearchNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetHubSearchNil(b bool)` - - SetHubSearchNil sets the value for HubSearch to be an explicit nil - -### UnsetHubSearch -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetHubSearch()` - -UnsetHubSearch ensures that no value is present for HubSearch, not even an explicit nil -### GetItemClusters - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetItemClusters() interface{}` - -GetItemClusters returns the ItemClusters field if non-nil, zero value otherwise. - -### GetItemClustersOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetItemClustersOk() (*interface{}, bool)` - -GetItemClustersOk returns a tuple with the ItemClusters field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItemClusters - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetItemClusters(v interface{})` - -SetItemClusters sets ItemClusters field to given value. - -### HasItemClusters - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasItemClusters() bool` - -HasItemClusters returns a boolean if a field has been set. - -### SetItemClustersNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetItemClustersNil(b bool)` - - SetItemClustersNil sets the value for ItemClusters to be an explicit nil - -### UnsetItemClusters -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetItemClusters()` - -UnsetItemClusters ensures that no value is present for ItemClusters, not even an explicit nil -### GetLivetv - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetLivetv() interface{}` - -GetLivetv returns the Livetv field if non-nil, zero value otherwise. - -### GetLivetvOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetLivetvOk() (*interface{}, bool)` - -GetLivetvOk returns a tuple with the Livetv field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLivetv - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetLivetv(v interface{})` - -SetLivetv sets Livetv field to given value. - -### HasLivetv - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasLivetv() bool` - -HasLivetv returns a boolean if a field has been set. - -### SetLivetvNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetLivetvNil(b bool)` - - SetLivetvNil sets the value for Livetv to be an explicit nil - -### UnsetLivetv -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetLivetv()` - -UnsetLivetv ensures that no value is present for Livetv, not even an explicit nil -### GetMachineIdentifier - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMachineIdentifier() interface{}` - -GetMachineIdentifier returns the MachineIdentifier field if non-nil, zero value otherwise. - -### GetMachineIdentifierOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMachineIdentifierOk() (*interface{}, bool)` - -GetMachineIdentifierOk returns a tuple with the MachineIdentifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMachineIdentifier - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMachineIdentifier(v interface{})` - -SetMachineIdentifier sets MachineIdentifier field to given value. - -### HasMachineIdentifier - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasMachineIdentifier() bool` - -HasMachineIdentifier returns a boolean if a field has been set. - -### SetMachineIdentifierNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMachineIdentifierNil(b bool)` - - SetMachineIdentifierNil sets the value for MachineIdentifier to be an explicit nil - -### UnsetMachineIdentifier -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetMachineIdentifier()` - -UnsetMachineIdentifier ensures that no value is present for MachineIdentifier, not even an explicit nil -### GetMediaProviders - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMediaProviders() interface{}` - -GetMediaProviders returns the MediaProviders field if non-nil, zero value otherwise. - -### GetMediaProvidersOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMediaProvidersOk() (*interface{}, bool)` - -GetMediaProvidersOk returns a tuple with the MediaProviders field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaProviders - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMediaProviders(v interface{})` - -SetMediaProviders sets MediaProviders field to given value. - -### HasMediaProviders - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasMediaProviders() bool` - -HasMediaProviders returns a boolean if a field has been set. - -### SetMediaProvidersNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMediaProvidersNil(b bool)` - - SetMediaProvidersNil sets the value for MediaProviders to be an explicit nil - -### UnsetMediaProviders -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetMediaProviders()` - -UnsetMediaProviders ensures that no value is present for MediaProviders, not even an explicit nil -### GetMultiuser - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMultiuser() interface{}` - -GetMultiuser returns the Multiuser field if non-nil, zero value otherwise. - -### GetMultiuserOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMultiuserOk() (*interface{}, bool)` - -GetMultiuserOk returns a tuple with the Multiuser field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMultiuser - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMultiuser(v interface{})` - -SetMultiuser sets Multiuser field to given value. - -### HasMultiuser - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasMultiuser() bool` - -HasMultiuser returns a boolean if a field has been set. - -### SetMultiuserNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMultiuserNil(b bool)` - - SetMultiuserNil sets the value for Multiuser to be an explicit nil - -### UnsetMultiuser -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetMultiuser()` - -UnsetMultiuser ensures that no value is present for Multiuser, not even an explicit nil -### GetMusicAnalysis - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMusicAnalysis() interface{}` - -GetMusicAnalysis returns the MusicAnalysis field if non-nil, zero value otherwise. - -### GetMusicAnalysisOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMusicAnalysisOk() (*interface{}, bool)` - -GetMusicAnalysisOk returns a tuple with the MusicAnalysis field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMusicAnalysis - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMusicAnalysis(v interface{})` - -SetMusicAnalysis sets MusicAnalysis field to given value. - -### HasMusicAnalysis - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasMusicAnalysis() bool` - -HasMusicAnalysis returns a boolean if a field has been set. - -### SetMusicAnalysisNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMusicAnalysisNil(b bool)` - - SetMusicAnalysisNil sets the value for MusicAnalysis to be an explicit nil - -### UnsetMusicAnalysis -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetMusicAnalysis()` - -UnsetMusicAnalysis ensures that no value is present for MusicAnalysis, not even an explicit nil -### GetMyPlex - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlex() interface{}` - -GetMyPlex returns the MyPlex field if non-nil, zero value otherwise. - -### GetMyPlexOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexOk() (*interface{}, bool)` - -GetMyPlexOk returns a tuple with the MyPlex field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMyPlex - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlex(v interface{})` - -SetMyPlex sets MyPlex field to given value. - -### HasMyPlex - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasMyPlex() bool` - -HasMyPlex returns a boolean if a field has been set. - -### SetMyPlexNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexNil(b bool)` - - SetMyPlexNil sets the value for MyPlex to be an explicit nil - -### UnsetMyPlex -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetMyPlex()` - -UnsetMyPlex ensures that no value is present for MyPlex, not even an explicit nil -### GetMyPlexMappingState - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexMappingState() interface{}` - -GetMyPlexMappingState returns the MyPlexMappingState field if non-nil, zero value otherwise. - -### GetMyPlexMappingStateOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexMappingStateOk() (*interface{}, bool)` - -GetMyPlexMappingStateOk returns a tuple with the MyPlexMappingState field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMyPlexMappingState - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexMappingState(v interface{})` - -SetMyPlexMappingState sets MyPlexMappingState field to given value. - -### HasMyPlexMappingState - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasMyPlexMappingState() bool` - -HasMyPlexMappingState returns a boolean if a field has been set. - -### SetMyPlexMappingStateNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexMappingStateNil(b bool)` - - SetMyPlexMappingStateNil sets the value for MyPlexMappingState to be an explicit nil - -### UnsetMyPlexMappingState -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetMyPlexMappingState()` - -UnsetMyPlexMappingState ensures that no value is present for MyPlexMappingState, not even an explicit nil -### GetMyPlexSigninState - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexSigninState() interface{}` - -GetMyPlexSigninState returns the MyPlexSigninState field if non-nil, zero value otherwise. - -### GetMyPlexSigninStateOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexSigninStateOk() (*interface{}, bool)` - -GetMyPlexSigninStateOk returns a tuple with the MyPlexSigninState field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMyPlexSigninState - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexSigninState(v interface{})` - -SetMyPlexSigninState sets MyPlexSigninState field to given value. - -### HasMyPlexSigninState - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasMyPlexSigninState() bool` - -HasMyPlexSigninState returns a boolean if a field has been set. - -### SetMyPlexSigninStateNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexSigninStateNil(b bool)` - - SetMyPlexSigninStateNil sets the value for MyPlexSigninState to be an explicit nil - -### UnsetMyPlexSigninState -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetMyPlexSigninState()` - -UnsetMyPlexSigninState ensures that no value is present for MyPlexSigninState, not even an explicit nil -### GetMyPlexSubscription - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexSubscription() interface{}` - -GetMyPlexSubscription returns the MyPlexSubscription field if non-nil, zero value otherwise. - -### GetMyPlexSubscriptionOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexSubscriptionOk() (*interface{}, bool)` - -GetMyPlexSubscriptionOk returns a tuple with the MyPlexSubscription field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMyPlexSubscription - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexSubscription(v interface{})` - -SetMyPlexSubscription sets MyPlexSubscription field to given value. - -### HasMyPlexSubscription - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasMyPlexSubscription() bool` - -HasMyPlexSubscription returns a boolean if a field has been set. - -### SetMyPlexSubscriptionNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexSubscriptionNil(b bool)` - - SetMyPlexSubscriptionNil sets the value for MyPlexSubscription to be an explicit nil - -### UnsetMyPlexSubscription -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetMyPlexSubscription()` - -UnsetMyPlexSubscription ensures that no value is present for MyPlexSubscription, not even an explicit nil -### GetMyPlexUsername - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexUsername() interface{}` - -GetMyPlexUsername returns the MyPlexUsername field if non-nil, zero value otherwise. - -### GetMyPlexUsernameOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexUsernameOk() (*interface{}, bool)` - -GetMyPlexUsernameOk returns a tuple with the MyPlexUsername field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMyPlexUsername - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexUsername(v interface{})` - -SetMyPlexUsername sets MyPlexUsername field to given value. - -### HasMyPlexUsername - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasMyPlexUsername() bool` - -HasMyPlexUsername returns a boolean if a field has been set. - -### SetMyPlexUsernameNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexUsernameNil(b bool)` - - SetMyPlexUsernameNil sets the value for MyPlexUsername to be an explicit nil - -### UnsetMyPlexUsername -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetMyPlexUsername()` - -UnsetMyPlexUsername ensures that no value is present for MyPlexUsername, not even an explicit nil -### GetOfflineTranscode - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetOfflineTranscode() interface{}` - -GetOfflineTranscode returns the OfflineTranscode field if non-nil, zero value otherwise. - -### GetOfflineTranscodeOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetOfflineTranscodeOk() (*interface{}, bool)` - -GetOfflineTranscodeOk returns a tuple with the OfflineTranscode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOfflineTranscode - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetOfflineTranscode(v interface{})` - -SetOfflineTranscode sets OfflineTranscode field to given value. - -### HasOfflineTranscode - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasOfflineTranscode() bool` - -HasOfflineTranscode returns a boolean if a field has been set. - -### SetOfflineTranscodeNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetOfflineTranscodeNil(b bool)` - - SetOfflineTranscodeNil sets the value for OfflineTranscode to be an explicit nil - -### UnsetOfflineTranscode -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetOfflineTranscode()` - -UnsetOfflineTranscode ensures that no value is present for OfflineTranscode, not even an explicit nil -### GetOwnerFeatures - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetOwnerFeatures() interface{}` - -GetOwnerFeatures returns the OwnerFeatures field if non-nil, zero value otherwise. - -### GetOwnerFeaturesOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetOwnerFeaturesOk() (*interface{}, bool)` - -GetOwnerFeaturesOk returns a tuple with the OwnerFeatures field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOwnerFeatures - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetOwnerFeatures(v interface{})` - -SetOwnerFeatures sets OwnerFeatures field to given value. - -### HasOwnerFeatures - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasOwnerFeatures() bool` - -HasOwnerFeatures returns a boolean if a field has been set. - -### SetOwnerFeaturesNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetOwnerFeaturesNil(b bool)` - - SetOwnerFeaturesNil sets the value for OwnerFeatures to be an explicit nil - -### UnsetOwnerFeatures -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetOwnerFeatures()` - -UnsetOwnerFeatures ensures that no value is present for OwnerFeatures, not even an explicit nil -### GetPhotoAutoTag - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetPhotoAutoTag() interface{}` - -GetPhotoAutoTag returns the PhotoAutoTag field if non-nil, zero value otherwise. - -### GetPhotoAutoTagOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetPhotoAutoTagOk() (*interface{}, bool)` - -GetPhotoAutoTagOk returns a tuple with the PhotoAutoTag field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPhotoAutoTag - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetPhotoAutoTag(v interface{})` - -SetPhotoAutoTag sets PhotoAutoTag field to given value. - -### HasPhotoAutoTag - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasPhotoAutoTag() bool` - -HasPhotoAutoTag returns a boolean if a field has been set. - -### SetPhotoAutoTagNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetPhotoAutoTagNil(b bool)` - - SetPhotoAutoTagNil sets the value for PhotoAutoTag to be an explicit nil - -### UnsetPhotoAutoTag -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetPhotoAutoTag()` - -UnsetPhotoAutoTag ensures that no value is present for PhotoAutoTag, not even an explicit nil -### GetPlatform - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetPlatform() interface{}` - -GetPlatform returns the Platform field if non-nil, zero value otherwise. - -### GetPlatformOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetPlatformOk() (*interface{}, bool)` - -GetPlatformOk returns a tuple with the Platform field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPlatform - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetPlatform(v interface{})` - -SetPlatform sets Platform field to given value. - -### HasPlatform - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasPlatform() bool` - -HasPlatform returns a boolean if a field has been set. - -### SetPlatformNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetPlatformNil(b bool)` - - SetPlatformNil sets the value for Platform to be an explicit nil - -### UnsetPlatform -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetPlatform()` - -UnsetPlatform ensures that no value is present for Platform, not even an explicit nil -### GetPlatformVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetPlatformVersion() interface{}` - -GetPlatformVersion returns the PlatformVersion field if non-nil, zero value otherwise. - -### GetPlatformVersionOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetPlatformVersionOk() (*interface{}, bool)` - -GetPlatformVersionOk returns a tuple with the PlatformVersion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPlatformVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetPlatformVersion(v interface{})` - -SetPlatformVersion sets PlatformVersion field to given value. - -### HasPlatformVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasPlatformVersion() bool` - -HasPlatformVersion returns a boolean if a field has been set. - -### SetPlatformVersionNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetPlatformVersionNil(b bool)` - - SetPlatformVersionNil sets the value for PlatformVersion to be an explicit nil - -### UnsetPlatformVersion -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetPlatformVersion()` - -UnsetPlatformVersion ensures that no value is present for PlatformVersion, not even an explicit nil -### GetPluginHost - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetPluginHost() interface{}` - -GetPluginHost returns the PluginHost field if non-nil, zero value otherwise. - -### GetPluginHostOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetPluginHostOk() (*interface{}, bool)` - -GetPluginHostOk returns a tuple with the PluginHost field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPluginHost - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetPluginHost(v interface{})` - -SetPluginHost sets PluginHost field to given value. - -### HasPluginHost - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasPluginHost() bool` - -HasPluginHost returns a boolean if a field has been set. - -### SetPluginHostNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetPluginHostNil(b bool)` - - SetPluginHostNil sets the value for PluginHost to be an explicit nil - -### UnsetPluginHost -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetPluginHost()` - -UnsetPluginHost ensures that no value is present for PluginHost, not even an explicit nil -### GetPushNotifications - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetPushNotifications() interface{}` - -GetPushNotifications returns the PushNotifications field if non-nil, zero value otherwise. - -### GetPushNotificationsOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetPushNotificationsOk() (*interface{}, bool)` - -GetPushNotificationsOk returns a tuple with the PushNotifications field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPushNotifications - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetPushNotifications(v interface{})` - -SetPushNotifications sets PushNotifications field to given value. - -### HasPushNotifications - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasPushNotifications() bool` - -HasPushNotifications returns a boolean if a field has been set. - -### SetPushNotificationsNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetPushNotificationsNil(b bool)` - - SetPushNotificationsNil sets the value for PushNotifications to be an explicit nil - -### UnsetPushNotifications -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetPushNotifications()` - -UnsetPushNotifications ensures that no value is present for PushNotifications, not even an explicit nil -### GetReadOnlyLibraries - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetReadOnlyLibraries() interface{}` - -GetReadOnlyLibraries returns the ReadOnlyLibraries field if non-nil, zero value otherwise. - -### GetReadOnlyLibrariesOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetReadOnlyLibrariesOk() (*interface{}, bool)` - -GetReadOnlyLibrariesOk returns a tuple with the ReadOnlyLibraries field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetReadOnlyLibraries - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetReadOnlyLibraries(v interface{})` - -SetReadOnlyLibraries sets ReadOnlyLibraries field to given value. - -### HasReadOnlyLibraries - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasReadOnlyLibraries() bool` - -HasReadOnlyLibraries returns a boolean if a field has been set. - -### SetReadOnlyLibrariesNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetReadOnlyLibrariesNil(b bool)` - - SetReadOnlyLibrariesNil sets the value for ReadOnlyLibraries to be an explicit nil - -### UnsetReadOnlyLibraries -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetReadOnlyLibraries()` - -UnsetReadOnlyLibraries ensures that no value is present for ReadOnlyLibraries, not even an explicit nil -### GetStreamingBrainABRVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetStreamingBrainABRVersion() interface{}` - -GetStreamingBrainABRVersion returns the StreamingBrainABRVersion field if non-nil, zero value otherwise. - -### GetStreamingBrainABRVersionOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetStreamingBrainABRVersionOk() (*interface{}, bool)` - -GetStreamingBrainABRVersionOk returns a tuple with the StreamingBrainABRVersion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStreamingBrainABRVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetStreamingBrainABRVersion(v interface{})` - -SetStreamingBrainABRVersion sets StreamingBrainABRVersion field to given value. - -### HasStreamingBrainABRVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasStreamingBrainABRVersion() bool` - -HasStreamingBrainABRVersion returns a boolean if a field has been set. - -### SetStreamingBrainABRVersionNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetStreamingBrainABRVersionNil(b bool)` - - SetStreamingBrainABRVersionNil sets the value for StreamingBrainABRVersion to be an explicit nil - -### UnsetStreamingBrainABRVersion -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetStreamingBrainABRVersion()` - -UnsetStreamingBrainABRVersion ensures that no value is present for StreamingBrainABRVersion, not even an explicit nil -### GetStreamingBrainVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetStreamingBrainVersion() interface{}` - -GetStreamingBrainVersion returns the StreamingBrainVersion field if non-nil, zero value otherwise. - -### GetStreamingBrainVersionOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetStreamingBrainVersionOk() (*interface{}, bool)` - -GetStreamingBrainVersionOk returns a tuple with the StreamingBrainVersion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStreamingBrainVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetStreamingBrainVersion(v interface{})` - -SetStreamingBrainVersion sets StreamingBrainVersion field to given value. - -### HasStreamingBrainVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasStreamingBrainVersion() bool` - -HasStreamingBrainVersion returns a boolean if a field has been set. - -### SetStreamingBrainVersionNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetStreamingBrainVersionNil(b bool)` - - SetStreamingBrainVersionNil sets the value for StreamingBrainVersion to be an explicit nil - -### UnsetStreamingBrainVersion -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetStreamingBrainVersion()` - -UnsetStreamingBrainVersion ensures that no value is present for StreamingBrainVersion, not even an explicit nil -### GetSync - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetSync() interface{}` - -GetSync returns the Sync field if non-nil, zero value otherwise. - -### GetSyncOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetSyncOk() (*interface{}, bool)` - -GetSyncOk returns a tuple with the Sync field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSync - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetSync(v interface{})` - -SetSync sets Sync field to given value. - -### HasSync - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasSync() bool` - -HasSync returns a boolean if a field has been set. - -### SetSyncNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetSyncNil(b bool)` - - SetSyncNil sets the value for Sync to be an explicit nil - -### UnsetSync -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetSync()` - -UnsetSync ensures that no value is present for Sync, not even an explicit nil -### GetTranscoderActiveVideoSessions - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderActiveVideoSessions() interface{}` - -GetTranscoderActiveVideoSessions returns the TranscoderActiveVideoSessions field if non-nil, zero value otherwise. - -### GetTranscoderActiveVideoSessionsOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderActiveVideoSessionsOk() (*interface{}, bool)` - -GetTranscoderActiveVideoSessionsOk returns a tuple with the TranscoderActiveVideoSessions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTranscoderActiveVideoSessions - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderActiveVideoSessions(v interface{})` - -SetTranscoderActiveVideoSessions sets TranscoderActiveVideoSessions field to given value. - -### HasTranscoderActiveVideoSessions - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderActiveVideoSessions() bool` - -HasTranscoderActiveVideoSessions returns a boolean if a field has been set. - -### SetTranscoderActiveVideoSessionsNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderActiveVideoSessionsNil(b bool)` - - SetTranscoderActiveVideoSessionsNil sets the value for TranscoderActiveVideoSessions to be an explicit nil - -### UnsetTranscoderActiveVideoSessions -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetTranscoderActiveVideoSessions()` - -UnsetTranscoderActiveVideoSessions ensures that no value is present for TranscoderActiveVideoSessions, not even an explicit nil -### GetTranscoderAudio - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderAudio() interface{}` - -GetTranscoderAudio returns the TranscoderAudio field if non-nil, zero value otherwise. - -### GetTranscoderAudioOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderAudioOk() (*interface{}, bool)` - -GetTranscoderAudioOk returns a tuple with the TranscoderAudio field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTranscoderAudio - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderAudio(v interface{})` - -SetTranscoderAudio sets TranscoderAudio field to given value. - -### HasTranscoderAudio - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderAudio() bool` - -HasTranscoderAudio returns a boolean if a field has been set. - -### SetTranscoderAudioNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderAudioNil(b bool)` - - SetTranscoderAudioNil sets the value for TranscoderAudio to be an explicit nil - -### UnsetTranscoderAudio -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetTranscoderAudio()` - -UnsetTranscoderAudio ensures that no value is present for TranscoderAudio, not even an explicit nil -### GetTranscoderLyrics - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderLyrics() interface{}` - -GetTranscoderLyrics returns the TranscoderLyrics field if non-nil, zero value otherwise. - -### GetTranscoderLyricsOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderLyricsOk() (*interface{}, bool)` - -GetTranscoderLyricsOk returns a tuple with the TranscoderLyrics field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTranscoderLyrics - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderLyrics(v interface{})` - -SetTranscoderLyrics sets TranscoderLyrics field to given value. - -### HasTranscoderLyrics - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderLyrics() bool` - -HasTranscoderLyrics returns a boolean if a field has been set. - -### SetTranscoderLyricsNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderLyricsNil(b bool)` - - SetTranscoderLyricsNil sets the value for TranscoderLyrics to be an explicit nil - -### UnsetTranscoderLyrics -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetTranscoderLyrics()` - -UnsetTranscoderLyrics ensures that no value is present for TranscoderLyrics, not even an explicit nil -### GetTranscoderPhoto - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderPhoto() interface{}` - -GetTranscoderPhoto returns the TranscoderPhoto field if non-nil, zero value otherwise. - -### GetTranscoderPhotoOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderPhotoOk() (*interface{}, bool)` - -GetTranscoderPhotoOk returns a tuple with the TranscoderPhoto field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTranscoderPhoto - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderPhoto(v interface{})` - -SetTranscoderPhoto sets TranscoderPhoto field to given value. - -### HasTranscoderPhoto - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderPhoto() bool` - -HasTranscoderPhoto returns a boolean if a field has been set. - -### SetTranscoderPhotoNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderPhotoNil(b bool)` - - SetTranscoderPhotoNil sets the value for TranscoderPhoto to be an explicit nil - -### UnsetTranscoderPhoto -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetTranscoderPhoto()` - -UnsetTranscoderPhoto ensures that no value is present for TranscoderPhoto, not even an explicit nil -### GetTranscoderSubtitles - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderSubtitles() interface{}` - -GetTranscoderSubtitles returns the TranscoderSubtitles field if non-nil, zero value otherwise. - -### GetTranscoderSubtitlesOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderSubtitlesOk() (*interface{}, bool)` - -GetTranscoderSubtitlesOk returns a tuple with the TranscoderSubtitles field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTranscoderSubtitles - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderSubtitles(v interface{})` - -SetTranscoderSubtitles sets TranscoderSubtitles field to given value. - -### HasTranscoderSubtitles - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderSubtitles() bool` - -HasTranscoderSubtitles returns a boolean if a field has been set. - -### SetTranscoderSubtitlesNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderSubtitlesNil(b bool)` - - SetTranscoderSubtitlesNil sets the value for TranscoderSubtitles to be an explicit nil - -### UnsetTranscoderSubtitles -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetTranscoderSubtitles()` - -UnsetTranscoderSubtitles ensures that no value is present for TranscoderSubtitles, not even an explicit nil -### GetTranscoderVideo - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideo() interface{}` - -GetTranscoderVideo returns the TranscoderVideo field if non-nil, zero value otherwise. - -### GetTranscoderVideoOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoOk() (*interface{}, bool)` - -GetTranscoderVideoOk returns a tuple with the TranscoderVideo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTranscoderVideo - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideo(v interface{})` - -SetTranscoderVideo sets TranscoderVideo field to given value. - -### HasTranscoderVideo - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderVideo() bool` - -HasTranscoderVideo returns a boolean if a field has been set. - -### SetTranscoderVideoNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideoNil(b bool)` - - SetTranscoderVideoNil sets the value for TranscoderVideo to be an explicit nil - -### UnsetTranscoderVideo -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetTranscoderVideo()` - -UnsetTranscoderVideo ensures that no value is present for TranscoderVideo, not even an explicit nil -### GetTranscoderVideoBitrates - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoBitrates() interface{}` - -GetTranscoderVideoBitrates returns the TranscoderVideoBitrates field if non-nil, zero value otherwise. - -### GetTranscoderVideoBitratesOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoBitratesOk() (*interface{}, bool)` - -GetTranscoderVideoBitratesOk returns a tuple with the TranscoderVideoBitrates field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTranscoderVideoBitrates - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideoBitrates(v interface{})` - -SetTranscoderVideoBitrates sets TranscoderVideoBitrates field to given value. - -### HasTranscoderVideoBitrates - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderVideoBitrates() bool` - -HasTranscoderVideoBitrates returns a boolean if a field has been set. - -### SetTranscoderVideoBitratesNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideoBitratesNil(b bool)` - - SetTranscoderVideoBitratesNil sets the value for TranscoderVideoBitrates to be an explicit nil - -### UnsetTranscoderVideoBitrates -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetTranscoderVideoBitrates()` - -UnsetTranscoderVideoBitrates ensures that no value is present for TranscoderVideoBitrates, not even an explicit nil -### GetTranscoderVideoQualities - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoQualities() interface{}` - -GetTranscoderVideoQualities returns the TranscoderVideoQualities field if non-nil, zero value otherwise. - -### GetTranscoderVideoQualitiesOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoQualitiesOk() (*interface{}, bool)` - -GetTranscoderVideoQualitiesOk returns a tuple with the TranscoderVideoQualities field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTranscoderVideoQualities - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideoQualities(v interface{})` - -SetTranscoderVideoQualities sets TranscoderVideoQualities field to given value. - -### HasTranscoderVideoQualities - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderVideoQualities() bool` - -HasTranscoderVideoQualities returns a boolean if a field has been set. - -### SetTranscoderVideoQualitiesNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideoQualitiesNil(b bool)` - - SetTranscoderVideoQualitiesNil sets the value for TranscoderVideoQualities to be an explicit nil - -### UnsetTranscoderVideoQualities -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetTranscoderVideoQualities()` - -UnsetTranscoderVideoQualities ensures that no value is present for TranscoderVideoQualities, not even an explicit nil -### GetTranscoderVideoResolutions - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoResolutions() interface{}` - -GetTranscoderVideoResolutions returns the TranscoderVideoResolutions field if non-nil, zero value otherwise. - -### GetTranscoderVideoResolutionsOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoResolutionsOk() (*interface{}, bool)` - -GetTranscoderVideoResolutionsOk returns a tuple with the TranscoderVideoResolutions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTranscoderVideoResolutions - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideoResolutions(v interface{})` - -SetTranscoderVideoResolutions sets TranscoderVideoResolutions field to given value. - -### HasTranscoderVideoResolutions - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderVideoResolutions() bool` - -HasTranscoderVideoResolutions returns a boolean if a field has been set. - -### SetTranscoderVideoResolutionsNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideoResolutionsNil(b bool)` - - SetTranscoderVideoResolutionsNil sets the value for TranscoderVideoResolutions to be an explicit nil - -### UnsetTranscoderVideoResolutions -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetTranscoderVideoResolutions()` - -UnsetTranscoderVideoResolutions ensures that no value is present for TranscoderVideoResolutions, not even an explicit nil -### GetUpdatedAt - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetUpdatedAt() interface{}` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetUpdatedAtOk() (*interface{}, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetUpdatedAt(v interface{})` - -SetUpdatedAt sets UpdatedAt field to given value. - -### HasUpdatedAt - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasUpdatedAt() bool` - -HasUpdatedAt returns a boolean if a field has been set. - -### SetUpdatedAtNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetUpdatedAtNil(b bool)` - - SetUpdatedAtNil sets the value for UpdatedAt to be an explicit nil - -### UnsetUpdatedAt -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetUpdatedAt()` - -UnsetUpdatedAt ensures that no value is present for UpdatedAt, not even an explicit nil -### GetUpdater - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetUpdater() interface{}` - -GetUpdater returns the Updater field if non-nil, zero value otherwise. - -### GetUpdaterOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetUpdaterOk() (*interface{}, bool)` - -GetUpdaterOk returns a tuple with the Updater field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdater - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetUpdater(v interface{})` - -SetUpdater sets Updater field to given value. - -### HasUpdater - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasUpdater() bool` - -HasUpdater returns a boolean if a field has been set. - -### SetUpdaterNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetUpdaterNil(b bool)` - - SetUpdaterNil sets the value for Updater to be an explicit nil - -### UnsetUpdater -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetUpdater()` - -UnsetUpdater ensures that no value is present for Updater, not even an explicit nil -### GetVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetVersion() interface{}` - -GetVersion returns the Version field if non-nil, zero value otherwise. - -### GetVersionOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetVersionOk() (*interface{}, bool)` - -GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetVersion(v interface{})` - -SetVersion sets Version field to given value. - -### HasVersion - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasVersion() bool` - -HasVersion returns a boolean if a field has been set. - -### SetVersionNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetVersionNil(b bool)` - - SetVersionNil sets the value for Version to be an explicit nil - -### UnsetVersion -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetVersion()` - -UnsetVersion ensures that no value is present for Version, not even an explicit nil -### GetVoiceSearch - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetVoiceSearch() interface{}` - -GetVoiceSearch returns the VoiceSearch field if non-nil, zero value otherwise. - -### GetVoiceSearchOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetVoiceSearchOk() (*interface{}, bool)` - -GetVoiceSearchOk returns a tuple with the VoiceSearch field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVoiceSearch - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetVoiceSearch(v interface{})` - -SetVoiceSearch sets VoiceSearch field to given value. - -### HasVoiceSearch - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasVoiceSearch() bool` - -HasVoiceSearch returns a boolean if a field has been set. - -### SetVoiceSearchNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetVoiceSearchNil(b bool)` - - SetVoiceSearchNil sets the value for VoiceSearch to be an explicit nil - -### UnsetVoiceSearch -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetVoiceSearch()` - -UnsetVoiceSearch ensures that no value is present for VoiceSearch, not even an explicit nil -### GetDirectory - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetDirectory() interface{}` - -GetDirectory returns the Directory field if non-nil, zero value otherwise. - -### GetDirectoryOk - -`func (o *GetServerCapabilities200ResponseMediaContainer) GetDirectoryOk() (*interface{}, bool)` - -GetDirectoryOk returns a tuple with the Directory field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDirectory - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetDirectory(v interface{})` - -SetDirectory sets Directory field to given value. - -### HasDirectory - -`func (o *GetServerCapabilities200ResponseMediaContainer) HasDirectory() bool` - -HasDirectory returns a boolean if a field has been set. - -### SetDirectoryNil - -`func (o *GetServerCapabilities200ResponseMediaContainer) SetDirectoryNil(b bool)` - - SetDirectoryNil sets the value for Directory to be an explicit nil - -### UnsetDirectory -`func (o *GetServerCapabilities200ResponseMediaContainer) UnsetDirectory()` - -UnsetDirectory ensures that no value is present for Directory, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetServerCapabilities401Response.md b/pms/docs/GetServerCapabilities401Response.md deleted file mode 100644 index 6a0ba38..0000000 --- a/pms/docs/GetServerCapabilities401Response.md +++ /dev/null @@ -1,66 +0,0 @@ -# GetServerCapabilities401Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetServerCapabilities401Response - -`func NewGetServerCapabilities401Response() *GetServerCapabilities401Response` - -NewGetServerCapabilities401Response instantiates a new GetServerCapabilities401Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetServerCapabilities401ResponseWithDefaults - -`func NewGetServerCapabilities401ResponseWithDefaults() *GetServerCapabilities401Response` - -NewGetServerCapabilities401ResponseWithDefaults instantiates a new GetServerCapabilities401Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetErrors - -`func (o *GetServerCapabilities401Response) GetErrors() interface{}` - -GetErrors returns the Errors field if non-nil, zero value otherwise. - -### GetErrorsOk - -`func (o *GetServerCapabilities401Response) GetErrorsOk() (*interface{}, bool)` - -GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrors - -`func (o *GetServerCapabilities401Response) SetErrors(v interface{})` - -SetErrors sets Errors field to given value. - -### HasErrors - -`func (o *GetServerCapabilities401Response) HasErrors() bool` - -HasErrors returns a boolean if a field has been set. - -### SetErrorsNil - -`func (o *GetServerCapabilities401Response) SetErrorsNil(b bool)` - - SetErrorsNil sets the value for Errors to be an explicit nil - -### UnsetErrors -`func (o *GetServerCapabilities401Response) UnsetErrors()` - -UnsetErrors ensures that no value is present for Errors, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetServerIdentity200Response.md b/pms/docs/GetServerIdentity200Response.md deleted file mode 100644 index 32c8080..0000000 --- a/pms/docs/GetServerIdentity200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetServerIdentity200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MediaContainer** | Pointer to [**GetServerIdentity200ResponseMediaContainer**](GetServerIdentity200ResponseMediaContainer.md) | | [optional] - -## Methods - -### NewGetServerIdentity200Response - -`func NewGetServerIdentity200Response() *GetServerIdentity200Response` - -NewGetServerIdentity200Response instantiates a new GetServerIdentity200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetServerIdentity200ResponseWithDefaults - -`func NewGetServerIdentity200ResponseWithDefaults() *GetServerIdentity200Response` - -NewGetServerIdentity200ResponseWithDefaults instantiates a new GetServerIdentity200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMediaContainer - -`func (o *GetServerIdentity200Response) GetMediaContainer() GetServerIdentity200ResponseMediaContainer` - -GetMediaContainer returns the MediaContainer field if non-nil, zero value otherwise. - -### GetMediaContainerOk - -`func (o *GetServerIdentity200Response) GetMediaContainerOk() (*GetServerIdentity200ResponseMediaContainer, bool)` - -GetMediaContainerOk returns a tuple with the MediaContainer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaContainer - -`func (o *GetServerIdentity200Response) SetMediaContainer(v GetServerIdentity200ResponseMediaContainer)` - -SetMediaContainer sets MediaContainer field to given value. - -### HasMediaContainer - -`func (o *GetServerIdentity200Response) HasMediaContainer() bool` - -HasMediaContainer returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetServerIdentity200ResponseMediaContainer.md b/pms/docs/GetServerIdentity200ResponseMediaContainer.md deleted file mode 100644 index a6083bf..0000000 --- a/pms/docs/GetServerIdentity200ResponseMediaContainer.md +++ /dev/null @@ -1,174 +0,0 @@ -# GetServerIdentity200ResponseMediaContainer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Size** | Pointer to **interface{}** | | [optional] -**Claimed** | Pointer to **interface{}** | | [optional] -**MachineIdentifier** | Pointer to **interface{}** | | [optional] -**Version** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetServerIdentity200ResponseMediaContainer - -`func NewGetServerIdentity200ResponseMediaContainer() *GetServerIdentity200ResponseMediaContainer` - -NewGetServerIdentity200ResponseMediaContainer instantiates a new GetServerIdentity200ResponseMediaContainer object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetServerIdentity200ResponseMediaContainerWithDefaults - -`func NewGetServerIdentity200ResponseMediaContainerWithDefaults() *GetServerIdentity200ResponseMediaContainer` - -NewGetServerIdentity200ResponseMediaContainerWithDefaults instantiates a new GetServerIdentity200ResponseMediaContainer object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSize - -`func (o *GetServerIdentity200ResponseMediaContainer) GetSize() interface{}` - -GetSize returns the Size field if non-nil, zero value otherwise. - -### GetSizeOk - -`func (o *GetServerIdentity200ResponseMediaContainer) GetSizeOk() (*interface{}, bool)` - -GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSize - -`func (o *GetServerIdentity200ResponseMediaContainer) SetSize(v interface{})` - -SetSize sets Size field to given value. - -### HasSize - -`func (o *GetServerIdentity200ResponseMediaContainer) HasSize() bool` - -HasSize returns a boolean if a field has been set. - -### SetSizeNil - -`func (o *GetServerIdentity200ResponseMediaContainer) SetSizeNil(b bool)` - - SetSizeNil sets the value for Size to be an explicit nil - -### UnsetSize -`func (o *GetServerIdentity200ResponseMediaContainer) UnsetSize()` - -UnsetSize ensures that no value is present for Size, not even an explicit nil -### GetClaimed - -`func (o *GetServerIdentity200ResponseMediaContainer) GetClaimed() interface{}` - -GetClaimed returns the Claimed field if non-nil, zero value otherwise. - -### GetClaimedOk - -`func (o *GetServerIdentity200ResponseMediaContainer) GetClaimedOk() (*interface{}, bool)` - -GetClaimedOk returns a tuple with the Claimed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClaimed - -`func (o *GetServerIdentity200ResponseMediaContainer) SetClaimed(v interface{})` - -SetClaimed sets Claimed field to given value. - -### HasClaimed - -`func (o *GetServerIdentity200ResponseMediaContainer) HasClaimed() bool` - -HasClaimed returns a boolean if a field has been set. - -### SetClaimedNil - -`func (o *GetServerIdentity200ResponseMediaContainer) SetClaimedNil(b bool)` - - SetClaimedNil sets the value for Claimed to be an explicit nil - -### UnsetClaimed -`func (o *GetServerIdentity200ResponseMediaContainer) UnsetClaimed()` - -UnsetClaimed ensures that no value is present for Claimed, not even an explicit nil -### GetMachineIdentifier - -`func (o *GetServerIdentity200ResponseMediaContainer) GetMachineIdentifier() interface{}` - -GetMachineIdentifier returns the MachineIdentifier field if non-nil, zero value otherwise. - -### GetMachineIdentifierOk - -`func (o *GetServerIdentity200ResponseMediaContainer) GetMachineIdentifierOk() (*interface{}, bool)` - -GetMachineIdentifierOk returns a tuple with the MachineIdentifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMachineIdentifier - -`func (o *GetServerIdentity200ResponseMediaContainer) SetMachineIdentifier(v interface{})` - -SetMachineIdentifier sets MachineIdentifier field to given value. - -### HasMachineIdentifier - -`func (o *GetServerIdentity200ResponseMediaContainer) HasMachineIdentifier() bool` - -HasMachineIdentifier returns a boolean if a field has been set. - -### SetMachineIdentifierNil - -`func (o *GetServerIdentity200ResponseMediaContainer) SetMachineIdentifierNil(b bool)` - - SetMachineIdentifierNil sets the value for MachineIdentifier to be an explicit nil - -### UnsetMachineIdentifier -`func (o *GetServerIdentity200ResponseMediaContainer) UnsetMachineIdentifier()` - -UnsetMachineIdentifier ensures that no value is present for MachineIdentifier, not even an explicit nil -### GetVersion - -`func (o *GetServerIdentity200ResponseMediaContainer) GetVersion() interface{}` - -GetVersion returns the Version field if non-nil, zero value otherwise. - -### GetVersionOk - -`func (o *GetServerIdentity200ResponseMediaContainer) GetVersionOk() (*interface{}, bool)` - -GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersion - -`func (o *GetServerIdentity200ResponseMediaContainer) SetVersion(v interface{})` - -SetVersion sets Version field to given value. - -### HasVersion - -`func (o *GetServerIdentity200ResponseMediaContainer) HasVersion() bool` - -HasVersion returns a boolean if a field has been set. - -### SetVersionNil - -`func (o *GetServerIdentity200ResponseMediaContainer) SetVersionNil(b bool)` - - SetVersionNil sets the value for Version to be an explicit nil - -### UnsetVersion -`func (o *GetServerIdentity200ResponseMediaContainer) UnsetVersion()` - -UnsetVersion ensures that no value is present for Version, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetServerList200Response.md b/pms/docs/GetServerList200Response.md deleted file mode 100644 index 282fb0d..0000000 --- a/pms/docs/GetServerList200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetServerList200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MediaContainer** | Pointer to [**GetServerList200ResponseMediaContainer**](GetServerList200ResponseMediaContainer.md) | | [optional] - -## Methods - -### NewGetServerList200Response - -`func NewGetServerList200Response() *GetServerList200Response` - -NewGetServerList200Response instantiates a new GetServerList200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetServerList200ResponseWithDefaults - -`func NewGetServerList200ResponseWithDefaults() *GetServerList200Response` - -NewGetServerList200ResponseWithDefaults instantiates a new GetServerList200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMediaContainer - -`func (o *GetServerList200Response) GetMediaContainer() GetServerList200ResponseMediaContainer` - -GetMediaContainer returns the MediaContainer field if non-nil, zero value otherwise. - -### GetMediaContainerOk - -`func (o *GetServerList200Response) GetMediaContainerOk() (*GetServerList200ResponseMediaContainer, bool)` - -GetMediaContainerOk returns a tuple with the MediaContainer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaContainer - -`func (o *GetServerList200Response) SetMediaContainer(v GetServerList200ResponseMediaContainer)` - -SetMediaContainer sets MediaContainer field to given value. - -### HasMediaContainer - -`func (o *GetServerList200Response) HasMediaContainer() bool` - -HasMediaContainer returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetServerList200ResponseMediaContainer.md b/pms/docs/GetServerList200ResponseMediaContainer.md deleted file mode 100644 index a3d5bbb..0000000 --- a/pms/docs/GetServerList200ResponseMediaContainer.md +++ /dev/null @@ -1,102 +0,0 @@ -# GetServerList200ResponseMediaContainer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Size** | Pointer to **interface{}** | | [optional] -**Server** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetServerList200ResponseMediaContainer - -`func NewGetServerList200ResponseMediaContainer() *GetServerList200ResponseMediaContainer` - -NewGetServerList200ResponseMediaContainer instantiates a new GetServerList200ResponseMediaContainer object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetServerList200ResponseMediaContainerWithDefaults - -`func NewGetServerList200ResponseMediaContainerWithDefaults() *GetServerList200ResponseMediaContainer` - -NewGetServerList200ResponseMediaContainerWithDefaults instantiates a new GetServerList200ResponseMediaContainer object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSize - -`func (o *GetServerList200ResponseMediaContainer) GetSize() interface{}` - -GetSize returns the Size field if non-nil, zero value otherwise. - -### GetSizeOk - -`func (o *GetServerList200ResponseMediaContainer) GetSizeOk() (*interface{}, bool)` - -GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSize - -`func (o *GetServerList200ResponseMediaContainer) SetSize(v interface{})` - -SetSize sets Size field to given value. - -### HasSize - -`func (o *GetServerList200ResponseMediaContainer) HasSize() bool` - -HasSize returns a boolean if a field has been set. - -### SetSizeNil - -`func (o *GetServerList200ResponseMediaContainer) SetSizeNil(b bool)` - - SetSizeNil sets the value for Size to be an explicit nil - -### UnsetSize -`func (o *GetServerList200ResponseMediaContainer) UnsetSize()` - -UnsetSize ensures that no value is present for Size, not even an explicit nil -### GetServer - -`func (o *GetServerList200ResponseMediaContainer) GetServer() interface{}` - -GetServer returns the Server field if non-nil, zero value otherwise. - -### GetServerOk - -`func (o *GetServerList200ResponseMediaContainer) GetServerOk() (*interface{}, bool)` - -GetServerOk returns a tuple with the Server field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetServer - -`func (o *GetServerList200ResponseMediaContainer) SetServer(v interface{})` - -SetServer sets Server field to given value. - -### HasServer - -`func (o *GetServerList200ResponseMediaContainer) HasServer() bool` - -HasServer returns a boolean if a field has been set. - -### SetServerNil - -`func (o *GetServerList200ResponseMediaContainer) SetServerNil(b bool)` - - SetServerNil sets the value for Server to be an explicit nil - -### UnsetServer -`func (o *GetServerList200ResponseMediaContainer) UnsetServer()` - -UnsetServer ensures that no value is present for Server, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetTranscodeSessions200Response.md b/pms/docs/GetTranscodeSessions200Response.md deleted file mode 100644 index 0a4da94..0000000 --- a/pms/docs/GetTranscodeSessions200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetTranscodeSessions200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MediaContainer** | Pointer to [**GetTranscodeSessions200ResponseMediaContainer**](GetTranscodeSessions200ResponseMediaContainer.md) | | [optional] - -## Methods - -### NewGetTranscodeSessions200Response - -`func NewGetTranscodeSessions200Response() *GetTranscodeSessions200Response` - -NewGetTranscodeSessions200Response instantiates a new GetTranscodeSessions200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetTranscodeSessions200ResponseWithDefaults - -`func NewGetTranscodeSessions200ResponseWithDefaults() *GetTranscodeSessions200Response` - -NewGetTranscodeSessions200ResponseWithDefaults instantiates a new GetTranscodeSessions200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMediaContainer - -`func (o *GetTranscodeSessions200Response) GetMediaContainer() GetTranscodeSessions200ResponseMediaContainer` - -GetMediaContainer returns the MediaContainer field if non-nil, zero value otherwise. - -### GetMediaContainerOk - -`func (o *GetTranscodeSessions200Response) GetMediaContainerOk() (*GetTranscodeSessions200ResponseMediaContainer, bool)` - -GetMediaContainerOk returns a tuple with the MediaContainer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMediaContainer - -`func (o *GetTranscodeSessions200Response) SetMediaContainer(v GetTranscodeSessions200ResponseMediaContainer)` - -SetMediaContainer sets MediaContainer field to given value. - -### HasMediaContainer - -`func (o *GetTranscodeSessions200Response) HasMediaContainer() bool` - -HasMediaContainer returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/GetTranscodeSessions200ResponseMediaContainer.md b/pms/docs/GetTranscodeSessions200ResponseMediaContainer.md deleted file mode 100644 index fe3548c..0000000 --- a/pms/docs/GetTranscodeSessions200ResponseMediaContainer.md +++ /dev/null @@ -1,102 +0,0 @@ -# GetTranscodeSessions200ResponseMediaContainer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Size** | Pointer to **interface{}** | | [optional] -**TranscodeSession** | Pointer to **interface{}** | | [optional] - -## Methods - -### NewGetTranscodeSessions200ResponseMediaContainer - -`func NewGetTranscodeSessions200ResponseMediaContainer() *GetTranscodeSessions200ResponseMediaContainer` - -NewGetTranscodeSessions200ResponseMediaContainer instantiates a new GetTranscodeSessions200ResponseMediaContainer object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetTranscodeSessions200ResponseMediaContainerWithDefaults - -`func NewGetTranscodeSessions200ResponseMediaContainerWithDefaults() *GetTranscodeSessions200ResponseMediaContainer` - -NewGetTranscodeSessions200ResponseMediaContainerWithDefaults instantiates a new GetTranscodeSessions200ResponseMediaContainer object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSize - -`func (o *GetTranscodeSessions200ResponseMediaContainer) GetSize() interface{}` - -GetSize returns the Size field if non-nil, zero value otherwise. - -### GetSizeOk - -`func (o *GetTranscodeSessions200ResponseMediaContainer) GetSizeOk() (*interface{}, bool)` - -GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSize - -`func (o *GetTranscodeSessions200ResponseMediaContainer) SetSize(v interface{})` - -SetSize sets Size field to given value. - -### HasSize - -`func (o *GetTranscodeSessions200ResponseMediaContainer) HasSize() bool` - -HasSize returns a boolean if a field has been set. - -### SetSizeNil - -`func (o *GetTranscodeSessions200ResponseMediaContainer) SetSizeNil(b bool)` - - SetSizeNil sets the value for Size to be an explicit nil - -### UnsetSize -`func (o *GetTranscodeSessions200ResponseMediaContainer) UnsetSize()` - -UnsetSize ensures that no value is present for Size, not even an explicit nil -### GetTranscodeSession - -`func (o *GetTranscodeSessions200ResponseMediaContainer) GetTranscodeSession() interface{}` - -GetTranscodeSession returns the TranscodeSession field if non-nil, zero value otherwise. - -### GetTranscodeSessionOk - -`func (o *GetTranscodeSessions200ResponseMediaContainer) GetTranscodeSessionOk() (*interface{}, bool)` - -GetTranscodeSessionOk returns a tuple with the TranscodeSession field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTranscodeSession - -`func (o *GetTranscodeSessions200ResponseMediaContainer) SetTranscodeSession(v interface{})` - -SetTranscodeSession sets TranscodeSession field to given value. - -### HasTranscodeSession - -`func (o *GetTranscodeSessions200ResponseMediaContainer) HasTranscodeSession() bool` - -HasTranscodeSession returns a boolean if a field has been set. - -### SetTranscodeSessionNil - -`func (o *GetTranscodeSessions200ResponseMediaContainer) SetTranscodeSessionNil(b bool)` - - SetTranscodeSessionNil sets the value for TranscodeSession to be an explicit nil - -### UnsetTranscodeSession -`func (o *GetTranscodeSessions200ResponseMediaContainer) UnsetTranscodeSession()` - -UnsetTranscodeSession ensures that no value is present for TranscodeSession, not even an explicit nil - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/pms/docs/HubsApi.md b/pms/docs/HubsApi.md deleted file mode 100644 index daf8e77..0000000 --- a/pms/docs/HubsApi.md +++ /dev/null @@ -1,148 +0,0 @@ -# \HubsApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetGlobalHubs**](HubsApi.md#GetGlobalHubs) | **Get** /hubs | Get Global Hubs -[**GetLibraryHubs**](HubsApi.md#GetLibraryHubs) | **Get** /hubs/sections/{sectionId} | Get library specific hubs - - - -## GetGlobalHubs - -> GetGlobalHubs(ctx).Count(count).OnlyTransient(onlyTransient).Execute() - -Get Global Hubs - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - count := TODO // interface{} | The number of items to return with each hub. (optional) - onlyTransient := TODO // interface{} | 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). (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HubsApi.GetGlobalHubs(context.Background()).Count(count).OnlyTransient(onlyTransient).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HubsApi.GetGlobalHubs``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGlobalHubsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **count** | [**interface{}**](interface{}.md) | The number of items to return with each hub. | - **onlyTransient** | [**interface{}**](interface{}.md) | 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). | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetLibraryHubs - -> GetLibraryHubs(ctx, sectionId).Count(count).OnlyTransient(onlyTransient).Execute() - -Get library specific hubs - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - sectionId := TODO // interface{} | the Id of the library to query - count := TODO // interface{} | The number of items to return with each hub. (optional) - onlyTransient := TODO // interface{} | 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). (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.HubsApi.GetLibraryHubs(context.Background(), sectionId).Count(count).OnlyTransient(onlyTransient).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `HubsApi.GetLibraryHubs``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sectionId** | [**interface{}**](.md) | the Id of the library to query | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetLibraryHubsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **count** | [**interface{}**](interface{}.md) | The number of items to return with each hub. | - **onlyTransient** | [**interface{}**](interface{}.md) | 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). | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/LibraryApi.md b/pms/docs/LibraryApi.md deleted file mode 100644 index bd086ad..0000000 --- a/pms/docs/LibraryApi.md +++ /dev/null @@ -1,825 +0,0 @@ -# \LibraryApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteLibrary**](LibraryApi.md#DeleteLibrary) | **Delete** /library/sections/{sectionId} | Delete Library Section -[**GetCommonLibraryItems**](LibraryApi.md#GetCommonLibraryItems) | **Get** /library/sections/{sectionId}/common | Get Common Library Items -[**GetFileHash**](LibraryApi.md#GetFileHash) | **Get** /library/hashes | Get Hash Value -[**GetLatestLibraryItems**](LibraryApi.md#GetLatestLibraryItems) | **Get** /library/sections/{sectionId}/latest | Get Latest Library Items -[**GetLibraries**](LibraryApi.md#GetLibraries) | **Get** /library/sections | Get All Libraries -[**GetLibrary**](LibraryApi.md#GetLibrary) | **Get** /library/sections/{sectionId} | Get Library Details -[**GetLibraryItems**](LibraryApi.md#GetLibraryItems) | **Get** /library/sections/{sectionId}/all | Get Library Items -[**GetMetadata**](LibraryApi.md#GetMetadata) | **Get** /library/metadata/{ratingKey} | Get Items Metadata -[**GetMetadataChildren**](LibraryApi.md#GetMetadataChildren) | **Get** /library/metadata/{ratingKey}/children | Get Items Children -[**GetOnDeck**](LibraryApi.md#GetOnDeck) | **Get** /library/onDeck | Get On Deck -[**GetRecentlyAdded**](LibraryApi.md#GetRecentlyAdded) | **Get** /library/recentlyAdded | Get Recently Added -[**RefreshLibrary**](LibraryApi.md#RefreshLibrary) | **Get** /library/sections/{sectionId}/refresh | Refresh Library - - - -## DeleteLibrary - -> DeleteLibrary(ctx, sectionId).Execute() - -Delete Library Section - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - sectionId := TODO // interface{} | the Id of the library to query - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.DeleteLibrary(context.Background(), sectionId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.DeleteLibrary``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sectionId** | [**interface{}**](.md) | the Id of the library to query | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteLibraryRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetCommonLibraryItems - -> GetCommonLibraryItems(ctx, sectionId).Type_(type_).Filter(filter).Execute() - -Get Common Library Items - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - sectionId := TODO // interface{} | the Id of the library to query - type_ := TODO // interface{} | item type - filter := TODO // interface{} | the filter parameter (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.GetCommonLibraryItems(context.Background(), sectionId).Type_(type_).Filter(filter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.GetCommonLibraryItems``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sectionId** | [**interface{}**](.md) | the Id of the library to query | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetCommonLibraryItemsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **type_** | [**interface{}**](interface{}.md) | item type | - **filter** | [**interface{}**](interface{}.md) | the filter parameter | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetFileHash - -> GetFileHash(ctx).Url(url).Type_(type_).Execute() - -Get Hash Value - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - url := TODO // interface{} | This is the path to the local file, must be prefixed by `file://` - type_ := TODO // interface{} | Item type (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.GetFileHash(context.Background()).Url(url).Type_(type_).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.GetFileHash``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetFileHashRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **url** | [**interface{}**](interface{}.md) | This is the path to the local file, must be prefixed by `file://` | - **type_** | [**interface{}**](interface{}.md) | Item type | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetLatestLibraryItems - -> GetLatestLibraryItems(ctx, sectionId).Type_(type_).Filter(filter).Execute() - -Get Latest Library Items - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - sectionId := TODO // interface{} | the Id of the library to query - type_ := TODO // interface{} | item type - filter := TODO // interface{} | the filter parameter (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.GetLatestLibraryItems(context.Background(), sectionId).Type_(type_).Filter(filter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.GetLatestLibraryItems``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sectionId** | [**interface{}**](.md) | the Id of the library to query | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetLatestLibraryItemsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **type_** | [**interface{}**](interface{}.md) | item type | - **filter** | [**interface{}**](interface{}.md) | the filter parameter | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetLibraries - -> GetLibraries(ctx).Execute() - -Get All Libraries - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.GetLibraries(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.GetLibraries``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetLibrariesRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetLibrary - -> GetLibrary(ctx, sectionId).IncludeDetails(includeDetails).Execute() - -Get Library Details - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - sectionId := TODO // interface{} | the Id of the library to query - includeDetails := TODO // interface{} | 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. (optional) (default to 0) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.GetLibrary(context.Background(), sectionId).IncludeDetails(includeDetails).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.GetLibrary``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sectionId** | [**interface{}**](.md) | the Id of the library to query | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetLibraryRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **includeDetails** | [**interface{}**](interface{}.md) | 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. | [default to 0] - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetLibraryItems - -> GetLibraryItems(ctx, sectionId).Type_(type_).Filter(filter).Execute() - -Get Library Items - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - sectionId := TODO // interface{} | the Id of the library to query - type_ := TODO // interface{} | item type (optional) - filter := TODO // interface{} | the filter parameter (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.GetLibraryItems(context.Background(), sectionId).Type_(type_).Filter(filter).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.GetLibraryItems``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sectionId** | [**interface{}**](.md) | the Id of the library to query | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetLibraryItemsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **type_** | [**interface{}**](interface{}.md) | item type | - **filter** | [**interface{}**](interface{}.md) | the filter parameter | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetMetadata - -> GetMetadata(ctx, ratingKey).Execute() - -Get Items Metadata - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - ratingKey := TODO // interface{} | the id of the library item to return the children of. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.GetMetadata(context.Background(), ratingKey).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.GetMetadata``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ratingKey** | [**interface{}**](.md) | the id of the library item to return the children of. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetMetadataRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetMetadataChildren - -> GetMetadataChildren(ctx, ratingKey).Execute() - -Get Items Children - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - ratingKey := TODO // interface{} | the id of the library item to return the children of. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.GetMetadataChildren(context.Background(), ratingKey).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.GetMetadataChildren``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ratingKey** | [**interface{}**](.md) | the id of the library item to return the children of. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetMetadataChildrenRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOnDeck - -> GetOnDeck200Response GetOnDeck(ctx).Execute() - -Get On Deck - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.GetOnDeck(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.GetOnDeck``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOnDeck`: GetOnDeck200Response - fmt.Fprintf(os.Stdout, "Response from `LibraryApi.GetOnDeck`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetOnDeckRequest struct via the builder pattern - - -### Return type - -[**GetOnDeck200Response**](GetOnDeck200Response.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRecentlyAdded - -> GetRecentlyAdded200Response GetRecentlyAdded(ctx).Execute() - -Get Recently Added - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.GetRecentlyAdded(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.GetRecentlyAdded``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRecentlyAdded`: GetRecentlyAdded200Response - fmt.Fprintf(os.Stdout, "Response from `LibraryApi.GetRecentlyAdded`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRecentlyAddedRequest struct via the builder pattern - - -### Return type - -[**GetRecentlyAdded200Response**](GetRecentlyAdded200Response.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RefreshLibrary - -> RefreshLibrary(ctx, sectionId).Execute() - -Refresh Library - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - sectionId := TODO // interface{} | the Id of the library to refresh - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LibraryApi.RefreshLibrary(context.Background(), sectionId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LibraryApi.RefreshLibrary``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sectionId** | [**interface{}**](.md) | the Id of the library to refresh | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRefreshLibraryRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/LogApi.md b/pms/docs/LogApi.md deleted file mode 100644 index c96fe94..0000000 --- a/pms/docs/LogApi.md +++ /dev/null @@ -1,197 +0,0 @@ -# \LogApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**EnablePaperTrail**](LogApi.md#EnablePaperTrail) | **Get** /log/networked | Enabling Papertrail -[**LogLine**](LogApi.md#LogLine) | **Get** /log | Logging a single line message. -[**LogMultiLine**](LogApi.md#LogMultiLine) | **Post** /log | Logging a multi-line message - - - -## EnablePaperTrail - -> EnablePaperTrail(ctx).Execute() - -Enabling Papertrail - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LogApi.EnablePaperTrail(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LogApi.EnablePaperTrail``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiEnablePaperTrailRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## LogLine - -> LogLine(ctx).Level(level).Message(message).Source(source).Execute() - -Logging a single line message. - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - level := TODO // interface{} | An integer log level to write to the PMS log with. 0: Error 1: Warning 2: Info 3: Debug 4: Verbose - message := TODO // interface{} | The text of the message to write to the log. - source := TODO // interface{} | a string indicating the source of the message. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LogApi.LogLine(context.Background()).Level(level).Message(message).Source(source).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LogApi.LogLine``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiLogLineRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **level** | [**interface{}**](interface{}.md) | An integer log level to write to the PMS log with. 0: Error 1: Warning 2: Info 3: Debug 4: Verbose | - **message** | [**interface{}**](interface{}.md) | The text of the message to write to the log. | - **source** | [**interface{}**](interface{}.md) | a string indicating the source of the message. | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## LogMultiLine - -> LogMultiLine(ctx).Execute() - -Logging a multi-line message - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LogApi.LogMultiLine(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LogApi.LogMultiLine``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiLogMultiLineRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/MediaApi.md b/pms/docs/MediaApi.md deleted file mode 100644 index c06b072..0000000 --- a/pms/docs/MediaApi.md +++ /dev/null @@ -1,207 +0,0 @@ -# \MediaApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**MarkPlayed**](MediaApi.md#MarkPlayed) | **Get** /:/scrobble | Mark Media Played -[**MarkUnplayed**](MediaApi.md#MarkUnplayed) | **Get** /:/unscrobble | Mark Media Unplayed -[**UpdatePlayProgress**](MediaApi.md#UpdatePlayProgress) | **Post** /:/progress | Update Media Play Progress - - - -## MarkPlayed - -> MarkPlayed(ctx).Key(key).Execute() - -Mark Media Played - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - key := TODO // interface{} | The media key to mark as played - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MediaApi.MarkPlayed(context.Background()).Key(key).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MediaApi.MarkPlayed``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiMarkPlayedRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **key** | [**interface{}**](interface{}.md) | The media key to mark as played | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## MarkUnplayed - -> MarkUnplayed(ctx).Key(key).Execute() - -Mark Media Unplayed - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - key := TODO // interface{} | The media key to mark as Unplayed - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MediaApi.MarkUnplayed(context.Background()).Key(key).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MediaApi.MarkUnplayed``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiMarkUnplayedRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **key** | [**interface{}**](interface{}.md) | The media key to mark as Unplayed | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdatePlayProgress - -> UpdatePlayProgress(ctx).Key(key).Time(time).State(state).Execute() - -Update Media Play Progress - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - key := TODO // interface{} | the media key - time := TODO // interface{} | The time, in milliseconds, used to set the media playback progress. - state := TODO // interface{} | The playback state of the media item. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MediaApi.UpdatePlayProgress(context.Background()).Key(key).Time(time).State(state).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MediaApi.UpdatePlayProgress``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdatePlayProgressRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **key** | [**interface{}**](interface{}.md) | the media key | - **time** | [**interface{}**](interface{}.md) | The time, in milliseconds, used to set the media playback progress. | - **state** | [**interface{}**](interface{}.md) | The playback state of the media item. | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/PlaylistsApi.md b/pms/docs/PlaylistsApi.md deleted file mode 100644 index 5d8dbe3..0000000 --- a/pms/docs/PlaylistsApi.md +++ /dev/null @@ -1,635 +0,0 @@ -# \PlaylistsApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddPlaylistContents**](PlaylistsApi.md#AddPlaylistContents) | **Put** /playlists/{playlistID}/items | Adding to a Playlist -[**ClearPlaylistContents**](PlaylistsApi.md#ClearPlaylistContents) | **Delete** /playlists/{playlistID}/items | Delete Playlist Contents -[**CreatePlaylist**](PlaylistsApi.md#CreatePlaylist) | **Post** /playlists | Create a Playlist -[**DeletePlaylist**](PlaylistsApi.md#DeletePlaylist) | **Delete** /playlists/{playlistID} | Deletes a Playlist -[**GetPlaylist**](PlaylistsApi.md#GetPlaylist) | **Get** /playlists/{playlistID} | Retrieve Playlist -[**GetPlaylistContents**](PlaylistsApi.md#GetPlaylistContents) | **Get** /playlists/{playlistID}/items | Retrieve Playlist Contents -[**GetPlaylists**](PlaylistsApi.md#GetPlaylists) | **Get** /playlists/all | Get All Playlists -[**UpdatePlaylist**](PlaylistsApi.md#UpdatePlaylist) | **Put** /playlists/{playlistID} | Update a Playlist -[**UploadPlaylist**](PlaylistsApi.md#UploadPlaylist) | **Post** /playlists/upload | Upload Playlist - - - -## AddPlaylistContents - -> AddPlaylistContents(ctx, playlistID).Uri(uri).PlayQueueID(playQueueID).Execute() - -Adding to a Playlist - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - playlistID := TODO // interface{} | the ID of the playlist - uri := TODO // interface{} | the content URI for the playlist - playQueueID := TODO // interface{} | the play queue to add to a playlist - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlaylistsApi.AddPlaylistContents(context.Background(), playlistID).Uri(uri).PlayQueueID(playQueueID).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlaylistsApi.AddPlaylistContents``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playlistID** | [**interface{}**](.md) | the ID of the playlist | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddPlaylistContentsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **uri** | [**interface{}**](interface{}.md) | the content URI for the playlist | - **playQueueID** | [**interface{}**](interface{}.md) | the play queue to add to a playlist | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ClearPlaylistContents - -> ClearPlaylistContents(ctx, playlistID).Execute() - -Delete Playlist Contents - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - playlistID := TODO // interface{} | the ID of the playlist - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlaylistsApi.ClearPlaylistContents(context.Background(), playlistID).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlaylistsApi.ClearPlaylistContents``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playlistID** | [**interface{}**](.md) | the ID of the playlist | - -### Other Parameters - -Other parameters are passed through a pointer to a apiClearPlaylistContentsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreatePlaylist - -> CreatePlaylist(ctx).Title(title).Type_(type_).Smart(smart).Uri(uri).PlayQueueID(playQueueID).Execute() - -Create a Playlist - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - title := TODO // interface{} | name of the playlist - type_ := TODO // interface{} | type of playlist to create - smart := TODO // interface{} | whether the playlist is smart or not - uri := TODO // interface{} | the content URI for the playlist (optional) - playQueueID := TODO // interface{} | the play queue to copy to a playlist (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlaylistsApi.CreatePlaylist(context.Background()).Title(title).Type_(type_).Smart(smart).Uri(uri).PlayQueueID(playQueueID).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlaylistsApi.CreatePlaylist``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreatePlaylistRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **title** | [**interface{}**](interface{}.md) | name of the playlist | - **type_** | [**interface{}**](interface{}.md) | type of playlist to create | - **smart** | [**interface{}**](interface{}.md) | whether the playlist is smart or not | - **uri** | [**interface{}**](interface{}.md) | the content URI for the playlist | - **playQueueID** | [**interface{}**](interface{}.md) | the play queue to copy to a playlist | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeletePlaylist - -> DeletePlaylist(ctx, playlistID).Execute() - -Deletes a Playlist - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - playlistID := TODO // interface{} | the ID of the playlist - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlaylistsApi.DeletePlaylist(context.Background(), playlistID).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlaylistsApi.DeletePlaylist``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playlistID** | [**interface{}**](.md) | the ID of the playlist | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeletePlaylistRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetPlaylist - -> GetPlaylist(ctx, playlistID).Execute() - -Retrieve Playlist - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - playlistID := TODO // interface{} | the ID of the playlist - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlaylistsApi.GetPlaylist(context.Background(), playlistID).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlaylistsApi.GetPlaylist``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playlistID** | [**interface{}**](.md) | the ID of the playlist | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetPlaylistRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetPlaylistContents - -> GetPlaylistContents(ctx, playlistID).Type_(type_).Execute() - -Retrieve Playlist Contents - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - playlistID := TODO // interface{} | the ID of the playlist - type_ := TODO // interface{} | the metadata type of the item to return - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlaylistsApi.GetPlaylistContents(context.Background(), playlistID).Type_(type_).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlaylistsApi.GetPlaylistContents``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playlistID** | [**interface{}**](.md) | the ID of the playlist | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetPlaylistContentsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **type_** | [**interface{}**](interface{}.md) | the metadata type of the item to return | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetPlaylists - -> GetPlaylists(ctx).PlaylistType(playlistType).Smart(smart).Execute() - -Get All Playlists - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - playlistType := TODO // interface{} | limit to a type of playlist. (optional) - smart := TODO // interface{} | type of playlists to return (default is all). (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlaylistsApi.GetPlaylists(context.Background()).PlaylistType(playlistType).Smart(smart).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlaylistsApi.GetPlaylists``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetPlaylistsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **playlistType** | [**interface{}**](interface{}.md) | limit to a type of playlist. | - **smart** | [**interface{}**](interface{}.md) | type of playlists to return (default is all). | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdatePlaylist - -> UpdatePlaylist(ctx, playlistID).Execute() - -Update a Playlist - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - playlistID := TODO // interface{} | the ID of the playlist - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlaylistsApi.UpdatePlaylist(context.Background(), playlistID).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlaylistsApi.UpdatePlaylist``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playlistID** | [**interface{}**](.md) | the ID of the playlist | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdatePlaylistRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UploadPlaylist - -> UploadPlaylist(ctx).Path(path).Force(force).Execute() - -Upload Playlist - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - path := TODO // interface{} | 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. - force := TODO // interface{} | 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. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlaylistsApi.UploadPlaylist(context.Background()).Path(path).Force(force).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlaylistsApi.UploadPlaylist``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiUploadPlaylistRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | [**interface{}**](interface{}.md) | 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. | - **force** | [**interface{}**](interface{}.md) | 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. | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/SearchApi.md b/pms/docs/SearchApi.md deleted file mode 100644 index 13aa023..0000000 --- a/pms/docs/SearchApi.md +++ /dev/null @@ -1,213 +0,0 @@ -# \SearchApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSearchResults**](SearchApi.md#GetSearchResults) | **Get** /search | Get Search Results -[**PerformSearch**](SearchApi.md#PerformSearch) | **Get** /hubs/search | Perform a search -[**PerformVoiceSearch**](SearchApi.md#PerformVoiceSearch) | **Get** /hubs/search/voice | Perform a voice search - - - -## GetSearchResults - -> GetSearchResults200Response GetSearchResults(ctx).Query(query).Execute() - -Get Search Results - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - query := TODO // interface{} | The search query string to use - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SearchApi.GetSearchResults(context.Background()).Query(query).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SearchApi.GetSearchResults``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetSearchResults`: GetSearchResults200Response - fmt.Fprintf(os.Stdout, "Response from `SearchApi.GetSearchResults`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetSearchResultsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | [**interface{}**](interface{}.md) | The search query string to use | - -### Return type - -[**GetSearchResults200Response**](GetSearchResults200Response.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## PerformSearch - -> PerformSearch(ctx).Query(query).SectionId(sectionId).Limit(limit).Execute() - -Perform a search - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - query := TODO // interface{} | The query term - sectionId := TODO // interface{} | This gives context to the search, and can result in re-ordering of search result hubs (optional) - limit := TODO // interface{} | The number of items to return per hub (optional) (default to 3) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SearchApi.PerformSearch(context.Background()).Query(query).SectionId(sectionId).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SearchApi.PerformSearch``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiPerformSearchRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | [**interface{}**](interface{}.md) | The query term | - **sectionId** | [**interface{}**](interface{}.md) | This gives context to the search, and can result in re-ordering of search result hubs | - **limit** | [**interface{}**](interface{}.md) | The number of items to return per hub | [default to 3] - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## PerformVoiceSearch - -> PerformVoiceSearch(ctx).Query(query).SectionId(sectionId).Limit(limit).Execute() - -Perform a voice search - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - query := TODO // interface{} | The query term - sectionId := TODO // interface{} | This gives context to the search, and can result in re-ordering of search result hubs (optional) - limit := TODO // interface{} | The number of items to return per hub (optional) (default to 3) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SearchApi.PerformVoiceSearch(context.Background()).Query(query).SectionId(sectionId).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SearchApi.PerformVoiceSearch``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiPerformVoiceSearchRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | [**interface{}**](interface{}.md) | The query term | - **sectionId** | [**interface{}**](interface{}.md) | This gives context to the search, and can result in re-ordering of search result hubs | - **limit** | [**interface{}**](interface{}.md) | The number of items to return per hub | [default to 3] - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/SecurityApi.md b/pms/docs/SecurityApi.md deleted file mode 100644 index a99bf75..0000000 --- a/pms/docs/SecurityApi.md +++ /dev/null @@ -1,140 +0,0 @@ -# \SecurityApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSourceConnectionInformation**](SecurityApi.md#GetSourceConnectionInformation) | **Get** /security/resources | Get Source Connection Information -[**GetTransientToken**](SecurityApi.md#GetTransientToken) | **Get** /security/token | Get a Transient Token. - - - -## GetSourceConnectionInformation - -> GetSourceConnectionInformation(ctx).Source(source).Execute() - -Get Source Connection Information - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - source := TODO // interface{} | The source identifier with an included prefix. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SecurityApi.GetSourceConnectionInformation(context.Background()).Source(source).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SecurityApi.GetSourceConnectionInformation``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetSourceConnectionInformationRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **source** | [**interface{}**](interface{}.md) | The source identifier with an included prefix. | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetTransientToken - -> GetTransientToken(ctx).Type_(type_).Scope(scope).Execute() - -Get a Transient Token. - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - type_ := TODO // interface{} | `delegation` - This is the only supported `type` parameter. - scope := TODO // interface{} | `all` - This is the only supported `scope` parameter. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SecurityApi.GetTransientToken(context.Background()).Type_(type_).Scope(scope).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SecurityApi.GetTransientToken``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetTransientTokenRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **type_** | [**interface{}**](interface{}.md) | `delegation` - This is the only supported `type` parameter. | - **scope** | [**interface{}**](interface{}.md) | `all` - This is the only supported `scope` parameter. | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/ServerApi.md b/pms/docs/ServerApi.md deleted file mode 100644 index 25d545d..0000000 --- a/pms/docs/ServerApi.md +++ /dev/null @@ -1,517 +0,0 @@ -# \ServerApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetAvailableClients**](ServerApi.md#GetAvailableClients) | **Get** /clients | Get Available Clients -[**GetDevices**](ServerApi.md#GetDevices) | **Get** /devices | Get Devices -[**GetMyPlexAccount**](ServerApi.md#GetMyPlexAccount) | **Get** /myplex/account | Get MyPlex Account -[**GetResizedPhoto**](ServerApi.md#GetResizedPhoto) | **Get** /photo/:/transcode | Get a Resized Photo -[**GetServerCapabilities**](ServerApi.md#GetServerCapabilities) | **Get** / | Server Capabilities -[**GetServerIdentity**](ServerApi.md#GetServerIdentity) | **Get** /identity | Get Server Identity -[**GetServerList**](ServerApi.md#GetServerList) | **Get** /servers | Get Server List -[**GetServerPreferences**](ServerApi.md#GetServerPreferences) | **Get** /:/prefs | Get Server Preferences - - - -## GetAvailableClients - -> interface{} GetAvailableClients(ctx).Execute() - -Get Available Clients - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerApi.GetAvailableClients(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.GetAvailableClients``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAvailableClients`: interface{} - fmt.Fprintf(os.Stdout, "Response from `ServerApi.GetAvailableClients`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAvailableClientsRequest struct via the builder pattern - - -### Return type - -**interface{}** - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetDevices - -> GetDevices200Response GetDevices(ctx).Execute() - -Get Devices - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerApi.GetDevices(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.GetDevices``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetDevices`: GetDevices200Response - fmt.Fprintf(os.Stdout, "Response from `ServerApi.GetDevices`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetDevicesRequest struct via the builder pattern - - -### Return type - -[**GetDevices200Response**](GetDevices200Response.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetMyPlexAccount - -> GetMyPlexAccount200Response GetMyPlexAccount(ctx).Execute() - -Get MyPlex Account - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerApi.GetMyPlexAccount(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.GetMyPlexAccount``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMyPlexAccount`: GetMyPlexAccount200Response - fmt.Fprintf(os.Stdout, "Response from `ServerApi.GetMyPlexAccount`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetMyPlexAccountRequest struct via the builder pattern - - -### Return type - -[**GetMyPlexAccount200Response**](GetMyPlexAccount200Response.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetResizedPhoto - -> GetResizedPhoto(ctx).Width(width).Height(height).Opacity(opacity).Blur(blur).MinSize(minSize).Upscale(upscale).Url(url).Execute() - -Get a Resized Photo - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - width := TODO // interface{} | The width for the resized photo - height := TODO // interface{} | The height for the resized photo - opacity := TODO // interface{} | The opacity for the resized photo (default to 100) - blur := TODO // interface{} | The width for the resized photo - minSize := TODO // interface{} | images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. - upscale := TODO // interface{} | allow images to be resized beyond native dimensions. - url := TODO // interface{} | path to image within Plex - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerApi.GetResizedPhoto(context.Background()).Width(width).Height(height).Opacity(opacity).Blur(blur).MinSize(minSize).Upscale(upscale).Url(url).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.GetResizedPhoto``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetResizedPhotoRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **width** | [**interface{}**](interface{}.md) | The width for the resized photo | - **height** | [**interface{}**](interface{}.md) | The height for the resized photo | - **opacity** | [**interface{}**](interface{}.md) | The opacity for the resized photo | [default to 100] - **blur** | [**interface{}**](interface{}.md) | The width for the resized photo | - **minSize** | [**interface{}**](interface{}.md) | images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. | - **upscale** | [**interface{}**](interface{}.md) | allow images to be resized beyond native dimensions. | - **url** | [**interface{}**](interface{}.md) | path to image within Plex | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetServerCapabilities - -> GetServerCapabilities200Response GetServerCapabilities(ctx).Execute() - -Server Capabilities - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerApi.GetServerCapabilities(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.GetServerCapabilities``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetServerCapabilities`: GetServerCapabilities200Response - fmt.Fprintf(os.Stdout, "Response from `ServerApi.GetServerCapabilities`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetServerCapabilitiesRequest struct via the builder pattern - - -### Return type - -[**GetServerCapabilities200Response**](GetServerCapabilities200Response.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetServerIdentity - -> GetServerIdentity200Response GetServerIdentity(ctx).Execute() - -Get Server Identity - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerApi.GetServerIdentity(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.GetServerIdentity``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetServerIdentity`: GetServerIdentity200Response - fmt.Fprintf(os.Stdout, "Response from `ServerApi.GetServerIdentity`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetServerIdentityRequest struct via the builder pattern - - -### Return type - -[**GetServerIdentity200Response**](GetServerIdentity200Response.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetServerList - -> GetServerList200Response GetServerList(ctx).Execute() - -Get Server List - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerApi.GetServerList(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.GetServerList``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetServerList`: GetServerList200Response - fmt.Fprintf(os.Stdout, "Response from `ServerApi.GetServerList`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetServerListRequest struct via the builder pattern - - -### Return type - -[**GetServerList200Response**](GetServerList200Response.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetServerPreferences - -> GetServerPreferences(ctx).Execute() - -Get Server Preferences - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ServerApi.GetServerPreferences(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ServerApi.GetServerPreferences``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetServerPreferencesRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/SessionsApi.md b/pms/docs/SessionsApi.md deleted file mode 100644 index 34d6dea..0000000 --- a/pms/docs/SessionsApi.md +++ /dev/null @@ -1,259 +0,0 @@ -# \SessionsApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSessionHistory**](SessionsApi.md#GetSessionHistory) | **Get** /status/sessions/history/all | Get Session History -[**GetSessions**](SessionsApi.md#GetSessions) | **Get** /status/sessions | Get Active Sessions -[**GetTranscodeSessions**](SessionsApi.md#GetTranscodeSessions) | **Get** /transcode/sessions | Get Transcode Sessions -[**StopTranscodeSession**](SessionsApi.md#StopTranscodeSession) | **Delete** /transcode/sessions/{sessionKey} | Stop a Transcode Session - - - -## GetSessionHistory - -> GetSessionHistory(ctx).Execute() - -Get Session History - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SessionsApi.GetSessionHistory(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SessionsApi.GetSessionHistory``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetSessionHistoryRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetSessions - -> GetSessions(ctx).Execute() - -Get Active Sessions - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SessionsApi.GetSessions(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SessionsApi.GetSessions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetSessionsRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetTranscodeSessions - -> GetTranscodeSessions200Response GetTranscodeSessions(ctx).Execute() - -Get Transcode Sessions - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SessionsApi.GetTranscodeSessions(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SessionsApi.GetTranscodeSessions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetTranscodeSessions`: GetTranscodeSessions200Response - fmt.Fprintf(os.Stdout, "Response from `SessionsApi.GetTranscodeSessions`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetTranscodeSessionsRequest struct via the builder pattern - - -### Return type - -[**GetTranscodeSessions200Response**](GetTranscodeSessions200Response.md) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## StopTranscodeSession - -> StopTranscodeSession(ctx, sessionKey).Execute() - -Stop a Transcode Session - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - sessionKey := TODO // interface{} | the Key of the transcode session to stop - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SessionsApi.StopTranscodeSession(context.Background(), sessionKey).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SessionsApi.StopTranscodeSession``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**sessionKey** | [**interface{}**](.md) | the Key of the transcode session to stop | - -### Other Parameters - -Other parameters are passed through a pointer to a apiStopTranscodeSessionRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/UpdaterApi.md b/pms/docs/UpdaterApi.md deleted file mode 100644 index 1ad4fdf..0000000 --- a/pms/docs/UpdaterApi.md +++ /dev/null @@ -1,200 +0,0 @@ -# \UpdaterApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ApplyUpdates**](UpdaterApi.md#ApplyUpdates) | **Put** /updater/apply | Apply Updates -[**CheckForUpdates**](UpdaterApi.md#CheckForUpdates) | **Put** /updater/check | Checking for updates -[**GetUpdateStatus**](UpdaterApi.md#GetUpdateStatus) | **Get** /updater/status | Querying status of updates - - - -## ApplyUpdates - -> ApplyUpdates(ctx).Tonight(tonight).Skip(skip).Execute() - -Apply Updates - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - tonight := TODO // interface{} | 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 (optional) - skip := TODO // interface{} | Indicate that the latest version should be marked as skipped. The entry for this version will have the `state` set to `skipped`. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UpdaterApi.ApplyUpdates(context.Background()).Tonight(tonight).Skip(skip).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UpdaterApi.ApplyUpdates``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiApplyUpdatesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tonight** | [**interface{}**](interface{}.md) | 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 | - **skip** | [**interface{}**](interface{}.md) | Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`. | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CheckForUpdates - -> CheckForUpdates(ctx).Download(download).Execute() - -Checking for updates - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - download := TODO // interface{} | Indicate that you want to start download any updates found. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UpdaterApi.CheckForUpdates(context.Background()).Download(download).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UpdaterApi.CheckForUpdates``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCheckForUpdatesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **download** | [**interface{}**](interface{}.md) | Indicate that you want to start download any updates found. | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUpdateStatus - -> GetUpdateStatus(ctx).Execute() - -Querying status of updates - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UpdaterApi.GetUpdateStatus(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UpdaterApi.GetUpdateStatus``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUpdateStatusRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/docs/VideoApi.md b/pms/docs/VideoApi.md deleted file mode 100644 index 106d584..0000000 --- a/pms/docs/VideoApi.md +++ /dev/null @@ -1,186 +0,0 @@ -# \VideoApi - -All URIs are relative to *http://10.10.10.47:32400* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetTimeline**](VideoApi.md#GetTimeline) | **Get** /:/timeline | Get the timeline for a media item -[**StartUniversalTranscode**](VideoApi.md#StartUniversalTranscode) | **Get** /video/:/transcode/universal/start.mpd | Start Universal Transcode - - - -## GetTimeline - -> GetTimeline(ctx).RatingKey(ratingKey).Key(key).State(state).HasMDE(hasMDE).Time(time).Duration(duration).Context(context).PlayQueueItemID(playQueueItemID).PlayBackTime(playBackTime).Row(row).Execute() - -Get the timeline for a media item - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - ratingKey := TODO // interface{} | The rating key of the media item - key := TODO // interface{} | The key of the media item to get the timeline for - state := TODO // interface{} | The state of the media item - hasMDE := TODO // interface{} | Whether the media item has MDE - time := TODO // interface{} | The time of the media item - duration := TODO // interface{} | The duration of the media item - context := TODO // interface{} | The context of the media item - playQueueItemID := TODO // interface{} | The play queue item ID of the media item - playBackTime := TODO // interface{} | The playback time of the media item - row := TODO // interface{} | The row of the media item - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.VideoApi.GetTimeline(context.Background()).RatingKey(ratingKey).Key(key).State(state).HasMDE(hasMDE).Time(time).Duration(duration).Context(context).PlayQueueItemID(playQueueItemID).PlayBackTime(playBackTime).Row(row).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `VideoApi.GetTimeline``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetTimelineRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ratingKey** | [**interface{}**](interface{}.md) | The rating key of the media item | - **key** | [**interface{}**](interface{}.md) | The key of the media item to get the timeline for | - **state** | [**interface{}**](interface{}.md) | The state of the media item | - **hasMDE** | [**interface{}**](interface{}.md) | Whether the media item has MDE | - **time** | [**interface{}**](interface{}.md) | The time of the media item | - **duration** | [**interface{}**](interface{}.md) | The duration of the media item | - **context** | [**interface{}**](interface{}.md) | The context of the media item | - **playQueueItemID** | [**interface{}**](interface{}.md) | The play queue item ID of the media item | - **playBackTime** | [**interface{}**](interface{}.md) | The playback time of the media item | - **row** | [**interface{}**](interface{}.md) | The row of the media item | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## StartUniversalTranscode - -> StartUniversalTranscode(ctx).HasMDE(hasMDE).Path(path).MediaIndex(mediaIndex).PartIndex(partIndex).Protocol(protocol).FastSeek(fastSeek).DirectPlay(directPlay).DirectStream(directStream).SubtitleSize(subtitleSize).Subtites(subtites).AudioBoost(audioBoost).Location(location).MediaBufferSize(mediaBufferSize).Session(session).AddDebugOverlay(addDebugOverlay).AutoAdjustQuality(autoAdjustQuality).Execute() - -Start Universal Transcode - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - hasMDE := TODO // interface{} | Whether the media item has MDE - path := TODO // interface{} | The path to the media item to transcode - mediaIndex := TODO // interface{} | The index of the media item to transcode - partIndex := TODO // interface{} | The index of the part to transcode - protocol := TODO // interface{} | The protocol to use for the transcode session - fastSeek := TODO // interface{} | Whether to use fast seek or not (optional) - directPlay := TODO // interface{} | Whether to use direct play or not (optional) - directStream := TODO // interface{} | Whether to use direct stream or not (optional) - subtitleSize := TODO // interface{} | The size of the subtitles (optional) - subtites := TODO // interface{} | The subtitles (optional) - audioBoost := TODO // interface{} | The audio boost (optional) - location := TODO // interface{} | The location of the transcode session (optional) - mediaBufferSize := TODO // interface{} | The size of the media buffer (optional) - session := TODO // interface{} | The session ID (optional) - addDebugOverlay := TODO // interface{} | Whether to add a debug overlay or not (optional) - autoAdjustQuality := TODO // interface{} | Whether to auto adjust quality or not (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.VideoApi.StartUniversalTranscode(context.Background()).HasMDE(hasMDE).Path(path).MediaIndex(mediaIndex).PartIndex(partIndex).Protocol(protocol).FastSeek(fastSeek).DirectPlay(directPlay).DirectStream(directStream).SubtitleSize(subtitleSize).Subtites(subtites).AudioBoost(audioBoost).Location(location).MediaBufferSize(mediaBufferSize).Session(session).AddDebugOverlay(addDebugOverlay).AutoAdjustQuality(autoAdjustQuality).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `VideoApi.StartUniversalTranscode``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiStartUniversalTranscodeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **hasMDE** | [**interface{}**](interface{}.md) | Whether the media item has MDE | - **path** | [**interface{}**](interface{}.md) | The path to the media item to transcode | - **mediaIndex** | [**interface{}**](interface{}.md) | The index of the media item to transcode | - **partIndex** | [**interface{}**](interface{}.md) | The index of the part to transcode | - **protocol** | [**interface{}**](interface{}.md) | The protocol to use for the transcode session | - **fastSeek** | [**interface{}**](interface{}.md) | Whether to use fast seek or not | - **directPlay** | [**interface{}**](interface{}.md) | Whether to use direct play or not | - **directStream** | [**interface{}**](interface{}.md) | Whether to use direct stream or not | - **subtitleSize** | [**interface{}**](interface{}.md) | The size of the subtitles | - **subtites** | [**interface{}**](interface{}.md) | The subtitles | - **audioBoost** | [**interface{}**](interface{}.md) | The audio boost | - **location** | [**interface{}**](interface{}.md) | The location of the transcode session | - **mediaBufferSize** | [**interface{}**](interface{}.md) | The size of the media buffer | - **session** | [**interface{}**](interface{}.md) | The session ID | - **addDebugOverlay** | [**interface{}**](interface{}.md) | Whether to add a debug overlay or not | - **autoAdjustQuality** | [**interface{}**](interface{}.md) | Whether to auto adjust quality or not | - -### Return type - - (empty response body) - -### Authorization - -[accessToken](../README.md#accessToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/pms/git_push.sh b/pms/git_push.sh deleted file mode 100644 index 4d884b3..0000000 --- a/pms/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="lukehagar" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="plexgo" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/pms/go.mod b/pms/go.mod deleted file mode 100644 index ee64514..0000000 --- a/pms/go.mod +++ /dev/null @@ -1,7 +0,0 @@ -module github.com/sailpoint-oss/golang-sdk/sdk-output/v3 - -go 1.13 - -require ( - github.com/hashicorp/go-retryablehttp v0.7.2 // indirect -) diff --git a/pms/go.sum b/pms/go.sum deleted file mode 100644 index c966c8d..0000000 --- a/pms/go.sum +++ /dev/null @@ -1,11 +0,0 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/pms/model_get_butler_tasks_200_response.go b/pms/model_get_butler_tasks_200_response.go deleted file mode 100644 index ca4d238..0000000 --- a/pms/model_get_butler_tasks_200_response.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetButlerTasks200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetButlerTasks200Response{} - -// GetButlerTasks200Response struct for GetButlerTasks200Response -type GetButlerTasks200Response struct { - ButlerTasks *GetButlerTasks200ResponseButlerTasks `json:"ButlerTasks,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetButlerTasks200Response GetButlerTasks200Response - -// NewGetButlerTasks200Response instantiates a new GetButlerTasks200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetButlerTasks200Response() *GetButlerTasks200Response { - this := GetButlerTasks200Response{} - return &this -} - -// NewGetButlerTasks200ResponseWithDefaults instantiates a new GetButlerTasks200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetButlerTasks200ResponseWithDefaults() *GetButlerTasks200Response { - this := GetButlerTasks200Response{} - return &this -} - -// GetButlerTasks returns the ButlerTasks field value if set, zero value otherwise. -func (o *GetButlerTasks200Response) GetButlerTasks() GetButlerTasks200ResponseButlerTasks { - if o == nil || isNil(o.ButlerTasks) { - var ret GetButlerTasks200ResponseButlerTasks - return ret - } - return *o.ButlerTasks -} - -// GetButlerTasksOk returns a tuple with the ButlerTasks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetButlerTasks200Response) GetButlerTasksOk() (*GetButlerTasks200ResponseButlerTasks, bool) { - if o == nil || isNil(o.ButlerTasks) { - return nil, false - } - return o.ButlerTasks, true -} - -// HasButlerTasks returns a boolean if a field has been set. -func (o *GetButlerTasks200Response) HasButlerTasks() bool { - if o != nil && !isNil(o.ButlerTasks) { - return true - } - - return false -} - -// SetButlerTasks gets a reference to the given GetButlerTasks200ResponseButlerTasks and assigns it to the ButlerTasks field. -func (o *GetButlerTasks200Response) SetButlerTasks(v GetButlerTasks200ResponseButlerTasks) { - o.ButlerTasks = &v -} - -func (o GetButlerTasks200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetButlerTasks200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.ButlerTasks) { - toSerialize["ButlerTasks"] = o.ButlerTasks - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetButlerTasks200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetButlerTasks200Response := _GetButlerTasks200Response{} - - if err = json.Unmarshal(bytes, &varGetButlerTasks200Response); err == nil { - *o = GetButlerTasks200Response(varGetButlerTasks200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "ButlerTasks") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetButlerTasks200Response struct { - value *GetButlerTasks200Response - isSet bool -} - -func (v NullableGetButlerTasks200Response) Get() *GetButlerTasks200Response { - return v.value -} - -func (v *NullableGetButlerTasks200Response) Set(val *GetButlerTasks200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetButlerTasks200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetButlerTasks200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetButlerTasks200Response(val *GetButlerTasks200Response) *NullableGetButlerTasks200Response { - return &NullableGetButlerTasks200Response{value: val, isSet: true} -} - -func (v NullableGetButlerTasks200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetButlerTasks200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_butler_tasks_200_response_butler_tasks.go b/pms/model_get_butler_tasks_200_response_butler_tasks.go deleted file mode 100644 index 65f2fcd..0000000 --- a/pms/model_get_butler_tasks_200_response_butler_tasks.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetButlerTasks200ResponseButlerTasks type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetButlerTasks200ResponseButlerTasks{} - -// GetButlerTasks200ResponseButlerTasks struct for GetButlerTasks200ResponseButlerTasks -type GetButlerTasks200ResponseButlerTasks struct { - ButlerTask interface{} `json:"ButlerTask,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetButlerTasks200ResponseButlerTasks GetButlerTasks200ResponseButlerTasks - -// NewGetButlerTasks200ResponseButlerTasks instantiates a new GetButlerTasks200ResponseButlerTasks object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetButlerTasks200ResponseButlerTasks() *GetButlerTasks200ResponseButlerTasks { - this := GetButlerTasks200ResponseButlerTasks{} - return &this -} - -// NewGetButlerTasks200ResponseButlerTasksWithDefaults instantiates a new GetButlerTasks200ResponseButlerTasks object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetButlerTasks200ResponseButlerTasksWithDefaults() *GetButlerTasks200ResponseButlerTasks { - this := GetButlerTasks200ResponseButlerTasks{} - return &this -} - -// GetButlerTask returns the ButlerTask field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetButlerTasks200ResponseButlerTasks) GetButlerTask() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.ButlerTask -} - -// GetButlerTaskOk returns a tuple with the ButlerTask field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetButlerTasks200ResponseButlerTasks) GetButlerTaskOk() (*interface{}, bool) { - if o == nil || isNil(o.ButlerTask) { - return nil, false - } - return &o.ButlerTask, true -} - -// HasButlerTask returns a boolean if a field has been set. -func (o *GetButlerTasks200ResponseButlerTasks) HasButlerTask() bool { - if o != nil && isNil(o.ButlerTask) { - return true - } - - return false -} - -// SetButlerTask gets a reference to the given interface{} and assigns it to the ButlerTask field. -func (o *GetButlerTasks200ResponseButlerTasks) SetButlerTask(v interface{}) { - o.ButlerTask = v -} - -func (o GetButlerTasks200ResponseButlerTasks) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetButlerTasks200ResponseButlerTasks) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.ButlerTask != nil { - toSerialize["ButlerTask"] = o.ButlerTask - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetButlerTasks200ResponseButlerTasks) UnmarshalJSON(bytes []byte) (err error) { - varGetButlerTasks200ResponseButlerTasks := _GetButlerTasks200ResponseButlerTasks{} - - if err = json.Unmarshal(bytes, &varGetButlerTasks200ResponseButlerTasks); err == nil { - *o = GetButlerTasks200ResponseButlerTasks(varGetButlerTasks200ResponseButlerTasks) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "ButlerTask") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetButlerTasks200ResponseButlerTasks struct { - value *GetButlerTasks200ResponseButlerTasks - isSet bool -} - -func (v NullableGetButlerTasks200ResponseButlerTasks) Get() *GetButlerTasks200ResponseButlerTasks { - return v.value -} - -func (v *NullableGetButlerTasks200ResponseButlerTasks) Set(val *GetButlerTasks200ResponseButlerTasks) { - v.value = val - v.isSet = true -} - -func (v NullableGetButlerTasks200ResponseButlerTasks) IsSet() bool { - return v.isSet -} - -func (v *NullableGetButlerTasks200ResponseButlerTasks) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetButlerTasks200ResponseButlerTasks(val *GetButlerTasks200ResponseButlerTasks) *NullableGetButlerTasks200ResponseButlerTasks { - return &NullableGetButlerTasks200ResponseButlerTasks{value: val, isSet: true} -} - -func (v NullableGetButlerTasks200ResponseButlerTasks) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetButlerTasks200ResponseButlerTasks) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_devices_200_response.go b/pms/model_get_devices_200_response.go deleted file mode 100644 index b94adda..0000000 --- a/pms/model_get_devices_200_response.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetDevices200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetDevices200Response{} - -// GetDevices200Response struct for GetDevices200Response -type GetDevices200Response struct { - MediaContainer *GetDevices200ResponseMediaContainer `json:"MediaContainer,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetDevices200Response GetDevices200Response - -// NewGetDevices200Response instantiates a new GetDevices200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetDevices200Response() *GetDevices200Response { - this := GetDevices200Response{} - return &this -} - -// NewGetDevices200ResponseWithDefaults instantiates a new GetDevices200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetDevices200ResponseWithDefaults() *GetDevices200Response { - this := GetDevices200Response{} - return &this -} - -// GetMediaContainer returns the MediaContainer field value if set, zero value otherwise. -func (o *GetDevices200Response) GetMediaContainer() GetDevices200ResponseMediaContainer { - if o == nil || isNil(o.MediaContainer) { - var ret GetDevices200ResponseMediaContainer - return ret - } - return *o.MediaContainer -} - -// GetMediaContainerOk returns a tuple with the MediaContainer field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetDevices200Response) GetMediaContainerOk() (*GetDevices200ResponseMediaContainer, bool) { - if o == nil || isNil(o.MediaContainer) { - return nil, false - } - return o.MediaContainer, true -} - -// HasMediaContainer returns a boolean if a field has been set. -func (o *GetDevices200Response) HasMediaContainer() bool { - if o != nil && !isNil(o.MediaContainer) { - return true - } - - return false -} - -// SetMediaContainer gets a reference to the given GetDevices200ResponseMediaContainer and assigns it to the MediaContainer field. -func (o *GetDevices200Response) SetMediaContainer(v GetDevices200ResponseMediaContainer) { - o.MediaContainer = &v -} - -func (o GetDevices200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetDevices200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MediaContainer) { - toSerialize["MediaContainer"] = o.MediaContainer - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetDevices200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetDevices200Response := _GetDevices200Response{} - - if err = json.Unmarshal(bytes, &varGetDevices200Response); err == nil { - *o = GetDevices200Response(varGetDevices200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "MediaContainer") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetDevices200Response struct { - value *GetDevices200Response - isSet bool -} - -func (v NullableGetDevices200Response) Get() *GetDevices200Response { - return v.value -} - -func (v *NullableGetDevices200Response) Set(val *GetDevices200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetDevices200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetDevices200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetDevices200Response(val *GetDevices200Response) *NullableGetDevices200Response { - return &NullableGetDevices200Response{value: val, isSet: true} -} - -func (v NullableGetDevices200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetDevices200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_devices_200_response_media_container.go b/pms/model_get_devices_200_response_media_container.go deleted file mode 100644 index 5b2bc56..0000000 --- a/pms/model_get_devices_200_response_media_container.go +++ /dev/null @@ -1,229 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetDevices200ResponseMediaContainer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetDevices200ResponseMediaContainer{} - -// GetDevices200ResponseMediaContainer struct for GetDevices200ResponseMediaContainer -type GetDevices200ResponseMediaContainer struct { - Size interface{} `json:"size,omitempty"` - Identifier interface{} `json:"identifier,omitempty"` - Device interface{} `json:"Device,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetDevices200ResponseMediaContainer GetDevices200ResponseMediaContainer - -// NewGetDevices200ResponseMediaContainer instantiates a new GetDevices200ResponseMediaContainer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetDevices200ResponseMediaContainer() *GetDevices200ResponseMediaContainer { - this := GetDevices200ResponseMediaContainer{} - return &this -} - -// NewGetDevices200ResponseMediaContainerWithDefaults instantiates a new GetDevices200ResponseMediaContainer object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetDevices200ResponseMediaContainerWithDefaults() *GetDevices200ResponseMediaContainer { - this := GetDevices200ResponseMediaContainer{} - return &this -} - -// GetSize returns the Size field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetDevices200ResponseMediaContainer) GetSize() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetDevices200ResponseMediaContainer) GetSizeOk() (*interface{}, bool) { - if o == nil || isNil(o.Size) { - return nil, false - } - return &o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *GetDevices200ResponseMediaContainer) HasSize() bool { - if o != nil && isNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given interface{} and assigns it to the Size field. -func (o *GetDevices200ResponseMediaContainer) SetSize(v interface{}) { - o.Size = v -} - -// GetIdentifier returns the Identifier field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetDevices200ResponseMediaContainer) GetIdentifier() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Identifier -} - -// GetIdentifierOk returns a tuple with the Identifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetDevices200ResponseMediaContainer) GetIdentifierOk() (*interface{}, bool) { - if o == nil || isNil(o.Identifier) { - return nil, false - } - return &o.Identifier, true -} - -// HasIdentifier returns a boolean if a field has been set. -func (o *GetDevices200ResponseMediaContainer) HasIdentifier() bool { - if o != nil && isNil(o.Identifier) { - return true - } - - return false -} - -// SetIdentifier gets a reference to the given interface{} and assigns it to the Identifier field. -func (o *GetDevices200ResponseMediaContainer) SetIdentifier(v interface{}) { - o.Identifier = v -} - -// GetDevice returns the Device field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetDevices200ResponseMediaContainer) GetDevice() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Device -} - -// GetDeviceOk returns a tuple with the Device field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetDevices200ResponseMediaContainer) GetDeviceOk() (*interface{}, bool) { - if o == nil || isNil(o.Device) { - return nil, false - } - return &o.Device, true -} - -// HasDevice returns a boolean if a field has been set. -func (o *GetDevices200ResponseMediaContainer) HasDevice() bool { - if o != nil && isNil(o.Device) { - return true - } - - return false -} - -// SetDevice gets a reference to the given interface{} and assigns it to the Device field. -func (o *GetDevices200ResponseMediaContainer) SetDevice(v interface{}) { - o.Device = v -} - -func (o GetDevices200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetDevices200ResponseMediaContainer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Size != nil { - toSerialize["size"] = o.Size - } - if o.Identifier != nil { - toSerialize["identifier"] = o.Identifier - } - if o.Device != nil { - toSerialize["Device"] = o.Device - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetDevices200ResponseMediaContainer) UnmarshalJSON(bytes []byte) (err error) { - varGetDevices200ResponseMediaContainer := _GetDevices200ResponseMediaContainer{} - - if err = json.Unmarshal(bytes, &varGetDevices200ResponseMediaContainer); err == nil { - *o = GetDevices200ResponseMediaContainer(varGetDevices200ResponseMediaContainer) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "size") - delete(additionalProperties, "identifier") - delete(additionalProperties, "Device") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetDevices200ResponseMediaContainer struct { - value *GetDevices200ResponseMediaContainer - isSet bool -} - -func (v NullableGetDevices200ResponseMediaContainer) Get() *GetDevices200ResponseMediaContainer { - return v.value -} - -func (v *NullableGetDevices200ResponseMediaContainer) Set(val *GetDevices200ResponseMediaContainer) { - v.value = val - v.isSet = true -} - -func (v NullableGetDevices200ResponseMediaContainer) IsSet() bool { - return v.isSet -} - -func (v *NullableGetDevices200ResponseMediaContainer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetDevices200ResponseMediaContainer(val *GetDevices200ResponseMediaContainer) *NullableGetDevices200ResponseMediaContainer { - return &NullableGetDevices200ResponseMediaContainer{value: val, isSet: true} -} - -func (v NullableGetDevices200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetDevices200ResponseMediaContainer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_my_plex_account_200_response.go b/pms/model_get_my_plex_account_200_response.go deleted file mode 100644 index d330ee8..0000000 --- a/pms/model_get_my_plex_account_200_response.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetMyPlexAccount200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetMyPlexAccount200Response{} - -// GetMyPlexAccount200Response struct for GetMyPlexAccount200Response -type GetMyPlexAccount200Response struct { - MyPlex *GetMyPlexAccount200ResponseMyPlex `json:"MyPlex,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetMyPlexAccount200Response GetMyPlexAccount200Response - -// NewGetMyPlexAccount200Response instantiates a new GetMyPlexAccount200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetMyPlexAccount200Response() *GetMyPlexAccount200Response { - this := GetMyPlexAccount200Response{} - return &this -} - -// NewGetMyPlexAccount200ResponseWithDefaults instantiates a new GetMyPlexAccount200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetMyPlexAccount200ResponseWithDefaults() *GetMyPlexAccount200Response { - this := GetMyPlexAccount200Response{} - return &this -} - -// GetMyPlex returns the MyPlex field value if set, zero value otherwise. -func (o *GetMyPlexAccount200Response) GetMyPlex() GetMyPlexAccount200ResponseMyPlex { - if o == nil || isNil(o.MyPlex) { - var ret GetMyPlexAccount200ResponseMyPlex - return ret - } - return *o.MyPlex -} - -// GetMyPlexOk returns a tuple with the MyPlex field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetMyPlexAccount200Response) GetMyPlexOk() (*GetMyPlexAccount200ResponseMyPlex, bool) { - if o == nil || isNil(o.MyPlex) { - return nil, false - } - return o.MyPlex, true -} - -// HasMyPlex returns a boolean if a field has been set. -func (o *GetMyPlexAccount200Response) HasMyPlex() bool { - if o != nil && !isNil(o.MyPlex) { - return true - } - - return false -} - -// SetMyPlex gets a reference to the given GetMyPlexAccount200ResponseMyPlex and assigns it to the MyPlex field. -func (o *GetMyPlexAccount200Response) SetMyPlex(v GetMyPlexAccount200ResponseMyPlex) { - o.MyPlex = &v -} - -func (o GetMyPlexAccount200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetMyPlexAccount200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MyPlex) { - toSerialize["MyPlex"] = o.MyPlex - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetMyPlexAccount200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetMyPlexAccount200Response := _GetMyPlexAccount200Response{} - - if err = json.Unmarshal(bytes, &varGetMyPlexAccount200Response); err == nil { - *o = GetMyPlexAccount200Response(varGetMyPlexAccount200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "MyPlex") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetMyPlexAccount200Response struct { - value *GetMyPlexAccount200Response - isSet bool -} - -func (v NullableGetMyPlexAccount200Response) Get() *GetMyPlexAccount200Response { - return v.value -} - -func (v *NullableGetMyPlexAccount200Response) Set(val *GetMyPlexAccount200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetMyPlexAccount200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetMyPlexAccount200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetMyPlexAccount200Response(val *GetMyPlexAccount200Response) *NullableGetMyPlexAccount200Response { - return &NullableGetMyPlexAccount200Response{value: val, isSet: true} -} - -func (v NullableGetMyPlexAccount200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetMyPlexAccount200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_my_plex_account_200_response_my_plex.go b/pms/model_get_my_plex_account_200_response_my_plex.go deleted file mode 100644 index c1572b6..0000000 --- a/pms/model_get_my_plex_account_200_response_my_plex.go +++ /dev/null @@ -1,571 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetMyPlexAccount200ResponseMyPlex type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetMyPlexAccount200ResponseMyPlex{} - -// GetMyPlexAccount200ResponseMyPlex struct for GetMyPlexAccount200ResponseMyPlex -type GetMyPlexAccount200ResponseMyPlex struct { - AuthToken interface{} `json:"authToken,omitempty"` - Username interface{} `json:"username,omitempty"` - MappingState interface{} `json:"mappingState,omitempty"` - MappingError interface{} `json:"mappingError,omitempty"` - SignInState interface{} `json:"signInState,omitempty"` - PublicAddress interface{} `json:"publicAddress,omitempty"` - PublicPort interface{} `json:"publicPort,omitempty"` - PrivateAddress interface{} `json:"privateAddress,omitempty"` - PrivatePort interface{} `json:"privatePort,omitempty"` - SubscriptionFeatures interface{} `json:"subscriptionFeatures,omitempty"` - SubscriptionActive interface{} `json:"subscriptionActive,omitempty"` - SubscriptionState interface{} `json:"subscriptionState,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetMyPlexAccount200ResponseMyPlex GetMyPlexAccount200ResponseMyPlex - -// NewGetMyPlexAccount200ResponseMyPlex instantiates a new GetMyPlexAccount200ResponseMyPlex object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetMyPlexAccount200ResponseMyPlex() *GetMyPlexAccount200ResponseMyPlex { - this := GetMyPlexAccount200ResponseMyPlex{} - return &this -} - -// NewGetMyPlexAccount200ResponseMyPlexWithDefaults instantiates a new GetMyPlexAccount200ResponseMyPlex object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetMyPlexAccount200ResponseMyPlexWithDefaults() *GetMyPlexAccount200ResponseMyPlex { - this := GetMyPlexAccount200ResponseMyPlex{} - return &this -} - -// GetAuthToken returns the AuthToken field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetAuthToken() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.AuthToken -} - -// GetAuthTokenOk returns a tuple with the AuthToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetAuthTokenOk() (*interface{}, bool) { - if o == nil || isNil(o.AuthToken) { - return nil, false - } - return &o.AuthToken, true -} - -// HasAuthToken returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasAuthToken() bool { - if o != nil && isNil(o.AuthToken) { - return true - } - - return false -} - -// SetAuthToken gets a reference to the given interface{} and assigns it to the AuthToken field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetAuthToken(v interface{}) { - o.AuthToken = v -} - -// GetUsername returns the Username field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetUsername() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetUsernameOk() (*interface{}, bool) { - if o == nil || isNil(o.Username) { - return nil, false - } - return &o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasUsername() bool { - if o != nil && isNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given interface{} and assigns it to the Username field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetUsername(v interface{}) { - o.Username = v -} - -// GetMappingState returns the MappingState field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetMappingState() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MappingState -} - -// GetMappingStateOk returns a tuple with the MappingState field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetMappingStateOk() (*interface{}, bool) { - if o == nil || isNil(o.MappingState) { - return nil, false - } - return &o.MappingState, true -} - -// HasMappingState returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasMappingState() bool { - if o != nil && isNil(o.MappingState) { - return true - } - - return false -} - -// SetMappingState gets a reference to the given interface{} and assigns it to the MappingState field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetMappingState(v interface{}) { - o.MappingState = v -} - -// GetMappingError returns the MappingError field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetMappingError() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MappingError -} - -// GetMappingErrorOk returns a tuple with the MappingError field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetMappingErrorOk() (*interface{}, bool) { - if o == nil || isNil(o.MappingError) { - return nil, false - } - return &o.MappingError, true -} - -// HasMappingError returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasMappingError() bool { - if o != nil && isNil(o.MappingError) { - return true - } - - return false -} - -// SetMappingError gets a reference to the given interface{} and assigns it to the MappingError field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetMappingError(v interface{}) { - o.MappingError = v -} - -// GetSignInState returns the SignInState field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetSignInState() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.SignInState -} - -// GetSignInStateOk returns a tuple with the SignInState field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetSignInStateOk() (*interface{}, bool) { - if o == nil || isNil(o.SignInState) { - return nil, false - } - return &o.SignInState, true -} - -// HasSignInState returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasSignInState() bool { - if o != nil && isNil(o.SignInState) { - return true - } - - return false -} - -// SetSignInState gets a reference to the given interface{} and assigns it to the SignInState field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetSignInState(v interface{}) { - o.SignInState = v -} - -// GetPublicAddress returns the PublicAddress field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetPublicAddress() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.PublicAddress -} - -// GetPublicAddressOk returns a tuple with the PublicAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetPublicAddressOk() (*interface{}, bool) { - if o == nil || isNil(o.PublicAddress) { - return nil, false - } - return &o.PublicAddress, true -} - -// HasPublicAddress returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasPublicAddress() bool { - if o != nil && isNil(o.PublicAddress) { - return true - } - - return false -} - -// SetPublicAddress gets a reference to the given interface{} and assigns it to the PublicAddress field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetPublicAddress(v interface{}) { - o.PublicAddress = v -} - -// GetPublicPort returns the PublicPort field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetPublicPort() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.PublicPort -} - -// GetPublicPortOk returns a tuple with the PublicPort field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetPublicPortOk() (*interface{}, bool) { - if o == nil || isNil(o.PublicPort) { - return nil, false - } - return &o.PublicPort, true -} - -// HasPublicPort returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasPublicPort() bool { - if o != nil && isNil(o.PublicPort) { - return true - } - - return false -} - -// SetPublicPort gets a reference to the given interface{} and assigns it to the PublicPort field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetPublicPort(v interface{}) { - o.PublicPort = v -} - -// GetPrivateAddress returns the PrivateAddress field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetPrivateAddress() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.PrivateAddress -} - -// GetPrivateAddressOk returns a tuple with the PrivateAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetPrivateAddressOk() (*interface{}, bool) { - if o == nil || isNil(o.PrivateAddress) { - return nil, false - } - return &o.PrivateAddress, true -} - -// HasPrivateAddress returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasPrivateAddress() bool { - if o != nil && isNil(o.PrivateAddress) { - return true - } - - return false -} - -// SetPrivateAddress gets a reference to the given interface{} and assigns it to the PrivateAddress field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetPrivateAddress(v interface{}) { - o.PrivateAddress = v -} - -// GetPrivatePort returns the PrivatePort field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetPrivatePort() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.PrivatePort -} - -// GetPrivatePortOk returns a tuple with the PrivatePort field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetPrivatePortOk() (*interface{}, bool) { - if o == nil || isNil(o.PrivatePort) { - return nil, false - } - return &o.PrivatePort, true -} - -// HasPrivatePort returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasPrivatePort() bool { - if o != nil && isNil(o.PrivatePort) { - return true - } - - return false -} - -// SetPrivatePort gets a reference to the given interface{} and assigns it to the PrivatePort field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetPrivatePort(v interface{}) { - o.PrivatePort = v -} - -// GetSubscriptionFeatures returns the SubscriptionFeatures field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionFeatures() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.SubscriptionFeatures -} - -// GetSubscriptionFeaturesOk returns a tuple with the SubscriptionFeatures field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionFeaturesOk() (*interface{}, bool) { - if o == nil || isNil(o.SubscriptionFeatures) { - return nil, false - } - return &o.SubscriptionFeatures, true -} - -// HasSubscriptionFeatures returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasSubscriptionFeatures() bool { - if o != nil && isNil(o.SubscriptionFeatures) { - return true - } - - return false -} - -// SetSubscriptionFeatures gets a reference to the given interface{} and assigns it to the SubscriptionFeatures field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetSubscriptionFeatures(v interface{}) { - o.SubscriptionFeatures = v -} - -// GetSubscriptionActive returns the SubscriptionActive field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionActive() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.SubscriptionActive -} - -// GetSubscriptionActiveOk returns a tuple with the SubscriptionActive field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionActiveOk() (*interface{}, bool) { - if o == nil || isNil(o.SubscriptionActive) { - return nil, false - } - return &o.SubscriptionActive, true -} - -// HasSubscriptionActive returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasSubscriptionActive() bool { - if o != nil && isNil(o.SubscriptionActive) { - return true - } - - return false -} - -// SetSubscriptionActive gets a reference to the given interface{} and assigns it to the SubscriptionActive field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetSubscriptionActive(v interface{}) { - o.SubscriptionActive = v -} - -// GetSubscriptionState returns the SubscriptionState field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionState() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.SubscriptionState -} - -// GetSubscriptionStateOk returns a tuple with the SubscriptionState field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetMyPlexAccount200ResponseMyPlex) GetSubscriptionStateOk() (*interface{}, bool) { - if o == nil || isNil(o.SubscriptionState) { - return nil, false - } - return &o.SubscriptionState, true -} - -// HasSubscriptionState returns a boolean if a field has been set. -func (o *GetMyPlexAccount200ResponseMyPlex) HasSubscriptionState() bool { - if o != nil && isNil(o.SubscriptionState) { - return true - } - - return false -} - -// SetSubscriptionState gets a reference to the given interface{} and assigns it to the SubscriptionState field. -func (o *GetMyPlexAccount200ResponseMyPlex) SetSubscriptionState(v interface{}) { - o.SubscriptionState = v -} - -func (o GetMyPlexAccount200ResponseMyPlex) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetMyPlexAccount200ResponseMyPlex) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.AuthToken != nil { - toSerialize["authToken"] = o.AuthToken - } - if o.Username != nil { - toSerialize["username"] = o.Username - } - if o.MappingState != nil { - toSerialize["mappingState"] = o.MappingState - } - if o.MappingError != nil { - toSerialize["mappingError"] = o.MappingError - } - if o.SignInState != nil { - toSerialize["signInState"] = o.SignInState - } - if o.PublicAddress != nil { - toSerialize["publicAddress"] = o.PublicAddress - } - if o.PublicPort != nil { - toSerialize["publicPort"] = o.PublicPort - } - if o.PrivateAddress != nil { - toSerialize["privateAddress"] = o.PrivateAddress - } - if o.PrivatePort != nil { - toSerialize["privatePort"] = o.PrivatePort - } - if o.SubscriptionFeatures != nil { - toSerialize["subscriptionFeatures"] = o.SubscriptionFeatures - } - if o.SubscriptionActive != nil { - toSerialize["subscriptionActive"] = o.SubscriptionActive - } - if o.SubscriptionState != nil { - toSerialize["subscriptionState"] = o.SubscriptionState - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetMyPlexAccount200ResponseMyPlex) UnmarshalJSON(bytes []byte) (err error) { - varGetMyPlexAccount200ResponseMyPlex := _GetMyPlexAccount200ResponseMyPlex{} - - if err = json.Unmarshal(bytes, &varGetMyPlexAccount200ResponseMyPlex); err == nil { - *o = GetMyPlexAccount200ResponseMyPlex(varGetMyPlexAccount200ResponseMyPlex) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "authToken") - delete(additionalProperties, "username") - delete(additionalProperties, "mappingState") - delete(additionalProperties, "mappingError") - delete(additionalProperties, "signInState") - delete(additionalProperties, "publicAddress") - delete(additionalProperties, "publicPort") - delete(additionalProperties, "privateAddress") - delete(additionalProperties, "privatePort") - delete(additionalProperties, "subscriptionFeatures") - delete(additionalProperties, "subscriptionActive") - delete(additionalProperties, "subscriptionState") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetMyPlexAccount200ResponseMyPlex struct { - value *GetMyPlexAccount200ResponseMyPlex - isSet bool -} - -func (v NullableGetMyPlexAccount200ResponseMyPlex) Get() *GetMyPlexAccount200ResponseMyPlex { - return v.value -} - -func (v *NullableGetMyPlexAccount200ResponseMyPlex) Set(val *GetMyPlexAccount200ResponseMyPlex) { - v.value = val - v.isSet = true -} - -func (v NullableGetMyPlexAccount200ResponseMyPlex) IsSet() bool { - return v.isSet -} - -func (v *NullableGetMyPlexAccount200ResponseMyPlex) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetMyPlexAccount200ResponseMyPlex(val *GetMyPlexAccount200ResponseMyPlex) *NullableGetMyPlexAccount200ResponseMyPlex { - return &NullableGetMyPlexAccount200ResponseMyPlex{value: val, isSet: true} -} - -func (v NullableGetMyPlexAccount200ResponseMyPlex) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetMyPlexAccount200ResponseMyPlex) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_on_deck_200_response.go b/pms/model_get_on_deck_200_response.go deleted file mode 100644 index 52e02fe..0000000 --- a/pms/model_get_on_deck_200_response.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetOnDeck200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetOnDeck200Response{} - -// GetOnDeck200Response struct for GetOnDeck200Response -type GetOnDeck200Response struct { - MediaContainer *GetOnDeck200ResponseMediaContainer `json:"MediaContainer,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetOnDeck200Response GetOnDeck200Response - -// NewGetOnDeck200Response instantiates a new GetOnDeck200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetOnDeck200Response() *GetOnDeck200Response { - this := GetOnDeck200Response{} - return &this -} - -// NewGetOnDeck200ResponseWithDefaults instantiates a new GetOnDeck200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetOnDeck200ResponseWithDefaults() *GetOnDeck200Response { - this := GetOnDeck200Response{} - return &this -} - -// GetMediaContainer returns the MediaContainer field value if set, zero value otherwise. -func (o *GetOnDeck200Response) GetMediaContainer() GetOnDeck200ResponseMediaContainer { - if o == nil || isNil(o.MediaContainer) { - var ret GetOnDeck200ResponseMediaContainer - return ret - } - return *o.MediaContainer -} - -// GetMediaContainerOk returns a tuple with the MediaContainer field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetOnDeck200Response) GetMediaContainerOk() (*GetOnDeck200ResponseMediaContainer, bool) { - if o == nil || isNil(o.MediaContainer) { - return nil, false - } - return o.MediaContainer, true -} - -// HasMediaContainer returns a boolean if a field has been set. -func (o *GetOnDeck200Response) HasMediaContainer() bool { - if o != nil && !isNil(o.MediaContainer) { - return true - } - - return false -} - -// SetMediaContainer gets a reference to the given GetOnDeck200ResponseMediaContainer and assigns it to the MediaContainer field. -func (o *GetOnDeck200Response) SetMediaContainer(v GetOnDeck200ResponseMediaContainer) { - o.MediaContainer = &v -} - -func (o GetOnDeck200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetOnDeck200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MediaContainer) { - toSerialize["MediaContainer"] = o.MediaContainer - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetOnDeck200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetOnDeck200Response := _GetOnDeck200Response{} - - if err = json.Unmarshal(bytes, &varGetOnDeck200Response); err == nil { - *o = GetOnDeck200Response(varGetOnDeck200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "MediaContainer") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetOnDeck200Response struct { - value *GetOnDeck200Response - isSet bool -} - -func (v NullableGetOnDeck200Response) Get() *GetOnDeck200Response { - return v.value -} - -func (v *NullableGetOnDeck200Response) Set(val *GetOnDeck200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetOnDeck200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetOnDeck200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetOnDeck200Response(val *GetOnDeck200Response) *NullableGetOnDeck200Response { - return &NullableGetOnDeck200Response{value: val, isSet: true} -} - -func (v NullableGetOnDeck200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetOnDeck200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_on_deck_200_response_media_container.go b/pms/model_get_on_deck_200_response_media_container.go deleted file mode 100644 index c315a03..0000000 --- a/pms/model_get_on_deck_200_response_media_container.go +++ /dev/null @@ -1,381 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetOnDeck200ResponseMediaContainer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetOnDeck200ResponseMediaContainer{} - -// GetOnDeck200ResponseMediaContainer struct for GetOnDeck200ResponseMediaContainer -type GetOnDeck200ResponseMediaContainer struct { - Size interface{} `json:"size,omitempty"` - AllowSync interface{} `json:"allowSync,omitempty"` - Identifier interface{} `json:"identifier,omitempty"` - MediaTagPrefix interface{} `json:"mediaTagPrefix,omitempty"` - MediaTagVersion interface{} `json:"mediaTagVersion,omitempty"` - MixedParents interface{} `json:"mixedParents,omitempty"` - Metadata interface{} `json:"Metadata,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetOnDeck200ResponseMediaContainer GetOnDeck200ResponseMediaContainer - -// NewGetOnDeck200ResponseMediaContainer instantiates a new GetOnDeck200ResponseMediaContainer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetOnDeck200ResponseMediaContainer() *GetOnDeck200ResponseMediaContainer { - this := GetOnDeck200ResponseMediaContainer{} - return &this -} - -// NewGetOnDeck200ResponseMediaContainerWithDefaults instantiates a new GetOnDeck200ResponseMediaContainer object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetOnDeck200ResponseMediaContainerWithDefaults() *GetOnDeck200ResponseMediaContainer { - this := GetOnDeck200ResponseMediaContainer{} - return &this -} - -// GetSize returns the Size field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetOnDeck200ResponseMediaContainer) GetSize() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetOnDeck200ResponseMediaContainer) GetSizeOk() (*interface{}, bool) { - if o == nil || isNil(o.Size) { - return nil, false - } - return &o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *GetOnDeck200ResponseMediaContainer) HasSize() bool { - if o != nil && isNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given interface{} and assigns it to the Size field. -func (o *GetOnDeck200ResponseMediaContainer) SetSize(v interface{}) { - o.Size = v -} - -// GetAllowSync returns the AllowSync field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetOnDeck200ResponseMediaContainer) GetAllowSync() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.AllowSync -} - -// GetAllowSyncOk returns a tuple with the AllowSync field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetOnDeck200ResponseMediaContainer) GetAllowSyncOk() (*interface{}, bool) { - if o == nil || isNil(o.AllowSync) { - return nil, false - } - return &o.AllowSync, true -} - -// HasAllowSync returns a boolean if a field has been set. -func (o *GetOnDeck200ResponseMediaContainer) HasAllowSync() bool { - if o != nil && isNil(o.AllowSync) { - return true - } - - return false -} - -// SetAllowSync gets a reference to the given interface{} and assigns it to the AllowSync field. -func (o *GetOnDeck200ResponseMediaContainer) SetAllowSync(v interface{}) { - o.AllowSync = v -} - -// GetIdentifier returns the Identifier field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetOnDeck200ResponseMediaContainer) GetIdentifier() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Identifier -} - -// GetIdentifierOk returns a tuple with the Identifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetOnDeck200ResponseMediaContainer) GetIdentifierOk() (*interface{}, bool) { - if o == nil || isNil(o.Identifier) { - return nil, false - } - return &o.Identifier, true -} - -// HasIdentifier returns a boolean if a field has been set. -func (o *GetOnDeck200ResponseMediaContainer) HasIdentifier() bool { - if o != nil && isNil(o.Identifier) { - return true - } - - return false -} - -// SetIdentifier gets a reference to the given interface{} and assigns it to the Identifier field. -func (o *GetOnDeck200ResponseMediaContainer) SetIdentifier(v interface{}) { - o.Identifier = v -} - -// GetMediaTagPrefix returns the MediaTagPrefix field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetOnDeck200ResponseMediaContainer) GetMediaTagPrefix() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MediaTagPrefix -} - -// GetMediaTagPrefixOk returns a tuple with the MediaTagPrefix field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetOnDeck200ResponseMediaContainer) GetMediaTagPrefixOk() (*interface{}, bool) { - if o == nil || isNil(o.MediaTagPrefix) { - return nil, false - } - return &o.MediaTagPrefix, true -} - -// HasMediaTagPrefix returns a boolean if a field has been set. -func (o *GetOnDeck200ResponseMediaContainer) HasMediaTagPrefix() bool { - if o != nil && isNil(o.MediaTagPrefix) { - return true - } - - return false -} - -// SetMediaTagPrefix gets a reference to the given interface{} and assigns it to the MediaTagPrefix field. -func (o *GetOnDeck200ResponseMediaContainer) SetMediaTagPrefix(v interface{}) { - o.MediaTagPrefix = v -} - -// GetMediaTagVersion returns the MediaTagVersion field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetOnDeck200ResponseMediaContainer) GetMediaTagVersion() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MediaTagVersion -} - -// GetMediaTagVersionOk returns a tuple with the MediaTagVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetOnDeck200ResponseMediaContainer) GetMediaTagVersionOk() (*interface{}, bool) { - if o == nil || isNil(o.MediaTagVersion) { - return nil, false - } - return &o.MediaTagVersion, true -} - -// HasMediaTagVersion returns a boolean if a field has been set. -func (o *GetOnDeck200ResponseMediaContainer) HasMediaTagVersion() bool { - if o != nil && isNil(o.MediaTagVersion) { - return true - } - - return false -} - -// SetMediaTagVersion gets a reference to the given interface{} and assigns it to the MediaTagVersion field. -func (o *GetOnDeck200ResponseMediaContainer) SetMediaTagVersion(v interface{}) { - o.MediaTagVersion = v -} - -// GetMixedParents returns the MixedParents field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetOnDeck200ResponseMediaContainer) GetMixedParents() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MixedParents -} - -// GetMixedParentsOk returns a tuple with the MixedParents field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetOnDeck200ResponseMediaContainer) GetMixedParentsOk() (*interface{}, bool) { - if o == nil || isNil(o.MixedParents) { - return nil, false - } - return &o.MixedParents, true -} - -// HasMixedParents returns a boolean if a field has been set. -func (o *GetOnDeck200ResponseMediaContainer) HasMixedParents() bool { - if o != nil && isNil(o.MixedParents) { - return true - } - - return false -} - -// SetMixedParents gets a reference to the given interface{} and assigns it to the MixedParents field. -func (o *GetOnDeck200ResponseMediaContainer) SetMixedParents(v interface{}) { - o.MixedParents = v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetOnDeck200ResponseMediaContainer) GetMetadata() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetOnDeck200ResponseMediaContainer) GetMetadataOk() (*interface{}, bool) { - if o == nil || isNil(o.Metadata) { - return nil, false - } - return &o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *GetOnDeck200ResponseMediaContainer) HasMetadata() bool { - if o != nil && isNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given interface{} and assigns it to the Metadata field. -func (o *GetOnDeck200ResponseMediaContainer) SetMetadata(v interface{}) { - o.Metadata = v -} - -func (o GetOnDeck200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetOnDeck200ResponseMediaContainer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Size != nil { - toSerialize["size"] = o.Size - } - if o.AllowSync != nil { - toSerialize["allowSync"] = o.AllowSync - } - if o.Identifier != nil { - toSerialize["identifier"] = o.Identifier - } - if o.MediaTagPrefix != nil { - toSerialize["mediaTagPrefix"] = o.MediaTagPrefix - } - if o.MediaTagVersion != nil { - toSerialize["mediaTagVersion"] = o.MediaTagVersion - } - if o.MixedParents != nil { - toSerialize["mixedParents"] = o.MixedParents - } - if o.Metadata != nil { - toSerialize["Metadata"] = o.Metadata - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetOnDeck200ResponseMediaContainer) UnmarshalJSON(bytes []byte) (err error) { - varGetOnDeck200ResponseMediaContainer := _GetOnDeck200ResponseMediaContainer{} - - if err = json.Unmarshal(bytes, &varGetOnDeck200ResponseMediaContainer); err == nil { - *o = GetOnDeck200ResponseMediaContainer(varGetOnDeck200ResponseMediaContainer) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "size") - delete(additionalProperties, "allowSync") - delete(additionalProperties, "identifier") - delete(additionalProperties, "mediaTagPrefix") - delete(additionalProperties, "mediaTagVersion") - delete(additionalProperties, "mixedParents") - delete(additionalProperties, "Metadata") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetOnDeck200ResponseMediaContainer struct { - value *GetOnDeck200ResponseMediaContainer - isSet bool -} - -func (v NullableGetOnDeck200ResponseMediaContainer) Get() *GetOnDeck200ResponseMediaContainer { - return v.value -} - -func (v *NullableGetOnDeck200ResponseMediaContainer) Set(val *GetOnDeck200ResponseMediaContainer) { - v.value = val - v.isSet = true -} - -func (v NullableGetOnDeck200ResponseMediaContainer) IsSet() bool { - return v.isSet -} - -func (v *NullableGetOnDeck200ResponseMediaContainer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetOnDeck200ResponseMediaContainer(val *GetOnDeck200ResponseMediaContainer) *NullableGetOnDeck200ResponseMediaContainer { - return &NullableGetOnDeck200ResponseMediaContainer{value: val, isSet: true} -} - -func (v NullableGetOnDeck200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetOnDeck200ResponseMediaContainer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_recently_added_200_response.go b/pms/model_get_recently_added_200_response.go deleted file mode 100644 index 55925dc..0000000 --- a/pms/model_get_recently_added_200_response.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetRecentlyAdded200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRecentlyAdded200Response{} - -// GetRecentlyAdded200Response struct for GetRecentlyAdded200Response -type GetRecentlyAdded200Response struct { - MediaContainer *GetRecentlyAdded200ResponseMediaContainer `json:"MediaContainer,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetRecentlyAdded200Response GetRecentlyAdded200Response - -// NewGetRecentlyAdded200Response instantiates a new GetRecentlyAdded200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRecentlyAdded200Response() *GetRecentlyAdded200Response { - this := GetRecentlyAdded200Response{} - return &this -} - -// NewGetRecentlyAdded200ResponseWithDefaults instantiates a new GetRecentlyAdded200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRecentlyAdded200ResponseWithDefaults() *GetRecentlyAdded200Response { - this := GetRecentlyAdded200Response{} - return &this -} - -// GetMediaContainer returns the MediaContainer field value if set, zero value otherwise. -func (o *GetRecentlyAdded200Response) GetMediaContainer() GetRecentlyAdded200ResponseMediaContainer { - if o == nil || isNil(o.MediaContainer) { - var ret GetRecentlyAdded200ResponseMediaContainer - return ret - } - return *o.MediaContainer -} - -// GetMediaContainerOk returns a tuple with the MediaContainer field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRecentlyAdded200Response) GetMediaContainerOk() (*GetRecentlyAdded200ResponseMediaContainer, bool) { - if o == nil || isNil(o.MediaContainer) { - return nil, false - } - return o.MediaContainer, true -} - -// HasMediaContainer returns a boolean if a field has been set. -func (o *GetRecentlyAdded200Response) HasMediaContainer() bool { - if o != nil && !isNil(o.MediaContainer) { - return true - } - - return false -} - -// SetMediaContainer gets a reference to the given GetRecentlyAdded200ResponseMediaContainer and assigns it to the MediaContainer field. -func (o *GetRecentlyAdded200Response) SetMediaContainer(v GetRecentlyAdded200ResponseMediaContainer) { - o.MediaContainer = &v -} - -func (o GetRecentlyAdded200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRecentlyAdded200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MediaContainer) { - toSerialize["MediaContainer"] = o.MediaContainer - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetRecentlyAdded200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetRecentlyAdded200Response := _GetRecentlyAdded200Response{} - - if err = json.Unmarshal(bytes, &varGetRecentlyAdded200Response); err == nil { - *o = GetRecentlyAdded200Response(varGetRecentlyAdded200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "MediaContainer") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetRecentlyAdded200Response struct { - value *GetRecentlyAdded200Response - isSet bool -} - -func (v NullableGetRecentlyAdded200Response) Get() *GetRecentlyAdded200Response { - return v.value -} - -func (v *NullableGetRecentlyAdded200Response) Set(val *GetRecentlyAdded200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetRecentlyAdded200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRecentlyAdded200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRecentlyAdded200Response(val *GetRecentlyAdded200Response) *NullableGetRecentlyAdded200Response { - return &NullableGetRecentlyAdded200Response{value: val, isSet: true} -} - -func (v NullableGetRecentlyAdded200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRecentlyAdded200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_recently_added_200_response_media_container.go b/pms/model_get_recently_added_200_response_media_container.go deleted file mode 100644 index f7a1570..0000000 --- a/pms/model_get_recently_added_200_response_media_container.go +++ /dev/null @@ -1,381 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetRecentlyAdded200ResponseMediaContainer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRecentlyAdded200ResponseMediaContainer{} - -// GetRecentlyAdded200ResponseMediaContainer struct for GetRecentlyAdded200ResponseMediaContainer -type GetRecentlyAdded200ResponseMediaContainer struct { - Size interface{} `json:"size,omitempty"` - AllowSync interface{} `json:"allowSync,omitempty"` - Identifier interface{} `json:"identifier,omitempty"` - MediaTagPrefix interface{} `json:"mediaTagPrefix,omitempty"` - MediaTagVersion interface{} `json:"mediaTagVersion,omitempty"` - MixedParents interface{} `json:"mixedParents,omitempty"` - Metadata interface{} `json:"Metadata,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetRecentlyAdded200ResponseMediaContainer GetRecentlyAdded200ResponseMediaContainer - -// NewGetRecentlyAdded200ResponseMediaContainer instantiates a new GetRecentlyAdded200ResponseMediaContainer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetRecentlyAdded200ResponseMediaContainer() *GetRecentlyAdded200ResponseMediaContainer { - this := GetRecentlyAdded200ResponseMediaContainer{} - return &this -} - -// NewGetRecentlyAdded200ResponseMediaContainerWithDefaults instantiates a new GetRecentlyAdded200ResponseMediaContainer object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetRecentlyAdded200ResponseMediaContainerWithDefaults() *GetRecentlyAdded200ResponseMediaContainer { - this := GetRecentlyAdded200ResponseMediaContainer{} - return &this -} - -// GetSize returns the Size field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetRecentlyAdded200ResponseMediaContainer) GetSize() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetRecentlyAdded200ResponseMediaContainer) GetSizeOk() (*interface{}, bool) { - if o == nil || isNil(o.Size) { - return nil, false - } - return &o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *GetRecentlyAdded200ResponseMediaContainer) HasSize() bool { - if o != nil && isNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given interface{} and assigns it to the Size field. -func (o *GetRecentlyAdded200ResponseMediaContainer) SetSize(v interface{}) { - o.Size = v -} - -// GetAllowSync returns the AllowSync field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetRecentlyAdded200ResponseMediaContainer) GetAllowSync() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.AllowSync -} - -// GetAllowSyncOk returns a tuple with the AllowSync field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetRecentlyAdded200ResponseMediaContainer) GetAllowSyncOk() (*interface{}, bool) { - if o == nil || isNil(o.AllowSync) { - return nil, false - } - return &o.AllowSync, true -} - -// HasAllowSync returns a boolean if a field has been set. -func (o *GetRecentlyAdded200ResponseMediaContainer) HasAllowSync() bool { - if o != nil && isNil(o.AllowSync) { - return true - } - - return false -} - -// SetAllowSync gets a reference to the given interface{} and assigns it to the AllowSync field. -func (o *GetRecentlyAdded200ResponseMediaContainer) SetAllowSync(v interface{}) { - o.AllowSync = v -} - -// GetIdentifier returns the Identifier field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetRecentlyAdded200ResponseMediaContainer) GetIdentifier() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Identifier -} - -// GetIdentifierOk returns a tuple with the Identifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetRecentlyAdded200ResponseMediaContainer) GetIdentifierOk() (*interface{}, bool) { - if o == nil || isNil(o.Identifier) { - return nil, false - } - return &o.Identifier, true -} - -// HasIdentifier returns a boolean if a field has been set. -func (o *GetRecentlyAdded200ResponseMediaContainer) HasIdentifier() bool { - if o != nil && isNil(o.Identifier) { - return true - } - - return false -} - -// SetIdentifier gets a reference to the given interface{} and assigns it to the Identifier field. -func (o *GetRecentlyAdded200ResponseMediaContainer) SetIdentifier(v interface{}) { - o.Identifier = v -} - -// GetMediaTagPrefix returns the MediaTagPrefix field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetRecentlyAdded200ResponseMediaContainer) GetMediaTagPrefix() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MediaTagPrefix -} - -// GetMediaTagPrefixOk returns a tuple with the MediaTagPrefix field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetRecentlyAdded200ResponseMediaContainer) GetMediaTagPrefixOk() (*interface{}, bool) { - if o == nil || isNil(o.MediaTagPrefix) { - return nil, false - } - return &o.MediaTagPrefix, true -} - -// HasMediaTagPrefix returns a boolean if a field has been set. -func (o *GetRecentlyAdded200ResponseMediaContainer) HasMediaTagPrefix() bool { - if o != nil && isNil(o.MediaTagPrefix) { - return true - } - - return false -} - -// SetMediaTagPrefix gets a reference to the given interface{} and assigns it to the MediaTagPrefix field. -func (o *GetRecentlyAdded200ResponseMediaContainer) SetMediaTagPrefix(v interface{}) { - o.MediaTagPrefix = v -} - -// GetMediaTagVersion returns the MediaTagVersion field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetRecentlyAdded200ResponseMediaContainer) GetMediaTagVersion() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MediaTagVersion -} - -// GetMediaTagVersionOk returns a tuple with the MediaTagVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetRecentlyAdded200ResponseMediaContainer) GetMediaTagVersionOk() (*interface{}, bool) { - if o == nil || isNil(o.MediaTagVersion) { - return nil, false - } - return &o.MediaTagVersion, true -} - -// HasMediaTagVersion returns a boolean if a field has been set. -func (o *GetRecentlyAdded200ResponseMediaContainer) HasMediaTagVersion() bool { - if o != nil && isNil(o.MediaTagVersion) { - return true - } - - return false -} - -// SetMediaTagVersion gets a reference to the given interface{} and assigns it to the MediaTagVersion field. -func (o *GetRecentlyAdded200ResponseMediaContainer) SetMediaTagVersion(v interface{}) { - o.MediaTagVersion = v -} - -// GetMixedParents returns the MixedParents field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetRecentlyAdded200ResponseMediaContainer) GetMixedParents() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MixedParents -} - -// GetMixedParentsOk returns a tuple with the MixedParents field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetRecentlyAdded200ResponseMediaContainer) GetMixedParentsOk() (*interface{}, bool) { - if o == nil || isNil(o.MixedParents) { - return nil, false - } - return &o.MixedParents, true -} - -// HasMixedParents returns a boolean if a field has been set. -func (o *GetRecentlyAdded200ResponseMediaContainer) HasMixedParents() bool { - if o != nil && isNil(o.MixedParents) { - return true - } - - return false -} - -// SetMixedParents gets a reference to the given interface{} and assigns it to the MixedParents field. -func (o *GetRecentlyAdded200ResponseMediaContainer) SetMixedParents(v interface{}) { - o.MixedParents = v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetRecentlyAdded200ResponseMediaContainer) GetMetadata() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetRecentlyAdded200ResponseMediaContainer) GetMetadataOk() (*interface{}, bool) { - if o == nil || isNil(o.Metadata) { - return nil, false - } - return &o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *GetRecentlyAdded200ResponseMediaContainer) HasMetadata() bool { - if o != nil && isNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given interface{} and assigns it to the Metadata field. -func (o *GetRecentlyAdded200ResponseMediaContainer) SetMetadata(v interface{}) { - o.Metadata = v -} - -func (o GetRecentlyAdded200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRecentlyAdded200ResponseMediaContainer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Size != nil { - toSerialize["size"] = o.Size - } - if o.AllowSync != nil { - toSerialize["allowSync"] = o.AllowSync - } - if o.Identifier != nil { - toSerialize["identifier"] = o.Identifier - } - if o.MediaTagPrefix != nil { - toSerialize["mediaTagPrefix"] = o.MediaTagPrefix - } - if o.MediaTagVersion != nil { - toSerialize["mediaTagVersion"] = o.MediaTagVersion - } - if o.MixedParents != nil { - toSerialize["mixedParents"] = o.MixedParents - } - if o.Metadata != nil { - toSerialize["Metadata"] = o.Metadata - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetRecentlyAdded200ResponseMediaContainer) UnmarshalJSON(bytes []byte) (err error) { - varGetRecentlyAdded200ResponseMediaContainer := _GetRecentlyAdded200ResponseMediaContainer{} - - if err = json.Unmarshal(bytes, &varGetRecentlyAdded200ResponseMediaContainer); err == nil { - *o = GetRecentlyAdded200ResponseMediaContainer(varGetRecentlyAdded200ResponseMediaContainer) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "size") - delete(additionalProperties, "allowSync") - delete(additionalProperties, "identifier") - delete(additionalProperties, "mediaTagPrefix") - delete(additionalProperties, "mediaTagVersion") - delete(additionalProperties, "mixedParents") - delete(additionalProperties, "Metadata") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetRecentlyAdded200ResponseMediaContainer struct { - value *GetRecentlyAdded200ResponseMediaContainer - isSet bool -} - -func (v NullableGetRecentlyAdded200ResponseMediaContainer) Get() *GetRecentlyAdded200ResponseMediaContainer { - return v.value -} - -func (v *NullableGetRecentlyAdded200ResponseMediaContainer) Set(val *GetRecentlyAdded200ResponseMediaContainer) { - v.value = val - v.isSet = true -} - -func (v NullableGetRecentlyAdded200ResponseMediaContainer) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRecentlyAdded200ResponseMediaContainer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRecentlyAdded200ResponseMediaContainer(val *GetRecentlyAdded200ResponseMediaContainer) *NullableGetRecentlyAdded200ResponseMediaContainer { - return &NullableGetRecentlyAdded200ResponseMediaContainer{value: val, isSet: true} -} - -func (v NullableGetRecentlyAdded200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRecentlyAdded200ResponseMediaContainer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_search_results_200_response.go b/pms/model_get_search_results_200_response.go deleted file mode 100644 index 96b63fd..0000000 --- a/pms/model_get_search_results_200_response.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetSearchResults200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetSearchResults200Response{} - -// GetSearchResults200Response struct for GetSearchResults200Response -type GetSearchResults200Response struct { - MediaContainer *GetSearchResults200ResponseMediaContainer `json:"MediaContainer,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetSearchResults200Response GetSearchResults200Response - -// NewGetSearchResults200Response instantiates a new GetSearchResults200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetSearchResults200Response() *GetSearchResults200Response { - this := GetSearchResults200Response{} - return &this -} - -// NewGetSearchResults200ResponseWithDefaults instantiates a new GetSearchResults200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetSearchResults200ResponseWithDefaults() *GetSearchResults200Response { - this := GetSearchResults200Response{} - return &this -} - -// GetMediaContainer returns the MediaContainer field value if set, zero value otherwise. -func (o *GetSearchResults200Response) GetMediaContainer() GetSearchResults200ResponseMediaContainer { - if o == nil || isNil(o.MediaContainer) { - var ret GetSearchResults200ResponseMediaContainer - return ret - } - return *o.MediaContainer -} - -// GetMediaContainerOk returns a tuple with the MediaContainer field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetSearchResults200Response) GetMediaContainerOk() (*GetSearchResults200ResponseMediaContainer, bool) { - if o == nil || isNil(o.MediaContainer) { - return nil, false - } - return o.MediaContainer, true -} - -// HasMediaContainer returns a boolean if a field has been set. -func (o *GetSearchResults200Response) HasMediaContainer() bool { - if o != nil && !isNil(o.MediaContainer) { - return true - } - - return false -} - -// SetMediaContainer gets a reference to the given GetSearchResults200ResponseMediaContainer and assigns it to the MediaContainer field. -func (o *GetSearchResults200Response) SetMediaContainer(v GetSearchResults200ResponseMediaContainer) { - o.MediaContainer = &v -} - -func (o GetSearchResults200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetSearchResults200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MediaContainer) { - toSerialize["MediaContainer"] = o.MediaContainer - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetSearchResults200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetSearchResults200Response := _GetSearchResults200Response{} - - if err = json.Unmarshal(bytes, &varGetSearchResults200Response); err == nil { - *o = GetSearchResults200Response(varGetSearchResults200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "MediaContainer") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetSearchResults200Response struct { - value *GetSearchResults200Response - isSet bool -} - -func (v NullableGetSearchResults200Response) Get() *GetSearchResults200Response { - return v.value -} - -func (v *NullableGetSearchResults200Response) Set(val *GetSearchResults200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetSearchResults200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetSearchResults200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetSearchResults200Response(val *GetSearchResults200Response) *NullableGetSearchResults200Response { - return &NullableGetSearchResults200Response{value: val, isSet: true} -} - -func (v NullableGetSearchResults200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetSearchResults200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_search_results_200_response_media_container.go b/pms/model_get_search_results_200_response_media_container.go deleted file mode 100644 index 0a02456..0000000 --- a/pms/model_get_search_results_200_response_media_container.go +++ /dev/null @@ -1,343 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetSearchResults200ResponseMediaContainer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetSearchResults200ResponseMediaContainer{} - -// GetSearchResults200ResponseMediaContainer struct for GetSearchResults200ResponseMediaContainer -type GetSearchResults200ResponseMediaContainer struct { - Size interface{} `json:"size,omitempty"` - Identifier interface{} `json:"identifier,omitempty"` - MediaTagPrefix interface{} `json:"mediaTagPrefix,omitempty"` - MediaTagVersion interface{} `json:"mediaTagVersion,omitempty"` - Metadata interface{} `json:"Metadata,omitempty"` - Provider interface{} `json:"Provider,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetSearchResults200ResponseMediaContainer GetSearchResults200ResponseMediaContainer - -// NewGetSearchResults200ResponseMediaContainer instantiates a new GetSearchResults200ResponseMediaContainer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetSearchResults200ResponseMediaContainer() *GetSearchResults200ResponseMediaContainer { - this := GetSearchResults200ResponseMediaContainer{} - return &this -} - -// NewGetSearchResults200ResponseMediaContainerWithDefaults instantiates a new GetSearchResults200ResponseMediaContainer object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetSearchResults200ResponseMediaContainerWithDefaults() *GetSearchResults200ResponseMediaContainer { - this := GetSearchResults200ResponseMediaContainer{} - return &this -} - -// GetSize returns the Size field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetSearchResults200ResponseMediaContainer) GetSize() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetSearchResults200ResponseMediaContainer) GetSizeOk() (*interface{}, bool) { - if o == nil || isNil(o.Size) { - return nil, false - } - return &o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *GetSearchResults200ResponseMediaContainer) HasSize() bool { - if o != nil && isNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given interface{} and assigns it to the Size field. -func (o *GetSearchResults200ResponseMediaContainer) SetSize(v interface{}) { - o.Size = v -} - -// GetIdentifier returns the Identifier field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetSearchResults200ResponseMediaContainer) GetIdentifier() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Identifier -} - -// GetIdentifierOk returns a tuple with the Identifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetSearchResults200ResponseMediaContainer) GetIdentifierOk() (*interface{}, bool) { - if o == nil || isNil(o.Identifier) { - return nil, false - } - return &o.Identifier, true -} - -// HasIdentifier returns a boolean if a field has been set. -func (o *GetSearchResults200ResponseMediaContainer) HasIdentifier() bool { - if o != nil && isNil(o.Identifier) { - return true - } - - return false -} - -// SetIdentifier gets a reference to the given interface{} and assigns it to the Identifier field. -func (o *GetSearchResults200ResponseMediaContainer) SetIdentifier(v interface{}) { - o.Identifier = v -} - -// GetMediaTagPrefix returns the MediaTagPrefix field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetSearchResults200ResponseMediaContainer) GetMediaTagPrefix() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MediaTagPrefix -} - -// GetMediaTagPrefixOk returns a tuple with the MediaTagPrefix field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetSearchResults200ResponseMediaContainer) GetMediaTagPrefixOk() (*interface{}, bool) { - if o == nil || isNil(o.MediaTagPrefix) { - return nil, false - } - return &o.MediaTagPrefix, true -} - -// HasMediaTagPrefix returns a boolean if a field has been set. -func (o *GetSearchResults200ResponseMediaContainer) HasMediaTagPrefix() bool { - if o != nil && isNil(o.MediaTagPrefix) { - return true - } - - return false -} - -// SetMediaTagPrefix gets a reference to the given interface{} and assigns it to the MediaTagPrefix field. -func (o *GetSearchResults200ResponseMediaContainer) SetMediaTagPrefix(v interface{}) { - o.MediaTagPrefix = v -} - -// GetMediaTagVersion returns the MediaTagVersion field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetSearchResults200ResponseMediaContainer) GetMediaTagVersion() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MediaTagVersion -} - -// GetMediaTagVersionOk returns a tuple with the MediaTagVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetSearchResults200ResponseMediaContainer) GetMediaTagVersionOk() (*interface{}, bool) { - if o == nil || isNil(o.MediaTagVersion) { - return nil, false - } - return &o.MediaTagVersion, true -} - -// HasMediaTagVersion returns a boolean if a field has been set. -func (o *GetSearchResults200ResponseMediaContainer) HasMediaTagVersion() bool { - if o != nil && isNil(o.MediaTagVersion) { - return true - } - - return false -} - -// SetMediaTagVersion gets a reference to the given interface{} and assigns it to the MediaTagVersion field. -func (o *GetSearchResults200ResponseMediaContainer) SetMediaTagVersion(v interface{}) { - o.MediaTagVersion = v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetSearchResults200ResponseMediaContainer) GetMetadata() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetSearchResults200ResponseMediaContainer) GetMetadataOk() (*interface{}, bool) { - if o == nil || isNil(o.Metadata) { - return nil, false - } - return &o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *GetSearchResults200ResponseMediaContainer) HasMetadata() bool { - if o != nil && isNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given interface{} and assigns it to the Metadata field. -func (o *GetSearchResults200ResponseMediaContainer) SetMetadata(v interface{}) { - o.Metadata = v -} - -// GetProvider returns the Provider field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetSearchResults200ResponseMediaContainer) GetProvider() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Provider -} - -// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetSearchResults200ResponseMediaContainer) GetProviderOk() (*interface{}, bool) { - if o == nil || isNil(o.Provider) { - return nil, false - } - return &o.Provider, true -} - -// HasProvider returns a boolean if a field has been set. -func (o *GetSearchResults200ResponseMediaContainer) HasProvider() bool { - if o != nil && isNil(o.Provider) { - return true - } - - return false -} - -// SetProvider gets a reference to the given interface{} and assigns it to the Provider field. -func (o *GetSearchResults200ResponseMediaContainer) SetProvider(v interface{}) { - o.Provider = v -} - -func (o GetSearchResults200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetSearchResults200ResponseMediaContainer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Size != nil { - toSerialize["size"] = o.Size - } - if o.Identifier != nil { - toSerialize["identifier"] = o.Identifier - } - if o.MediaTagPrefix != nil { - toSerialize["mediaTagPrefix"] = o.MediaTagPrefix - } - if o.MediaTagVersion != nil { - toSerialize["mediaTagVersion"] = o.MediaTagVersion - } - if o.Metadata != nil { - toSerialize["Metadata"] = o.Metadata - } - if o.Provider != nil { - toSerialize["Provider"] = o.Provider - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetSearchResults200ResponseMediaContainer) UnmarshalJSON(bytes []byte) (err error) { - varGetSearchResults200ResponseMediaContainer := _GetSearchResults200ResponseMediaContainer{} - - if err = json.Unmarshal(bytes, &varGetSearchResults200ResponseMediaContainer); err == nil { - *o = GetSearchResults200ResponseMediaContainer(varGetSearchResults200ResponseMediaContainer) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "size") - delete(additionalProperties, "identifier") - delete(additionalProperties, "mediaTagPrefix") - delete(additionalProperties, "mediaTagVersion") - delete(additionalProperties, "Metadata") - delete(additionalProperties, "Provider") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetSearchResults200ResponseMediaContainer struct { - value *GetSearchResults200ResponseMediaContainer - isSet bool -} - -func (v NullableGetSearchResults200ResponseMediaContainer) Get() *GetSearchResults200ResponseMediaContainer { - return v.value -} - -func (v *NullableGetSearchResults200ResponseMediaContainer) Set(val *GetSearchResults200ResponseMediaContainer) { - v.value = val - v.isSet = true -} - -func (v NullableGetSearchResults200ResponseMediaContainer) IsSet() bool { - return v.isSet -} - -func (v *NullableGetSearchResults200ResponseMediaContainer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetSearchResults200ResponseMediaContainer(val *GetSearchResults200ResponseMediaContainer) *NullableGetSearchResults200ResponseMediaContainer { - return &NullableGetSearchResults200ResponseMediaContainer{value: val, isSet: true} -} - -func (v NullableGetSearchResults200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetSearchResults200ResponseMediaContainer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_server_activities_200_response.go b/pms/model_get_server_activities_200_response.go deleted file mode 100644 index 3cf8358..0000000 --- a/pms/model_get_server_activities_200_response.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetServerActivities200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServerActivities200Response{} - -// GetServerActivities200Response struct for GetServerActivities200Response -type GetServerActivities200Response struct { - MediaContainer *GetServerActivities200ResponseMediaContainer `json:"MediaContainer,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetServerActivities200Response GetServerActivities200Response - -// NewGetServerActivities200Response instantiates a new GetServerActivities200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetServerActivities200Response() *GetServerActivities200Response { - this := GetServerActivities200Response{} - return &this -} - -// NewGetServerActivities200ResponseWithDefaults instantiates a new GetServerActivities200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetServerActivities200ResponseWithDefaults() *GetServerActivities200Response { - this := GetServerActivities200Response{} - return &this -} - -// GetMediaContainer returns the MediaContainer field value if set, zero value otherwise. -func (o *GetServerActivities200Response) GetMediaContainer() GetServerActivities200ResponseMediaContainer { - if o == nil || isNil(o.MediaContainer) { - var ret GetServerActivities200ResponseMediaContainer - return ret - } - return *o.MediaContainer -} - -// GetMediaContainerOk returns a tuple with the MediaContainer field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetServerActivities200Response) GetMediaContainerOk() (*GetServerActivities200ResponseMediaContainer, bool) { - if o == nil || isNil(o.MediaContainer) { - return nil, false - } - return o.MediaContainer, true -} - -// HasMediaContainer returns a boolean if a field has been set. -func (o *GetServerActivities200Response) HasMediaContainer() bool { - if o != nil && !isNil(o.MediaContainer) { - return true - } - - return false -} - -// SetMediaContainer gets a reference to the given GetServerActivities200ResponseMediaContainer and assigns it to the MediaContainer field. -func (o *GetServerActivities200Response) SetMediaContainer(v GetServerActivities200ResponseMediaContainer) { - o.MediaContainer = &v -} - -func (o GetServerActivities200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetServerActivities200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MediaContainer) { - toSerialize["MediaContainer"] = o.MediaContainer - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetServerActivities200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetServerActivities200Response := _GetServerActivities200Response{} - - if err = json.Unmarshal(bytes, &varGetServerActivities200Response); err == nil { - *o = GetServerActivities200Response(varGetServerActivities200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "MediaContainer") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetServerActivities200Response struct { - value *GetServerActivities200Response - isSet bool -} - -func (v NullableGetServerActivities200Response) Get() *GetServerActivities200Response { - return v.value -} - -func (v *NullableGetServerActivities200Response) Set(val *GetServerActivities200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetServerActivities200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServerActivities200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServerActivities200Response(val *GetServerActivities200Response) *NullableGetServerActivities200Response { - return &NullableGetServerActivities200Response{value: val, isSet: true} -} - -func (v NullableGetServerActivities200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServerActivities200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_server_activities_200_response_media_container.go b/pms/model_get_server_activities_200_response_media_container.go deleted file mode 100644 index c831f81..0000000 --- a/pms/model_get_server_activities_200_response_media_container.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetServerActivities200ResponseMediaContainer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServerActivities200ResponseMediaContainer{} - -// GetServerActivities200ResponseMediaContainer struct for GetServerActivities200ResponseMediaContainer -type GetServerActivities200ResponseMediaContainer struct { - Size interface{} `json:"size,omitempty"` - Activity interface{} `json:"Activity,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetServerActivities200ResponseMediaContainer GetServerActivities200ResponseMediaContainer - -// NewGetServerActivities200ResponseMediaContainer instantiates a new GetServerActivities200ResponseMediaContainer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetServerActivities200ResponseMediaContainer() *GetServerActivities200ResponseMediaContainer { - this := GetServerActivities200ResponseMediaContainer{} - return &this -} - -// NewGetServerActivities200ResponseMediaContainerWithDefaults instantiates a new GetServerActivities200ResponseMediaContainer object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetServerActivities200ResponseMediaContainerWithDefaults() *GetServerActivities200ResponseMediaContainer { - this := GetServerActivities200ResponseMediaContainer{} - return &this -} - -// GetSize returns the Size field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerActivities200ResponseMediaContainer) GetSize() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerActivities200ResponseMediaContainer) GetSizeOk() (*interface{}, bool) { - if o == nil || isNil(o.Size) { - return nil, false - } - return &o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *GetServerActivities200ResponseMediaContainer) HasSize() bool { - if o != nil && isNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given interface{} and assigns it to the Size field. -func (o *GetServerActivities200ResponseMediaContainer) SetSize(v interface{}) { - o.Size = v -} - -// GetActivity returns the Activity field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerActivities200ResponseMediaContainer) GetActivity() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Activity -} - -// GetActivityOk returns a tuple with the Activity field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerActivities200ResponseMediaContainer) GetActivityOk() (*interface{}, bool) { - if o == nil || isNil(o.Activity) { - return nil, false - } - return &o.Activity, true -} - -// HasActivity returns a boolean if a field has been set. -func (o *GetServerActivities200ResponseMediaContainer) HasActivity() bool { - if o != nil && isNil(o.Activity) { - return true - } - - return false -} - -// SetActivity gets a reference to the given interface{} and assigns it to the Activity field. -func (o *GetServerActivities200ResponseMediaContainer) SetActivity(v interface{}) { - o.Activity = v -} - -func (o GetServerActivities200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetServerActivities200ResponseMediaContainer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Size != nil { - toSerialize["size"] = o.Size - } - if o.Activity != nil { - toSerialize["Activity"] = o.Activity - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetServerActivities200ResponseMediaContainer) UnmarshalJSON(bytes []byte) (err error) { - varGetServerActivities200ResponseMediaContainer := _GetServerActivities200ResponseMediaContainer{} - - if err = json.Unmarshal(bytes, &varGetServerActivities200ResponseMediaContainer); err == nil { - *o = GetServerActivities200ResponseMediaContainer(varGetServerActivities200ResponseMediaContainer) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "size") - delete(additionalProperties, "Activity") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetServerActivities200ResponseMediaContainer struct { - value *GetServerActivities200ResponseMediaContainer - isSet bool -} - -func (v NullableGetServerActivities200ResponseMediaContainer) Get() *GetServerActivities200ResponseMediaContainer { - return v.value -} - -func (v *NullableGetServerActivities200ResponseMediaContainer) Set(val *GetServerActivities200ResponseMediaContainer) { - v.value = val - v.isSet = true -} - -func (v NullableGetServerActivities200ResponseMediaContainer) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServerActivities200ResponseMediaContainer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServerActivities200ResponseMediaContainer(val *GetServerActivities200ResponseMediaContainer) *NullableGetServerActivities200ResponseMediaContainer { - return &NullableGetServerActivities200ResponseMediaContainer{value: val, isSet: true} -} - -func (v NullableGetServerActivities200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServerActivities200ResponseMediaContainer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_server_capabilities_200_response.go b/pms/model_get_server_capabilities_200_response.go deleted file mode 100644 index 56e7a55..0000000 --- a/pms/model_get_server_capabilities_200_response.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetServerCapabilities200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServerCapabilities200Response{} - -// GetServerCapabilities200Response struct for GetServerCapabilities200Response -type GetServerCapabilities200Response struct { - MediaContainer *GetServerCapabilities200ResponseMediaContainer `json:"MediaContainer,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetServerCapabilities200Response GetServerCapabilities200Response - -// NewGetServerCapabilities200Response instantiates a new GetServerCapabilities200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetServerCapabilities200Response() *GetServerCapabilities200Response { - this := GetServerCapabilities200Response{} - return &this -} - -// NewGetServerCapabilities200ResponseWithDefaults instantiates a new GetServerCapabilities200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetServerCapabilities200ResponseWithDefaults() *GetServerCapabilities200Response { - this := GetServerCapabilities200Response{} - return &this -} - -// GetMediaContainer returns the MediaContainer field value if set, zero value otherwise. -func (o *GetServerCapabilities200Response) GetMediaContainer() GetServerCapabilities200ResponseMediaContainer { - if o == nil || isNil(o.MediaContainer) { - var ret GetServerCapabilities200ResponseMediaContainer - return ret - } - return *o.MediaContainer -} - -// GetMediaContainerOk returns a tuple with the MediaContainer field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetServerCapabilities200Response) GetMediaContainerOk() (*GetServerCapabilities200ResponseMediaContainer, bool) { - if o == nil || isNil(o.MediaContainer) { - return nil, false - } - return o.MediaContainer, true -} - -// HasMediaContainer returns a boolean if a field has been set. -func (o *GetServerCapabilities200Response) HasMediaContainer() bool { - if o != nil && !isNil(o.MediaContainer) { - return true - } - - return false -} - -// SetMediaContainer gets a reference to the given GetServerCapabilities200ResponseMediaContainer and assigns it to the MediaContainer field. -func (o *GetServerCapabilities200Response) SetMediaContainer(v GetServerCapabilities200ResponseMediaContainer) { - o.MediaContainer = &v -} - -func (o GetServerCapabilities200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetServerCapabilities200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MediaContainer) { - toSerialize["MediaContainer"] = o.MediaContainer - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetServerCapabilities200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetServerCapabilities200Response := _GetServerCapabilities200Response{} - - if err = json.Unmarshal(bytes, &varGetServerCapabilities200Response); err == nil { - *o = GetServerCapabilities200Response(varGetServerCapabilities200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "MediaContainer") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetServerCapabilities200Response struct { - value *GetServerCapabilities200Response - isSet bool -} - -func (v NullableGetServerCapabilities200Response) Get() *GetServerCapabilities200Response { - return v.value -} - -func (v *NullableGetServerCapabilities200Response) Set(val *GetServerCapabilities200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetServerCapabilities200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServerCapabilities200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServerCapabilities200Response(val *GetServerCapabilities200Response) *NullableGetServerCapabilities200Response { - return &NullableGetServerCapabilities200Response{value: val, isSet: true} -} - -func (v NullableGetServerCapabilities200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServerCapabilities200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_server_capabilities_200_response_media_container.go b/pms/model_get_server_capabilities_200_response_media_container.go deleted file mode 100644 index 79ce980..0000000 --- a/pms/model_get_server_capabilities_200_response_media_container.go +++ /dev/null @@ -1,2053 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetServerCapabilities200ResponseMediaContainer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServerCapabilities200ResponseMediaContainer{} - -// GetServerCapabilities200ResponseMediaContainer struct for GetServerCapabilities200ResponseMediaContainer -type GetServerCapabilities200ResponseMediaContainer struct { - Size interface{} `json:"size,omitempty"` - AllowCameraUpload interface{} `json:"allowCameraUpload,omitempty"` - AllowChannelAccess interface{} `json:"allowChannelAccess,omitempty"` - AllowMediaDeletion interface{} `json:"allowMediaDeletion,omitempty"` - AllowSharing interface{} `json:"allowSharing,omitempty"` - AllowSync interface{} `json:"allowSync,omitempty"` - AllowTuners interface{} `json:"allowTuners,omitempty"` - BackgroundProcessing interface{} `json:"backgroundProcessing,omitempty"` - Certificate interface{} `json:"certificate,omitempty"` - CompanionProxy interface{} `json:"companionProxy,omitempty"` - CountryCode interface{} `json:"countryCode,omitempty"` - Diagnostics interface{} `json:"diagnostics,omitempty"` - EventStream interface{} `json:"eventStream,omitempty"` - FriendlyName interface{} `json:"friendlyName,omitempty"` - HubSearch interface{} `json:"hubSearch,omitempty"` - ItemClusters interface{} `json:"itemClusters,omitempty"` - Livetv interface{} `json:"livetv,omitempty"` - MachineIdentifier interface{} `json:"machineIdentifier,omitempty"` - MediaProviders interface{} `json:"mediaProviders,omitempty"` - Multiuser interface{} `json:"multiuser,omitempty"` - MusicAnalysis interface{} `json:"musicAnalysis,omitempty"` - MyPlex interface{} `json:"myPlex,omitempty"` - MyPlexMappingState interface{} `json:"myPlexMappingState,omitempty"` - MyPlexSigninState interface{} `json:"myPlexSigninState,omitempty"` - MyPlexSubscription interface{} `json:"myPlexSubscription,omitempty"` - MyPlexUsername interface{} `json:"myPlexUsername,omitempty"` - OfflineTranscode interface{} `json:"offlineTranscode,omitempty"` - OwnerFeatures interface{} `json:"ownerFeatures,omitempty"` - PhotoAutoTag interface{} `json:"photoAutoTag,omitempty"` - Platform interface{} `json:"platform,omitempty"` - PlatformVersion interface{} `json:"platformVersion,omitempty"` - PluginHost interface{} `json:"pluginHost,omitempty"` - PushNotifications interface{} `json:"pushNotifications,omitempty"` - ReadOnlyLibraries interface{} `json:"readOnlyLibraries,omitempty"` - StreamingBrainABRVersion interface{} `json:"streamingBrainABRVersion,omitempty"` - StreamingBrainVersion interface{} `json:"streamingBrainVersion,omitempty"` - Sync interface{} `json:"sync,omitempty"` - TranscoderActiveVideoSessions interface{} `json:"transcoderActiveVideoSessions,omitempty"` - TranscoderAudio interface{} `json:"transcoderAudio,omitempty"` - TranscoderLyrics interface{} `json:"transcoderLyrics,omitempty"` - TranscoderPhoto interface{} `json:"transcoderPhoto,omitempty"` - TranscoderSubtitles interface{} `json:"transcoderSubtitles,omitempty"` - TranscoderVideo interface{} `json:"transcoderVideo,omitempty"` - TranscoderVideoBitrates interface{} `json:"transcoderVideoBitrates,omitempty"` - TranscoderVideoQualities interface{} `json:"transcoderVideoQualities,omitempty"` - TranscoderVideoResolutions interface{} `json:"transcoderVideoResolutions,omitempty"` - UpdatedAt interface{} `json:"updatedAt,omitempty"` - Updater interface{} `json:"updater,omitempty"` - Version interface{} `json:"version,omitempty"` - VoiceSearch interface{} `json:"voiceSearch,omitempty"` - Directory interface{} `json:"Directory,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetServerCapabilities200ResponseMediaContainer GetServerCapabilities200ResponseMediaContainer - -// NewGetServerCapabilities200ResponseMediaContainer instantiates a new GetServerCapabilities200ResponseMediaContainer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetServerCapabilities200ResponseMediaContainer() *GetServerCapabilities200ResponseMediaContainer { - this := GetServerCapabilities200ResponseMediaContainer{} - return &this -} - -// NewGetServerCapabilities200ResponseMediaContainerWithDefaults instantiates a new GetServerCapabilities200ResponseMediaContainer object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetServerCapabilities200ResponseMediaContainerWithDefaults() *GetServerCapabilities200ResponseMediaContainer { - this := GetServerCapabilities200ResponseMediaContainer{} - return &this -} - -// GetSize returns the Size field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetSize() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetSizeOk() (*interface{}, bool) { - if o == nil || isNil(o.Size) { - return nil, false - } - return &o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasSize() bool { - if o != nil && isNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given interface{} and assigns it to the Size field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetSize(v interface{}) { - o.Size = v -} - -// GetAllowCameraUpload returns the AllowCameraUpload field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowCameraUpload() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.AllowCameraUpload -} - -// GetAllowCameraUploadOk returns a tuple with the AllowCameraUpload field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowCameraUploadOk() (*interface{}, bool) { - if o == nil || isNil(o.AllowCameraUpload) { - return nil, false - } - return &o.AllowCameraUpload, true -} - -// HasAllowCameraUpload returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowCameraUpload() bool { - if o != nil && isNil(o.AllowCameraUpload) { - return true - } - - return false -} - -// SetAllowCameraUpload gets a reference to the given interface{} and assigns it to the AllowCameraUpload field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowCameraUpload(v interface{}) { - o.AllowCameraUpload = v -} - -// GetAllowChannelAccess returns the AllowChannelAccess field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowChannelAccess() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.AllowChannelAccess -} - -// GetAllowChannelAccessOk returns a tuple with the AllowChannelAccess field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowChannelAccessOk() (*interface{}, bool) { - if o == nil || isNil(o.AllowChannelAccess) { - return nil, false - } - return &o.AllowChannelAccess, true -} - -// HasAllowChannelAccess returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowChannelAccess() bool { - if o != nil && isNil(o.AllowChannelAccess) { - return true - } - - return false -} - -// SetAllowChannelAccess gets a reference to the given interface{} and assigns it to the AllowChannelAccess field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowChannelAccess(v interface{}) { - o.AllowChannelAccess = v -} - -// GetAllowMediaDeletion returns the AllowMediaDeletion field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowMediaDeletion() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.AllowMediaDeletion -} - -// GetAllowMediaDeletionOk returns a tuple with the AllowMediaDeletion field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowMediaDeletionOk() (*interface{}, bool) { - if o == nil || isNil(o.AllowMediaDeletion) { - return nil, false - } - return &o.AllowMediaDeletion, true -} - -// HasAllowMediaDeletion returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowMediaDeletion() bool { - if o != nil && isNil(o.AllowMediaDeletion) { - return true - } - - return false -} - -// SetAllowMediaDeletion gets a reference to the given interface{} and assigns it to the AllowMediaDeletion field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowMediaDeletion(v interface{}) { - o.AllowMediaDeletion = v -} - -// GetAllowSharing returns the AllowSharing field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowSharing() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.AllowSharing -} - -// GetAllowSharingOk returns a tuple with the AllowSharing field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowSharingOk() (*interface{}, bool) { - if o == nil || isNil(o.AllowSharing) { - return nil, false - } - return &o.AllowSharing, true -} - -// HasAllowSharing returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowSharing() bool { - if o != nil && isNil(o.AllowSharing) { - return true - } - - return false -} - -// SetAllowSharing gets a reference to the given interface{} and assigns it to the AllowSharing field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowSharing(v interface{}) { - o.AllowSharing = v -} - -// GetAllowSync returns the AllowSync field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowSync() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.AllowSync -} - -// GetAllowSyncOk returns a tuple with the AllowSync field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowSyncOk() (*interface{}, bool) { - if o == nil || isNil(o.AllowSync) { - return nil, false - } - return &o.AllowSync, true -} - -// HasAllowSync returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowSync() bool { - if o != nil && isNil(o.AllowSync) { - return true - } - - return false -} - -// SetAllowSync gets a reference to the given interface{} and assigns it to the AllowSync field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowSync(v interface{}) { - o.AllowSync = v -} - -// GetAllowTuners returns the AllowTuners field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowTuners() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.AllowTuners -} - -// GetAllowTunersOk returns a tuple with the AllowTuners field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetAllowTunersOk() (*interface{}, bool) { - if o == nil || isNil(o.AllowTuners) { - return nil, false - } - return &o.AllowTuners, true -} - -// HasAllowTuners returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasAllowTuners() bool { - if o != nil && isNil(o.AllowTuners) { - return true - } - - return false -} - -// SetAllowTuners gets a reference to the given interface{} and assigns it to the AllowTuners field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetAllowTuners(v interface{}) { - o.AllowTuners = v -} - -// GetBackgroundProcessing returns the BackgroundProcessing field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetBackgroundProcessing() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.BackgroundProcessing -} - -// GetBackgroundProcessingOk returns a tuple with the BackgroundProcessing field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetBackgroundProcessingOk() (*interface{}, bool) { - if o == nil || isNil(o.BackgroundProcessing) { - return nil, false - } - return &o.BackgroundProcessing, true -} - -// HasBackgroundProcessing returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasBackgroundProcessing() bool { - if o != nil && isNil(o.BackgroundProcessing) { - return true - } - - return false -} - -// SetBackgroundProcessing gets a reference to the given interface{} and assigns it to the BackgroundProcessing field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetBackgroundProcessing(v interface{}) { - o.BackgroundProcessing = v -} - -// GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetCertificate() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Certificate -} - -// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetCertificateOk() (*interface{}, bool) { - if o == nil || isNil(o.Certificate) { - return nil, false - } - return &o.Certificate, true -} - -// HasCertificate returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasCertificate() bool { - if o != nil && isNil(o.Certificate) { - return true - } - - return false -} - -// SetCertificate gets a reference to the given interface{} and assigns it to the Certificate field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetCertificate(v interface{}) { - o.Certificate = v -} - -// GetCompanionProxy returns the CompanionProxy field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetCompanionProxy() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.CompanionProxy -} - -// GetCompanionProxyOk returns a tuple with the CompanionProxy field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetCompanionProxyOk() (*interface{}, bool) { - if o == nil || isNil(o.CompanionProxy) { - return nil, false - } - return &o.CompanionProxy, true -} - -// HasCompanionProxy returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasCompanionProxy() bool { - if o != nil && isNil(o.CompanionProxy) { - return true - } - - return false -} - -// SetCompanionProxy gets a reference to the given interface{} and assigns it to the CompanionProxy field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetCompanionProxy(v interface{}) { - o.CompanionProxy = v -} - -// GetCountryCode returns the CountryCode field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetCountryCode() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.CountryCode -} - -// GetCountryCodeOk returns a tuple with the CountryCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetCountryCodeOk() (*interface{}, bool) { - if o == nil || isNil(o.CountryCode) { - return nil, false - } - return &o.CountryCode, true -} - -// HasCountryCode returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasCountryCode() bool { - if o != nil && isNil(o.CountryCode) { - return true - } - - return false -} - -// SetCountryCode gets a reference to the given interface{} and assigns it to the CountryCode field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetCountryCode(v interface{}) { - o.CountryCode = v -} - -// GetDiagnostics returns the Diagnostics field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetDiagnostics() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Diagnostics -} - -// GetDiagnosticsOk returns a tuple with the Diagnostics field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetDiagnosticsOk() (*interface{}, bool) { - if o == nil || isNil(o.Diagnostics) { - return nil, false - } - return &o.Diagnostics, true -} - -// HasDiagnostics returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasDiagnostics() bool { - if o != nil && isNil(o.Diagnostics) { - return true - } - - return false -} - -// SetDiagnostics gets a reference to the given interface{} and assigns it to the Diagnostics field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetDiagnostics(v interface{}) { - o.Diagnostics = v -} - -// GetEventStream returns the EventStream field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetEventStream() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.EventStream -} - -// GetEventStreamOk returns a tuple with the EventStream field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetEventStreamOk() (*interface{}, bool) { - if o == nil || isNil(o.EventStream) { - return nil, false - } - return &o.EventStream, true -} - -// HasEventStream returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasEventStream() bool { - if o != nil && isNil(o.EventStream) { - return true - } - - return false -} - -// SetEventStream gets a reference to the given interface{} and assigns it to the EventStream field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetEventStream(v interface{}) { - o.EventStream = v -} - -// GetFriendlyName returns the FriendlyName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetFriendlyName() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.FriendlyName -} - -// GetFriendlyNameOk returns a tuple with the FriendlyName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetFriendlyNameOk() (*interface{}, bool) { - if o == nil || isNil(o.FriendlyName) { - return nil, false - } - return &o.FriendlyName, true -} - -// HasFriendlyName returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasFriendlyName() bool { - if o != nil && isNil(o.FriendlyName) { - return true - } - - return false -} - -// SetFriendlyName gets a reference to the given interface{} and assigns it to the FriendlyName field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetFriendlyName(v interface{}) { - o.FriendlyName = v -} - -// GetHubSearch returns the HubSearch field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetHubSearch() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.HubSearch -} - -// GetHubSearchOk returns a tuple with the HubSearch field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetHubSearchOk() (*interface{}, bool) { - if o == nil || isNil(o.HubSearch) { - return nil, false - } - return &o.HubSearch, true -} - -// HasHubSearch returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasHubSearch() bool { - if o != nil && isNil(o.HubSearch) { - return true - } - - return false -} - -// SetHubSearch gets a reference to the given interface{} and assigns it to the HubSearch field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetHubSearch(v interface{}) { - o.HubSearch = v -} - -// GetItemClusters returns the ItemClusters field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetItemClusters() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.ItemClusters -} - -// GetItemClustersOk returns a tuple with the ItemClusters field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetItemClustersOk() (*interface{}, bool) { - if o == nil || isNil(o.ItemClusters) { - return nil, false - } - return &o.ItemClusters, true -} - -// HasItemClusters returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasItemClusters() bool { - if o != nil && isNil(o.ItemClusters) { - return true - } - - return false -} - -// SetItemClusters gets a reference to the given interface{} and assigns it to the ItemClusters field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetItemClusters(v interface{}) { - o.ItemClusters = v -} - -// GetLivetv returns the Livetv field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetLivetv() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Livetv -} - -// GetLivetvOk returns a tuple with the Livetv field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetLivetvOk() (*interface{}, bool) { - if o == nil || isNil(o.Livetv) { - return nil, false - } - return &o.Livetv, true -} - -// HasLivetv returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasLivetv() bool { - if o != nil && isNil(o.Livetv) { - return true - } - - return false -} - -// SetLivetv gets a reference to the given interface{} and assigns it to the Livetv field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetLivetv(v interface{}) { - o.Livetv = v -} - -// GetMachineIdentifier returns the MachineIdentifier field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetMachineIdentifier() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MachineIdentifier -} - -// GetMachineIdentifierOk returns a tuple with the MachineIdentifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetMachineIdentifierOk() (*interface{}, bool) { - if o == nil || isNil(o.MachineIdentifier) { - return nil, false - } - return &o.MachineIdentifier, true -} - -// HasMachineIdentifier returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasMachineIdentifier() bool { - if o != nil && isNil(o.MachineIdentifier) { - return true - } - - return false -} - -// SetMachineIdentifier gets a reference to the given interface{} and assigns it to the MachineIdentifier field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetMachineIdentifier(v interface{}) { - o.MachineIdentifier = v -} - -// GetMediaProviders returns the MediaProviders field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetMediaProviders() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MediaProviders -} - -// GetMediaProvidersOk returns a tuple with the MediaProviders field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetMediaProvidersOk() (*interface{}, bool) { - if o == nil || isNil(o.MediaProviders) { - return nil, false - } - return &o.MediaProviders, true -} - -// HasMediaProviders returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasMediaProviders() bool { - if o != nil && isNil(o.MediaProviders) { - return true - } - - return false -} - -// SetMediaProviders gets a reference to the given interface{} and assigns it to the MediaProviders field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetMediaProviders(v interface{}) { - o.MediaProviders = v -} - -// GetMultiuser returns the Multiuser field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetMultiuser() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Multiuser -} - -// GetMultiuserOk returns a tuple with the Multiuser field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetMultiuserOk() (*interface{}, bool) { - if o == nil || isNil(o.Multiuser) { - return nil, false - } - return &o.Multiuser, true -} - -// HasMultiuser returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasMultiuser() bool { - if o != nil && isNil(o.Multiuser) { - return true - } - - return false -} - -// SetMultiuser gets a reference to the given interface{} and assigns it to the Multiuser field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetMultiuser(v interface{}) { - o.Multiuser = v -} - -// GetMusicAnalysis returns the MusicAnalysis field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetMusicAnalysis() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MusicAnalysis -} - -// GetMusicAnalysisOk returns a tuple with the MusicAnalysis field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetMusicAnalysisOk() (*interface{}, bool) { - if o == nil || isNil(o.MusicAnalysis) { - return nil, false - } - return &o.MusicAnalysis, true -} - -// HasMusicAnalysis returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasMusicAnalysis() bool { - if o != nil && isNil(o.MusicAnalysis) { - return true - } - - return false -} - -// SetMusicAnalysis gets a reference to the given interface{} and assigns it to the MusicAnalysis field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetMusicAnalysis(v interface{}) { - o.MusicAnalysis = v -} - -// GetMyPlex returns the MyPlex field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlex() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MyPlex -} - -// GetMyPlexOk returns a tuple with the MyPlex field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexOk() (*interface{}, bool) { - if o == nil || isNil(o.MyPlex) { - return nil, false - } - return &o.MyPlex, true -} - -// HasMyPlex returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasMyPlex() bool { - if o != nil && isNil(o.MyPlex) { - return true - } - - return false -} - -// SetMyPlex gets a reference to the given interface{} and assigns it to the MyPlex field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlex(v interface{}) { - o.MyPlex = v -} - -// GetMyPlexMappingState returns the MyPlexMappingState field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexMappingState() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MyPlexMappingState -} - -// GetMyPlexMappingStateOk returns a tuple with the MyPlexMappingState field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexMappingStateOk() (*interface{}, bool) { - if o == nil || isNil(o.MyPlexMappingState) { - return nil, false - } - return &o.MyPlexMappingState, true -} - -// HasMyPlexMappingState returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasMyPlexMappingState() bool { - if o != nil && isNil(o.MyPlexMappingState) { - return true - } - - return false -} - -// SetMyPlexMappingState gets a reference to the given interface{} and assigns it to the MyPlexMappingState field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexMappingState(v interface{}) { - o.MyPlexMappingState = v -} - -// GetMyPlexSigninState returns the MyPlexSigninState field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexSigninState() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MyPlexSigninState -} - -// GetMyPlexSigninStateOk returns a tuple with the MyPlexSigninState field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexSigninStateOk() (*interface{}, bool) { - if o == nil || isNil(o.MyPlexSigninState) { - return nil, false - } - return &o.MyPlexSigninState, true -} - -// HasMyPlexSigninState returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasMyPlexSigninState() bool { - if o != nil && isNil(o.MyPlexSigninState) { - return true - } - - return false -} - -// SetMyPlexSigninState gets a reference to the given interface{} and assigns it to the MyPlexSigninState field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexSigninState(v interface{}) { - o.MyPlexSigninState = v -} - -// GetMyPlexSubscription returns the MyPlexSubscription field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexSubscription() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MyPlexSubscription -} - -// GetMyPlexSubscriptionOk returns a tuple with the MyPlexSubscription field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexSubscriptionOk() (*interface{}, bool) { - if o == nil || isNil(o.MyPlexSubscription) { - return nil, false - } - return &o.MyPlexSubscription, true -} - -// HasMyPlexSubscription returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasMyPlexSubscription() bool { - if o != nil && isNil(o.MyPlexSubscription) { - return true - } - - return false -} - -// SetMyPlexSubscription gets a reference to the given interface{} and assigns it to the MyPlexSubscription field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexSubscription(v interface{}) { - o.MyPlexSubscription = v -} - -// GetMyPlexUsername returns the MyPlexUsername field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexUsername() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MyPlexUsername -} - -// GetMyPlexUsernameOk returns a tuple with the MyPlexUsername field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetMyPlexUsernameOk() (*interface{}, bool) { - if o == nil || isNil(o.MyPlexUsername) { - return nil, false - } - return &o.MyPlexUsername, true -} - -// HasMyPlexUsername returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasMyPlexUsername() bool { - if o != nil && isNil(o.MyPlexUsername) { - return true - } - - return false -} - -// SetMyPlexUsername gets a reference to the given interface{} and assigns it to the MyPlexUsername field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetMyPlexUsername(v interface{}) { - o.MyPlexUsername = v -} - -// GetOfflineTranscode returns the OfflineTranscode field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetOfflineTranscode() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.OfflineTranscode -} - -// GetOfflineTranscodeOk returns a tuple with the OfflineTranscode field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetOfflineTranscodeOk() (*interface{}, bool) { - if o == nil || isNil(o.OfflineTranscode) { - return nil, false - } - return &o.OfflineTranscode, true -} - -// HasOfflineTranscode returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasOfflineTranscode() bool { - if o != nil && isNil(o.OfflineTranscode) { - return true - } - - return false -} - -// SetOfflineTranscode gets a reference to the given interface{} and assigns it to the OfflineTranscode field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetOfflineTranscode(v interface{}) { - o.OfflineTranscode = v -} - -// GetOwnerFeatures returns the OwnerFeatures field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetOwnerFeatures() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.OwnerFeatures -} - -// GetOwnerFeaturesOk returns a tuple with the OwnerFeatures field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetOwnerFeaturesOk() (*interface{}, bool) { - if o == nil || isNil(o.OwnerFeatures) { - return nil, false - } - return &o.OwnerFeatures, true -} - -// HasOwnerFeatures returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasOwnerFeatures() bool { - if o != nil && isNil(o.OwnerFeatures) { - return true - } - - return false -} - -// SetOwnerFeatures gets a reference to the given interface{} and assigns it to the OwnerFeatures field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetOwnerFeatures(v interface{}) { - o.OwnerFeatures = v -} - -// GetPhotoAutoTag returns the PhotoAutoTag field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetPhotoAutoTag() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.PhotoAutoTag -} - -// GetPhotoAutoTagOk returns a tuple with the PhotoAutoTag field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetPhotoAutoTagOk() (*interface{}, bool) { - if o == nil || isNil(o.PhotoAutoTag) { - return nil, false - } - return &o.PhotoAutoTag, true -} - -// HasPhotoAutoTag returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasPhotoAutoTag() bool { - if o != nil && isNil(o.PhotoAutoTag) { - return true - } - - return false -} - -// SetPhotoAutoTag gets a reference to the given interface{} and assigns it to the PhotoAutoTag field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetPhotoAutoTag(v interface{}) { - o.PhotoAutoTag = v -} - -// GetPlatform returns the Platform field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetPlatform() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Platform -} - -// GetPlatformOk returns a tuple with the Platform field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetPlatformOk() (*interface{}, bool) { - if o == nil || isNil(o.Platform) { - return nil, false - } - return &o.Platform, true -} - -// HasPlatform returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasPlatform() bool { - if o != nil && isNil(o.Platform) { - return true - } - - return false -} - -// SetPlatform gets a reference to the given interface{} and assigns it to the Platform field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetPlatform(v interface{}) { - o.Platform = v -} - -// GetPlatformVersion returns the PlatformVersion field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetPlatformVersion() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.PlatformVersion -} - -// GetPlatformVersionOk returns a tuple with the PlatformVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetPlatformVersionOk() (*interface{}, bool) { - if o == nil || isNil(o.PlatformVersion) { - return nil, false - } - return &o.PlatformVersion, true -} - -// HasPlatformVersion returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasPlatformVersion() bool { - if o != nil && isNil(o.PlatformVersion) { - return true - } - - return false -} - -// SetPlatformVersion gets a reference to the given interface{} and assigns it to the PlatformVersion field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetPlatformVersion(v interface{}) { - o.PlatformVersion = v -} - -// GetPluginHost returns the PluginHost field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetPluginHost() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.PluginHost -} - -// GetPluginHostOk returns a tuple with the PluginHost field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetPluginHostOk() (*interface{}, bool) { - if o == nil || isNil(o.PluginHost) { - return nil, false - } - return &o.PluginHost, true -} - -// HasPluginHost returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasPluginHost() bool { - if o != nil && isNil(o.PluginHost) { - return true - } - - return false -} - -// SetPluginHost gets a reference to the given interface{} and assigns it to the PluginHost field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetPluginHost(v interface{}) { - o.PluginHost = v -} - -// GetPushNotifications returns the PushNotifications field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetPushNotifications() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.PushNotifications -} - -// GetPushNotificationsOk returns a tuple with the PushNotifications field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetPushNotificationsOk() (*interface{}, bool) { - if o == nil || isNil(o.PushNotifications) { - return nil, false - } - return &o.PushNotifications, true -} - -// HasPushNotifications returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasPushNotifications() bool { - if o != nil && isNil(o.PushNotifications) { - return true - } - - return false -} - -// SetPushNotifications gets a reference to the given interface{} and assigns it to the PushNotifications field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetPushNotifications(v interface{}) { - o.PushNotifications = v -} - -// GetReadOnlyLibraries returns the ReadOnlyLibraries field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetReadOnlyLibraries() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.ReadOnlyLibraries -} - -// GetReadOnlyLibrariesOk returns a tuple with the ReadOnlyLibraries field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetReadOnlyLibrariesOk() (*interface{}, bool) { - if o == nil || isNil(o.ReadOnlyLibraries) { - return nil, false - } - return &o.ReadOnlyLibraries, true -} - -// HasReadOnlyLibraries returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasReadOnlyLibraries() bool { - if o != nil && isNil(o.ReadOnlyLibraries) { - return true - } - - return false -} - -// SetReadOnlyLibraries gets a reference to the given interface{} and assigns it to the ReadOnlyLibraries field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetReadOnlyLibraries(v interface{}) { - o.ReadOnlyLibraries = v -} - -// GetStreamingBrainABRVersion returns the StreamingBrainABRVersion field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetStreamingBrainABRVersion() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.StreamingBrainABRVersion -} - -// GetStreamingBrainABRVersionOk returns a tuple with the StreamingBrainABRVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetStreamingBrainABRVersionOk() (*interface{}, bool) { - if o == nil || isNil(o.StreamingBrainABRVersion) { - return nil, false - } - return &o.StreamingBrainABRVersion, true -} - -// HasStreamingBrainABRVersion returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasStreamingBrainABRVersion() bool { - if o != nil && isNil(o.StreamingBrainABRVersion) { - return true - } - - return false -} - -// SetStreamingBrainABRVersion gets a reference to the given interface{} and assigns it to the StreamingBrainABRVersion field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetStreamingBrainABRVersion(v interface{}) { - o.StreamingBrainABRVersion = v -} - -// GetStreamingBrainVersion returns the StreamingBrainVersion field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetStreamingBrainVersion() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.StreamingBrainVersion -} - -// GetStreamingBrainVersionOk returns a tuple with the StreamingBrainVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetStreamingBrainVersionOk() (*interface{}, bool) { - if o == nil || isNil(o.StreamingBrainVersion) { - return nil, false - } - return &o.StreamingBrainVersion, true -} - -// HasStreamingBrainVersion returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasStreamingBrainVersion() bool { - if o != nil && isNil(o.StreamingBrainVersion) { - return true - } - - return false -} - -// SetStreamingBrainVersion gets a reference to the given interface{} and assigns it to the StreamingBrainVersion field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetStreamingBrainVersion(v interface{}) { - o.StreamingBrainVersion = v -} - -// GetSync returns the Sync field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetSync() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Sync -} - -// GetSyncOk returns a tuple with the Sync field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetSyncOk() (*interface{}, bool) { - if o == nil || isNil(o.Sync) { - return nil, false - } - return &o.Sync, true -} - -// HasSync returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasSync() bool { - if o != nil && isNil(o.Sync) { - return true - } - - return false -} - -// SetSync gets a reference to the given interface{} and assigns it to the Sync field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetSync(v interface{}) { - o.Sync = v -} - -// GetTranscoderActiveVideoSessions returns the TranscoderActiveVideoSessions field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderActiveVideoSessions() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TranscoderActiveVideoSessions -} - -// GetTranscoderActiveVideoSessionsOk returns a tuple with the TranscoderActiveVideoSessions field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderActiveVideoSessionsOk() (*interface{}, bool) { - if o == nil || isNil(o.TranscoderActiveVideoSessions) { - return nil, false - } - return &o.TranscoderActiveVideoSessions, true -} - -// HasTranscoderActiveVideoSessions returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderActiveVideoSessions() bool { - if o != nil && isNil(o.TranscoderActiveVideoSessions) { - return true - } - - return false -} - -// SetTranscoderActiveVideoSessions gets a reference to the given interface{} and assigns it to the TranscoderActiveVideoSessions field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderActiveVideoSessions(v interface{}) { - o.TranscoderActiveVideoSessions = v -} - -// GetTranscoderAudio returns the TranscoderAudio field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderAudio() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TranscoderAudio -} - -// GetTranscoderAudioOk returns a tuple with the TranscoderAudio field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderAudioOk() (*interface{}, bool) { - if o == nil || isNil(o.TranscoderAudio) { - return nil, false - } - return &o.TranscoderAudio, true -} - -// HasTranscoderAudio returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderAudio() bool { - if o != nil && isNil(o.TranscoderAudio) { - return true - } - - return false -} - -// SetTranscoderAudio gets a reference to the given interface{} and assigns it to the TranscoderAudio field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderAudio(v interface{}) { - o.TranscoderAudio = v -} - -// GetTranscoderLyrics returns the TranscoderLyrics field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderLyrics() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TranscoderLyrics -} - -// GetTranscoderLyricsOk returns a tuple with the TranscoderLyrics field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderLyricsOk() (*interface{}, bool) { - if o == nil || isNil(o.TranscoderLyrics) { - return nil, false - } - return &o.TranscoderLyrics, true -} - -// HasTranscoderLyrics returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderLyrics() bool { - if o != nil && isNil(o.TranscoderLyrics) { - return true - } - - return false -} - -// SetTranscoderLyrics gets a reference to the given interface{} and assigns it to the TranscoderLyrics field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderLyrics(v interface{}) { - o.TranscoderLyrics = v -} - -// GetTranscoderPhoto returns the TranscoderPhoto field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderPhoto() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TranscoderPhoto -} - -// GetTranscoderPhotoOk returns a tuple with the TranscoderPhoto field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderPhotoOk() (*interface{}, bool) { - if o == nil || isNil(o.TranscoderPhoto) { - return nil, false - } - return &o.TranscoderPhoto, true -} - -// HasTranscoderPhoto returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderPhoto() bool { - if o != nil && isNil(o.TranscoderPhoto) { - return true - } - - return false -} - -// SetTranscoderPhoto gets a reference to the given interface{} and assigns it to the TranscoderPhoto field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderPhoto(v interface{}) { - o.TranscoderPhoto = v -} - -// GetTranscoderSubtitles returns the TranscoderSubtitles field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderSubtitles() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TranscoderSubtitles -} - -// GetTranscoderSubtitlesOk returns a tuple with the TranscoderSubtitles field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderSubtitlesOk() (*interface{}, bool) { - if o == nil || isNil(o.TranscoderSubtitles) { - return nil, false - } - return &o.TranscoderSubtitles, true -} - -// HasTranscoderSubtitles returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderSubtitles() bool { - if o != nil && isNil(o.TranscoderSubtitles) { - return true - } - - return false -} - -// SetTranscoderSubtitles gets a reference to the given interface{} and assigns it to the TranscoderSubtitles field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderSubtitles(v interface{}) { - o.TranscoderSubtitles = v -} - -// GetTranscoderVideo returns the TranscoderVideo field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideo() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TranscoderVideo -} - -// GetTranscoderVideoOk returns a tuple with the TranscoderVideo field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoOk() (*interface{}, bool) { - if o == nil || isNil(o.TranscoderVideo) { - return nil, false - } - return &o.TranscoderVideo, true -} - -// HasTranscoderVideo returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderVideo() bool { - if o != nil && isNil(o.TranscoderVideo) { - return true - } - - return false -} - -// SetTranscoderVideo gets a reference to the given interface{} and assigns it to the TranscoderVideo field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideo(v interface{}) { - o.TranscoderVideo = v -} - -// GetTranscoderVideoBitrates returns the TranscoderVideoBitrates field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoBitrates() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TranscoderVideoBitrates -} - -// GetTranscoderVideoBitratesOk returns a tuple with the TranscoderVideoBitrates field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoBitratesOk() (*interface{}, bool) { - if o == nil || isNil(o.TranscoderVideoBitrates) { - return nil, false - } - return &o.TranscoderVideoBitrates, true -} - -// HasTranscoderVideoBitrates returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderVideoBitrates() bool { - if o != nil && isNil(o.TranscoderVideoBitrates) { - return true - } - - return false -} - -// SetTranscoderVideoBitrates gets a reference to the given interface{} and assigns it to the TranscoderVideoBitrates field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideoBitrates(v interface{}) { - o.TranscoderVideoBitrates = v -} - -// GetTranscoderVideoQualities returns the TranscoderVideoQualities field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoQualities() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TranscoderVideoQualities -} - -// GetTranscoderVideoQualitiesOk returns a tuple with the TranscoderVideoQualities field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoQualitiesOk() (*interface{}, bool) { - if o == nil || isNil(o.TranscoderVideoQualities) { - return nil, false - } - return &o.TranscoderVideoQualities, true -} - -// HasTranscoderVideoQualities returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderVideoQualities() bool { - if o != nil && isNil(o.TranscoderVideoQualities) { - return true - } - - return false -} - -// SetTranscoderVideoQualities gets a reference to the given interface{} and assigns it to the TranscoderVideoQualities field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideoQualities(v interface{}) { - o.TranscoderVideoQualities = v -} - -// GetTranscoderVideoResolutions returns the TranscoderVideoResolutions field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoResolutions() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TranscoderVideoResolutions -} - -// GetTranscoderVideoResolutionsOk returns a tuple with the TranscoderVideoResolutions field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetTranscoderVideoResolutionsOk() (*interface{}, bool) { - if o == nil || isNil(o.TranscoderVideoResolutions) { - return nil, false - } - return &o.TranscoderVideoResolutions, true -} - -// HasTranscoderVideoResolutions returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasTranscoderVideoResolutions() bool { - if o != nil && isNil(o.TranscoderVideoResolutions) { - return true - } - - return false -} - -// SetTranscoderVideoResolutions gets a reference to the given interface{} and assigns it to the TranscoderVideoResolutions field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetTranscoderVideoResolutions(v interface{}) { - o.TranscoderVideoResolutions = v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetUpdatedAt() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetUpdatedAtOk() (*interface{}, bool) { - if o == nil || isNil(o.UpdatedAt) { - return nil, false - } - return &o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasUpdatedAt() bool { - if o != nil && isNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given interface{} and assigns it to the UpdatedAt field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetUpdatedAt(v interface{}) { - o.UpdatedAt = v -} - -// GetUpdater returns the Updater field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetUpdater() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Updater -} - -// GetUpdaterOk returns a tuple with the Updater field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetUpdaterOk() (*interface{}, bool) { - if o == nil || isNil(o.Updater) { - return nil, false - } - return &o.Updater, true -} - -// HasUpdater returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasUpdater() bool { - if o != nil && isNil(o.Updater) { - return true - } - - return false -} - -// SetUpdater gets a reference to the given interface{} and assigns it to the Updater field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetUpdater(v interface{}) { - o.Updater = v -} - -// GetVersion returns the Version field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetVersion() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetVersionOk() (*interface{}, bool) { - if o == nil || isNil(o.Version) { - return nil, false - } - return &o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasVersion() bool { - if o != nil && isNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given interface{} and assigns it to the Version field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetVersion(v interface{}) { - o.Version = v -} - -// GetVoiceSearch returns the VoiceSearch field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetVoiceSearch() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.VoiceSearch -} - -// GetVoiceSearchOk returns a tuple with the VoiceSearch field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetVoiceSearchOk() (*interface{}, bool) { - if o == nil || isNil(o.VoiceSearch) { - return nil, false - } - return &o.VoiceSearch, true -} - -// HasVoiceSearch returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasVoiceSearch() bool { - if o != nil && isNil(o.VoiceSearch) { - return true - } - - return false -} - -// SetVoiceSearch gets a reference to the given interface{} and assigns it to the VoiceSearch field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetVoiceSearch(v interface{}) { - o.VoiceSearch = v -} - -// GetDirectory returns the Directory field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities200ResponseMediaContainer) GetDirectory() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Directory -} - -// GetDirectoryOk returns a tuple with the Directory field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities200ResponseMediaContainer) GetDirectoryOk() (*interface{}, bool) { - if o == nil || isNil(o.Directory) { - return nil, false - } - return &o.Directory, true -} - -// HasDirectory returns a boolean if a field has been set. -func (o *GetServerCapabilities200ResponseMediaContainer) HasDirectory() bool { - if o != nil && isNil(o.Directory) { - return true - } - - return false -} - -// SetDirectory gets a reference to the given interface{} and assigns it to the Directory field. -func (o *GetServerCapabilities200ResponseMediaContainer) SetDirectory(v interface{}) { - o.Directory = v -} - -func (o GetServerCapabilities200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetServerCapabilities200ResponseMediaContainer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Size != nil { - toSerialize["size"] = o.Size - } - if o.AllowCameraUpload != nil { - toSerialize["allowCameraUpload"] = o.AllowCameraUpload - } - if o.AllowChannelAccess != nil { - toSerialize["allowChannelAccess"] = o.AllowChannelAccess - } - if o.AllowMediaDeletion != nil { - toSerialize["allowMediaDeletion"] = o.AllowMediaDeletion - } - if o.AllowSharing != nil { - toSerialize["allowSharing"] = o.AllowSharing - } - if o.AllowSync != nil { - toSerialize["allowSync"] = o.AllowSync - } - if o.AllowTuners != nil { - toSerialize["allowTuners"] = o.AllowTuners - } - if o.BackgroundProcessing != nil { - toSerialize["backgroundProcessing"] = o.BackgroundProcessing - } - if o.Certificate != nil { - toSerialize["certificate"] = o.Certificate - } - if o.CompanionProxy != nil { - toSerialize["companionProxy"] = o.CompanionProxy - } - if o.CountryCode != nil { - toSerialize["countryCode"] = o.CountryCode - } - if o.Diagnostics != nil { - toSerialize["diagnostics"] = o.Diagnostics - } - if o.EventStream != nil { - toSerialize["eventStream"] = o.EventStream - } - if o.FriendlyName != nil { - toSerialize["friendlyName"] = o.FriendlyName - } - if o.HubSearch != nil { - toSerialize["hubSearch"] = o.HubSearch - } - if o.ItemClusters != nil { - toSerialize["itemClusters"] = o.ItemClusters - } - if o.Livetv != nil { - toSerialize["livetv"] = o.Livetv - } - if o.MachineIdentifier != nil { - toSerialize["machineIdentifier"] = o.MachineIdentifier - } - if o.MediaProviders != nil { - toSerialize["mediaProviders"] = o.MediaProviders - } - if o.Multiuser != nil { - toSerialize["multiuser"] = o.Multiuser - } - if o.MusicAnalysis != nil { - toSerialize["musicAnalysis"] = o.MusicAnalysis - } - if o.MyPlex != nil { - toSerialize["myPlex"] = o.MyPlex - } - if o.MyPlexMappingState != nil { - toSerialize["myPlexMappingState"] = o.MyPlexMappingState - } - if o.MyPlexSigninState != nil { - toSerialize["myPlexSigninState"] = o.MyPlexSigninState - } - if o.MyPlexSubscription != nil { - toSerialize["myPlexSubscription"] = o.MyPlexSubscription - } - if o.MyPlexUsername != nil { - toSerialize["myPlexUsername"] = o.MyPlexUsername - } - if o.OfflineTranscode != nil { - toSerialize["offlineTranscode"] = o.OfflineTranscode - } - if o.OwnerFeatures != nil { - toSerialize["ownerFeatures"] = o.OwnerFeatures - } - if o.PhotoAutoTag != nil { - toSerialize["photoAutoTag"] = o.PhotoAutoTag - } - if o.Platform != nil { - toSerialize["platform"] = o.Platform - } - if o.PlatformVersion != nil { - toSerialize["platformVersion"] = o.PlatformVersion - } - if o.PluginHost != nil { - toSerialize["pluginHost"] = o.PluginHost - } - if o.PushNotifications != nil { - toSerialize["pushNotifications"] = o.PushNotifications - } - if o.ReadOnlyLibraries != nil { - toSerialize["readOnlyLibraries"] = o.ReadOnlyLibraries - } - if o.StreamingBrainABRVersion != nil { - toSerialize["streamingBrainABRVersion"] = o.StreamingBrainABRVersion - } - if o.StreamingBrainVersion != nil { - toSerialize["streamingBrainVersion"] = o.StreamingBrainVersion - } - if o.Sync != nil { - toSerialize["sync"] = o.Sync - } - if o.TranscoderActiveVideoSessions != nil { - toSerialize["transcoderActiveVideoSessions"] = o.TranscoderActiveVideoSessions - } - if o.TranscoderAudio != nil { - toSerialize["transcoderAudio"] = o.TranscoderAudio - } - if o.TranscoderLyrics != nil { - toSerialize["transcoderLyrics"] = o.TranscoderLyrics - } - if o.TranscoderPhoto != nil { - toSerialize["transcoderPhoto"] = o.TranscoderPhoto - } - if o.TranscoderSubtitles != nil { - toSerialize["transcoderSubtitles"] = o.TranscoderSubtitles - } - if o.TranscoderVideo != nil { - toSerialize["transcoderVideo"] = o.TranscoderVideo - } - if o.TranscoderVideoBitrates != nil { - toSerialize["transcoderVideoBitrates"] = o.TranscoderVideoBitrates - } - if o.TranscoderVideoQualities != nil { - toSerialize["transcoderVideoQualities"] = o.TranscoderVideoQualities - } - if o.TranscoderVideoResolutions != nil { - toSerialize["transcoderVideoResolutions"] = o.TranscoderVideoResolutions - } - if o.UpdatedAt != nil { - toSerialize["updatedAt"] = o.UpdatedAt - } - if o.Updater != nil { - toSerialize["updater"] = o.Updater - } - if o.Version != nil { - toSerialize["version"] = o.Version - } - if o.VoiceSearch != nil { - toSerialize["voiceSearch"] = o.VoiceSearch - } - if o.Directory != nil { - toSerialize["Directory"] = o.Directory - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetServerCapabilities200ResponseMediaContainer) UnmarshalJSON(bytes []byte) (err error) { - varGetServerCapabilities200ResponseMediaContainer := _GetServerCapabilities200ResponseMediaContainer{} - - if err = json.Unmarshal(bytes, &varGetServerCapabilities200ResponseMediaContainer); err == nil { - *o = GetServerCapabilities200ResponseMediaContainer(varGetServerCapabilities200ResponseMediaContainer) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "size") - delete(additionalProperties, "allowCameraUpload") - delete(additionalProperties, "allowChannelAccess") - delete(additionalProperties, "allowMediaDeletion") - delete(additionalProperties, "allowSharing") - delete(additionalProperties, "allowSync") - delete(additionalProperties, "allowTuners") - delete(additionalProperties, "backgroundProcessing") - delete(additionalProperties, "certificate") - delete(additionalProperties, "companionProxy") - delete(additionalProperties, "countryCode") - delete(additionalProperties, "diagnostics") - delete(additionalProperties, "eventStream") - delete(additionalProperties, "friendlyName") - delete(additionalProperties, "hubSearch") - delete(additionalProperties, "itemClusters") - delete(additionalProperties, "livetv") - delete(additionalProperties, "machineIdentifier") - delete(additionalProperties, "mediaProviders") - delete(additionalProperties, "multiuser") - delete(additionalProperties, "musicAnalysis") - delete(additionalProperties, "myPlex") - delete(additionalProperties, "myPlexMappingState") - delete(additionalProperties, "myPlexSigninState") - delete(additionalProperties, "myPlexSubscription") - delete(additionalProperties, "myPlexUsername") - delete(additionalProperties, "offlineTranscode") - delete(additionalProperties, "ownerFeatures") - delete(additionalProperties, "photoAutoTag") - delete(additionalProperties, "platform") - delete(additionalProperties, "platformVersion") - delete(additionalProperties, "pluginHost") - delete(additionalProperties, "pushNotifications") - delete(additionalProperties, "readOnlyLibraries") - delete(additionalProperties, "streamingBrainABRVersion") - delete(additionalProperties, "streamingBrainVersion") - delete(additionalProperties, "sync") - delete(additionalProperties, "transcoderActiveVideoSessions") - delete(additionalProperties, "transcoderAudio") - delete(additionalProperties, "transcoderLyrics") - delete(additionalProperties, "transcoderPhoto") - delete(additionalProperties, "transcoderSubtitles") - delete(additionalProperties, "transcoderVideo") - delete(additionalProperties, "transcoderVideoBitrates") - delete(additionalProperties, "transcoderVideoQualities") - delete(additionalProperties, "transcoderVideoResolutions") - delete(additionalProperties, "updatedAt") - delete(additionalProperties, "updater") - delete(additionalProperties, "version") - delete(additionalProperties, "voiceSearch") - delete(additionalProperties, "Directory") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetServerCapabilities200ResponseMediaContainer struct { - value *GetServerCapabilities200ResponseMediaContainer - isSet bool -} - -func (v NullableGetServerCapabilities200ResponseMediaContainer) Get() *GetServerCapabilities200ResponseMediaContainer { - return v.value -} - -func (v *NullableGetServerCapabilities200ResponseMediaContainer) Set(val *GetServerCapabilities200ResponseMediaContainer) { - v.value = val - v.isSet = true -} - -func (v NullableGetServerCapabilities200ResponseMediaContainer) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServerCapabilities200ResponseMediaContainer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServerCapabilities200ResponseMediaContainer(val *GetServerCapabilities200ResponseMediaContainer) *NullableGetServerCapabilities200ResponseMediaContainer { - return &NullableGetServerCapabilities200ResponseMediaContainer{value: val, isSet: true} -} - -func (v NullableGetServerCapabilities200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServerCapabilities200ResponseMediaContainer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_server_capabilities_401_response.go b/pms/model_get_server_capabilities_401_response.go deleted file mode 100644 index 2b73583..0000000 --- a/pms/model_get_server_capabilities_401_response.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetServerCapabilities401Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServerCapabilities401Response{} - -// GetServerCapabilities401Response struct for GetServerCapabilities401Response -type GetServerCapabilities401Response struct { - Errors interface{} `json:"errors,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetServerCapabilities401Response GetServerCapabilities401Response - -// NewGetServerCapabilities401Response instantiates a new GetServerCapabilities401Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetServerCapabilities401Response() *GetServerCapabilities401Response { - this := GetServerCapabilities401Response{} - return &this -} - -// NewGetServerCapabilities401ResponseWithDefaults instantiates a new GetServerCapabilities401Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetServerCapabilities401ResponseWithDefaults() *GetServerCapabilities401Response { - this := GetServerCapabilities401Response{} - return &this -} - -// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerCapabilities401Response) GetErrors() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Errors -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerCapabilities401Response) GetErrorsOk() (*interface{}, bool) { - if o == nil || isNil(o.Errors) { - return nil, false - } - return &o.Errors, true -} - -// HasErrors returns a boolean if a field has been set. -func (o *GetServerCapabilities401Response) HasErrors() bool { - if o != nil && isNil(o.Errors) { - return true - } - - return false -} - -// SetErrors gets a reference to the given interface{} and assigns it to the Errors field. -func (o *GetServerCapabilities401Response) SetErrors(v interface{}) { - o.Errors = v -} - -func (o GetServerCapabilities401Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetServerCapabilities401Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Errors != nil { - toSerialize["errors"] = o.Errors - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetServerCapabilities401Response) UnmarshalJSON(bytes []byte) (err error) { - varGetServerCapabilities401Response := _GetServerCapabilities401Response{} - - if err = json.Unmarshal(bytes, &varGetServerCapabilities401Response); err == nil { - *o = GetServerCapabilities401Response(varGetServerCapabilities401Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "errors") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetServerCapabilities401Response struct { - value *GetServerCapabilities401Response - isSet bool -} - -func (v NullableGetServerCapabilities401Response) Get() *GetServerCapabilities401Response { - return v.value -} - -func (v *NullableGetServerCapabilities401Response) Set(val *GetServerCapabilities401Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetServerCapabilities401Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServerCapabilities401Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServerCapabilities401Response(val *GetServerCapabilities401Response) *NullableGetServerCapabilities401Response { - return &NullableGetServerCapabilities401Response{value: val, isSet: true} -} - -func (v NullableGetServerCapabilities401Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServerCapabilities401Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_server_identity_200_response.go b/pms/model_get_server_identity_200_response.go deleted file mode 100644 index 022626b..0000000 --- a/pms/model_get_server_identity_200_response.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetServerIdentity200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServerIdentity200Response{} - -// GetServerIdentity200Response struct for GetServerIdentity200Response -type GetServerIdentity200Response struct { - MediaContainer *GetServerIdentity200ResponseMediaContainer `json:"MediaContainer,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetServerIdentity200Response GetServerIdentity200Response - -// NewGetServerIdentity200Response instantiates a new GetServerIdentity200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetServerIdentity200Response() *GetServerIdentity200Response { - this := GetServerIdentity200Response{} - return &this -} - -// NewGetServerIdentity200ResponseWithDefaults instantiates a new GetServerIdentity200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetServerIdentity200ResponseWithDefaults() *GetServerIdentity200Response { - this := GetServerIdentity200Response{} - return &this -} - -// GetMediaContainer returns the MediaContainer field value if set, zero value otherwise. -func (o *GetServerIdentity200Response) GetMediaContainer() GetServerIdentity200ResponseMediaContainer { - if o == nil || isNil(o.MediaContainer) { - var ret GetServerIdentity200ResponseMediaContainer - return ret - } - return *o.MediaContainer -} - -// GetMediaContainerOk returns a tuple with the MediaContainer field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetServerIdentity200Response) GetMediaContainerOk() (*GetServerIdentity200ResponseMediaContainer, bool) { - if o == nil || isNil(o.MediaContainer) { - return nil, false - } - return o.MediaContainer, true -} - -// HasMediaContainer returns a boolean if a field has been set. -func (o *GetServerIdentity200Response) HasMediaContainer() bool { - if o != nil && !isNil(o.MediaContainer) { - return true - } - - return false -} - -// SetMediaContainer gets a reference to the given GetServerIdentity200ResponseMediaContainer and assigns it to the MediaContainer field. -func (o *GetServerIdentity200Response) SetMediaContainer(v GetServerIdentity200ResponseMediaContainer) { - o.MediaContainer = &v -} - -func (o GetServerIdentity200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetServerIdentity200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MediaContainer) { - toSerialize["MediaContainer"] = o.MediaContainer - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetServerIdentity200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetServerIdentity200Response := _GetServerIdentity200Response{} - - if err = json.Unmarshal(bytes, &varGetServerIdentity200Response); err == nil { - *o = GetServerIdentity200Response(varGetServerIdentity200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "MediaContainer") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetServerIdentity200Response struct { - value *GetServerIdentity200Response - isSet bool -} - -func (v NullableGetServerIdentity200Response) Get() *GetServerIdentity200Response { - return v.value -} - -func (v *NullableGetServerIdentity200Response) Set(val *GetServerIdentity200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetServerIdentity200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServerIdentity200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServerIdentity200Response(val *GetServerIdentity200Response) *NullableGetServerIdentity200Response { - return &NullableGetServerIdentity200Response{value: val, isSet: true} -} - -func (v NullableGetServerIdentity200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServerIdentity200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_server_identity_200_response_media_container.go b/pms/model_get_server_identity_200_response_media_container.go deleted file mode 100644 index f9fa4bd..0000000 --- a/pms/model_get_server_identity_200_response_media_container.go +++ /dev/null @@ -1,267 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetServerIdentity200ResponseMediaContainer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServerIdentity200ResponseMediaContainer{} - -// GetServerIdentity200ResponseMediaContainer struct for GetServerIdentity200ResponseMediaContainer -type GetServerIdentity200ResponseMediaContainer struct { - Size interface{} `json:"size,omitempty"` - Claimed interface{} `json:"claimed,omitempty"` - MachineIdentifier interface{} `json:"machineIdentifier,omitempty"` - Version interface{} `json:"version,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetServerIdentity200ResponseMediaContainer GetServerIdentity200ResponseMediaContainer - -// NewGetServerIdentity200ResponseMediaContainer instantiates a new GetServerIdentity200ResponseMediaContainer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetServerIdentity200ResponseMediaContainer() *GetServerIdentity200ResponseMediaContainer { - this := GetServerIdentity200ResponseMediaContainer{} - return &this -} - -// NewGetServerIdentity200ResponseMediaContainerWithDefaults instantiates a new GetServerIdentity200ResponseMediaContainer object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetServerIdentity200ResponseMediaContainerWithDefaults() *GetServerIdentity200ResponseMediaContainer { - this := GetServerIdentity200ResponseMediaContainer{} - return &this -} - -// GetSize returns the Size field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerIdentity200ResponseMediaContainer) GetSize() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerIdentity200ResponseMediaContainer) GetSizeOk() (*interface{}, bool) { - if o == nil || isNil(o.Size) { - return nil, false - } - return &o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *GetServerIdentity200ResponseMediaContainer) HasSize() bool { - if o != nil && isNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given interface{} and assigns it to the Size field. -func (o *GetServerIdentity200ResponseMediaContainer) SetSize(v interface{}) { - o.Size = v -} - -// GetClaimed returns the Claimed field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerIdentity200ResponseMediaContainer) GetClaimed() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Claimed -} - -// GetClaimedOk returns a tuple with the Claimed field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerIdentity200ResponseMediaContainer) GetClaimedOk() (*interface{}, bool) { - if o == nil || isNil(o.Claimed) { - return nil, false - } - return &o.Claimed, true -} - -// HasClaimed returns a boolean if a field has been set. -func (o *GetServerIdentity200ResponseMediaContainer) HasClaimed() bool { - if o != nil && isNil(o.Claimed) { - return true - } - - return false -} - -// SetClaimed gets a reference to the given interface{} and assigns it to the Claimed field. -func (o *GetServerIdentity200ResponseMediaContainer) SetClaimed(v interface{}) { - o.Claimed = v -} - -// GetMachineIdentifier returns the MachineIdentifier field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerIdentity200ResponseMediaContainer) GetMachineIdentifier() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.MachineIdentifier -} - -// GetMachineIdentifierOk returns a tuple with the MachineIdentifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerIdentity200ResponseMediaContainer) GetMachineIdentifierOk() (*interface{}, bool) { - if o == nil || isNil(o.MachineIdentifier) { - return nil, false - } - return &o.MachineIdentifier, true -} - -// HasMachineIdentifier returns a boolean if a field has been set. -func (o *GetServerIdentity200ResponseMediaContainer) HasMachineIdentifier() bool { - if o != nil && isNil(o.MachineIdentifier) { - return true - } - - return false -} - -// SetMachineIdentifier gets a reference to the given interface{} and assigns it to the MachineIdentifier field. -func (o *GetServerIdentity200ResponseMediaContainer) SetMachineIdentifier(v interface{}) { - o.MachineIdentifier = v -} - -// GetVersion returns the Version field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerIdentity200ResponseMediaContainer) GetVersion() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerIdentity200ResponseMediaContainer) GetVersionOk() (*interface{}, bool) { - if o == nil || isNil(o.Version) { - return nil, false - } - return &o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *GetServerIdentity200ResponseMediaContainer) HasVersion() bool { - if o != nil && isNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given interface{} and assigns it to the Version field. -func (o *GetServerIdentity200ResponseMediaContainer) SetVersion(v interface{}) { - o.Version = v -} - -func (o GetServerIdentity200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetServerIdentity200ResponseMediaContainer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Size != nil { - toSerialize["size"] = o.Size - } - if o.Claimed != nil { - toSerialize["claimed"] = o.Claimed - } - if o.MachineIdentifier != nil { - toSerialize["machineIdentifier"] = o.MachineIdentifier - } - if o.Version != nil { - toSerialize["version"] = o.Version - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetServerIdentity200ResponseMediaContainer) UnmarshalJSON(bytes []byte) (err error) { - varGetServerIdentity200ResponseMediaContainer := _GetServerIdentity200ResponseMediaContainer{} - - if err = json.Unmarshal(bytes, &varGetServerIdentity200ResponseMediaContainer); err == nil { - *o = GetServerIdentity200ResponseMediaContainer(varGetServerIdentity200ResponseMediaContainer) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "size") - delete(additionalProperties, "claimed") - delete(additionalProperties, "machineIdentifier") - delete(additionalProperties, "version") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetServerIdentity200ResponseMediaContainer struct { - value *GetServerIdentity200ResponseMediaContainer - isSet bool -} - -func (v NullableGetServerIdentity200ResponseMediaContainer) Get() *GetServerIdentity200ResponseMediaContainer { - return v.value -} - -func (v *NullableGetServerIdentity200ResponseMediaContainer) Set(val *GetServerIdentity200ResponseMediaContainer) { - v.value = val - v.isSet = true -} - -func (v NullableGetServerIdentity200ResponseMediaContainer) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServerIdentity200ResponseMediaContainer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServerIdentity200ResponseMediaContainer(val *GetServerIdentity200ResponseMediaContainer) *NullableGetServerIdentity200ResponseMediaContainer { - return &NullableGetServerIdentity200ResponseMediaContainer{value: val, isSet: true} -} - -func (v NullableGetServerIdentity200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServerIdentity200ResponseMediaContainer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_server_list_200_response.go b/pms/model_get_server_list_200_response.go deleted file mode 100644 index 05e30c7..0000000 --- a/pms/model_get_server_list_200_response.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetServerList200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServerList200Response{} - -// GetServerList200Response struct for GetServerList200Response -type GetServerList200Response struct { - MediaContainer *GetServerList200ResponseMediaContainer `json:"MediaContainer,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetServerList200Response GetServerList200Response - -// NewGetServerList200Response instantiates a new GetServerList200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetServerList200Response() *GetServerList200Response { - this := GetServerList200Response{} - return &this -} - -// NewGetServerList200ResponseWithDefaults instantiates a new GetServerList200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetServerList200ResponseWithDefaults() *GetServerList200Response { - this := GetServerList200Response{} - return &this -} - -// GetMediaContainer returns the MediaContainer field value if set, zero value otherwise. -func (o *GetServerList200Response) GetMediaContainer() GetServerList200ResponseMediaContainer { - if o == nil || isNil(o.MediaContainer) { - var ret GetServerList200ResponseMediaContainer - return ret - } - return *o.MediaContainer -} - -// GetMediaContainerOk returns a tuple with the MediaContainer field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetServerList200Response) GetMediaContainerOk() (*GetServerList200ResponseMediaContainer, bool) { - if o == nil || isNil(o.MediaContainer) { - return nil, false - } - return o.MediaContainer, true -} - -// HasMediaContainer returns a boolean if a field has been set. -func (o *GetServerList200Response) HasMediaContainer() bool { - if o != nil && !isNil(o.MediaContainer) { - return true - } - - return false -} - -// SetMediaContainer gets a reference to the given GetServerList200ResponseMediaContainer and assigns it to the MediaContainer field. -func (o *GetServerList200Response) SetMediaContainer(v GetServerList200ResponseMediaContainer) { - o.MediaContainer = &v -} - -func (o GetServerList200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetServerList200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MediaContainer) { - toSerialize["MediaContainer"] = o.MediaContainer - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetServerList200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetServerList200Response := _GetServerList200Response{} - - if err = json.Unmarshal(bytes, &varGetServerList200Response); err == nil { - *o = GetServerList200Response(varGetServerList200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "MediaContainer") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetServerList200Response struct { - value *GetServerList200Response - isSet bool -} - -func (v NullableGetServerList200Response) Get() *GetServerList200Response { - return v.value -} - -func (v *NullableGetServerList200Response) Set(val *GetServerList200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetServerList200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServerList200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServerList200Response(val *GetServerList200Response) *NullableGetServerList200Response { - return &NullableGetServerList200Response{value: val, isSet: true} -} - -func (v NullableGetServerList200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServerList200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_server_list_200_response_media_container.go b/pms/model_get_server_list_200_response_media_container.go deleted file mode 100644 index 9a4cac3..0000000 --- a/pms/model_get_server_list_200_response_media_container.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetServerList200ResponseMediaContainer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServerList200ResponseMediaContainer{} - -// GetServerList200ResponseMediaContainer struct for GetServerList200ResponseMediaContainer -type GetServerList200ResponseMediaContainer struct { - Size interface{} `json:"size,omitempty"` - Server interface{} `json:"Server,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetServerList200ResponseMediaContainer GetServerList200ResponseMediaContainer - -// NewGetServerList200ResponseMediaContainer instantiates a new GetServerList200ResponseMediaContainer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetServerList200ResponseMediaContainer() *GetServerList200ResponseMediaContainer { - this := GetServerList200ResponseMediaContainer{} - return &this -} - -// NewGetServerList200ResponseMediaContainerWithDefaults instantiates a new GetServerList200ResponseMediaContainer object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetServerList200ResponseMediaContainerWithDefaults() *GetServerList200ResponseMediaContainer { - this := GetServerList200ResponseMediaContainer{} - return &this -} - -// GetSize returns the Size field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerList200ResponseMediaContainer) GetSize() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerList200ResponseMediaContainer) GetSizeOk() (*interface{}, bool) { - if o == nil || isNil(o.Size) { - return nil, false - } - return &o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *GetServerList200ResponseMediaContainer) HasSize() bool { - if o != nil && isNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given interface{} and assigns it to the Size field. -func (o *GetServerList200ResponseMediaContainer) SetSize(v interface{}) { - o.Size = v -} - -// GetServer returns the Server field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetServerList200ResponseMediaContainer) GetServer() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Server -} - -// GetServerOk returns a tuple with the Server field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetServerList200ResponseMediaContainer) GetServerOk() (*interface{}, bool) { - if o == nil || isNil(o.Server) { - return nil, false - } - return &o.Server, true -} - -// HasServer returns a boolean if a field has been set. -func (o *GetServerList200ResponseMediaContainer) HasServer() bool { - if o != nil && isNil(o.Server) { - return true - } - - return false -} - -// SetServer gets a reference to the given interface{} and assigns it to the Server field. -func (o *GetServerList200ResponseMediaContainer) SetServer(v interface{}) { - o.Server = v -} - -func (o GetServerList200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetServerList200ResponseMediaContainer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Size != nil { - toSerialize["size"] = o.Size - } - if o.Server != nil { - toSerialize["Server"] = o.Server - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetServerList200ResponseMediaContainer) UnmarshalJSON(bytes []byte) (err error) { - varGetServerList200ResponseMediaContainer := _GetServerList200ResponseMediaContainer{} - - if err = json.Unmarshal(bytes, &varGetServerList200ResponseMediaContainer); err == nil { - *o = GetServerList200ResponseMediaContainer(varGetServerList200ResponseMediaContainer) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "size") - delete(additionalProperties, "Server") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetServerList200ResponseMediaContainer struct { - value *GetServerList200ResponseMediaContainer - isSet bool -} - -func (v NullableGetServerList200ResponseMediaContainer) Get() *GetServerList200ResponseMediaContainer { - return v.value -} - -func (v *NullableGetServerList200ResponseMediaContainer) Set(val *GetServerList200ResponseMediaContainer) { - v.value = val - v.isSet = true -} - -func (v NullableGetServerList200ResponseMediaContainer) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServerList200ResponseMediaContainer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServerList200ResponseMediaContainer(val *GetServerList200ResponseMediaContainer) *NullableGetServerList200ResponseMediaContainer { - return &NullableGetServerList200ResponseMediaContainer{value: val, isSet: true} -} - -func (v NullableGetServerList200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServerList200ResponseMediaContainer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_transcode_sessions_200_response.go b/pms/model_get_transcode_sessions_200_response.go deleted file mode 100644 index 445130b..0000000 --- a/pms/model_get_transcode_sessions_200_response.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetTranscodeSessions200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetTranscodeSessions200Response{} - -// GetTranscodeSessions200Response struct for GetTranscodeSessions200Response -type GetTranscodeSessions200Response struct { - MediaContainer *GetTranscodeSessions200ResponseMediaContainer `json:"MediaContainer,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetTranscodeSessions200Response GetTranscodeSessions200Response - -// NewGetTranscodeSessions200Response instantiates a new GetTranscodeSessions200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetTranscodeSessions200Response() *GetTranscodeSessions200Response { - this := GetTranscodeSessions200Response{} - return &this -} - -// NewGetTranscodeSessions200ResponseWithDefaults instantiates a new GetTranscodeSessions200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetTranscodeSessions200ResponseWithDefaults() *GetTranscodeSessions200Response { - this := GetTranscodeSessions200Response{} - return &this -} - -// GetMediaContainer returns the MediaContainer field value if set, zero value otherwise. -func (o *GetTranscodeSessions200Response) GetMediaContainer() GetTranscodeSessions200ResponseMediaContainer { - if o == nil || isNil(o.MediaContainer) { - var ret GetTranscodeSessions200ResponseMediaContainer - return ret - } - return *o.MediaContainer -} - -// GetMediaContainerOk returns a tuple with the MediaContainer field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetTranscodeSessions200Response) GetMediaContainerOk() (*GetTranscodeSessions200ResponseMediaContainer, bool) { - if o == nil || isNil(o.MediaContainer) { - return nil, false - } - return o.MediaContainer, true -} - -// HasMediaContainer returns a boolean if a field has been set. -func (o *GetTranscodeSessions200Response) HasMediaContainer() bool { - if o != nil && !isNil(o.MediaContainer) { - return true - } - - return false -} - -// SetMediaContainer gets a reference to the given GetTranscodeSessions200ResponseMediaContainer and assigns it to the MediaContainer field. -func (o *GetTranscodeSessions200Response) SetMediaContainer(v GetTranscodeSessions200ResponseMediaContainer) { - o.MediaContainer = &v -} - -func (o GetTranscodeSessions200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetTranscodeSessions200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MediaContainer) { - toSerialize["MediaContainer"] = o.MediaContainer - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetTranscodeSessions200Response) UnmarshalJSON(bytes []byte) (err error) { - varGetTranscodeSessions200Response := _GetTranscodeSessions200Response{} - - if err = json.Unmarshal(bytes, &varGetTranscodeSessions200Response); err == nil { - *o = GetTranscodeSessions200Response(varGetTranscodeSessions200Response) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "MediaContainer") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetTranscodeSessions200Response struct { - value *GetTranscodeSessions200Response - isSet bool -} - -func (v NullableGetTranscodeSessions200Response) Get() *GetTranscodeSessions200Response { - return v.value -} - -func (v *NullableGetTranscodeSessions200Response) Set(val *GetTranscodeSessions200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetTranscodeSessions200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetTranscodeSessions200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetTranscodeSessions200Response(val *GetTranscodeSessions200Response) *NullableGetTranscodeSessions200Response { - return &NullableGetTranscodeSessions200Response{value: val, isSet: true} -} - -func (v NullableGetTranscodeSessions200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetTranscodeSessions200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/model_get_transcode_sessions_200_response_media_container.go b/pms/model_get_transcode_sessions_200_response_media_container.go deleted file mode 100644 index d8fe5e6..0000000 --- a/pms/model_get_transcode_sessions_200_response_media_container.go +++ /dev/null @@ -1,191 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" -) - -// checks if the GetTranscodeSessions200ResponseMediaContainer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetTranscodeSessions200ResponseMediaContainer{} - -// GetTranscodeSessions200ResponseMediaContainer struct for GetTranscodeSessions200ResponseMediaContainer -type GetTranscodeSessions200ResponseMediaContainer struct { - Size interface{} `json:"size,omitempty"` - TranscodeSession interface{} `json:"TranscodeSession,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GetTranscodeSessions200ResponseMediaContainer GetTranscodeSessions200ResponseMediaContainer - -// NewGetTranscodeSessions200ResponseMediaContainer instantiates a new GetTranscodeSessions200ResponseMediaContainer object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetTranscodeSessions200ResponseMediaContainer() *GetTranscodeSessions200ResponseMediaContainer { - this := GetTranscodeSessions200ResponseMediaContainer{} - return &this -} - -// NewGetTranscodeSessions200ResponseMediaContainerWithDefaults instantiates a new GetTranscodeSessions200ResponseMediaContainer object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetTranscodeSessions200ResponseMediaContainerWithDefaults() *GetTranscodeSessions200ResponseMediaContainer { - this := GetTranscodeSessions200ResponseMediaContainer{} - return &this -} - -// GetSize returns the Size field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetTranscodeSessions200ResponseMediaContainer) GetSize() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetTranscodeSessions200ResponseMediaContainer) GetSizeOk() (*interface{}, bool) { - if o == nil || isNil(o.Size) { - return nil, false - } - return &o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *GetTranscodeSessions200ResponseMediaContainer) HasSize() bool { - if o != nil && isNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given interface{} and assigns it to the Size field. -func (o *GetTranscodeSessions200ResponseMediaContainer) SetSize(v interface{}) { - o.Size = v -} - -// GetTranscodeSession returns the TranscodeSession field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetTranscodeSessions200ResponseMediaContainer) GetTranscodeSession() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.TranscodeSession -} - -// GetTranscodeSessionOk returns a tuple with the TranscodeSession field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetTranscodeSessions200ResponseMediaContainer) GetTranscodeSessionOk() (*interface{}, bool) { - if o == nil || isNil(o.TranscodeSession) { - return nil, false - } - return &o.TranscodeSession, true -} - -// HasTranscodeSession returns a boolean if a field has been set. -func (o *GetTranscodeSessions200ResponseMediaContainer) HasTranscodeSession() bool { - if o != nil && isNil(o.TranscodeSession) { - return true - } - - return false -} - -// SetTranscodeSession gets a reference to the given interface{} and assigns it to the TranscodeSession field. -func (o *GetTranscodeSessions200ResponseMediaContainer) SetTranscodeSession(v interface{}) { - o.TranscodeSession = v -} - -func (o GetTranscodeSessions200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetTranscodeSessions200ResponseMediaContainer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Size != nil { - toSerialize["size"] = o.Size - } - if o.TranscodeSession != nil { - toSerialize["TranscodeSession"] = o.TranscodeSession - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GetTranscodeSessions200ResponseMediaContainer) UnmarshalJSON(bytes []byte) (err error) { - varGetTranscodeSessions200ResponseMediaContainer := _GetTranscodeSessions200ResponseMediaContainer{} - - if err = json.Unmarshal(bytes, &varGetTranscodeSessions200ResponseMediaContainer); err == nil { - *o = GetTranscodeSessions200ResponseMediaContainer(varGetTranscodeSessions200ResponseMediaContainer) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "size") - delete(additionalProperties, "TranscodeSession") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGetTranscodeSessions200ResponseMediaContainer struct { - value *GetTranscodeSessions200ResponseMediaContainer - isSet bool -} - -func (v NullableGetTranscodeSessions200ResponseMediaContainer) Get() *GetTranscodeSessions200ResponseMediaContainer { - return v.value -} - -func (v *NullableGetTranscodeSessions200ResponseMediaContainer) Set(val *GetTranscodeSessions200ResponseMediaContainer) { - v.value = val - v.isSet = true -} - -func (v NullableGetTranscodeSessions200ResponseMediaContainer) IsSet() bool { - return v.isSet -} - -func (v *NullableGetTranscodeSessions200ResponseMediaContainer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetTranscodeSessions200ResponseMediaContainer(val *GetTranscodeSessions200ResponseMediaContainer) *NullableGetTranscodeSessions200ResponseMediaContainer { - return &NullableGetTranscodeSessions200ResponseMediaContainer{value: val, isSet: true} -} - -func (v NullableGetTranscodeSessions200ResponseMediaContainer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetTranscodeSessions200ResponseMediaContainer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pms/response.go b/pms/response.go deleted file mode 100644 index 4c7a235..0000000 --- a/pms/response.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/pms/test/api_activities_test.go b/pms/test/api_activities_test.go deleted file mode 100644 index 35368d9..0000000 --- a/pms/test/api_activities_test.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Plex-API - -Testing ActivitiesApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_ActivitiesApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test ActivitiesApiService CancelServerActivities", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var activityUUID interface{} - - httpRes, err := apiClient.PMS.ActivitiesApi.CancelServerActivities(context.Background(), activityUUID).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ActivitiesApiService GetServerActivities", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.ActivitiesApi.GetServerActivities(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_butler_test.go b/pms/test/api_butler_test.go deleted file mode 100644 index e9d9b28..0000000 --- a/pms/test/api_butler_test.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Plex-API - -Testing ButlerApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_ButlerApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test ButlerApiService GetButlerTasks", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.ButlerApi.GetButlerTasks(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ButlerApiService StartAllTasks", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.ButlerApi.StartAllTasks(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ButlerApiService StartTask", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var taskName interface{} - - httpRes, err := apiClient.PMS.ButlerApi.StartTask(context.Background(), taskName).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ButlerApiService StopAllTasks", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.ButlerApi.StopAllTasks(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ButlerApiService StopTask", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var taskName interface{} - - httpRes, err := apiClient.PMS.ButlerApi.StopTask(context.Background(), taskName).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_hubs_test.go b/pms/test/api_hubs_test.go deleted file mode 100644 index 2d62ff9..0000000 --- a/pms/test/api_hubs_test.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Plex-API - -Testing HubsApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_HubsApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test HubsApiService GetGlobalHubs", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.HubsApi.GetGlobalHubs(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test HubsApiService GetLibraryHubs", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var sectionId interface{} - - httpRes, err := apiClient.PMS.HubsApi.GetLibraryHubs(context.Background(), sectionId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_library_test.go b/pms/test/api_library_test.go deleted file mode 100644 index 2bb3c63..0000000 --- a/pms/test/api_library_test.go +++ /dev/null @@ -1,175 +0,0 @@ -/* -Plex-API - -Testing LibraryApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_LibraryApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test LibraryApiService DeleteLibrary", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var sectionId interface{} - - httpRes, err := apiClient.PMS.LibraryApi.DeleteLibrary(context.Background(), sectionId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LibraryApiService GetCommonLibraryItems", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var sectionId interface{} - - httpRes, err := apiClient.PMS.LibraryApi.GetCommonLibraryItems(context.Background(), sectionId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LibraryApiService GetFileHash", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.LibraryApi.GetFileHash(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LibraryApiService GetLatestLibraryItems", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var sectionId interface{} - - httpRes, err := apiClient.PMS.LibraryApi.GetLatestLibraryItems(context.Background(), sectionId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LibraryApiService GetLibraries", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.LibraryApi.GetLibraries(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LibraryApiService GetLibrary", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var sectionId interface{} - - httpRes, err := apiClient.PMS.LibraryApi.GetLibrary(context.Background(), sectionId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LibraryApiService GetLibraryItems", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var sectionId interface{} - - httpRes, err := apiClient.PMS.LibraryApi.GetLibraryItems(context.Background(), sectionId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LibraryApiService GetMetadata", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var ratingKey interface{} - - httpRes, err := apiClient.PMS.LibraryApi.GetMetadata(context.Background(), ratingKey).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LibraryApiService GetMetadataChildren", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var ratingKey interface{} - - httpRes, err := apiClient.PMS.LibraryApi.GetMetadataChildren(context.Background(), ratingKey).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LibraryApiService GetOnDeck", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.LibraryApi.GetOnDeck(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LibraryApiService GetRecentlyAdded", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.LibraryApi.GetRecentlyAdded(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LibraryApiService RefreshLibrary", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var sectionId interface{} - - httpRes, err := apiClient.PMS.LibraryApi.RefreshLibrary(context.Background(), sectionId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_log_test.go b/pms/test/api_log_test.go deleted file mode 100644 index e3d6167..0000000 --- a/pms/test/api_log_test.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Plex-API - -Testing LogApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_LogApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test LogApiService EnablePaperTrail", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.LogApi.EnablePaperTrail(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LogApiService LogLine", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.LogApi.LogLine(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test LogApiService LogMultiLine", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.LogApi.LogMultiLine(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_media_test.go b/pms/test/api_media_test.go deleted file mode 100644 index 975cf5a..0000000 --- a/pms/test/api_media_test.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Plex-API - -Testing MediaApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_MediaApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test MediaApiService MarkPlayed", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.MediaApi.MarkPlayed(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MediaApiService MarkUnplayed", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.MediaApi.MarkUnplayed(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MediaApiService UpdatePlayProgress", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.MediaApi.UpdatePlayProgress(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_playlists_test.go b/pms/test/api_playlists_test.go deleted file mode 100644 index 18aa0f3..0000000 --- a/pms/test/api_playlists_test.go +++ /dev/null @@ -1,136 +0,0 @@ -/* -Plex-API - -Testing PlaylistsApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_PlaylistsApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test PlaylistsApiService AddPlaylistContents", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var playlistID interface{} - - httpRes, err := apiClient.PMS.PlaylistsApi.AddPlaylistContents(context.Background(), playlistID).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlaylistsApiService ClearPlaylistContents", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var playlistID interface{} - - httpRes, err := apiClient.PMS.PlaylistsApi.ClearPlaylistContents(context.Background(), playlistID).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlaylistsApiService CreatePlaylist", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.PlaylistsApi.CreatePlaylist(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlaylistsApiService DeletePlaylist", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var playlistID interface{} - - httpRes, err := apiClient.PMS.PlaylistsApi.DeletePlaylist(context.Background(), playlistID).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlaylistsApiService GetPlaylist", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var playlistID interface{} - - httpRes, err := apiClient.PMS.PlaylistsApi.GetPlaylist(context.Background(), playlistID).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlaylistsApiService GetPlaylistContents", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var playlistID interface{} - - httpRes, err := apiClient.PMS.PlaylistsApi.GetPlaylistContents(context.Background(), playlistID).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlaylistsApiService GetPlaylists", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.PlaylistsApi.GetPlaylists(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlaylistsApiService UpdatePlaylist", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var playlistID interface{} - - httpRes, err := apiClient.PMS.PlaylistsApi.UpdatePlaylist(context.Background(), playlistID).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PlaylistsApiService UploadPlaylist", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.PlaylistsApi.UploadPlaylist(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_search_test.go b/pms/test/api_search_test.go deleted file mode 100644 index 54d167b..0000000 --- a/pms/test/api_search_test.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Plex-API - -Testing SearchApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_SearchApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test SearchApiService GetSearchResults", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.SearchApi.GetSearchResults(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SearchApiService PerformSearch", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.SearchApi.PerformSearch(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SearchApiService PerformVoiceSearch", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.SearchApi.PerformVoiceSearch(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_security_test.go b/pms/test/api_security_test.go deleted file mode 100644 index b5f481d..0000000 --- a/pms/test/api_security_test.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Plex-API - -Testing SecurityApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_SecurityApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test SecurityApiService GetSourceConnectionInformation", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.SecurityApi.GetSourceConnectionInformation(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SecurityApiService GetTransientToken", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.SecurityApi.GetTransientToken(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_server_test.go b/pms/test/api_server_test.go deleted file mode 100644 index 3bba93c..0000000 --- a/pms/test/api_server_test.go +++ /dev/null @@ -1,119 +0,0 @@ -/* -Plex-API - -Testing ServerApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_ServerApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test ServerApiService GetAvailableClients", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.ServerApi.GetAvailableClients(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServerApiService GetDevices", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.ServerApi.GetDevices(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServerApiService GetMyPlexAccount", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.ServerApi.GetMyPlexAccount(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServerApiService GetResizedPhoto", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.ServerApi.GetResizedPhoto(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServerApiService GetServerCapabilities", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.ServerApi.GetServerCapabilities(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServerApiService GetServerIdentity", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.ServerApi.GetServerIdentity(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServerApiService GetServerList", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.ServerApi.GetServerList(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test ServerApiService GetServerPreferences", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.ServerApi.GetServerPreferences(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_sessions_test.go b/pms/test/api_sessions_test.go deleted file mode 100644 index 275b157..0000000 --- a/pms/test/api_sessions_test.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -Plex-API - -Testing SessionsApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_SessionsApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test SessionsApiService GetSessionHistory", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.SessionsApi.GetSessionHistory(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SessionsApiService GetSessions", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.SessionsApi.GetSessions(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SessionsApiService GetTranscodeSessions", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PMS.SessionsApi.GetTranscodeSessions(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SessionsApiService StopTranscodeSession", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var sessionKey interface{} - - httpRes, err := apiClient.PMS.SessionsApi.StopTranscodeSession(context.Background(), sessionKey).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_updater_test.go b/pms/test/api_updater_test.go deleted file mode 100644 index d7fad64..0000000 --- a/pms/test/api_updater_test.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Plex-API - -Testing UpdaterApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_UpdaterApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test UpdaterApiService ApplyUpdates", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.UpdaterApi.ApplyUpdates(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UpdaterApiService CheckForUpdates", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.UpdaterApi.CheckForUpdates(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UpdaterApiService GetUpdateStatus", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.UpdaterApi.GetUpdateStatus(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/test/api_video_test.go b/pms/test/api_video_test.go deleted file mode 100644 index 7fb0a45..0000000 --- a/pms/test/api_video_test.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Plex-API - -Testing VideoApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package pms - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "github.com/lukehagar/plexgo" -) - -func Test_pms_VideoApiService(t *testing.T) { - - configuration := openapiclient.NewDefaultConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test VideoApiService GetTimeline", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.VideoApi.GetTimeline(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test VideoApiService StartUniversalTranscode", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.PMS.VideoApi.StartUniversalTranscode(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/pms/utils.go b/pms/utils.go deleted file mode 100644 index 147e619..0000000 --- a/pms/utils.go +++ /dev/null @@ -1,348 +0,0 @@ -/* -Plex-API - -An Open API Spec for interacting with Plex.tv and Plex Servers - -API version: 0.0.3 -Contact: Lukeslakemail@gmail.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package pms - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// isNil checks if an input is nil -func isNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/sdk-resources/plextv-config.yaml b/sdk-resources/plextv-config.yaml deleted file mode 100644 index 457de24..0000000 --- a/sdk-resources/plextv-config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -templateDir: ./sdk-resources/resources -packageName: plextv -packageVersion: 1.1.6 -generateInterfaces: false -enumClassPrefix: false -disallowAdditionalPropertiesIfNotPresent: false -useOneOfDiscriminatorLookup: false diff --git a/sdk-resources/pms-config.yaml b/sdk-resources/pms-config.yaml deleted file mode 100644 index 9190ff5..0000000 --- a/sdk-resources/pms-config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -templateDir: ./sdk-resources/resources -packageName: pms -packageVersion: 1.1.6 -generateInterfaces: false -enumClassPrefix: false -disallowAdditionalPropertiesIfNotPresent: false -useOneOfDiscriminatorLookup: false diff --git a/sdk-resources/resources/.travis.yml b/sdk-resources/resources/.travis.yml deleted file mode 100644 index f5cb2ce..0000000 --- a/sdk-resources/resources/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/sdk-resources/resources/README.mustache b/sdk-resources/resources/README.mustache deleted file mode 100644 index cf9c353..0000000 --- a/sdk-resources/resources/README.mustache +++ /dev/null @@ -1,223 +0,0 @@ -# Go API client for {{packageName}} - -{{#appDescriptionWithNewLines}} -{{{.}}} -{{/appDescriptionWithNewLines}} - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: {{appVersion}} -- Package version: {{packageVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Build package: {{generatorClass}} -{{#infoUrl}} -For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -{{#hasOAuthMethods}} -go get golang.org/x/oauth2 -{{/hasOAuthMethods}} -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import {{packageName}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), {{packageName}}.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), {{packageName}}.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), {{packageName}}.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), {{packageName}}.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) -``` - -## Documentation for API Endpoints - -All URIs are relative to *{{basePath}}* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} - -## Documentation For Models - -{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) -{{/model}}{{/models}} - -## Documentation For Authorization - -{{^authMethods}} Endpoints do not require authorization. -{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} -{{#authMethods}} - -### {{{name}}} - -{{#isApiKey}} -- **Type**: API key -- **API key parameter name**: {{{keyParamName}}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: {{keyParamName}} and passed in as the auth context for each request. - -{{/isApiKey}} -{{#isBasic}} -{{#isBasicBearer}} -- **Type**: HTTP Bearer token authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING") -r, err := client.Service.Operation(auth, args) -``` - -{{/isBasicBearer}} -{{#isBasicBasic}} -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - -{{/isBasicBasic}} -{{#isHttpSignature}} -- **Type**: HTTP signature authentication - -Example - -```golang - authConfig := client.HttpSignatureAuth{ - KeyId: "my-key-id", - PrivateKeyPath: "rsa.pem", - Passphrase: "my-passphrase", - SigningScheme: sw.HttpSigningSchemeHs2019, - SignedHeaders: []string{ - sw.HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. - sw.HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. - "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. - "Date", // The date and time at which the message was originated. - "Content-Type", // The Media type of the body of the request. - "Digest", // A cryptographic digest of the request body. - }, - SigningAlgorithm: sw.HttpSigningAlgorithmRsaPSS, - SignatureMaxValidity: 5 * time.Minute, - } - var authCtx context.Context - var err error - if authCtx, err = authConfig.ContextWithValue(context.Background()); err != nil { - // Process error - } - r, err = client.Service.Operation(auth, args) - -``` -{{/isHttpSignature}} -{{/isBasic}} -{{#isOAuth}} - -- **Type**: OAuth -- **Flow**: {{{flow}}} -- **Authorization URL**: {{{authorizationUrl}}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - **{{{scope}}}**: {{{description}}} -{{/scopes}} - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING") -r, err := client.Service.Operation(auth, args) -``` - -Or via OAuth2 module to automatically refresh tokens and perform user authentication. - -```golang -import "golang.org/x/oauth2" - -/* Perform OAuth2 round trip request and obtain a token */ - -tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) -auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) -r, err := client.Service.Operation(auth, args) -``` - -{{/isOAuth}} -{{/authMethods}} - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author - -{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} -{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/sdk-resources/resources/api.mustache b/sdk-resources/resources/api.mustache deleted file mode 100644 index d66ae6d..0000000 --- a/sdk-resources/resources/api.mustache +++ /dev/null @@ -1,412 +0,0 @@ -{{>partial_header}} -package {{packageName}} - -{{#operations}} -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -{{#imports}} "{{import}}" -{{/imports}} -) - -{{#generateInterfaces}} - -type {{classname}} interface { - {{#operation}} - - /* - {{operationId}} {{{summary}}}{{^summary}}Method for {{operationId}}{{/summary}} - {{#notes}} - - {{{unescapedNotes}}} - {{/notes}} - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} - @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}} - @return {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request - {{#isDeprecated}} - - Deprecated - {{/isDeprecated}} - */ - {{{nickname}}}(ctx context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request - - // {{nickname}}Execute executes the request{{#returnType}} - // @return {{{.}}}{{/returnType}} - {{#isDeprecated}} - // Deprecated - {{/isDeprecated}} - {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request) ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}{{^isResponseFile}}*{{/isResponseFile}}{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error) - {{/operation}} -} -{{/generateInterfaces}} - -// {{classname}}Service {{classname}} service -type {{classname}}Service service -{{#operation}} - -type {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request struct { - ctx context.Context{{#generateInterfaces}} - ApiService {{classname}} -{{/generateInterfaces}}{{^generateInterfaces}} - ApiService *{{classname}}Service -{{/generateInterfaces}} -{{#allParams}} - {{paramName}} {{^isPathParam}}{{^isFile}}*{{/isFile}}{{/isPathParam}}{{{dataType}}} -{{/allParams}} -} - -{{#allParams}} -{{^isPathParam}} -{{#description}} -// {{.}} -{{/description}} -{{#isDeprecated}} -// Deprecated -{{/isDeprecated}} -func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request) {{vendorExtensions.x-export-param-name}}({{paramName}} {{{dataType}}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request { - r.{{paramName}} = {{^isFile}}&{{/isFile}}{{paramName}} - return r -} - -{{/isPathParam}} -{{/allParams}} -func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request) Execute() ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}{{^isResponseFile}}*{{/isResponseFile}}{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error) { - return r.ApiService.{{nickname}}Execute(r) -} - -/* -{{operationId}} {{{summary}}}{{^summary}}Method for {{operationId}}{{/summary}} -{{#notes}} - -{{{unescapedNotes}}} -{{/notes}} - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} - @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}} - @return {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request -{{#isDeprecated}} - -Deprecated -{{/isDeprecated}} -*/ -func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request { - return {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request{ - ApiService: a, - ctx: ctx, - {{#pathParams}} - {{paramName}}: {{paramName}}, - {{/pathParams}} - } -} - -// Execute executes the request{{#returnType}} -// @return {{{.}}}{{/returnType}} -{{#isDeprecated}} -// Deprecated -{{/isDeprecated}} -func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}{{^structPrefix}}Api{{/structPrefix}}{{operationId}}Request) ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}{{^isResponseFile}}*{{/isResponseFile}}{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error) { - var ( - localVarHTTPMethod = http.Method{{httpMethod}} - localVarPostBody interface{} - formFiles []formFile - {{#returnType}} - localVarReturnValue {{^isArray}}{{^returnTypeIsPrimitive}}{{^isResponseFile}}*{{/isResponseFile}}{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}} - {{/returnType}} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "{{{classname}}}Service.{{{nickname}}}") - if err != nil { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "{{{path}}}"{{#pathParams}} - localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", url.PathEscape(parameterValueToString(r.{{paramName}}, "{{paramName}}")), -1){{/pathParams}} - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - {{#allParams}} - {{#required}} - {{^isPathParam}} - if r.{{paramName}} == nil { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} is required and must be specified") - } - {{/isPathParam}} - {{#minItems}} - if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minItems}} { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minItems}} elements") - } - {{/minItems}} - {{#maxItems}} - if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxItems}} { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxItems}} elements") - } - {{/maxItems}} - {{#minLength}} - if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minLength}} { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minLength}} elements") - } - {{/minLength}} - {{#maxLength}} - if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxLength}} { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxLength}} elements") - } - {{/maxLength}} - {{#minimum}} - {{#isString}} - {{paramName}}Txt, err := atoi({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) - if {{paramName}}Txt < {{minimum}} { - {{/isString}} - {{^isString}} - if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} < {{minimum}} { - {{/isString}} - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be greater than {{minimum}}") - } - {{/minimum}} - {{#maximum}} - {{#isString}} - {{paramName}}Txt, err := atoi({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) - if {{paramName}}Txt > {{maximum}} { - {{/isString}} - {{^isString}} - if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} > {{maximum}} { - {{/isString}} - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be less than {{maximum}}") - } - {{/maximum}} - {{/required}} - {{/allParams}} - - {{#queryParams}} - {{#required}} - {{#isCollectionFormatMulti}} - { - t := *r.{{paramName}} - if reflect.TypeOf(t).Kind() == reflect.Slice { - s := reflect.ValueOf(t) - for i := 0; i < s.Len(); i++ { - parameterAddToQuery(localVarQueryParams, "{{baseName}}", s.Index(i), "{{collectionFormat}}") - } - } else { - parameterAddToQuery(localVarQueryParams, "{{baseName}}", t, "{{collectionFormat}}") - } - } - {{/isCollectionFormatMulti}} - {{^isCollectionFormatMulti}} - parameterAddToQuery(localVarQueryParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") - {{/isCollectionFormatMulti}} - {{/required}} - {{^required}} - if r.{{paramName}} != nil { - {{#isCollectionFormatMulti}} - t := *r.{{paramName}} - if reflect.TypeOf(t).Kind() == reflect.Slice { - s := reflect.ValueOf(t) - for i := 0; i < s.Len(); i++ { - parameterAddToQuery(localVarQueryParams, "{{baseName}}", s.Index(i), "{{collectionFormat}}") - } - } else { - parameterAddToQuery(localVarQueryParams, "{{baseName}}", t, "{{collectionFormat}}") - } - {{/isCollectionFormatMulti}} - {{^isCollectionFormatMulti}} - parameterAddToQuery(localVarQueryParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") - {{/isCollectionFormatMulti}} - } - {{/required}} - {{/queryParams}} - // to determine the Content-Type header -{{=<% %>=}} - localVarHTTPContentTypes := []string{<%#consumes%>"<%&mediaType%>"<%^-last%>, <%/-last%><%/consumes%>} -<%={{ }}=%> - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header -{{=<% %>=}} - localVarHTTPHeaderAccepts := []string{<%#produces%>"<%&mediaType%>"<%^-last%>, <%/-last%><%/produces%>} -<%={{ }}=%> - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } -{{#headerParams}} - {{#required}} - parameterAddToQuery(localVarQueryParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") - {{/required}} - {{^required}} - if r.{{paramName}} != nil { - parameterAddToQuery(localVarQueryParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") - } - {{/required}} -{{/headerParams}} -{{#formParams}} -{{#isFile}} - var {{paramName}}LocalVarFormFileName string - var {{paramName}}LocalVarFileName string - var {{paramName}}LocalVarFileBytes []byte - - {{paramName}}LocalVarFormFileName = "{{baseName}}" - - - {{paramName}}LocalVarFile := r.{{paramName}} - - if {{paramName}}LocalVarFile != nil { - fbs, _ := ioutil.ReadAll({{paramName}}LocalVarFile) - - {{paramName}}LocalVarFileBytes = fbs - {{paramName}}LocalVarFileName = {{paramName}}LocalVarFile.Name() - {{paramName}}LocalVarFile.Close() - formFiles = append(formFiles, formFile{fileBytes: {{paramName}}LocalVarFileBytes, fileName: {{paramName}}LocalVarFileName, formFileName: {{paramName}}LocalVarFormFileName}) - } -{{/isFile}} -{{^isFile}} -{{#required}} - parameterAddToQuery(localVarFormParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") -{{/required}} -{{^required}} -{{#isModel}} - if r.{{paramName}} != nil { - paramJson, err := parameterToJson(*r.{{paramName}}) - if err != nil { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err - } - localVarFormParams.Add("{{baseName}}", paramJson) - } -{{/isModel}} -{{^isModel}} - if r.{{paramName}} != nil { - parameterAddToQuery(localVarFormParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") - } -{{/isModel}} -{{/required}} -{{/isFile}} -{{/formParams}} -{{#bodyParams}} - // body params - localVarPostBody = r.{{paramName}} -{{/bodyParams}} -{{#authMethods}} -{{#isApiKey}} -{{^isKeyInCookie}} - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - {{#vendorExtensions.x-auth-id-alias}} - if apiKey, ok := auth["{{.}}"]; ok { - var key string - if prefix, ok := auth["{{name}}"]; ok && prefix.Prefix != "" { - key = prefix.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - {{/vendorExtensions.x-auth-id-alias}} - {{^vendorExtensions.x-auth-id-alias}} - if apiKey, ok := auth["{{name}}"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - {{/vendorExtensions.x-auth-id-alias}} - {{#isKeyInHeader}} - localVarHeaderParams["{{keyParamName}}"] = key - {{/isKeyInHeader}} - {{#isKeyInQuery}} - localVarQueryParams.Add("{{keyParamName}}", key) - {{/isKeyInQuery}} - } - } - } -{{/isKeyInCookie}} -{{/isApiKey}} -{{/authMethods}} - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - {{#responses}} - {{#dataType}} - {{^is1xx}} - {{^is2xx}} - {{#range}} - {{#is3xx}} - if localVarHTTPResponse.StatusCode >= 300 && localVarHTTPResponse.StatusCode < 400 { - {{/is3xx}} - {{#is4xx}} - if localVarHTTPResponse.StatusCode >= 400 && localVarHTTPResponse.StatusCode < 500 { - {{/is4xx}} - {{#is5xx}} - if localVarHTTPResponse.StatusCode >= 500 { - {{/is5xx}} - {{/range}} - {{^range}} - {{^wildcard}} - if localVarHTTPResponse.StatusCode == {{{code}}} { - {{/wildcard}} - {{/range}} - var v {{{dataType}}} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - {{^-last}} - return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr - {{/-last}} - {{^wildcard}} - } - {{/wildcard}} - {{/is2xx}} - {{/is1xx}} - {{/dataType}} - {{/responses}} - return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr - } - - {{#returnType}} - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr - } - - {{/returnType}} - return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, nil -} -{{/operation}} -{{/operations}} diff --git a/sdk-resources/resources/api_doc.mustache b/sdk-resources/resources/api_doc.mustache deleted file mode 100644 index c992746..0000000 --- a/sdk-resources/resources/api_doc.mustache +++ /dev/null @@ -1,92 +0,0 @@ -# {{invokerPackage}}\{{classname}}{{#description}} - -{{.}}{{/description}} - -All URIs are relative to *{{basePath}}* - -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}} - -{{#operations}} -{{#operation}} - -## {{{operationId}}} - -> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}(ctx{{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute() - -{{{summary}}}{{#notes}} - -{{{unespacedNotes}}}{{/notes}} - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" -{{#vendorExtensions.x-go-import}} -{{{vendorExtensions.x-go-import}}} -{{/vendorExtensions.x-go-import}} - {{goImportAlias}} "./openapi" -) - -func main() { - {{#allParams}} - {{paramName}} := {{{vendorExtensions.x-go-example}}} // {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/allParams}} - - configuration := {{goImportAlias}}.NewConfiguration() - apiClient := {{goImportAlias}}.NewAPIClient(configuration) - resp, r, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `{{classname}}.{{operationId}}``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - {{#returnType}} - // response from `{{operationId}}`: {{{.}}} - fmt.Fprintf(os.Stdout, "Response from `{{classname}}.{{operationId}}`: %v\n", resp) - {{/returnType}} -} -``` - -### Path Parameters - -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#pathParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.{{/-last}}{{/pathParams}}{{#pathParams}} -**{{paramName}}** | {{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/pathParams}} - -### Other Parameters - -Other parameters are passed through a pointer to a api{{{nickname}}}Request struct via the builder pattern -{{#allParams}}{{#-last}} - -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}} -{{^isPathParam}} **{{paramName}}** | {{#isContainer}}{{#isArray}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**[]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**map[string]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/isContainer}} | {{description}} | {{#defaultValue}}[default to {{.}}]{{/defaultValue}}{{/isPathParam}}{{/allParams}} - -### Return type - -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}} (empty response body){{/returnType}} - -### Authorization - -{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} - -### HTTP request headers - -- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} -- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - -{{/operation}} -{{/operations}} diff --git a/sdk-resources/resources/api_test.mustache b/sdk-resources/resources/api_test.mustache deleted file mode 100644 index f7bf4fa..0000000 --- a/sdk-resources/resources/api_test.mustache +++ /dev/null @@ -1,54 +0,0 @@ -/* -{{#appName}} -{{{.}}} -{{/appName}} - -Testing {{classname}}Service - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package {{packageName}} - -import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - {{goImportAlias}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}" -) - -func Test_{{packageName}}_{{classname}}Service(t *testing.T) { - - configuration := {{goImportAlias}}.NewDefaultConfiguration() - apiClient := {{goImportAlias}}.NewAPIClient(configuration) - -{{#operations}} -{{#operation}} - t.Run("Test {{classname}}Service {{{nickname}}}", func(t *testing.T) { - - {{^pathParams}} - t.Skip("skip test") // remove to run test - {{/pathParams}} - {{#pathParams}} - {{#-first}} - t.Skip("skip test") // remove to run test - - {{/-first}} - var {{paramName}} {{{dataType}}} - {{/pathParams}} - - {{#returnType}}resp, {{/returnType}}httpRes, err := apiClient.{{#lambda.uppercase}}{{packageName}}{{/lambda.uppercase}}.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}).Execute() - - require.Nil(t, err) - {{#returnType}} - require.NotNil(t, resp) - {{/returnType}} - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -{{/operation}} -{{/operations}} -} diff --git a/sdk-resources/resources/client.mustache b/sdk-resources/resources/client.mustache deleted file mode 100644 index f175b03..0000000 --- a/sdk-resources/resources/client.mustache +++ /dev/null @@ -1,804 +0,0 @@ -{{>partial_header}} -package {{packageName}} - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "io/ioutil" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - - {{#hasOAuthMethods}} - "golang.org/x/oauth2" - {{/hasOAuthMethods}} - retryablehttp "github.com/hashicorp/go-retryablehttp" - {{#withAWSV4Signature}} - awsv4 "github.com/aws/aws-sdk-go/aws/signer/v4" - awscredentials "github.com/aws/aws-sdk-go/aws/credentials" - {{/withAWSV4Signature}} -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) -) - -// APIClient manages communication with the {{appName}} API v{{version}} -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services -{{#apiInfo}} -{{#apis}} -{{#operations}} - - {{classname}} {{#generateInterfaces}}{{classname}}{{/generateInterfaces}}{{^generateInterfaces}}*{{classname}}Service{{/generateInterfaces}} -{{/operations}} -{{/apis}} -{{/apiInfo}} -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = retryablehttp.NewClient() - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - -{{#apiInfo}} - // API Services -{{#apis}} -{{#operations}} - c.{{classname}} = (*{{classname}}Service)(&c.common) -{{/operations}} -{{/apis}} -{{/apiInfo}} - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToQuery adds the provided object to the url query supporting deep object syntax -func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToQuery(queryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToQuery(queryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i:=0;i 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - localVarRequest.Header.Add("X-SailPoint-SDK", "{{packageVersion}}") - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - {{#hasOAuthMethods}} - // OAuth2 authentication - if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { - // We were able to grab an oauth2 token from the context - var latestToken *oauth2.Token - if latestToken, err = tok.Token(); err != nil { - return nil, err - } - - latestToken.SetAuthHeader(localVarRequest) - } - if c.cfg.Token == "" && c.cfg.ClientId != "" && c.cfg.ClientSecret != "" && c.cfg.TokenURL != "" { - auth, err := getAccessToken(c.cfg.ClientId, c.cfg.ClientSecret, c.cfg.TokenURL) - if err != nil { - return nil, err - } - c.cfg.Token = auth - localVarRequest.Header.Add("Authorization", "Bearer "+auth) - } else { - localVarRequest.Header.Add("Authorization", "Bearer "+c.cfg.Token) - } - {{/hasOAuthMethods}} - {{#hasHttpBasicMethods}} - // Basic HTTP Authentication - if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { - localVarRequest.SetBasicAuth(auth.UserName, auth.Password) - } - - {{/hasHttpBasicMethods}} - {{#hasHttpBearerMethods}} - // AccessToken Authentication - if auth, ok := ctx.Value(ContextAccessToken).(string); ok { - localVarRequest.Header.Add("Authorization", "Bearer "+auth) - } - - - {{/hasHttpBearerMethods}} - {{#withAWSV4Signature}} - // AWS Signature v4 Authentication - if auth, ok := ctx.Value(ContextAWSv4).(AWSv4); ok { - creds := awscredentials.NewStaticCredentials(auth.AccessKey, auth.SecretKey, auth.SessionToken) - signer := awsv4.NewSigner(creds) - var reader *strings.Reader - if body == nil { - reader = strings.NewReader("") - } else { - reader = strings.NewReader(body.String()) - } - - // Define default values for region and service to maintain backward compatibility - region := auth.Region - if region == "" { - region = "eu-west-2" - } - service := auth.Service - if service == "" { - service = "oapi" - } - - timestamp := time.Now() - _, err := signer.Sign(localVarRequest, reader, service, region, timestamp) - if err != nil { - return nil, err - } - } - {{/withAWSV4Signature}} - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } -{{#withCustomMiddlewareFunction}} - - if c.cfg.Middleware != nil { - c.cfg.Middleware(localVarRequest) - } - -{{/withCustomMiddlewareFunction}} -{{#hasHttpSignatureMethods}} - if ctx != nil { - // HTTP Signature Authentication. All request headers must be set (including default headers) - // because the headers may be included in the signature. - if auth, ok := ctx.Value(ContextHttpSignatureAuth).(HttpSignatureAuth); ok { - err = SignRequest(ctx, localVarRequest, auth) - if err != nil { - return nil, err - } - } - } -{{/hasHttpSignatureMethods}} - return localVarRequest, nil -} - -type AccessToken struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - ExpiresIn int `json:"expires_in"` - Scope string `json:"scope"` - TenantId string `json:"tenant_id"` - Pod string `json:"pod"` - StrongAuthSupported bool `json:"strong_auth_supported"` - Org string `json:"org"` - IdentityId string `json:"identity_id"` - UserName string `json:"user_name"` - StrongAuth bool `json:"strong_auth"` - Jti string `json:"jti"` -} - -func getAccessToken(clientId string, clientSecret string, tokenURL string) (string, error) { - url := tokenURL + "?grant_type=client_credentials&client_id=" + clientId + "&client_secret=" + clientSecret - method := "POST" - client := &http.Client{} - req, err := http.NewRequest(method, url, nil) - - if err != nil { - fmt.Println(err) - return "", err - } - res, err := client.Do(req) - if err != nil { - fmt.Println(err) - return "", err - } - defer res.Body.Close() - - body, err := ioutil.ReadAll(res.Body) - if err != nil { - fmt.Println(err) - return "", err - } - - var jsonMap AccessToken - json.Unmarshal([]byte(body), &jsonMap) - - return jsonMap.AccessToken, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = ioutil.TempFile("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { - return e.model -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - - // status title (detail) - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/sdk-resources/resources/configuration.mustache b/sdk-resources/resources/configuration.mustache deleted file mode 100644 index 0a82051..0000000 --- a/sdk-resources/resources/configuration.mustache +++ /dev/null @@ -1,335 +0,0 @@ -{{>partial_header}} -package {{packageName}} - -import ( - "context" - "fmt" - "strings" - - retryablehttp "github.com/hashicorp/go-retryablehttp" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - {{#hasOAuthMethods}} - // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. - ContextOAuth2 = contextKey("token") - - {{/hasOAuthMethods}} - {{#hasHttpBasicMethods}} - // ContextBasicAuth takes BasicAuth as authentication for the request. - ContextBasicAuth = contextKey("basic") - - {{/hasHttpBasicMethods}} - {{#hasHttpBearerMethods}} - // ContextAccessToken takes a string oauth2 access token as authentication for the request. - ContextAccessToken = contextKey("accesstoken") - - {{/hasHttpBearerMethods}} - {{#hasApiKeyMethods}} - // ContextAPIKeys takes a string apikey as authentication for the request - ContextAPIKeys = contextKey("apiKeys") - - {{/hasApiKeyMethods}} - {{#withAWSV4Signature}} - // ContextAWSv4 takes an Access Key and a Secret Key for signing AWS Signature v4 - ContextAWSv4 = contextKey("awsv4") - - {{/withAWSV4Signature}} - {{#hasHttpSignatureMethods}} - // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. - ContextHttpSignatureAuth = contextKey("httpsignature") - - {{/hasHttpSignatureMethods}} - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -{{#withAWSV4Signature}} -// AWSv4 provides AWS Signature to a request passed via context using ContextAWSv4 -// https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html -type AWSv4 struct { - AccessKey string - SecretKey string - SessionToken string - Region string - Service string -} - -{{/withAWSV4Signature}} -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -{{#withCustomMiddlewareFunction}} -// MiddlewareFunction provides way to implement custom middleware -type MiddlewareFunction func(*http.Request) - -{{/withCustomMiddlewareFunction}} -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *retryablehttp.Client - ClientId string - ClientSecret string - BaseURL string - TokenURL string - Token string - {{#withCustomMiddlewareFunction}} - Middleware MiddlewareFunction - {{/withCustomMiddlewareFunction}} -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration(clientId string, clientSecret string, baseURL string, tokenURL string, token string) *Configuration { - cfg := &Configuration{ - ClientId: clientId, - ClientSecret: clientSecret, - BaseURL: baseURL, - TokenURL: tokenURL, - Token: token, - DefaultHeader: make(map[string]string), - UserAgent: "{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/go{{/httpUserAgent}}", - Debug: false, - {{#servers}} - {{#-first}} - Servers: ServerConfigurations{ - {{/-first}} - { - URL: baseURL, - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - {{#variables}} - {{#-first}} - Variables: map[string]ServerVariable{ - {{/-first}} - "{{{name}}}": ServerVariable{ - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - DefaultValue: "{{{defaultValue}}}", - {{#enumValues}} - {{#-first}} - EnumValues: []string{ - {{/-first}} - "{{{.}}}", - {{#-last}} - }, - {{/-last}} - {{/enumValues}} - }, - {{#-last}} - }, - {{/-last}} - {{/variables}} - }, - {{#-last}} - }, - {{/-last}} - {{/servers}} - {{#apiInfo}} - OperationServers: map[string]ServerConfigurations{ - {{#apis}} - {{#operations}} - {{#operation}} - {{#servers}} - {{#-first}} - "{{{classname}}}Service.{{{nickname}}}": { - {{/-first}} - { - URL: "{{{url}}}", - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - {{#variables}} - {{#-first}} - Variables: map[string]ServerVariable{ - {{/-first}} - "{{{name}}}": ServerVariable{ - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - DefaultValue: "{{{defaultValue}}}", - {{#enumValues}} - {{#-first}} - EnumValues: []string{ - {{/-first}} - "{{{.}}}", - {{#-last}} - }, - {{/-last}} - {{/enumValues}} - }, - {{#-last}} - }, - {{/-last}} - {{/variables}} - }, - {{#-last}} - }, - {{/-last}} - {{/servers}} - {{/operation}} - {{/operations}} - {{/apis}} - }, - {{/apiInfo}} - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/sdk-resources/resources/git_push.sh.mustache b/sdk-resources/resources/git_push.sh.mustache deleted file mode 100644 index 0e3776a..0000000 --- a/sdk-resources/resources/git_push.sh.mustache +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="{{{gitHost}}}" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="{{{gitUserId}}}" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="{{{gitRepoId}}}" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="{{{releaseNote}}}" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/sdk-resources/resources/gitignore.mustache b/sdk-resources/resources/gitignore.mustache deleted file mode 100644 index daf913b..0000000 --- a/sdk-resources/resources/gitignore.mustache +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/sdk-resources/resources/go.mod.mustache b/sdk-resources/resources/go.mod.mustache deleted file mode 100644 index ce1a28f..0000000 --- a/sdk-resources/resources/go.mod.mustache +++ /dev/null @@ -1,13 +0,0 @@ -module github.com/sailpoint-oss/golang-sdk/sdk-output/v3 - -go 1.13 - -require ( - {{#hasOAuthMethods}} - golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 - {{/hasOAuthMethods}} - github.com/hashicorp/go-retryablehttp v0.7.2 // indirect - {{#withAWSV4Signature}} - github.com/aws/aws-sdk-go v1.34.14 - {{/withAWSV4Signature}} -) diff --git a/sdk-resources/resources/model.mustache b/sdk-resources/resources/model.mustache deleted file mode 100644 index 684af1d..0000000 --- a/sdk-resources/resources/model.mustache +++ /dev/null @@ -1,20 +0,0 @@ -{{>partial_header}} -package {{packageName}} - -{{#models}} -import ( - "encoding/json" -{{#imports}} - "{{import}}" -{{/imports}} -) - -{{#model}} -{{#isEnum}} -{{>model_enum}} -{{/isEnum}} -{{^isEnum}} -{{#oneOf}}{{#-first}}{{>model_oneof}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>model_anyof}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>model_simple}}{{/anyOf}}{{/oneOf}} -{{/isEnum}} -{{/model}} -{{/models}} diff --git a/sdk-resources/resources/model_anyof.mustache b/sdk-resources/resources/model_anyof.mustache deleted file mode 100644 index 5037c20..0000000 --- a/sdk-resources/resources/model_anyof.mustache +++ /dev/null @@ -1,76 +0,0 @@ -// {{classname}} {{{description}}}{{^description}}struct for {{{classname}}}{{/description}} -type {{classname}} struct { - {{#anyOf}} - {{{.}}}var *{{{.}}} - {{/anyOf}} -} - -// Unmarshal JSON data into any of the pointers in the struct -func (dst *{{classname}}) UnmarshalJSON(data []byte) error { - var err error - {{#isNullable}} - // this object is nullable so check if the payload is null or empty string - if string(data) == "" || string(data) == "{}" { - return nil - } - - {{/isNullable}} - {{#discriminator}} - {{#mappedModels}} - {{#-first}} - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = json.Unmarshal(data, &jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - {{/-first}} - // check if the discriminator value is '{{{mappingName}}}' - if jsonDict["{{{propertyBaseName}}}"] == "{{{mappingName}}}" { - // try to unmarshal JSON data into {{{modelName}}} - err = json.Unmarshal(data, &dst.{{{modelName}}}); - if err == nil { - json{{{modelName}}}, _ := json.Marshal(dst.{{{modelName}}}) - if string(json{{{modelName}}}) == "{}" { // empty struct - dst.{{{modelName}}} = nil - } else { - return nil // data stored in dst.{{{modelName}}}, return on the first match - } - } else { - dst.{{{modelName}}} = nil - } - } - - {{/mappedModels}} - {{/discriminator}} - {{#anyOf}} - // try to unmarshal JSON data into {{{.}}}var - err = json.Unmarshal(data, &dst.{{{.}}}var); - if err == nil { - json{{{.}}}var, _ := json.Marshal(dst.{{{.}}}var) - if string(json{{{.}}}var) == "{}" { // empty struct - dst.{{{.}}}var = nil - } else { - return nil // data stored in dst.{{{.}}}var, return on the first match - } - } else { - dst.{{{.}}}var = nil - } - - {{/anyOf}} - return fmt.Errorf("data failed to match schemas in anyOf({{classname}})") -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src *{{classname}}) MarshalJSON() ([]byte, error) { -{{#anyOf}} - if src.{{{.}}}var != nil { - return json.Marshal(&src.{{{.}}}var) - } - -{{/anyOf}} - return nil, nil // no data in anyOf schemas -} - -{{>nullable_model}} diff --git a/sdk-resources/resources/model_doc.mustache b/sdk-resources/resources/model_doc.mustache deleted file mode 100644 index 439e695..0000000 --- a/sdk-resources/resources/model_doc.mustache +++ /dev/null @@ -1,97 +0,0 @@ -{{#models}}{{#model}}# {{classname}} - -{{^isEnum}} -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -{{#vendorExtensions.x-is-one-of-interface}} -**{{classname}}Interface** | **interface { {{#discriminator}}{{propertyGetter}}() {{propertyType}}{{/discriminator}} }** | An interface that can hold any of the proper implementing types | -{{/vendorExtensions.x-is-one-of-interface}} -{{^vendorExtensions.x-is-one-of-interface}} -{{#vars}}**{{name}}** | {{^required}}Pointer to {{/required}}{{#isContainer}}{{#isArray}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**[]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{dataType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isArray}}{{#isMap}}{{#items}}{{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**map[string]{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}{{/items}}{{/isMap}}{{/isContainer}}{{^isContainer}}{{^isPrimitiveType}}{{^isFile}}{{^isDateTime}}[{{/isDateTime}}{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}{{^isDateTime}}]({{^baseType}}{{dataType}}{{/baseType}}{{baseType}}.md){{/isDateTime}}{{/isFile}}{{/isPrimitiveType}}{{/isContainer}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} -{{/vars}} -{{/vendorExtensions.x-is-one-of-interface}} - -## Methods - -{{^vendorExtensions.x-is-one-of-interface}} -### New{{classname}} - -`func New{{classname}}({{#vars}}{{#required}}{{nameInCamelCase}} {{dataType}}, {{/required}}{{/vars}}) *{{classname}}` - -New{{classname}} instantiates a new {{classname}} object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### New{{classname}}WithDefaults - -`func New{{classname}}WithDefaults() *{{classname}}` - -New{{classname}}WithDefaults instantiates a new {{classname}} object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -{{#vars}} -### Get{{name}} - -`func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}}` - -Get{{name}} returns the {{name}} field if non-nil, zero value otherwise. - -### Get{{name}}Ok - -`func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-go-base-type}}, bool)` - -Get{{name}}Ok returns a tuple with the {{name}} field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### Set{{name}} - -`func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}})` - -Set{{name}} sets {{name}} field to given value. - -{{^required}} -### Has{{name}} - -`func (o *{{classname}}) Has{{name}}() bool` - -Has{{name}} returns a boolean if a field has been set. -{{/required}} - -{{#isNullable}} -### Set{{name}}Nil - -`func (o *{{classname}}) Set{{name}}Nil(b bool)` - - Set{{name}}Nil sets the value for {{name}} to be an explicit nil - -### Unset{{name}} -`func (o *{{classname}}) Unset{{name}}()` - -Unset{{name}} ensures that no value is present for {{name}}, not even an explicit nil -{{/isNullable}} -{{/vars}} -{{#vendorExtensions.x-implements}} - -### As{{{.}}} - -`func (s *{{classname}}) As{{{.}}}() {{{.}}}` - -Convenience method to wrap this instance of {{classname}} in {{{.}}} -{{/vendorExtensions.x-implements}} -{{/vendorExtensions.x-is-one-of-interface}} -{{/isEnum}} -{{#isEnum}} -## Enum - -{{#allowableValues}}{{#enumVars}} -* `{{name}}` (value: `{{{value}}}`) -{{/enumVars}}{{/allowableValues}} -{{/isEnum}} - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - -{{/model}}{{/models}} diff --git a/sdk-resources/resources/model_enum.mustache b/sdk-resources/resources/model_enum.mustache deleted file mode 100644 index 398f8f0..0000000 --- a/sdk-resources/resources/model_enum.mustache +++ /dev/null @@ -1,101 +0,0 @@ -// {{{classname}}} {{{description}}}{{^description}}the model '{{{classname}}}'{{/description}} -type {{{classname}}} {{{format}}}{{^format}}{{dataType}}{{/format}} - -// List of {{{name}}} -const ( - {{#allowableValues}} - {{#enumVars}} - {{^-first}} - {{/-first}} - {{#enumClassPrefix}}{{{classname.toUpperCase}}}_{{/enumClassPrefix}}{{name}} {{{classname}}} = {{{value}}} - {{/enumVars}} - {{/allowableValues}} -) - -// All allowed values of {{{classname}}} enum -var Allowed{{{classname}}}EnumValues = []{{{classname}}}{ - {{#allowableValues}} - {{#enumVars}} - {{{value}}}, - {{/enumVars}} - {{/allowableValues}} -} - -func (v *{{{classname}}}) UnmarshalJSON(src []byte) error { - var value {{{format}}}{{^format}}{{dataType}}{{/format}} - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := {{{classname}}}(value) - for _, existing := range Allowed{{{classname}}}EnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid {{classname}}", value) -} - -// New{{{classname}}}FromValue returns a pointer to a valid {{{classname}}} -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func New{{{classname}}}FromValue(v {{{format}}}{{^format}}{{dataType}}{{/format}}) (*{{{classname}}}, error) { - ev := {{{classname}}}(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for {{{classname}}}: valid values are %v", v, Allowed{{{classname}}}EnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v {{{classname}}}) IsValid() bool { - for _, existing := range Allowed{{{classname}}}EnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to {{{name}}} value -func (v {{{classname}}}) Ptr() *{{{classname}}} { - return &v -} - -type Nullable{{{classname}}} struct { - value *{{{classname}}} - isSet bool -} - -func (v Nullable{{classname}}) Get() *{{classname}} { - return v.value -} - -func (v *Nullable{{classname}}) Set(val *{{classname}}) { - v.value = val - v.isSet = true -} - -func (v Nullable{{classname}}) IsSet() bool { - return v.isSet -} - -func (v *Nullable{{classname}}) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullable{{classname}}(val *{{classname}}) *Nullable{{classname}} { - return &Nullable{{classname}}{value: val, isSet: true} -} - -func (v Nullable{{{classname}}}) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *Nullable{{{classname}}}) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk-resources/resources/model_oneof.mustache b/sdk-resources/resources/model_oneof.mustache deleted file mode 100644 index 8366014..0000000 --- a/sdk-resources/resources/model_oneof.mustache +++ /dev/null @@ -1,144 +0,0 @@ -// {{classname}} - {{{description}}}{{^description}}struct for {{{classname}}}{{/description}} -type {{classname}} struct { - {{#oneOf}} - {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} *{{{.}}} - {{/oneOf}} -} - -{{#oneOf}} -// {{{.}}}As{{classname}} is a convenience function that returns {{{.}}} wrapped in {{classname}} -func {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}As{{classname}}(v *{{{.}}}) {{classname}} { - return {{classname}}{ - {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}: v, - } -} - -{{/oneOf}} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *{{classname}}) UnmarshalJSON(data []byte) error { - var err error - {{#isNullable}} - // this object is nullable so check if the payload is null or empty string - if string(data) == "" || string(data) == "{}" { - return nil - } - - {{/isNullable}} - {{#useOneOfDiscriminatorLookup}} - {{#discriminator}} - {{#mappedModels}} - {{#-first}} - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - {{/-first}} - // check if the discriminator value is '{{{mappingName}}}' - if jsonDict["{{{propertyBaseName}}}"] == "{{{mappingName}}}" { - // try to unmarshal JSON data into {{{modelName}}} - err = json.Unmarshal(data, &dst.{{{modelName}}}) - if err == nil { - return nil // data stored in dst.{{{modelName}}}, return on the first match - } else { - dst.{{{modelName}}} = nil - return fmt.Errorf("failed to unmarshal {{classname}} as {{{modelName}}}: %s", err.Error()) - } - } - - {{/mappedModels}} - return nil - {{/discriminator}} - {{^discriminator}} - match := 0 - {{#oneOf}} - // try to unmarshal data into {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} - err = json.Unmarshal(data, &dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) - if err == nil { - json{{{.}}}, _ := json.Marshal(dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) - if string(json{{{.}}}) == "{}" { // empty struct - dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil - } else { - match++ - } - } else { - dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil - } - - {{/oneOf}} - if match > 1 { // more than 1 match - // reset to nil - {{#oneOf}} - dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil - {{/oneOf}} - - return fmt.Errorf("data matches more than one schema in oneOf({{classname}})") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf({{classname}})") - } - {{/discriminator}} - {{/useOneOfDiscriminatorLookup}} - {{^useOneOfDiscriminatorLookup}} - match := 0 - {{#oneOf}} - // try to unmarshal data into {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} - err = newStrictDecoder(data).Decode(&dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) - if err == nil { - json{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}, _ := json.Marshal(dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) - if string(json{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) == "{}" { // empty struct - dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil - } else { - match++ - } - } else { - dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil - } - - {{/oneOf}} - if match > 1 { // more than 1 match - // reset to nil - {{#oneOf}} - dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil - {{/oneOf}} - - return fmt.Errorf("data matches more than one schema in oneOf({{classname}})") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf({{classname}})") - } - {{/useOneOfDiscriminatorLookup}} -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src {{classname}}) MarshalJSON() ([]byte, error) { -{{#oneOf}} - if src.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} != nil { - return json.Marshal(&src.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) - } - -{{/oneOf}} - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *{{classname}}) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } -{{#oneOf}} - if obj.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} != nil { - return obj.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} - } - -{{/oneOf}} - // all schemas are nil - return nil -} - -{{>nullable_model}} diff --git a/sdk-resources/resources/model_simple.mustache b/sdk-resources/resources/model_simple.mustache deleted file mode 100644 index dab19a2..0000000 --- a/sdk-resources/resources/model_simple.mustache +++ /dev/null @@ -1,455 +0,0 @@ -// checks if the {{classname}} type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &{{classname}}{} - -// {{classname}} {{{description}}}{{^description}}struct for {{{classname}}}{{/description}} -type {{classname}} struct { -{{#parent}} -{{^isMap}} -{{^isArray}} - {{{parent}}} -{{/isArray}} -{{/isMap}} -{{#isArray}} - Items {{{parent}}} -{{/isArray}} -{{/parent}} -{{#vars}} -{{^-first}} -{{/-first}} -{{#description}} - // {{{.}}} -{{/description}} -{{#deprecated}} - // Deprecated -{{/deprecated}} - {{name}} {{^required}}{{^isNullable}}{{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{/isNullable}}{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` -{{/vars}} -{{#isAdditionalPropertiesTrue}} - AdditionalProperties map[string]interface{} -{{/isAdditionalPropertiesTrue}} -} - -{{#isAdditionalPropertiesTrue}} -type _{{{classname}}} {{{classname}}} - -{{/isAdditionalPropertiesTrue}} -// New{{classname}} instantiates a new {{classname}} object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func New{{classname}}({{#requiredVars}}{{nameInCamelCase}} {{dataType}}{{^-last}}, {{/-last}}{{/requiredVars}}) *{{classname}} { - this := {{classname}}{} -{{#allVars}} -{{#required}} - this.{{name}} = {{nameInCamelCase}} -{{/required}} -{{^required}} -{{#defaultValue}} -{{^vendorExtensions.x-golang-is-container}} -{{^isReadOnly}} -{{#isNullable}} - var {{nameInCamelCase}} {{{datatypeWithEnum}}} = {{{.}}} - this.{{name}} = *New{{{dataType}}}(&{{nameInCamelCase}}) -{{/isNullable}} -{{^isNullable}} - var {{nameInCamelCase}} {{{dataType}}} = {{{.}}} - this.{{name}} = &{{nameInCamelCase}} -{{/isNullable}} -{{/isReadOnly}} -{{/vendorExtensions.x-golang-is-container}} -{{/defaultValue}} -{{/required}} -{{/allVars}} - return &this -} - -// New{{classname}}WithDefaults instantiates a new {{classname}} object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func New{{classname}}WithDefaults() *{{classname}} { - this := {{classname}}{} -{{#vars}} -{{#defaultValue}} -{{^vendorExtensions.x-golang-is-container}} -{{^isReadOnly}} -{{#isNullable}} -{{!we use datatypeWithEnum here, since it will represent the non-nullable name of the datatype, e.g. int64 for NullableInt64}} - var {{nameInCamelCase}} {{{datatypeWithEnum}}} = {{{.}}} - this.{{name}} = *New{{{dataType}}}(&{{nameInCamelCase}}) -{{/isNullable}} -{{^isNullable}} - var {{nameInCamelCase}} {{{dataType}}} = {{{.}}} - this.{{name}} = {{^required}}&{{/required}}{{nameInCamelCase}} -{{/isNullable}} -{{/isReadOnly}} -{{/vendorExtensions.x-golang-is-container}} -{{/defaultValue}} -{{/vars}} - return &this -} - -{{#vars}} -{{#required}} -// Get{{name}} returns the {{name}} field value -{{#isNullable}} -// If the value is explicit nil, the zero value for {{vendorExtensions.x-go-base-type}} will be returned -{{/isNullable}} -{{#deprecated}} -// Deprecated -{{/deprecated}} -func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} { - if o == nil{{#isNullable}}{{^vendorExtensions.x-golang-is-container}} || o.{{name}}.Get() == nil{{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { - var ret {{vendorExtensions.x-go-base-type}} - return ret - } - -{{#isNullable}} -{{#vendorExtensions.x-golang-is-container}} - return o.{{name}} -{{/vendorExtensions.x-golang-is-container}} -{{^vendorExtensions.x-golang-is-container}} - return *o.{{name}}.Get() -{{/vendorExtensions.x-golang-is-container}} -{{/isNullable}} -{{^isNullable}} - return o.{{name}} -{{/isNullable}} -} - -// Get{{name}}Ok returns a tuple with the {{name}} field value -// and a boolean to check if the value has been set. -{{#isNullable}} -// NOTE: If the value is an explicit nil, `nil, true` will be returned -{{/isNullable}} -{{#deprecated}} -// Deprecated -{{/deprecated}} -func (o *{{classname}}) Get{{name}}Ok() ({{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{vendorExtensions.x-go-base-type}}, bool) { - if o == nil{{#isNullable}}{{#vendorExtensions.x-golang-is-container}} || isNil(o.{{name}}){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { -{{^isFreeFormObject}} - return nil, false - {{/isFreeFormObject}} - {{#isFreeFormObject}} - return {{vendorExtensions.x-go-base-type}}{}, false - {{/isFreeFormObject}} - } -{{#isNullable}} -{{#vendorExtensions.x-golang-is-container}} - return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true -{{/vendorExtensions.x-golang-is-container}} -{{^vendorExtensions.x-golang-is-container}} - return o.{{name}}.Get(), o.{{name}}.IsSet() -{{/vendorExtensions.x-golang-is-container}} -{{/isNullable}} -{{^isNullable}} - return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true -{{/isNullable}} -} - -// Set{{name}} sets field value -{{#deprecated}} -// Deprecated -{{/deprecated}} -func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}}) { -{{#isNullable}} -{{#vendorExtensions.x-golang-is-container}} - o.{{name}} = v -{{/vendorExtensions.x-golang-is-container}} -{{^vendorExtensions.x-golang-is-container}} - o.{{name}}.Set(&v) -{{/vendorExtensions.x-golang-is-container}} -{{/isNullable}} -{{^isNullable}} - o.{{name}} = v -{{/isNullable}} -} - -{{/required}} -{{^required}} -// Get{{name}} returns the {{name}} field value if set, zero value otherwise{{#isNullable}} (both if not set or set to explicit null){{/isNullable}}. -{{#deprecated}} -// Deprecated -{{/deprecated}} -func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} { - if o == nil{{^isNullable}} || isNil(o.{{name}}){{/isNullable}}{{#isNullable}}{{^vendorExtensions.x-golang-is-container}} || isNil(o.{{name}}.Get()){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { - var ret {{vendorExtensions.x-go-base-type}} - return ret - } -{{#isNullable}} -{{#vendorExtensions.x-golang-is-container}} - return o.{{name}} -{{/vendorExtensions.x-golang-is-container}} -{{^vendorExtensions.x-golang-is-container}} - return *o.{{name}}.Get() -{{/vendorExtensions.x-golang-is-container}} -{{/isNullable}} -{{^isNullable}} - return {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}o.{{name}} -{{/isNullable}} -} - -// Get{{name}}Ok returns a tuple with the {{name}} field value if set, nil otherwise -// and a boolean to check if the value has been set. -{{#isNullable}} -// NOTE: If the value is an explicit nil, `nil, true` will be returned -{{/isNullable}} -{{#deprecated}} -// Deprecated -{{/deprecated}} -func (o *{{classname}}) Get{{name}}Ok() ({{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{vendorExtensions.x-go-base-type}}, bool) { - if o == nil{{^isNullable}} || isNil(o.{{name}}){{/isNullable}}{{#isNullable}}{{#vendorExtensions.x-golang-is-container}} || isNil(o.{{name}}){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { - {{^isFreeFormObject}} - return nil, false - {{/isFreeFormObject}} - {{#isFreeFormObject}} - return {{vendorExtensions.x-go-base-type}}{}, false - {{/isFreeFormObject}} - } -{{#isNullable}} -{{#vendorExtensions.x-golang-is-container}} - return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true -{{/vendorExtensions.x-golang-is-container}} -{{^vendorExtensions.x-golang-is-container}} - return o.{{name}}.Get(), o.{{name}}.IsSet() -{{/vendorExtensions.x-golang-is-container}} -{{/isNullable}} -{{^isNullable}} - return o.{{name}}, true -{{/isNullable}} -} - -// Has{{name}} returns a boolean if a field has been set. -func (o *{{classname}}) Has{{name}}() bool { - if o != nil && {{^isNullable}}!isNil(o.{{name}}){{/isNullable}}{{#isNullable}}{{#vendorExtensions.x-golang-is-container}}isNil(o.{{name}}){{/vendorExtensions.x-golang-is-container}}{{^vendorExtensions.x-golang-is-container}}o.{{name}}.IsSet(){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { - return true - } - - return false -} - -// Set{{name}} gets a reference to the given {{dataType}} and assigns it to the {{name}} field. -{{#deprecated}} -// Deprecated -{{/deprecated}} -func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}}) { -{{#isNullable}} -{{#vendorExtensions.x-golang-is-container}} - o.{{name}} = v -{{/vendorExtensions.x-golang-is-container}} -{{^vendorExtensions.x-golang-is-container}} - o.{{name}}.Set({{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}v) -{{/vendorExtensions.x-golang-is-container}} -{{/isNullable}} -{{^isNullable}} - o.{{name}} = {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}v -{{/isNullable}} -} -{{#isNullable}} -{{^vendorExtensions.x-golang-is-container}} -// Set{{name}}Nil sets the value for {{name}} to be an explicit nil -func (o *{{classname}}) Set{{name}}Nil() { - o.{{name}}.Set(nil) -} - -// Unset{{name}} ensures that no value is present for {{name}}, not even an explicit nil -func (o *{{classname}}) Unset{{name}}() { - o.{{name}}.Unset() -} -{{/vendorExtensions.x-golang-is-container}} -{{/isNullable}} - -{{/required}} -{{/vars}} -func (o {{classname}}) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o {{classname}}) ToMap() (map[string]interface{}, error) { - toSerialize := {{#isArray}}make([]interface{}, len(o.Items)){{/isArray}}{{^isArray}}map[string]interface{}{}{{/isArray}} - {{#parent}} - {{^isMap}} - {{^isArray}} - serialized{{parent}}, err{{parent}} := json.Marshal(o.{{parent}}) - if err{{parent}} != nil { - return map[string]interface{}{}, err{{parent}} - } - err{{parent}} = json.Unmarshal([]byte(serialized{{parent}}), &toSerialize) - if err{{parent}} != nil { - return map[string]interface{}{}, err{{parent}} - } - {{/isArray}} - {{/isMap}} - {{#isArray}} - for i, item := range o.Items { - toSerialize[i] = item - } - {{/isArray}} - {{/parent}} - {{#vars}} - {{! if argument is nullable, only serialize it if it is set}} - {{#isNullable}} - {{#vendorExtensions.x-golang-is-container}} - {{! support for container fields is not ideal at this point because of lack of Nullable* types}} - if o.{{name}} != nil { - toSerialize["{{baseName}}"] = o.{{name}} - } - {{/vendorExtensions.x-golang-is-container}} - {{^vendorExtensions.x-golang-is-container}} - {{#required}} - toSerialize["{{baseName}}"] = o.{{name}}.Get() - {{/required}} - {{^required}} - if o.{{name}}.IsSet() { - toSerialize["{{baseName}}"] = o.{{name}}.Get() - } - {{/required}} - {{/vendorExtensions.x-golang-is-container}} - {{/isNullable}} - {{! if argument is not nullable, don't set it if it is nil}} - {{^isNullable}} - {{^isReadOnly}} - {{#required}} - toSerialize["{{baseName}}"] = o.{{name}} - {{/required}} - {{^required}} - if !isNil(o.{{name}}) { - toSerialize["{{baseName}}"] = o.{{name}} - } - {{/required}} - {{/isReadOnly}} - {{#isReadOnly}} - // skip: {{baseName}} is readOnly - {{/isReadOnly}} - {{/isNullable}} - {{/vars}} - {{#isAdditionalPropertiesTrue}} - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - {{/isAdditionalPropertiesTrue}} - return toSerialize, nil -} - -{{#isAdditionalPropertiesTrue}} -func (o *{{{classname}}}) UnmarshalJSON(bytes []byte) (err error) { -{{#parent}} -{{^isMap}} - type {{classname}}WithoutEmbeddedStruct struct { - {{#vars}} - {{^-first}} - {{/-first}} - {{#description}} - // {{{.}}} - {{/description}} - {{#deprecated}} - // Deprecated - {{/deprecated}} - {{name}} {{^required}}{{^isNullable}}{{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{/isNullable}}{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` - {{/vars}} - } - - var{{{classname}}}WithoutEmbeddedStruct := {{{classname}}}WithoutEmbeddedStruct{} - - err = json.Unmarshal(bytes, &var{{{classname}}}WithoutEmbeddedStruct) - if err == nil { - var{{{classname}}} := _{{{classname}}}{} - {{#vars}} - var{{{classname}}}.{{{name}}} = var{{{classname}}}WithoutEmbeddedStruct.{{{name}}} - {{/vars}} - *o = {{{classname}}}(var{{{classname}}}) - } else { - return err - } - - var{{{classname}}} := _{{{classname}}}{} - - err = json.Unmarshal(bytes, &var{{{classname}}}) - if err == nil { - o.{{{parent}}} = var{{{classname}}}.{{{parent}}} - } else { - return err - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - {{#vars}} - delete(additionalProperties, "{{{baseName}}}") - {{/vars}} - - // remove fields from embedded structs - reflect{{{parent}}} := reflect.ValueOf(o.{{{parent}}}) - for i := 0; i < reflect{{{parent}}}.Type().NumField(); i++ { - t := reflect{{{parent}}}.Type().Field(i) - - if jsonTag := t.Tag.Get("json"); jsonTag != "" { - fieldName := "" - if commaIdx := strings.Index(jsonTag, ","); commaIdx > 0 { - fieldName = jsonTag[:commaIdx] - } else { - fieldName = jsonTag - } - if fieldName != "AdditionalProperties" { - delete(additionalProperties, fieldName) - } - } - } - - o.AdditionalProperties = additionalProperties - } - - return err -{{/isMap}} -{{#isMap}} - var{{{classname}}} := _{{{classname}}}{} - - if err = json.Unmarshal(bytes, &var{{{classname}}}); err == nil { - *o = {{{classname}}}(var{{{classname}}}) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - {{#vars}} - delete(additionalProperties, "{{{baseName}}}") - {{/vars}} - o.AdditionalProperties = additionalProperties - } - - return err -{{/isMap}} -{{/parent}} -{{^parent}} - var{{{classname}}} := _{{{classname}}}{} - - if err = json.Unmarshal(bytes, &var{{{classname}}}); err == nil { - *o = {{{classname}}}(var{{{classname}}}) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - {{#vars}} - delete(additionalProperties, "{{{baseName}}}") - {{/vars}} - o.AdditionalProperties = additionalProperties - } - - return err -{{/parent}} -} - -{{/isAdditionalPropertiesTrue}} -{{#isArray}} -func (o *{{{classname}}}) UnmarshalJSON(bytes []byte) (err error) { - return json.Unmarshal(bytes, &o.Items) -} - -{{/isArray}} -{{>nullable_model}} diff --git a/sdk-resources/resources/nullable_model.mustache b/sdk-resources/resources/nullable_model.mustache deleted file mode 100644 index 7b60ce6..0000000 --- a/sdk-resources/resources/nullable_model.mustache +++ /dev/null @@ -1,35 +0,0 @@ -type Nullable{{{classname}}} struct { - value {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{{classname}}} - isSet bool -} - -func (v Nullable{{classname}}) Get() {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}} { - return v.value -} - -func (v *Nullable{{classname}}) Set(val {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}}) { - v.value = val - v.isSet = true -} - -func (v Nullable{{classname}}) IsSet() bool { - return v.isSet -} - -func (v *Nullable{{classname}}) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullable{{classname}}(val {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}}) *Nullable{{classname}} { - return &Nullable{{classname}}{value: val, isSet: true} -} - -func (v Nullable{{{classname}}}) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *Nullable{{{classname}}}) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk-resources/resources/openapi.mustache b/sdk-resources/resources/openapi.mustache deleted file mode 100644 index 51ebafb..0000000 --- a/sdk-resources/resources/openapi.mustache +++ /dev/null @@ -1 +0,0 @@ -{{{openapi-yaml}}} \ No newline at end of file diff --git a/sdk-resources/resources/partial_header.mustache b/sdk-resources/resources/partial_header.mustache deleted file mode 100644 index d8f219c..0000000 --- a/sdk-resources/resources/partial_header.mustache +++ /dev/null @@ -1,18 +0,0 @@ -/* -{{#appName}} -{{{.}}} - -{{/appName}} -{{#appDescription}} -{{{.}}} - -{{/appDescription}} -{{#version}} -API version: {{{.}}} -{{/version}} -{{#infoEmail}} -Contact: {{{.}}} -{{/infoEmail}} -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/sdk-resources/resources/response.mustache b/sdk-resources/resources/response.mustache deleted file mode 100644 index 4691e8f..0000000 --- a/sdk-resources/resources/response.mustache +++ /dev/null @@ -1,38 +0,0 @@ -{{>partial_header}} -package {{packageName}} - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/sdk-resources/resources/signing.mustache b/sdk-resources/resources/signing.mustache deleted file mode 100644 index d11d1cb..0000000 --- a/sdk-resources/resources/signing.mustache +++ /dev/null @@ -1,446 +0,0 @@ -{{>partial_header}} -package {{packageName}} - -import ( - "bytes" - "context" - "crypto" - "crypto/ecdsa" - "crypto/ed25519" - "crypto/rand" - "crypto/rsa" - "crypto/x509" - "encoding/base64" - "encoding/pem" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/textproto" - "os" - "strings" - "time" -) - -const ( - // Constants for HTTP signature parameters. - // The '(request-target)' parameter concatenates the lowercased :method, an - // ASCII space, and the :path pseudo-headers. - HttpSignatureParameterRequestTarget string = "(request-target)" - // The '(created)' parameter expresses when the signature was - // created. The value MUST be a Unix timestamp integer value. - HttpSignatureParameterCreated string = "(created)" - // The '(expires)' parameter expresses when the signature ceases to - // be valid. The value MUST be a Unix timestamp integer value. - HttpSignatureParameterExpires string = "(expires)" -) - -const ( - // Constants for HTTP headers. - // The 'Host' header, as defined in RFC 2616, section 14.23. - HttpHeaderHost string = "Host" - // The 'Date' header. - HttpHeaderDate string = "Date" - // The digest header, as defined in RFC 3230, section 4.3.2. - HttpHeaderDigest string = "Digest" - // The HTTP Authorization header, as defined in RFC 7235, section 4.2. - HttpHeaderAuthorization string = "Authorization" -) - -const ( - // Specifies the Digital Signature Algorithm is derived from metadata - // associated with 'keyId'. Supported DSA algorithms are RSASSA-PKCS1-v1_5, - // RSASSA-PSS, and ECDSA. - // The hash is SHA-512. - // This is the default value. - HttpSigningSchemeHs2019 string = "hs2019" - // Use RSASSA-PKCS1-v1_5 with SHA-512 hash. Deprecated. - HttpSigningSchemeRsaSha512 string = "rsa-sha512" - // Use RSASSA-PKCS1-v1_5 with SHA-256 hash. Deprecated. - HttpSigningSchemeRsaSha256 string = "rsa-sha256" - - // RFC 8017 section 7.2 - // Calculate the message signature using RSASSA-PKCS1-V1_5-SIGN from RSA PKCS#1 v1.5. - // PKCSV1_5 is deterministic. The same message and key will produce an identical - // signature value each time. - HttpSigningAlgorithmRsaPKCS1v15 string = "RSASSA-PKCS1-v1_5" - // Calculate the message signature using probabilistic signature scheme RSASSA-PSS. - // PSS is randomized and will produce a different signature value each time. - HttpSigningAlgorithmRsaPSS string = "RSASSA-PSS" - - // HashAlgorithm Sha256 for generating hash - HttpHashAlgorithmSha256 string = "sha256" - - // HashAlgorithm Sha512 for generating hash - HttpHashAlgorithmSha512 string = "sha512" -) - -var supportedSigningSchemes = map[string]bool{ - HttpSigningSchemeHs2019: true, - HttpSigningSchemeRsaSha512: true, - HttpSigningSchemeRsaSha256: true, -} - - -// HttpSignatureAuth provides HTTP signature authentication to a request passed -// via context using ContextHttpSignatureAuth. -// An 'Authorization' header is calculated by creating a hash of select headers, -// and optionally the body of the HTTP request, then signing the hash value using -// a private key which is available to the client. -// -// SignedHeaders specifies the list of HTTP headers that are included when generating -// the message signature. -// The two special signature headers '(request-target)' and '(created)' SHOULD be -// included in SignedHeaders. -// The '(created)' header expresses when the signature was created. -// The '(request-target)' header is a concatenation of the lowercased :method, an -// ASCII space, and the :path pseudo-headers. -// -// For example, SignedHeaders can be set to: -// (request-target) (created) date host digest -// -// When SignedHeaders is not specified, the client defaults to a single value, '(created)', -// in the list of HTTP headers. -// When SignedHeaders contains the 'Digest' value, the client performs the following operations: -// 1. Calculate a digest of request body, as specified in RFC3230, section 4.3.2. -// 2. Set the 'Digest' header in the request body. -// 3. Include the 'Digest' header and value in the HTTP signature. -type HttpSignatureAuth struct { - KeyId string // A key identifier. - PrivateKeyPath string // The path to the private key. - Passphrase string // The passphrase to decrypt the private key, if the key is encrypted. - SigningScheme string // The signature scheme, when signing HTTP requests. Supported value is 'hs2019'. - // The signature algorithm, when signing HTTP requests. - // Supported values are RSASSA-PKCS1-v1_5, RSASSA-PSS. - SigningAlgorithm string - HashAlgorithm string // supported values are sha256 and sha512. This also allows using sha256 with hs2019, which defaults to sha512. - SignedHeaders []string // A list of HTTP headers included when generating the signature for the message. - // SignatureMaxValidity specifies the maximum duration of the signature validity. - // The value is used to set the '(expires)' signature parameter in the HTTP request. - // '(expires)' is set to '(created)' plus the value of the SignatureMaxValidity field. - // To specify the '(expires)' signature parameter, set 'SignatureMaxValidity' and add '(expires)' to 'SignedHeaders'. - SignatureMaxValidity time.Duration - privateKey crypto.PrivateKey // The private key used to sign HTTP requests. -} - -// SetPrivateKey accepts a private key string and sets it. -func (h *HttpSignatureAuth) SetPrivateKey(privateKey string) error { - return h.parsePrivateKey([]byte(privateKey)) -} - -// ContextWithValue validates the HttpSignatureAuth configuration parameters and returns a context -// suitable for HTTP signature. An error is returned if the HttpSignatureAuth configuration parameters -// are invalid. -func (h *HttpSignatureAuth) ContextWithValue(ctx context.Context) (context.Context, error) { - if h.KeyId == "" { - return nil, fmt.Errorf("key ID must be specified") - } - if h.PrivateKeyPath == "" && h.privateKey == nil { - return nil, fmt.Errorf("private key path must be specified") - } - if _, ok := supportedSigningSchemes[h.SigningScheme]; !ok { - return nil, fmt.Errorf("invalid signing scheme: '%v'", h.SigningScheme) - } - m := make(map[string]bool) - for _, h := range h.SignedHeaders { - if strings.EqualFold(h, HttpHeaderAuthorization) { - return nil, fmt.Errorf("signed headers cannot include the 'Authorization' header") - } - m[h] = true - } - if len(m) != len(h.SignedHeaders) { - return nil, fmt.Errorf("list of signed headers cannot have duplicate names") - } - if h.SignatureMaxValidity < 0 { - return nil, fmt.Errorf("signature max validity must be a positive value") - } - if err := h.loadPrivateKey(); err != nil { - return nil, err - } - return context.WithValue(ctx, ContextHttpSignatureAuth, *h), nil -} - -// GetPublicKey returns the public key associated with this HTTP signature configuration. -func (h *HttpSignatureAuth) GetPublicKey() (crypto.PublicKey, error) { - if h.privateKey == nil { - if err := h.loadPrivateKey(); err != nil { - return nil, err - } - } - switch key := h.privateKey.(type) { - case *rsa.PrivateKey: - return key.Public(), nil - case *ecdsa.PrivateKey: - return key.Public(), nil - default: - // Do not change '%T' to anything else such as '%v'! - // The value of the private key must not be returned. - return nil, fmt.Errorf("unsupported key: %T", h.privateKey) - } -} - -// loadPrivateKey reads the private key from the file specified in the HttpSignatureAuth. -// The key is loaded only when privateKey is not already set. -func (h *HttpSignatureAuth) loadPrivateKey() (err error) { - if h.privateKey != nil { - return nil - } - var file *os.File - file, err = os.Open(h.PrivateKeyPath) - if err != nil { - return fmt.Errorf("cannot load private key '%s'. Error: %v", h.PrivateKeyPath, err) - } - defer func() { - err = file.Close() - }() - var priv []byte - priv, err = ioutil.ReadAll(file) - if err != nil { - return err - } - return h.parsePrivateKey(priv) -} - -// parsePrivateKey decodes privateKey byte array to crypto.PrivateKey type. -func (h *HttpSignatureAuth) parsePrivateKey(priv []byte) error { - pemBlock, _ := pem.Decode(priv) - if pemBlock == nil { - // No PEM data has been found. - return fmt.Errorf("file '%s' does not contain PEM data", h.PrivateKeyPath) - } - var privKey []byte - var err error - if x509.IsEncryptedPEMBlock(pemBlock) { - // The PEM data is encrypted. - privKey, err = x509.DecryptPEMBlock(pemBlock, []byte(h.Passphrase)) - if err != nil { - // Failed to decrypt PEM block. Because of deficiencies in the encrypted-PEM format, - // it's not always possible to detect an incorrect password. - return err - } - } else { - privKey = pemBlock.Bytes - } - switch pemBlock.Type { - case "RSA PRIVATE KEY": - if h.privateKey, err = x509.ParsePKCS1PrivateKey(privKey); err != nil { - return err - } - case "EC PRIVATE KEY", "PRIVATE KEY": - // https://tools.ietf.org/html/rfc5915 section 4. - if h.privateKey, err = x509.ParsePKCS8PrivateKey(privKey); err != nil { - return err - } - default: - return fmt.Errorf("key '%s' is not supported", pemBlock.Type) - } - return nil -} - -// SignRequest signs the request using HTTP signature. -// See https://datatracker.ietf.org/doc/draft-cavage-http-signatures/ -// -// Do not add, remove or change headers that are included in the SignedHeaders -// after SignRequest has been invoked; this is because the header values are -// included in the signature. Any subsequent alteration will cause a signature -// verification failure. -// If there are multiple instances of the same header field, all -// header field values associated with the header field MUST be -// concatenated, separated by a ASCII comma and an ASCII space -// ', ', and used in the order in which they will appear in the -// transmitted HTTP message. -func SignRequest( - ctx context.Context, - r *http.Request, - auth HttpSignatureAuth) error { - - if auth.privateKey == nil { - return fmt.Errorf("private key is not set") - } - now := time.Now() - date := now.UTC().Format(http.TimeFormat) - // The 'created' field expresses when the signature was created. - // The value MUST be a Unix timestamp integer value. See 'HTTP signature' section 2.1.4. - created := now.Unix() - - var h crypto.Hash - var err error - var prefix string - var expiresUnix float64 - - if auth.SignatureMaxValidity < 0 { - return fmt.Errorf("signature validity must be a positive value") - } - if auth.SignatureMaxValidity > 0 { - e := now.Add(auth.SignatureMaxValidity) - expiresUnix = float64(e.Unix()) + float64(e.Nanosecond()) / float64(time.Second) - } - // Determine the cryptographic hash to be used for the signature and the body digest. - switch auth.SigningScheme { - case HttpSigningSchemeRsaSha512: - h = crypto.SHA512 - prefix = "SHA-512=" - case HttpSigningSchemeRsaSha256: - // This is deprecated and should no longer be used. - h = crypto.SHA256 - prefix = "SHA-256=" - case HttpSigningSchemeHs2019: - if auth.HashAlgorithm == HttpHashAlgorithmSha256 { - h = crypto.SHA256 - prefix = "SHA-256=" - } else { - h = crypto.SHA512 - prefix = "SHA-512=" - } - - default: - return fmt.Errorf("unsupported signature scheme: %v", auth.SigningScheme) - } - if !h.Available() { - return fmt.Errorf("hash '%v' is not available", h) - } - - // Build the "(request-target)" signature header. - var sb bytes.Buffer - fmt.Fprintf(&sb, "%s %s", strings.ToLower(r.Method), r.URL.EscapedPath()) - if r.URL.RawQuery != "" { - // The ":path" pseudo-header field includes the path and query parts - // of the target URI (the "path-absolute" production and optionally a - // '?' character followed by the "query" production (see Sections 3.3 - // and 3.4 of [RFC3986] - fmt.Fprintf(&sb, "?%s", r.URL.RawQuery) - } - requestTarget := sb.String() - sb.Reset() - - // Build the string to be signed. - signedHeaders := auth.SignedHeaders - if len(signedHeaders) == 0 { - signedHeaders = []string{HttpSignatureParameterCreated} - } - // Validate the list of signed headers has no duplicates. - m := make(map[string]bool) - for _, h := range signedHeaders { - m[h] = true - } - if len(m) != len(signedHeaders) { - return fmt.Errorf("list of signed headers must not have any duplicates") - } - hasCreatedParameter := false - hasExpiresParameter := false - for i, header := range signedHeaders { - header = strings.ToLower(header) - var value string - switch header { - case strings.ToLower(HttpHeaderAuthorization): - return fmt.Errorf("cannot include the 'Authorization' header as a signed header") - case HttpSignatureParameterRequestTarget: - value = requestTarget - case HttpSignatureParameterCreated: - value = fmt.Sprintf("%d", created) - hasCreatedParameter = true - case HttpSignatureParameterExpires: - if auth.SignatureMaxValidity.Nanoseconds() == 0 { - return fmt.Errorf("cannot set '(expires)' signature parameter. SignatureMaxValidity is not configured") - } - value = fmt.Sprintf("%.3f", expiresUnix) - hasExpiresParameter = true - case "date": - value = date - r.Header.Set(HttpHeaderDate, date) - case "digest": - // Calculate the digest of the HTTP request body. - // Calculate body digest per RFC 3230 section 4.3.2 - bodyHash := h.New() - if r.Body != nil { - // Make a copy of the body io.Reader so that we can read the body to calculate the hash, - // then one more time when marshaling the request. - var body io.Reader - body, err = r.GetBody() - if err != nil { - return err - } - if _, err = io.Copy(bodyHash, body); err != nil { - return err - } - } - d := bodyHash.Sum(nil) - value = prefix + base64.StdEncoding.EncodeToString(d) - r.Header.Set(HttpHeaderDigest, value) - case "host": - value = r.Host - r.Header.Set(HttpHeaderHost, r.Host) - default: - var ok bool - var v []string - canonicalHeader := textproto.CanonicalMIMEHeaderKey(header) - if v, ok = r.Header[canonicalHeader]; !ok { - // If a header specified in the headers parameter cannot be matched with - // a provided header in the message, the implementation MUST produce an error. - return fmt.Errorf("header '%s' does not exist in the request", canonicalHeader) - } - // If there are multiple instances of the same header field, all - // header field values associated with the header field MUST be - // concatenated, separated by a ASCII comma and an ASCII space - // `, `, and used in the order in which they will appear in the - // transmitted HTTP message. - value = strings.Join(v, ", ") - } - if i > 0 { - fmt.Fprintf(&sb, "\n") - } - fmt.Fprintf(&sb, "%s: %s", header, value) - } - if expiresUnix != 0 && !hasExpiresParameter { - return fmt.Errorf("signatureMaxValidity is specified, but '(expired)' parameter is not present") - } - msg := []byte(sb.String()) - msgHash := h.New() - if _, err = msgHash.Write(msg); err != nil { - return err - } - d := msgHash.Sum(nil) - - var signature []byte - switch key := auth.privateKey.(type) { - case *rsa.PrivateKey: - switch auth.SigningAlgorithm { - case HttpSigningAlgorithmRsaPKCS1v15: - signature, err = rsa.SignPKCS1v15(rand.Reader, key, h, d) - case "", HttpSigningAlgorithmRsaPSS: - signature, err = rsa.SignPSS(rand.Reader, key, h, d, nil) - default: - return fmt.Errorf("unsupported signing algorithm: '%s'", auth.SigningAlgorithm) - } - case *ecdsa.PrivateKey: - signature, err = key.Sign(rand.Reader, d, h) - case ed25519.PrivateKey: // requires go 1.13 - signature, err = key.Sign(rand.Reader, msg, crypto.Hash(0)) - default: - return fmt.Errorf("unsupported private key") - } - if err != nil { - return err - } - - sb.Reset() - for i, header := range signedHeaders { - if i > 0 { - sb.WriteRune(' ') - } - sb.WriteString(strings.ToLower(header)) - } - headers_list := sb.String() - sb.Reset() - fmt.Fprintf(&sb, `Signature keyId="%s",algorithm="%s",`, auth.KeyId, auth.SigningScheme) - if hasCreatedParameter { - fmt.Fprintf(&sb, "created=%d,", created) - } - if hasExpiresParameter { - fmt.Fprintf(&sb, "expires=%.3f,", expiresUnix) - } - fmt.Fprintf(&sb, `headers="%s",signature="%s"`, headers_list, base64.StdEncoding.EncodeToString(signature)) - authStr := sb.String() - r.Header.Set(HttpHeaderAuthorization, authStr) - return nil -} diff --git a/sdk-resources/resources/utils.mustache b/sdk-resources/resources/utils.mustache deleted file mode 100644 index 5e97b9d..0000000 --- a/sdk-resources/resources/utils.mustache +++ /dev/null @@ -1,338 +0,0 @@ -{{>partial_header}} -package {{packageName}} - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// isNil checks if an input is nil -func isNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -}