ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.148.0

This commit is contained in:
speakeasybot
2024-01-22 17:17:00 +00:00
parent a06808d74e
commit 37ef8aa8ec
35 changed files with 6299 additions and 630 deletions

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: e742591b-391d-4f4e-8484-d01a093b32ec
management:
docChecksum: 1e8e82037a237e1d1467721fbd2c7ab0
docChecksum: 7aba498c024534142941d65a7c2e649c
docVersion: 0.0.3
speakeasyVersion: internal
generationVersion: 2.237.3
releaseVersion: 0.3.0
configChecksum: 870f0f2f99cd8c64af8475f2693673f7
releaseVersion: 0.3.1
configChecksum: 96cf52ff2db14b0d015b49a82209b77b
repoURL: https://github.com/LukeHagar/plexterraform.git
repoSubDirectory: .
published: true
@@ -123,8 +123,6 @@ generatedFiles:
- internal/sdk/pkg/models/operations/deletelibrary.go
- internal/sdk/pkg/models/operations/getlibraryitems.go
- internal/sdk/pkg/models/operations/refreshlibrary.go
- internal/sdk/pkg/models/operations/getlatestlibraryitems.go
- internal/sdk/pkg/models/operations/getcommonlibraryitems.go
- internal/sdk/pkg/models/operations/getmetadata.go
- internal/sdk/pkg/models/operations/getmetadatachildren.go
- internal/sdk/pkg/models/operations/getondeck.go

View File

@@ -61,7 +61,7 @@ terraform {
required_providers {
PlexAPI = {
source = "LukeHagar/PlexAPI"
version = "0.3.0"
version = "0.3.1"
}
}
}

View File

@@ -71,3 +71,11 @@ Based on:
- Speakeasy CLI 1.148.0 (2.237.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [terraform v0.3.0] .
## 2024-01-22 17:16:27
### Changes
Based on:
- OpenAPI Doc 0.0.3
- Speakeasy CLI 1.148.0 (2.237.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [terraform v0.3.1] .

View File

@@ -17,7 +17,7 @@ terraform {
required_providers {
PlexAPI = {
source = "LukeHagar/PlexAPI"
version = "0.3.0"
version = "0.3.1"
}
}
}

View File

@@ -2,7 +2,7 @@ terraform {
required_providers {
PlexAPI = {
source = "LukeHagar/PlexAPI"
version = "0.3.0"
version = "0.3.1"
}
}
}

View File

@@ -8,7 +8,7 @@ generation:
fixes:
nameResolutionDec2023: false
terraform:
version: 0.3.0
version: 0.3.1
author: LukeHagar
imports:
option: openapi

View File

@@ -68,9 +68,6 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, request operations.GetGlobalHu
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetGlobalHubsResponseBody
@@ -78,7 +75,20 @@ func (s *Hubs) GetGlobalHubs(ctx context.Context, request operations.GetGlobalHu
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetGlobalHubsHubsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
@@ -133,9 +143,6 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, request operations.GetLibrary
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetLibraryHubsResponseBody
@@ -143,7 +150,20 @@ func (s *Hubs) GetLibraryHubs(ctx context.Context, request operations.GetLibrary
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetLibraryHubsHubsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}

View File

@@ -229,28 +229,45 @@ func (s *Library) GetLibraries(ctx context.Context) (*operations.GetLibrariesRes
}
// 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:
// ## Library Details Endpoint
//
// - 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.
// This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
//
// - 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").
// The details include:
//
// - 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.
// ### Directories
// Organized into three categories:
//
// - 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.
// - **Primary Directories**:
// - Used in some clients for quick access to media subsets (e.g., "All", "On Deck").
// - Most can be replicated via media queries.
// - Customizable by users.
//
// - **Secondary Directories**:
// - Marked with `secondary="1"`.
// - Used in older clients for structured navigation.
//
// - **Special Directories**:
// - Includes a "By Folder" entry for filesystem-based browsing.
// - Contains an obsolete `search="1"` entry for on-the-fly search dialog creation.
//
// ### Types
// Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls:
//
// - **Type Object Attributes**:
// - `key`: Endpoint for the media list of this type.
// - `type`: Metadata type (if standard Plex type).
// - `title`: Title for this content type (e.g., "Movies").
//
// - **Filter Objects**:
// - Subset of the media query language.
// - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`.
//
// - **Sort Objects**:
// - Description of sort fields.
// - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`.
//
// > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered.
func (s *Library) GetLibrary(ctx context.Context, request operations.GetLibraryRequest) (*operations.GetLibraryResponse, error) {
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
url, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}", request, nil)
@@ -386,10 +403,30 @@ func (s *Library) DeleteLibrary(ctx context.Context, request operations.DeleteLi
}
// GetLibraryItems - Get Library Items
// This endpoint will return a list of library items filtered by the filter and type provided
// Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values:
// - `all`: All items in the section.
// - `unwatched`: Items that have not been played.
// - `newest`: Items that are recently released.
// - `recentlyAdded`: Items that are recently added to the library.
// - `recentlyViewed`: Items that were recently viewed.
// - `onDeck`: Items to continue watching.
// - `collection`: Items categorized by collection.
// - `edition`: Items categorized by edition.
// - `genre`: Items categorized by genre.
// - `year`: Items categorized by year of release.
// - `decade`: Items categorized by decade.
// - `director`: Items categorized by director.
// - `actor`: Items categorized by starring actor.
// - `country`: Items categorized by country of origin.
// - `contentRating`: Items categorized by content rating.
// - `rating`: Items categorized by rating.
// - `resolution`: Items categorized by resolution.
// - `firstCharacter`: Items categorized by the first letter.
// - `folder`: Items categorized by folder.
// - `search?type=1`: Search functionality within the section.
func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLibraryItemsRequest) (*operations.GetLibraryItemsResponse, error) {
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
url, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/all", request, nil)
url, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/{tag}", request, nil)
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
@@ -401,10 +438,6 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", s.sdkConfiguration.UserAgent)
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
@@ -431,9 +464,6 @@ func (s *Library) GetLibraryItems(ctx context.Context, request operations.GetLib
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetLibraryItemsResponseBody
@@ -511,138 +541,6 @@ func (s *Library) RefreshLibrary(ctx context.Context, request operations.Refresh
return res, nil
}
// GetLatestLibraryItems - Get Latest Library Items
// This endpoint will return a list of the latest library items filtered by the filter and type provided
func (s *Library) GetLatestLibraryItems(ctx context.Context, request operations.GetLatestLibraryItemsRequest) (*operations.GetLatestLibraryItemsResponse, error) {
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
url, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/latest", request, nil)
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", s.sdkConfiguration.UserAgent)
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
return nil, fmt.Errorf("error sending request: %w", err)
}
if httpRes == nil {
return nil, fmt.Errorf("error sending request: no response")
}
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
contentType := httpRes.Header.Get("Content-Type")
res := &operations.GetLatestLibraryItemsResponse{
StatusCode: httpRes.StatusCode,
ContentType: contentType,
RawResponse: httpRes,
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetLatestLibraryItemsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.Object = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
}
return res, nil
}
// GetCommonLibraryItems - Get Common Library Items
// Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter
func (s *Library) GetCommonLibraryItems(ctx context.Context, request operations.GetCommonLibraryItemsRequest) (*operations.GetCommonLibraryItemsResponse, error) {
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
url, err := utils.GenerateURL(ctx, baseURL, "/library/sections/{sectionId}/common", request, nil)
if err != nil {
return nil, fmt.Errorf("error generating URL: %w", err)
}
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", s.sdkConfiguration.UserAgent)
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
if err != nil {
return nil, fmt.Errorf("error sending request: %w", err)
}
if httpRes == nil {
return nil, fmt.Errorf("error sending request: no response")
}
rawBody, err := io.ReadAll(httpRes.Body)
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
contentType := httpRes.Header.Get("Content-Type")
res := &operations.GetCommonLibraryItemsResponse{
StatusCode: httpRes.StatusCode,
ContentType: contentType,
RawResponse: httpRes,
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
fallthrough
case httpRes.StatusCode == 404:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetCommonLibraryItemsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.Object = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
}
return res, nil
}
// GetMetadata - Get Items Metadata
// This endpoint will return the metadata of a library item specified with the ratingKey.
func (s *Library) GetMetadata(ctx context.Context, request operations.GetMetadataRequest) (*operations.GetMetadataResponse, error) {
@@ -685,9 +583,6 @@ func (s *Library) GetMetadata(ctx context.Context, request operations.GetMetadat
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetMetadataResponseBody
@@ -695,7 +590,20 @@ func (s *Library) GetMetadata(ctx context.Context, request operations.GetMetadat
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetMetadataLibraryResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
@@ -746,9 +654,6 @@ func (s *Library) GetMetadataChildren(ctx context.Context, request operations.Ge
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetMetadataChildrenResponseBody
@@ -756,7 +661,20 @@ func (s *Library) GetMetadataChildren(ctx context.Context, request operations.Ge
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetMetadataChildrenLibraryResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}

View File

@@ -88,18 +88,51 @@ func (s *Log) LogLine(ctx context.Context, request operations.LogLineRequest) (*
}
// 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.
func (s *Log) LogMultiLine(ctx context.Context) (*operations.LogMultiLineResponse, error) {
// This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
// It accepts a text/plain request body, where each line represents a distinct log entry.
// Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
//
// Log entries are separated by a newline character (`\n`).
// Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters.
// This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
//
// The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
// - `0`: Error - Critical issues that require immediate attention.
// - `1`: Warning - Important events that are not critical but may indicate potential issues.
// - `2`: Info - General informational messages about system operation.
// - `3`: Debug - Detailed information useful for debugging purposes.
// - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis.
//
// The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module).
//
// Example of a single log entry format:
// `level=4&message=Sample%20log%20entry&source=applicationName`
//
// Ensure each parameter is properly URL-encoded to avoid interpretation issues.
func (s *Log) LogMultiLine(ctx context.Context, request string) (*operations.LogMultiLineResponse, error) {
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
url := strings.TrimSuffix(baseURL, "/") + "/log"
req, err := http.NewRequestWithContext(ctx, "POST", url, nil)
bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "string", `request:"mediaType=text/plain"`)
if err != nil {
return nil, fmt.Errorf("error serializing request body: %w", err)
}
if bodyReader == nil {
return nil, fmt.Errorf("request body is required")
}
debugBody := bytes.NewBuffer([]byte{})
debugReader := io.TeeReader(bodyReader, debugBody)
req, err := http.NewRequestWithContext(ctx, "POST", url, debugReader)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", s.sdkConfiguration.UserAgent)
req.Header.Set("Content-Type", reqContentType)
client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
@@ -114,6 +147,7 @@ func (s *Log) LogMultiLine(ctx context.Context) (*operations.LogMultiLineRespons
if err != nil {
return nil, fmt.Errorf("error reading response body: %w", err)
}
httpRes.Request.Body = io.NopCloser(debugBody)
httpRes.Body.Close()
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))

View File

@@ -12,7 +12,7 @@ type AddPlaylistContentsRequest struct {
// the content URI for the playlist
URI string `queryParam:"style=form,explode=true,name=uri"`
// the play queue to add to a playlist
PlayQueueID float64 `queryParam:"style=form,explode=true,name=playQueueID"`
PlayQueueID *float64 `queryParam:"style=form,explode=true,name=playQueueID"`
}
func (o *AddPlaylistContentsRequest) GetPlaylistID() float64 {
@@ -29,9 +29,9 @@ func (o *AddPlaylistContentsRequest) GetURI() string {
return o.URI
}
func (o *AddPlaylistContentsRequest) GetPlayQueueID() float64 {
func (o *AddPlaylistContentsRequest) GetPlayQueueID() *float64 {
if o == nil {
return 0.0
return nil
}
return o.PlayQueueID
}
@@ -63,18 +63,172 @@ func (o *AddPlaylistContentsErrors) GetStatus() *float64 {
return o.Status
}
// AddPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type AddPlaylistContentsResponseBody struct {
// AddPlaylistContentsPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type AddPlaylistContentsPlaylistsResponseBody struct {
Errors []AddPlaylistContentsErrors `json:"errors,omitempty"`
}
func (o *AddPlaylistContentsResponseBody) GetErrors() []AddPlaylistContentsErrors {
func (o *AddPlaylistContentsPlaylistsResponseBody) GetErrors() []AddPlaylistContentsErrors {
if o == nil {
return nil
}
return o.Errors
}
type AddPlaylistContentsMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
Summary *string `json:"summary,omitempty"`
Smart *bool `json:"smart,omitempty"`
PlaylistType *string `json:"playlistType,omitempty"`
Composite *string `json:"composite,omitempty"`
Duration *int `json:"duration,omitempty"`
LeafCount *int `json:"leafCount,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
}
func (o *AddPlaylistContentsMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *AddPlaylistContentsMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *AddPlaylistContentsMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *AddPlaylistContentsMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *AddPlaylistContentsMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *AddPlaylistContentsMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *AddPlaylistContentsMetadata) GetSmart() *bool {
if o == nil {
return nil
}
return o.Smart
}
func (o *AddPlaylistContentsMetadata) GetPlaylistType() *string {
if o == nil {
return nil
}
return o.PlaylistType
}
func (o *AddPlaylistContentsMetadata) GetComposite() *string {
if o == nil {
return nil
}
return o.Composite
}
func (o *AddPlaylistContentsMetadata) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *AddPlaylistContentsMetadata) GetLeafCount() *int {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *AddPlaylistContentsMetadata) GetAddedAt() *int {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *AddPlaylistContentsMetadata) GetUpdatedAt() *int {
if o == nil {
return nil
}
return o.UpdatedAt
}
type AddPlaylistContentsMediaContainer struct {
Size *int `json:"size,omitempty"`
LeafCountAdded *int `json:"leafCountAdded,omitempty"`
LeafCountRequested *int `json:"leafCountRequested,omitempty"`
Metadata []AddPlaylistContentsMetadata `json:"Metadata,omitempty"`
}
func (o *AddPlaylistContentsMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *AddPlaylistContentsMediaContainer) GetLeafCountAdded() *int {
if o == nil {
return nil
}
return o.LeafCountAdded
}
func (o *AddPlaylistContentsMediaContainer) GetLeafCountRequested() *int {
if o == nil {
return nil
}
return o.LeafCountRequested
}
func (o *AddPlaylistContentsMediaContainer) GetMetadata() []AddPlaylistContentsMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// AddPlaylistContentsResponseBody - Playlist Updated
type AddPlaylistContentsResponseBody struct {
MediaContainer *AddPlaylistContentsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *AddPlaylistContentsResponseBody) GetMediaContainer() *AddPlaylistContentsMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type AddPlaylistContentsResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -82,8 +236,10 @@ type AddPlaylistContentsResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// Playlist Updated
TwoHundredApplicationJSONObject *AddPlaylistContentsResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *AddPlaylistContentsResponseBody
FourHundredAndOneApplicationJSONObject *AddPlaylistContentsPlaylistsResponseBody
}
func (o *AddPlaylistContentsResponse) GetContentType() string {
@@ -107,9 +263,16 @@ func (o *AddPlaylistContentsResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *AddPlaylistContentsResponse) GetObject() *AddPlaylistContentsResponseBody {
func (o *AddPlaylistContentsResponse) GetTwoHundredApplicationJSONObject() *AddPlaylistContentsResponseBody {
if o == nil {
return nil
}
return o.Object
return o.TwoHundredApplicationJSONObject
}
func (o *AddPlaylistContentsResponse) GetFourHundredAndOneApplicationJSONObject() *AddPlaylistContentsPlaylistsResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -75,7 +75,7 @@ type CreatePlaylistRequest struct {
// whether the playlist is smart or not
Smart Smart `queryParam:"style=form,explode=true,name=smart"`
// the content URI for the playlist
URI *string `queryParam:"style=form,explode=true,name=uri"`
URI string `queryParam:"style=form,explode=true,name=uri"`
// the play queue to copy to a playlist
PlayQueueID *float64 `queryParam:"style=form,explode=true,name=playQueueID"`
}
@@ -101,9 +101,9 @@ func (o *CreatePlaylistRequest) GetSmart() Smart {
return o.Smart
}
func (o *CreatePlaylistRequest) GetURI() *string {
func (o *CreatePlaylistRequest) GetURI() string {
if o == nil {
return nil
return ""
}
return o.URI
}
@@ -142,18 +142,180 @@ func (o *CreatePlaylistErrors) GetStatus() *float64 {
return o.Status
}
// CreatePlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type CreatePlaylistResponseBody struct {
// CreatePlaylistPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type CreatePlaylistPlaylistsResponseBody struct {
Errors []CreatePlaylistErrors `json:"errors,omitempty"`
}
func (o *CreatePlaylistResponseBody) GetErrors() []CreatePlaylistErrors {
func (o *CreatePlaylistPlaylistsResponseBody) GetErrors() []CreatePlaylistErrors {
if o == nil {
return nil
}
return o.Errors
}
type CreatePlaylistMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
Summary *string `json:"summary,omitempty"`
Smart *bool `json:"smart,omitempty"`
PlaylistType *string `json:"playlistType,omitempty"`
Icon *string `json:"icon,omitempty"`
ViewCount *int `json:"viewCount,omitempty"`
LastViewedAt *int `json:"lastViewedAt,omitempty"`
LeafCount *int `json:"leafCount,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
Composite *string `json:"composite,omitempty"`
Duration *int `json:"duration,omitempty"`
}
func (o *CreatePlaylistMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *CreatePlaylistMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *CreatePlaylistMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *CreatePlaylistMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *CreatePlaylistMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *CreatePlaylistMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *CreatePlaylistMetadata) GetSmart() *bool {
if o == nil {
return nil
}
return o.Smart
}
func (o *CreatePlaylistMetadata) GetPlaylistType() *string {
if o == nil {
return nil
}
return o.PlaylistType
}
func (o *CreatePlaylistMetadata) GetIcon() *string {
if o == nil {
return nil
}
return o.Icon
}
func (o *CreatePlaylistMetadata) GetViewCount() *int {
if o == nil {
return nil
}
return o.ViewCount
}
func (o *CreatePlaylistMetadata) GetLastViewedAt() *int {
if o == nil {
return nil
}
return o.LastViewedAt
}
func (o *CreatePlaylistMetadata) GetLeafCount() *int {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *CreatePlaylistMetadata) GetAddedAt() *int {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *CreatePlaylistMetadata) GetUpdatedAt() *int {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *CreatePlaylistMetadata) GetComposite() *string {
if o == nil {
return nil
}
return o.Composite
}
func (o *CreatePlaylistMetadata) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
type CreatePlaylistMediaContainer struct {
Size *int `json:"size,omitempty"`
Metadata []CreatePlaylistMetadata `json:"Metadata,omitempty"`
}
func (o *CreatePlaylistMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *CreatePlaylistMediaContainer) GetMetadata() []CreatePlaylistMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// CreatePlaylistResponseBody - returns all playlists
type CreatePlaylistResponseBody struct {
MediaContainer *CreatePlaylistMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *CreatePlaylistResponseBody) GetMediaContainer() *CreatePlaylistMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type CreatePlaylistResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -161,8 +323,10 @@ type CreatePlaylistResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// returns all playlists
TwoHundredApplicationJSONObject *CreatePlaylistResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *CreatePlaylistResponseBody
FourHundredAndOneApplicationJSONObject *CreatePlaylistPlaylistsResponseBody
}
func (o *CreatePlaylistResponse) GetContentType() string {
@@ -186,9 +350,16 @@ func (o *CreatePlaylistResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *CreatePlaylistResponse) GetObject() *CreatePlaylistResponseBody {
func (o *CreatePlaylistResponse) GetTwoHundredApplicationJSONObject() *CreatePlaylistResponseBody {
if o == nil {
return nil
}
return o.Object
return o.TwoHundredApplicationJSONObject
}
func (o *CreatePlaylistResponse) GetFourHundredAndOneApplicationJSONObject() *CreatePlaylistPlaylistsResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -33,12 +33,12 @@ func (o *GetAvailableClientsErrors) GetStatus() *float64 {
return o.Status
}
// GetAvailableClientsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetAvailableClientsResponseBody struct {
// GetAvailableClientsServerResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetAvailableClientsServerResponseBody struct {
Errors []GetAvailableClientsErrors `json:"errors,omitempty"`
}
func (o *GetAvailableClientsResponseBody) GetErrors() []GetAvailableClientsErrors {
func (o *GetAvailableClientsServerResponseBody) GetErrors() []GetAvailableClientsErrors {
if o == nil {
return nil
}
@@ -155,11 +155,12 @@ func (o *GetAvailableClientsMediaContainer) GetServer() []Server {
return o.Server
}
type ResponseBody struct {
// GetAvailableClientsResponseBody - Available Clients
type GetAvailableClientsResponseBody struct {
MediaContainer *GetAvailableClientsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *ResponseBody) GetMediaContainer() *GetAvailableClientsMediaContainer {
func (o *GetAvailableClientsResponseBody) GetMediaContainer() *GetAvailableClientsMediaContainer {
if o == nil {
return nil
}
@@ -174,9 +175,9 @@ type GetAvailableClientsResponse struct {
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// Available Clients
ResponseBodies []ResponseBody
TwoHundredApplicationJSONObject *GetAvailableClientsResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetAvailableClientsResponseBody
FourHundredAndOneApplicationJSONObject *GetAvailableClientsServerResponseBody
}
func (o *GetAvailableClientsResponse) GetContentType() string {
@@ -200,16 +201,16 @@ func (o *GetAvailableClientsResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *GetAvailableClientsResponse) GetResponseBodies() []ResponseBody {
func (o *GetAvailableClientsResponse) GetTwoHundredApplicationJSONObject() *GetAvailableClientsResponseBody {
if o == nil {
return nil
}
return o.ResponseBodies
return o.TwoHundredApplicationJSONObject
}
func (o *GetAvailableClientsResponse) GetObject() *GetAvailableClientsResponseBody {
func (o *GetAvailableClientsResponse) GetFourHundredAndOneApplicationJSONObject() *GetAvailableClientsServerResponseBody {
if o == nil {
return nil
}
return o.Object
return o.FourHundredAndOneApplicationJSONObject
}

View File

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

View File

@@ -84,18 +84,295 @@ func (o *GetGlobalHubsErrors) GetStatus() *float64 {
return o.Status
}
// GetGlobalHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetGlobalHubsResponseBody struct {
// GetGlobalHubsHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetGlobalHubsHubsResponseBody struct {
Errors []GetGlobalHubsErrors `json:"errors,omitempty"`
}
func (o *GetGlobalHubsResponseBody) GetErrors() []GetGlobalHubsErrors {
func (o *GetGlobalHubsHubsResponseBody) GetErrors() []GetGlobalHubsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetGlobalHubsMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
TitleSort *string `json:"titleSort,omitempty"`
Summary *string `json:"summary,omitempty"`
Smart *bool `json:"smart,omitempty"`
PlaylistType *string `json:"playlistType,omitempty"`
Composite *string `json:"composite,omitempty"`
Icon *string `json:"icon,omitempty"`
ViewCount *int `json:"viewCount,omitempty"`
LastViewedAt *int `json:"lastViewedAt,omitempty"`
Duration *int `json:"duration,omitempty"`
LeafCount *int `json:"leafCount,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
}
func (o *GetGlobalHubsMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetGlobalHubsMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetGlobalHubsMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *GetGlobalHubsMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetGlobalHubsMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetGlobalHubsMetadata) GetTitleSort() *string {
if o == nil {
return nil
}
return o.TitleSort
}
func (o *GetGlobalHubsMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *GetGlobalHubsMetadata) GetSmart() *bool {
if o == nil {
return nil
}
return o.Smart
}
func (o *GetGlobalHubsMetadata) GetPlaylistType() *string {
if o == nil {
return nil
}
return o.PlaylistType
}
func (o *GetGlobalHubsMetadata) GetComposite() *string {
if o == nil {
return nil
}
return o.Composite
}
func (o *GetGlobalHubsMetadata) GetIcon() *string {
if o == nil {
return nil
}
return o.Icon
}
func (o *GetGlobalHubsMetadata) GetViewCount() *int {
if o == nil {
return nil
}
return o.ViewCount
}
func (o *GetGlobalHubsMetadata) GetLastViewedAt() *int {
if o == nil {
return nil
}
return o.LastViewedAt
}
func (o *GetGlobalHubsMetadata) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetGlobalHubsMetadata) GetLeafCount() *int {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *GetGlobalHubsMetadata) GetAddedAt() *int {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *GetGlobalHubsMetadata) GetUpdatedAt() *int {
if o == nil {
return nil
}
return o.UpdatedAt
}
type Hub struct {
HubKey *string `json:"hubKey,omitempty"`
Key *string `json:"key,omitempty"`
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
HubIdentifier *string `json:"hubIdentifier,omitempty"`
Context *string `json:"context,omitempty"`
Size *int `json:"size,omitempty"`
More *bool `json:"more,omitempty"`
Style *string `json:"style,omitempty"`
Promoted *bool `json:"promoted,omitempty"`
Metadata []GetGlobalHubsMetadata `json:"Metadata,omitempty"`
}
func (o *Hub) GetHubKey() *string {
if o == nil {
return nil
}
return o.HubKey
}
func (o *Hub) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *Hub) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *Hub) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *Hub) GetHubIdentifier() *string {
if o == nil {
return nil
}
return o.HubIdentifier
}
func (o *Hub) GetContext() *string {
if o == nil {
return nil
}
return o.Context
}
func (o *Hub) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *Hub) GetMore() *bool {
if o == nil {
return nil
}
return o.More
}
func (o *Hub) GetStyle() *string {
if o == nil {
return nil
}
return o.Style
}
func (o *Hub) GetPromoted() *bool {
if o == nil {
return nil
}
return o.Promoted
}
func (o *Hub) GetMetadata() []GetGlobalHubsMetadata {
if o == nil {
return nil
}
return o.Metadata
}
type GetGlobalHubsMediaContainer struct {
Size *int `json:"size,omitempty"`
AllowSync *bool `json:"allowSync,omitempty"`
Identifier *string `json:"identifier,omitempty"`
Hub []Hub `json:"Hub,omitempty"`
}
func (o *GetGlobalHubsMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetGlobalHubsMediaContainer) GetAllowSync() *bool {
if o == nil {
return nil
}
return o.AllowSync
}
func (o *GetGlobalHubsMediaContainer) GetIdentifier() *string {
if o == nil {
return nil
}
return o.Identifier
}
func (o *GetGlobalHubsMediaContainer) GetHub() []Hub {
if o == nil {
return nil
}
return o.Hub
}
// GetGlobalHubsResponseBody - returns global hubs
type GetGlobalHubsResponseBody struct {
MediaContainer *GetGlobalHubsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetGlobalHubsResponseBody) GetMediaContainer() *GetGlobalHubsMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetGlobalHubsResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -103,8 +380,10 @@ type GetGlobalHubsResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// returns global hubs
TwoHundredApplicationJSONObject *GetGlobalHubsResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetGlobalHubsResponseBody
FourHundredAndOneApplicationJSONObject *GetGlobalHubsHubsResponseBody
}
func (o *GetGlobalHubsResponse) GetContentType() string {
@@ -128,9 +407,16 @@ func (o *GetGlobalHubsResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *GetGlobalHubsResponse) GetObject() *GetGlobalHubsResponseBody {
func (o *GetGlobalHubsResponse) GetTwoHundredApplicationJSONObject() *GetGlobalHubsResponseBody {
if o == nil {
return nil
}
return o.Object
return o.TwoHundredApplicationJSONObject
}
func (o *GetGlobalHubsResponse) GetFourHundredAndOneApplicationJSONObject() *GetGlobalHubsHubsResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

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

View File

@@ -5,6 +5,8 @@ package operations
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/types"
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
"net/http"
)
@@ -93,18 +95,751 @@ func (o *GetLibraryHubsErrors) GetStatus() *float64 {
return o.Status
}
// GetLibraryHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetLibraryHubsResponseBody struct {
// GetLibraryHubsHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetLibraryHubsHubsResponseBody struct {
Errors []GetLibraryHubsErrors `json:"errors,omitempty"`
}
func (o *GetLibraryHubsResponseBody) GetErrors() []GetLibraryHubsErrors {
func (o *GetLibraryHubsHubsResponseBody) GetErrors() []GetLibraryHubsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetLibraryHubsPart struct {
ID *int `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
Duration *int `json:"duration,omitempty"`
File *string `json:"file,omitempty"`
Size *int `json:"size,omitempty"`
AudioProfile *string `json:"audioProfile,omitempty"`
Container *string `json:"container,omitempty"`
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
OptimizedForStreaming *bool `json:"optimizedForStreaming,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
}
func (o *GetLibraryHubsPart) GetID() *int {
if o == nil {
return nil
}
return o.ID
}
func (o *GetLibraryHubsPart) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetLibraryHubsPart) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetLibraryHubsPart) GetFile() *string {
if o == nil {
return nil
}
return o.File
}
func (o *GetLibraryHubsPart) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetLibraryHubsPart) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetLibraryHubsPart) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetLibraryHubsPart) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *GetLibraryHubsPart) GetOptimizedForStreaming() *bool {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *GetLibraryHubsPart) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
type GetLibraryHubsMedia struct {
ID *int `json:"id,omitempty"`
Duration *int `json:"duration,omitempty"`
Bitrate *int `json:"bitrate,omitempty"`
Width *int `json:"width,omitempty"`
Height *int `json:"height,omitempty"`
AspectRatio *float64 `json:"aspectRatio,omitempty"`
AudioChannels *int `json:"audioChannels,omitempty"`
AudioCodec *string `json:"audioCodec,omitempty"`
VideoCodec *string `json:"videoCodec,omitempty"`
VideoResolution *string `json:"videoResolution,omitempty"`
Container *string `json:"container,omitempty"`
VideoFrameRate *string `json:"videoFrameRate,omitempty"`
OptimizedForStreaming *int `json:"optimizedForStreaming,omitempty"`
AudioProfile *string `json:"audioProfile,omitempty"`
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
Part []GetLibraryHubsPart `json:"Part,omitempty"`
}
func (o *GetLibraryHubsMedia) GetID() *int {
if o == nil {
return nil
}
return o.ID
}
func (o *GetLibraryHubsMedia) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetLibraryHubsMedia) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetLibraryHubsMedia) GetWidth() *int {
if o == nil {
return nil
}
return o.Width
}
func (o *GetLibraryHubsMedia) GetHeight() *int {
if o == nil {
return nil
}
return o.Height
}
func (o *GetLibraryHubsMedia) GetAspectRatio() *float64 {
if o == nil {
return nil
}
return o.AspectRatio
}
func (o *GetLibraryHubsMedia) GetAudioChannels() *int {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *GetLibraryHubsMedia) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *GetLibraryHubsMedia) GetVideoCodec() *string {
if o == nil {
return nil
}
return o.VideoCodec
}
func (o *GetLibraryHubsMedia) GetVideoResolution() *string {
if o == nil {
return nil
}
return o.VideoResolution
}
func (o *GetLibraryHubsMedia) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetLibraryHubsMedia) GetVideoFrameRate() *string {
if o == nil {
return nil
}
return o.VideoFrameRate
}
func (o *GetLibraryHubsMedia) GetOptimizedForStreaming() *int {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *GetLibraryHubsMedia) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetLibraryHubsMedia) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *GetLibraryHubsMedia) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *GetLibraryHubsMedia) GetPart() []GetLibraryHubsPart {
if o == nil {
return nil
}
return o.Part
}
type GetLibraryHubsGenre struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryHubsGenre) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryHubsCountry struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryHubsCountry) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryHubsDirector struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryHubsDirector) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryHubsRole struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryHubsRole) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryHubsWriter struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryHubsWriter) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryHubsMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Studio *string `json:"studio,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
LibrarySectionID *int `json:"librarySectionID,omitempty"`
LibrarySectionKey *string `json:"librarySectionKey,omitempty"`
ContentRating *string `json:"contentRating,omitempty"`
Summary *string `json:"summary,omitempty"`
Rating *float64 `json:"rating,omitempty"`
AudienceRating *float64 `json:"audienceRating,omitempty"`
ViewCount *int `json:"viewCount,omitempty"`
LastViewedAt *int `json:"lastViewedAt,omitempty"`
Year *int `json:"year,omitempty"`
Tagline *string `json:"tagline,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Art *string `json:"art,omitempty"`
Duration *int `json:"duration,omitempty"`
OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
RatingImage *string `json:"ratingImage,omitempty"`
Media []GetLibraryHubsMedia `json:"Media,omitempty"`
Genre []GetLibraryHubsGenre `json:"Genre,omitempty"`
Country []GetLibraryHubsCountry `json:"Country,omitempty"`
Director []GetLibraryHubsDirector `json:"Director,omitempty"`
Role []GetLibraryHubsRole `json:"Role,omitempty"`
Writer []GetLibraryHubsWriter `json:"Writer,omitempty"`
SkipCount *int `json:"skipCount,omitempty"`
ChapterSource *string `json:"chapterSource,omitempty"`
}
func (g GetLibraryHubsMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetLibraryHubsMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetLibraryHubsMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetLibraryHubsMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetLibraryHubsMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *GetLibraryHubsMetadata) GetStudio() *string {
if o == nil {
return nil
}
return o.Studio
}
func (o *GetLibraryHubsMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetLibraryHubsMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetLibraryHubsMetadata) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetLibraryHubsMetadata) GetLibrarySectionID() *int {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetLibraryHubsMetadata) GetLibrarySectionKey() *string {
if o == nil {
return nil
}
return o.LibrarySectionKey
}
func (o *GetLibraryHubsMetadata) GetContentRating() *string {
if o == nil {
return nil
}
return o.ContentRating
}
func (o *GetLibraryHubsMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *GetLibraryHubsMetadata) GetRating() *float64 {
if o == nil {
return nil
}
return o.Rating
}
func (o *GetLibraryHubsMetadata) GetAudienceRating() *float64 {
if o == nil {
return nil
}
return o.AudienceRating
}
func (o *GetLibraryHubsMetadata) GetViewCount() *int {
if o == nil {
return nil
}
return o.ViewCount
}
func (o *GetLibraryHubsMetadata) GetLastViewedAt() *int {
if o == nil {
return nil
}
return o.LastViewedAt
}
func (o *GetLibraryHubsMetadata) GetYear() *int {
if o == nil {
return nil
}
return o.Year
}
func (o *GetLibraryHubsMetadata) GetTagline() *string {
if o == nil {
return nil
}
return o.Tagline
}
func (o *GetLibraryHubsMetadata) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetLibraryHubsMetadata) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *GetLibraryHubsMetadata) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetLibraryHubsMetadata) GetOriginallyAvailableAt() *types.Date {
if o == nil {
return nil
}
return o.OriginallyAvailableAt
}
func (o *GetLibraryHubsMetadata) GetAddedAt() *int {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *GetLibraryHubsMetadata) GetUpdatedAt() *int {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *GetLibraryHubsMetadata) GetAudienceRatingImage() *string {
if o == nil {
return nil
}
return o.AudienceRatingImage
}
func (o *GetLibraryHubsMetadata) GetPrimaryExtraKey() *string {
if o == nil {
return nil
}
return o.PrimaryExtraKey
}
func (o *GetLibraryHubsMetadata) GetRatingImage() *string {
if o == nil {
return nil
}
return o.RatingImage
}
func (o *GetLibraryHubsMetadata) GetMedia() []GetLibraryHubsMedia {
if o == nil {
return nil
}
return o.Media
}
func (o *GetLibraryHubsMetadata) GetGenre() []GetLibraryHubsGenre {
if o == nil {
return nil
}
return o.Genre
}
func (o *GetLibraryHubsMetadata) GetCountry() []GetLibraryHubsCountry {
if o == nil {
return nil
}
return o.Country
}
func (o *GetLibraryHubsMetadata) GetDirector() []GetLibraryHubsDirector {
if o == nil {
return nil
}
return o.Director
}
func (o *GetLibraryHubsMetadata) GetRole() []GetLibraryHubsRole {
if o == nil {
return nil
}
return o.Role
}
func (o *GetLibraryHubsMetadata) GetWriter() []GetLibraryHubsWriter {
if o == nil {
return nil
}
return o.Writer
}
func (o *GetLibraryHubsMetadata) GetSkipCount() *int {
if o == nil {
return nil
}
return o.SkipCount
}
func (o *GetLibraryHubsMetadata) GetChapterSource() *string {
if o == nil {
return nil
}
return o.ChapterSource
}
type GetLibraryHubsHub struct {
Key *string `json:"key,omitempty"`
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
HubIdentifier *string `json:"hubIdentifier,omitempty"`
Context *string `json:"context,omitempty"`
Size *int `json:"size,omitempty"`
More *bool `json:"more,omitempty"`
Style *string `json:"style,omitempty"`
HubKey *string `json:"hubKey,omitempty"`
Metadata []GetLibraryHubsMetadata `json:"Metadata,omitempty"`
Promoted *bool `json:"promoted,omitempty"`
Random *bool `json:"random,omitempty"`
}
func (o *GetLibraryHubsHub) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetLibraryHubsHub) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetLibraryHubsHub) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetLibraryHubsHub) GetHubIdentifier() *string {
if o == nil {
return nil
}
return o.HubIdentifier
}
func (o *GetLibraryHubsHub) GetContext() *string {
if o == nil {
return nil
}
return o.Context
}
func (o *GetLibraryHubsHub) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetLibraryHubsHub) GetMore() *bool {
if o == nil {
return nil
}
return o.More
}
func (o *GetLibraryHubsHub) GetStyle() *string {
if o == nil {
return nil
}
return o.Style
}
func (o *GetLibraryHubsHub) GetHubKey() *string {
if o == nil {
return nil
}
return o.HubKey
}
func (o *GetLibraryHubsHub) GetMetadata() []GetLibraryHubsMetadata {
if o == nil {
return nil
}
return o.Metadata
}
func (o *GetLibraryHubsHub) GetPromoted() *bool {
if o == nil {
return nil
}
return o.Promoted
}
func (o *GetLibraryHubsHub) GetRandom() *bool {
if o == nil {
return nil
}
return o.Random
}
type GetLibraryHubsMediaContainer struct {
Size *int `json:"size,omitempty"`
AllowSync *bool `json:"allowSync,omitempty"`
Identifier *string `json:"identifier,omitempty"`
LibrarySectionID *int `json:"librarySectionID,omitempty"`
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
LibrarySectionUUID *string `json:"librarySectionUUID,omitempty"`
Hub []GetLibraryHubsHub `json:"Hub,omitempty"`
}
func (o *GetLibraryHubsMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetLibraryHubsMediaContainer) GetAllowSync() *bool {
if o == nil {
return nil
}
return o.AllowSync
}
func (o *GetLibraryHubsMediaContainer) GetIdentifier() *string {
if o == nil {
return nil
}
return o.Identifier
}
func (o *GetLibraryHubsMediaContainer) GetLibrarySectionID() *int {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetLibraryHubsMediaContainer) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetLibraryHubsMediaContainer) GetLibrarySectionUUID() *string {
if o == nil {
return nil
}
return o.LibrarySectionUUID
}
func (o *GetLibraryHubsMediaContainer) GetHub() []GetLibraryHubsHub {
if o == nil {
return nil
}
return o.Hub
}
// GetLibraryHubsResponseBody - The hubs specific to the library
type GetLibraryHubsResponseBody struct {
MediaContainer *GetLibraryHubsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetLibraryHubsResponseBody) GetMediaContainer() *GetLibraryHubsMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetLibraryHubsResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -112,8 +847,10 @@ type GetLibraryHubsResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// The hubs specific to the library
TwoHundredApplicationJSONObject *GetLibraryHubsResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetLibraryHubsResponseBody
FourHundredAndOneApplicationJSONObject *GetLibraryHubsHubsResponseBody
}
func (o *GetLibraryHubsResponse) GetContentType() string {
@@ -137,9 +874,16 @@ func (o *GetLibraryHubsResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *GetLibraryHubsResponse) GetObject() *GetLibraryHubsResponseBody {
func (o *GetLibraryHubsResponse) GetTwoHundredApplicationJSONObject() *GetLibraryHubsResponseBody {
if o == nil {
return nil
}
return o.Object
return o.TwoHundredApplicationJSONObject
}
func (o *GetLibraryHubsResponse) GetFourHundredAndOneApplicationJSONObject() *GetLibraryHubsHubsResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -3,76 +3,764 @@
package operations
import (
"encoding/json"
"fmt"
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/types"
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
"net/http"
)
type GetLibraryItemsRequest struct {
// the Id of the library to query
SectionID float64 `pathParam:"style=simple,explode=false,name=sectionId"`
// item type
Type *float64 `queryParam:"style=form,explode=true,name=type"`
// the filter parameter
Filter *string `queryParam:"style=form,explode=true,name=filter"`
// Tag - A key representing a specific tag within the section.
type Tag string
const (
TagAll Tag = "all"
TagUnwatched Tag = "unwatched"
TagNewest Tag = "newest"
TagRecentlyAdded Tag = "recentlyAdded"
TagRecentlyViewed Tag = "recentlyViewed"
TagOnDeck Tag = "onDeck"
TagCollection Tag = "collection"
TagEdition Tag = "edition"
TagGenre Tag = "genre"
TagYear Tag = "year"
TagDecade Tag = "decade"
TagDirector Tag = "director"
TagActor Tag = "actor"
TagCountry Tag = "country"
TagContentRating Tag = "contentRating"
TagRating Tag = "rating"
TagResolution Tag = "resolution"
TagFirstCharacter Tag = "firstCharacter"
TagFolder Tag = "folder"
TagSearchTypeEqual1 Tag = "search?type=1"
)
func (e Tag) ToPointer() *Tag {
return &e
}
func (o *GetLibraryItemsRequest) GetSectionID() float64 {
func (e *Tag) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
}
switch v {
case "all":
fallthrough
case "unwatched":
fallthrough
case "newest":
fallthrough
case "recentlyAdded":
fallthrough
case "recentlyViewed":
fallthrough
case "onDeck":
fallthrough
case "collection":
fallthrough
case "edition":
fallthrough
case "genre":
fallthrough
case "year":
fallthrough
case "decade":
fallthrough
case "director":
fallthrough
case "actor":
fallthrough
case "country":
fallthrough
case "contentRating":
fallthrough
case "rating":
fallthrough
case "resolution":
fallthrough
case "firstCharacter":
fallthrough
case "folder":
fallthrough
case "search?type=1":
*e = Tag(v)
return nil
default:
return fmt.Errorf("invalid value for Tag: %v", v)
}
}
type GetLibraryItemsRequest struct {
// the Id of the library to query
SectionID int64 `pathParam:"style=simple,explode=false,name=sectionId"`
// A key representing a specific tag within the section.
Tag Tag `pathParam:"style=simple,explode=false,name=tag"`
}
func (o *GetLibraryItemsRequest) GetSectionID() int64 {
if o == nil {
return 0.0
return 0
}
return o.SectionID
}
func (o *GetLibraryItemsRequest) GetType() *float64 {
func (o *GetLibraryItemsRequest) GetTag() Tag {
if o == nil {
return Tag("")
}
return o.Tag
}
type GetLibraryItemsPart struct {
ID *int `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
Duration *int `json:"duration,omitempty"`
File *string `json:"file,omitempty"`
Size *int64 `json:"size,omitempty"`
Container *string `json:"container,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
}
func (o *GetLibraryItemsPart) GetID() *int {
if o == nil {
return nil
}
return o.ID
}
func (o *GetLibraryItemsPart) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetLibraryItemsPart) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetLibraryItemsPart) GetFile() *string {
if o == nil {
return nil
}
return o.File
}
func (o *GetLibraryItemsPart) GetSize() *int64 {
if o == nil {
return nil
}
return o.Size
}
func (o *GetLibraryItemsPart) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetLibraryItemsPart) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
type GetLibraryItemsMedia struct {
ID *int `json:"id,omitempty"`
Duration *int `json:"duration,omitempty"`
Bitrate *int `json:"bitrate,omitempty"`
Width *int `json:"width,omitempty"`
Height *int `json:"height,omitempty"`
AspectRatio *float64 `json:"aspectRatio,omitempty"`
AudioChannels *int `json:"audioChannels,omitempty"`
AudioCodec *string `json:"audioCodec,omitempty"`
VideoCodec *string `json:"videoCodec,omitempty"`
VideoResolution *string `json:"videoResolution,omitempty"`
Container *string `json:"container,omitempty"`
VideoFrameRate *string `json:"videoFrameRate,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
Part []GetLibraryItemsPart `json:"Part,omitempty"`
}
func (o *GetLibraryItemsMedia) GetID() *int {
if o == nil {
return nil
}
return o.ID
}
func (o *GetLibraryItemsMedia) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetLibraryItemsMedia) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetLibraryItemsMedia) GetWidth() *int {
if o == nil {
return nil
}
return o.Width
}
func (o *GetLibraryItemsMedia) GetHeight() *int {
if o == nil {
return nil
}
return o.Height
}
func (o *GetLibraryItemsMedia) GetAspectRatio() *float64 {
if o == nil {
return nil
}
return o.AspectRatio
}
func (o *GetLibraryItemsMedia) GetAudioChannels() *int {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *GetLibraryItemsMedia) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *GetLibraryItemsMedia) GetVideoCodec() *string {
if o == nil {
return nil
}
return o.VideoCodec
}
func (o *GetLibraryItemsMedia) GetVideoResolution() *string {
if o == nil {
return nil
}
return o.VideoResolution
}
func (o *GetLibraryItemsMedia) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetLibraryItemsMedia) GetVideoFrameRate() *string {
if o == nil {
return nil
}
return o.VideoFrameRate
}
func (o *GetLibraryItemsMedia) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *GetLibraryItemsMedia) GetPart() []GetLibraryItemsPart {
if o == nil {
return nil
}
return o.Part
}
type GetLibraryItemsGenre struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryItemsGenre) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryItemsCountry struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryItemsCountry) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryItemsDirector struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryItemsDirector) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryItemsWriter struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryItemsWriter) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryItemsRole struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetLibraryItemsRole) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetLibraryItemsMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Studio *string `json:"studio,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
ContentRating *string `json:"contentRating,omitempty"`
Summary *string `json:"summary,omitempty"`
Rating *float64 `json:"rating,omitempty"`
AudienceRating *float64 `json:"audienceRating,omitempty"`
Year *int `json:"year,omitempty"`
Tagline *string `json:"tagline,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Art *string `json:"art,omitempty"`
Duration *int `json:"duration,omitempty"`
OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
ChapterSource *string `json:"chapterSource,omitempty"`
PrimaryExtraKey *string `json:"primaryExtraKey,omitempty"`
RatingImage *string `json:"ratingImage,omitempty"`
Media []GetLibraryItemsMedia `json:"Media,omitempty"`
Genre []GetLibraryItemsGenre `json:"Genre,omitempty"`
Country []GetLibraryItemsCountry `json:"Country,omitempty"`
Director []GetLibraryItemsDirector `json:"Director,omitempty"`
Writer []GetLibraryItemsWriter `json:"Writer,omitempty"`
Role []GetLibraryItemsRole `json:"Role,omitempty"`
TitleSort *string `json:"titleSort,omitempty"`
ViewCount *int `json:"viewCount,omitempty"`
LastViewedAt *int `json:"lastViewedAt,omitempty"`
OriginalTitle *string `json:"originalTitle,omitempty"`
ViewOffset *int `json:"viewOffset,omitempty"`
SkipCount *int `json:"skipCount,omitempty"`
}
func (g GetLibraryItemsMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetLibraryItemsMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetLibraryItemsMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetLibraryItemsMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetLibraryItemsMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *GetLibraryItemsMetadata) GetStudio() *string {
if o == nil {
return nil
}
return o.Studio
}
func (o *GetLibraryItemsMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetLibraryItemsRequest) GetFilter() *string {
func (o *GetLibraryItemsMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Filter
return o.Title
}
type GetLibraryItemsErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *GetLibraryItemsErrors) GetCode() *float64 {
func (o *GetLibraryItemsMetadata) GetContentRating() *string {
if o == nil {
return nil
}
return o.Code
return o.ContentRating
}
func (o *GetLibraryItemsErrors) GetMessage() *string {
func (o *GetLibraryItemsMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Message
return o.Summary
}
func (o *GetLibraryItemsErrors) GetStatus() *float64 {
func (o *GetLibraryItemsMetadata) GetRating() *float64 {
if o == nil {
return nil
}
return o.Status
return o.Rating
}
// GetLibraryItemsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
func (o *GetLibraryItemsMetadata) GetAudienceRating() *float64 {
if o == nil {
return nil
}
return o.AudienceRating
}
func (o *GetLibraryItemsMetadata) GetYear() *int {
if o == nil {
return nil
}
return o.Year
}
func (o *GetLibraryItemsMetadata) GetTagline() *string {
if o == nil {
return nil
}
return o.Tagline
}
func (o *GetLibraryItemsMetadata) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetLibraryItemsMetadata) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *GetLibraryItemsMetadata) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetLibraryItemsMetadata) GetOriginallyAvailableAt() *types.Date {
if o == nil {
return nil
}
return o.OriginallyAvailableAt
}
func (o *GetLibraryItemsMetadata) GetAddedAt() *int {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *GetLibraryItemsMetadata) GetUpdatedAt() *int {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *GetLibraryItemsMetadata) GetAudienceRatingImage() *string {
if o == nil {
return nil
}
return o.AudienceRatingImage
}
func (o *GetLibraryItemsMetadata) GetChapterSource() *string {
if o == nil {
return nil
}
return o.ChapterSource
}
func (o *GetLibraryItemsMetadata) GetPrimaryExtraKey() *string {
if o == nil {
return nil
}
return o.PrimaryExtraKey
}
func (o *GetLibraryItemsMetadata) GetRatingImage() *string {
if o == nil {
return nil
}
return o.RatingImage
}
func (o *GetLibraryItemsMetadata) GetMedia() []GetLibraryItemsMedia {
if o == nil {
return nil
}
return o.Media
}
func (o *GetLibraryItemsMetadata) GetGenre() []GetLibraryItemsGenre {
if o == nil {
return nil
}
return o.Genre
}
func (o *GetLibraryItemsMetadata) GetCountry() []GetLibraryItemsCountry {
if o == nil {
return nil
}
return o.Country
}
func (o *GetLibraryItemsMetadata) GetDirector() []GetLibraryItemsDirector {
if o == nil {
return nil
}
return o.Director
}
func (o *GetLibraryItemsMetadata) GetWriter() []GetLibraryItemsWriter {
if o == nil {
return nil
}
return o.Writer
}
func (o *GetLibraryItemsMetadata) GetRole() []GetLibraryItemsRole {
if o == nil {
return nil
}
return o.Role
}
func (o *GetLibraryItemsMetadata) GetTitleSort() *string {
if o == nil {
return nil
}
return o.TitleSort
}
func (o *GetLibraryItemsMetadata) GetViewCount() *int {
if o == nil {
return nil
}
return o.ViewCount
}
func (o *GetLibraryItemsMetadata) GetLastViewedAt() *int {
if o == nil {
return nil
}
return o.LastViewedAt
}
func (o *GetLibraryItemsMetadata) GetOriginalTitle() *string {
if o == nil {
return nil
}
return o.OriginalTitle
}
func (o *GetLibraryItemsMetadata) GetViewOffset() *int {
if o == nil {
return nil
}
return o.ViewOffset
}
func (o *GetLibraryItemsMetadata) GetSkipCount() *int {
if o == nil {
return nil
}
return o.SkipCount
}
type GetLibraryItemsMediaContainer struct {
Size *int `json:"size,omitempty"`
AllowSync *bool `json:"allowSync,omitempty"`
Art *string `json:"art,omitempty"`
Identifier *string `json:"identifier,omitempty"`
LibrarySectionID *int `json:"librarySectionID,omitempty"`
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
LibrarySectionUUID *string `json:"librarySectionUUID,omitempty"`
MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"`
MediaTagVersion *int `json:"mediaTagVersion,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Title1 *string `json:"title1,omitempty"`
Title2 *string `json:"title2,omitempty"`
ViewGroup *string `json:"viewGroup,omitempty"`
ViewMode *int `json:"viewMode,omitempty"`
Metadata []GetLibraryItemsMetadata `json:"Metadata,omitempty"`
}
func (o *GetLibraryItemsMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetLibraryItemsMediaContainer) GetAllowSync() *bool {
if o == nil {
return nil
}
return o.AllowSync
}
func (o *GetLibraryItemsMediaContainer) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *GetLibraryItemsMediaContainer) GetIdentifier() *string {
if o == nil {
return nil
}
return o.Identifier
}
func (o *GetLibraryItemsMediaContainer) GetLibrarySectionID() *int {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetLibraryItemsMediaContainer) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetLibraryItemsMediaContainer) GetLibrarySectionUUID() *string {
if o == nil {
return nil
}
return o.LibrarySectionUUID
}
func (o *GetLibraryItemsMediaContainer) GetMediaTagPrefix() *string {
if o == nil {
return nil
}
return o.MediaTagPrefix
}
func (o *GetLibraryItemsMediaContainer) GetMediaTagVersion() *int {
if o == nil {
return nil
}
return o.MediaTagVersion
}
func (o *GetLibraryItemsMediaContainer) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetLibraryItemsMediaContainer) GetTitle1() *string {
if o == nil {
return nil
}
return o.Title1
}
func (o *GetLibraryItemsMediaContainer) GetTitle2() *string {
if o == nil {
return nil
}
return o.Title2
}
func (o *GetLibraryItemsMediaContainer) GetViewGroup() *string {
if o == nil {
return nil
}
return o.ViewGroup
}
func (o *GetLibraryItemsMediaContainer) GetViewMode() *int {
if o == nil {
return nil
}
return o.ViewMode
}
func (o *GetLibraryItemsMediaContainer) GetMetadata() []GetLibraryItemsMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// GetLibraryItemsResponseBody - The contents of the library by section and tag
type GetLibraryItemsResponseBody struct {
Errors []GetLibraryItemsErrors `json:"errors,omitempty"`
MediaContainer *GetLibraryItemsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetLibraryItemsResponseBody) GetErrors() []GetLibraryItemsErrors {
func (o *GetLibraryItemsResponseBody) GetMediaContainer() *GetLibraryItemsMediaContainer {
if o == nil {
return nil
}
return o.Errors
return o.MediaContainer
}
type GetLibraryItemsResponse struct {
@@ -82,7 +770,7 @@ type GetLibraryItemsResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
// The contents of the library by section and tag
Object *GetLibraryItemsResponseBody
}

File diff suppressed because it is too large Load Diff

View File

@@ -45,18 +45,479 @@ func (o *GetMetadataChildrenErrors) GetStatus() *float64 {
return o.Status
}
// GetMetadataChildrenResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetMetadataChildrenResponseBody struct {
// GetMetadataChildrenLibraryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetMetadataChildrenLibraryResponseBody struct {
Errors []GetMetadataChildrenErrors `json:"errors,omitempty"`
}
func (o *GetMetadataChildrenResponseBody) GetErrors() []GetMetadataChildrenErrors {
func (o *GetMetadataChildrenLibraryResponseBody) GetErrors() []GetMetadataChildrenErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetMetadataChildrenDirectory struct {
LeafCount *int `json:"leafCount,omitempty"`
Thumb *string `json:"thumb,omitempty"`
ViewedLeafCount *int `json:"viewedLeafCount,omitempty"`
Key *string `json:"key,omitempty"`
Title *string `json:"title,omitempty"`
}
func (o *GetMetadataChildrenDirectory) GetLeafCount() *int {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *GetMetadataChildrenDirectory) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetMetadataChildrenDirectory) GetViewedLeafCount() *int {
if o == nil {
return nil
}
return o.ViewedLeafCount
}
func (o *GetMetadataChildrenDirectory) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetMetadataChildrenDirectory) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
type GetMetadataChildrenMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
GUID *string `json:"guid,omitempty"`
ParentGUID *string `json:"parentGuid,omitempty"`
ParentStudio *string `json:"parentStudio,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
ParentKey *string `json:"parentKey,omitempty"`
ParentTitle *string `json:"parentTitle,omitempty"`
Summary *string `json:"summary,omitempty"`
Index *int `json:"index,omitempty"`
ParentIndex *int `json:"parentIndex,omitempty"`
ViewCount *int `json:"viewCount,omitempty"`
LastViewedAt *int `json:"lastViewedAt,omitempty"`
ParentYear *int `json:"parentYear,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Art *string `json:"art,omitempty"`
ParentThumb *string `json:"parentThumb,omitempty"`
ParentTheme *string `json:"parentTheme,omitempty"`
LeafCount *int `json:"leafCount,omitempty"`
ViewedLeafCount *int `json:"viewedLeafCount,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
UserRating *int `json:"userRating,omitempty"`
SkipCount *int `json:"skipCount,omitempty"`
LastRatedAt *int `json:"lastRatedAt,omitempty"`
}
func (o *GetMetadataChildrenMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetMetadataChildrenMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetMetadataChildrenMetadata) GetParentRatingKey() *string {
if o == nil {
return nil
}
return o.ParentRatingKey
}
func (o *GetMetadataChildrenMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *GetMetadataChildrenMetadata) GetParentGUID() *string {
if o == nil {
return nil
}
return o.ParentGUID
}
func (o *GetMetadataChildrenMetadata) GetParentStudio() *string {
if o == nil {
return nil
}
return o.ParentStudio
}
func (o *GetMetadataChildrenMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetMetadataChildrenMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetMetadataChildrenMetadata) GetParentKey() *string {
if o == nil {
return nil
}
return o.ParentKey
}
func (o *GetMetadataChildrenMetadata) GetParentTitle() *string {
if o == nil {
return nil
}
return o.ParentTitle
}
func (o *GetMetadataChildrenMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *GetMetadataChildrenMetadata) GetIndex() *int {
if o == nil {
return nil
}
return o.Index
}
func (o *GetMetadataChildrenMetadata) GetParentIndex() *int {
if o == nil {
return nil
}
return o.ParentIndex
}
func (o *GetMetadataChildrenMetadata) GetViewCount() *int {
if o == nil {
return nil
}
return o.ViewCount
}
func (o *GetMetadataChildrenMetadata) GetLastViewedAt() *int {
if o == nil {
return nil
}
return o.LastViewedAt
}
func (o *GetMetadataChildrenMetadata) GetParentYear() *int {
if o == nil {
return nil
}
return o.ParentYear
}
func (o *GetMetadataChildrenMetadata) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetMetadataChildrenMetadata) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *GetMetadataChildrenMetadata) GetParentThumb() *string {
if o == nil {
return nil
}
return o.ParentThumb
}
func (o *GetMetadataChildrenMetadata) GetParentTheme() *string {
if o == nil {
return nil
}
return o.ParentTheme
}
func (o *GetMetadataChildrenMetadata) GetLeafCount() *int {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *GetMetadataChildrenMetadata) GetViewedLeafCount() *int {
if o == nil {
return nil
}
return o.ViewedLeafCount
}
func (o *GetMetadataChildrenMetadata) GetAddedAt() *int {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *GetMetadataChildrenMetadata) GetUpdatedAt() *int {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *GetMetadataChildrenMetadata) GetUserRating() *int {
if o == nil {
return nil
}
return o.UserRating
}
func (o *GetMetadataChildrenMetadata) GetSkipCount() *int {
if o == nil {
return nil
}
return o.SkipCount
}
func (o *GetMetadataChildrenMetadata) GetLastRatedAt() *int {
if o == nil {
return nil
}
return o.LastRatedAt
}
type GetMetadataChildrenMediaContainer struct {
Size *int `json:"size,omitempty"`
AllowSync *bool `json:"allowSync,omitempty"`
Art *string `json:"art,omitempty"`
Identifier *string `json:"identifier,omitempty"`
Key *string `json:"key,omitempty"`
LibrarySectionID *int `json:"librarySectionID,omitempty"`
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
LibrarySectionUUID *string `json:"librarySectionUUID,omitempty"`
MediaTagPrefix *string `json:"mediaTagPrefix,omitempty"`
MediaTagVersion *int `json:"mediaTagVersion,omitempty"`
Nocache *bool `json:"nocache,omitempty"`
ParentIndex *int `json:"parentIndex,omitempty"`
ParentTitle *string `json:"parentTitle,omitempty"`
ParentYear *int `json:"parentYear,omitempty"`
Summary *string `json:"summary,omitempty"`
Theme *string `json:"theme,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Title1 *string `json:"title1,omitempty"`
Title2 *string `json:"title2,omitempty"`
ViewGroup *string `json:"viewGroup,omitempty"`
ViewMode *int `json:"viewMode,omitempty"`
Directory []GetMetadataChildrenDirectory `json:"Directory,omitempty"`
Metadata []GetMetadataChildrenMetadata `json:"Metadata,omitempty"`
}
func (o *GetMetadataChildrenMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetMetadataChildrenMediaContainer) GetAllowSync() *bool {
if o == nil {
return nil
}
return o.AllowSync
}
func (o *GetMetadataChildrenMediaContainer) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *GetMetadataChildrenMediaContainer) GetIdentifier() *string {
if o == nil {
return nil
}
return o.Identifier
}
func (o *GetMetadataChildrenMediaContainer) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetMetadataChildrenMediaContainer) GetLibrarySectionID() *int {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetMetadataChildrenMediaContainer) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetMetadataChildrenMediaContainer) GetLibrarySectionUUID() *string {
if o == nil {
return nil
}
return o.LibrarySectionUUID
}
func (o *GetMetadataChildrenMediaContainer) GetMediaTagPrefix() *string {
if o == nil {
return nil
}
return o.MediaTagPrefix
}
func (o *GetMetadataChildrenMediaContainer) GetMediaTagVersion() *int {
if o == nil {
return nil
}
return o.MediaTagVersion
}
func (o *GetMetadataChildrenMediaContainer) GetNocache() *bool {
if o == nil {
return nil
}
return o.Nocache
}
func (o *GetMetadataChildrenMediaContainer) GetParentIndex() *int {
if o == nil {
return nil
}
return o.ParentIndex
}
func (o *GetMetadataChildrenMediaContainer) GetParentTitle() *string {
if o == nil {
return nil
}
return o.ParentTitle
}
func (o *GetMetadataChildrenMediaContainer) GetParentYear() *int {
if o == nil {
return nil
}
return o.ParentYear
}
func (o *GetMetadataChildrenMediaContainer) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *GetMetadataChildrenMediaContainer) GetTheme() *string {
if o == nil {
return nil
}
return o.Theme
}
func (o *GetMetadataChildrenMediaContainer) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetMetadataChildrenMediaContainer) GetTitle1() *string {
if o == nil {
return nil
}
return o.Title1
}
func (o *GetMetadataChildrenMediaContainer) GetTitle2() *string {
if o == nil {
return nil
}
return o.Title2
}
func (o *GetMetadataChildrenMediaContainer) GetViewGroup() *string {
if o == nil {
return nil
}
return o.ViewGroup
}
func (o *GetMetadataChildrenMediaContainer) GetViewMode() *int {
if o == nil {
return nil
}
return o.ViewMode
}
func (o *GetMetadataChildrenMediaContainer) GetDirectory() []GetMetadataChildrenDirectory {
if o == nil {
return nil
}
return o.Directory
}
func (o *GetMetadataChildrenMediaContainer) GetMetadata() []GetMetadataChildrenMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// GetMetadataChildrenResponseBody - The children of the library item.
type GetMetadataChildrenResponseBody struct {
MediaContainer *GetMetadataChildrenMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetMetadataChildrenResponseBody) GetMediaContainer() *GetMetadataChildrenMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetMetadataChildrenResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -64,8 +525,10 @@ type GetMetadataChildrenResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// The children of the library item.
TwoHundredApplicationJSONObject *GetMetadataChildrenResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetMetadataChildrenResponseBody
FourHundredAndOneApplicationJSONObject *GetMetadataChildrenLibraryResponseBody
}
func (o *GetMetadataChildrenResponse) GetContentType() string {
@@ -89,9 +552,16 @@ func (o *GetMetadataChildrenResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *GetMetadataChildrenResponse) GetObject() *GetMetadataChildrenResponseBody {
func (o *GetMetadataChildrenResponse) GetTwoHundredApplicationJSONObject() *GetMetadataChildrenResponseBody {
if o == nil {
return nil
}
return o.Object
return o.TwoHundredApplicationJSONObject
}
func (o *GetMetadataChildrenResponse) GetFourHundredAndOneApplicationJSONObject() *GetMetadataChildrenLibraryResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -47,7 +47,7 @@ func (o *GetOnDeckLibraryResponseBody) GetErrors() []GetOnDeckErrors {
return o.Errors
}
type Stream struct {
type GetOnDeckStream struct {
ID *float64 `json:"id,omitempty"`
StreamType *float64 `json:"streamType,omitempty"`
Default *bool `json:"default,omitempty"`
@@ -73,161 +73,161 @@ type Stream struct {
ExtendedDisplayTitle *string `json:"extendedDisplayTitle,omitempty"`
}
func (o *Stream) GetID() *float64 {
func (o *GetOnDeckStream) GetID() *float64 {
if o == nil {
return nil
}
return o.ID
}
func (o *Stream) GetStreamType() *float64 {
func (o *GetOnDeckStream) GetStreamType() *float64 {
if o == nil {
return nil
}
return o.StreamType
}
func (o *Stream) GetDefault() *bool {
func (o *GetOnDeckStream) GetDefault() *bool {
if o == nil {
return nil
}
return o.Default
}
func (o *Stream) GetCodec() *string {
func (o *GetOnDeckStream) GetCodec() *string {
if o == nil {
return nil
}
return o.Codec
}
func (o *Stream) GetIndex() *float64 {
func (o *GetOnDeckStream) GetIndex() *float64 {
if o == nil {
return nil
}
return o.Index
}
func (o *Stream) GetBitrate() *float64 {
func (o *GetOnDeckStream) GetBitrate() *float64 {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *Stream) GetLanguage() *string {
func (o *GetOnDeckStream) GetLanguage() *string {
if o == nil {
return nil
}
return o.Language
}
func (o *Stream) GetLanguageTag() *string {
func (o *GetOnDeckStream) GetLanguageTag() *string {
if o == nil {
return nil
}
return o.LanguageTag
}
func (o *Stream) GetLanguageCode() *string {
func (o *GetOnDeckStream) GetLanguageCode() *string {
if o == nil {
return nil
}
return o.LanguageCode
}
func (o *Stream) GetBitDepth() *float64 {
func (o *GetOnDeckStream) GetBitDepth() *float64 {
if o == nil {
return nil
}
return o.BitDepth
}
func (o *Stream) GetChromaLocation() *string {
func (o *GetOnDeckStream) GetChromaLocation() *string {
if o == nil {
return nil
}
return o.ChromaLocation
}
func (o *Stream) GetChromaSubsampling() *string {
func (o *GetOnDeckStream) GetChromaSubsampling() *string {
if o == nil {
return nil
}
return o.ChromaSubsampling
}
func (o *Stream) GetCodedHeight() *float64 {
func (o *GetOnDeckStream) GetCodedHeight() *float64 {
if o == nil {
return nil
}
return o.CodedHeight
}
func (o *Stream) GetCodedWidth() *float64 {
func (o *GetOnDeckStream) GetCodedWidth() *float64 {
if o == nil {
return nil
}
return o.CodedWidth
}
func (o *Stream) GetColorRange() *string {
func (o *GetOnDeckStream) GetColorRange() *string {
if o == nil {
return nil
}
return o.ColorRange
}
func (o *Stream) GetFrameRate() *float64 {
func (o *GetOnDeckStream) GetFrameRate() *float64 {
if o == nil {
return nil
}
return o.FrameRate
}
func (o *Stream) GetHeight() *float64 {
func (o *GetOnDeckStream) GetHeight() *float64 {
if o == nil {
return nil
}
return o.Height
}
func (o *Stream) GetLevel() *float64 {
func (o *GetOnDeckStream) GetLevel() *float64 {
if o == nil {
return nil
}
return o.Level
}
func (o *Stream) GetProfile() *string {
func (o *GetOnDeckStream) GetProfile() *string {
if o == nil {
return nil
}
return o.Profile
}
func (o *Stream) GetRefFrames() *float64 {
func (o *GetOnDeckStream) GetRefFrames() *float64 {
if o == nil {
return nil
}
return o.RefFrames
}
func (o *Stream) GetWidth() *float64 {
func (o *GetOnDeckStream) GetWidth() *float64 {
if o == nil {
return nil
}
return o.Width
}
func (o *Stream) GetDisplayTitle() *string {
func (o *GetOnDeckStream) GetDisplayTitle() *string {
if o == nil {
return nil
}
return o.DisplayTitle
}
func (o *Stream) GetExtendedDisplayTitle() *string {
func (o *GetOnDeckStream) GetExtendedDisplayTitle() *string {
if o == nil {
return nil
}
@@ -243,7 +243,7 @@ type GetOnDeckPart struct {
AudioProfile *string `json:"audioProfile,omitempty"`
Container *string `json:"container,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
Stream []Stream `json:"Stream,omitempty"`
Stream []GetOnDeckStream `json:"Stream,omitempty"`
}
func (o *GetOnDeckPart) GetID() *float64 {
@@ -302,7 +302,7 @@ func (o *GetOnDeckPart) GetVideoProfile() *string {
return o.VideoProfile
}
func (o *GetOnDeckPart) GetStream() []Stream {
func (o *GetOnDeckPart) GetStream() []GetOnDeckStream {
if o == nil {
return nil
}
@@ -432,11 +432,11 @@ func (o *GetOnDeckMedia) GetPart() []GetOnDeckPart {
return o.Part
}
type Guids struct {
type GetOnDeckGuids struct {
ID *string `json:"id,omitempty"`
}
func (o *Guids) GetID() *string {
func (o *GetOnDeckGuids) GetID() *string {
if o == nil {
return nil
}
@@ -479,7 +479,7 @@ type GetOnDeckMetadata struct {
AddedAt *float64 `json:"addedAt,omitempty"`
UpdatedAt *float64 `json:"updatedAt,omitempty"`
Media []GetOnDeckMedia `json:"Media,omitempty"`
Guids []Guids `json:"Guid,omitempty"`
Guids []GetOnDeckGuids `json:"Guid,omitempty"`
}
func (g GetOnDeckMetadata) MarshalJSON() ([]byte, error) {
@@ -738,7 +738,7 @@ func (o *GetOnDeckMetadata) GetMedia() []GetOnDeckMedia {
return o.Media
}
func (o *GetOnDeckMetadata) GetGuids() []Guids {
func (o *GetOnDeckMetadata) GetGuids() []GetOnDeckGuids {
if o == nil {
return nil
}

View File

@@ -45,18 +45,172 @@ func (o *GetPlaylistErrors) GetStatus() *float64 {
return o.Status
}
// GetPlaylistResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetPlaylistResponseBody struct {
// GetPlaylistPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetPlaylistPlaylistsResponseBody struct {
Errors []GetPlaylistErrors `json:"errors,omitempty"`
}
func (o *GetPlaylistResponseBody) GetErrors() []GetPlaylistErrors {
func (o *GetPlaylistPlaylistsResponseBody) GetErrors() []GetPlaylistErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetPlaylistMetadata struct {
Content *string `json:"content,omitempty"`
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
Summary *string `json:"summary,omitempty"`
Smart *bool `json:"smart,omitempty"`
PlaylistType *string `json:"playlistType,omitempty"`
Composite *string `json:"composite,omitempty"`
Icon *string `json:"icon,omitempty"`
Duration *int `json:"duration,omitempty"`
LeafCount *int `json:"leafCount,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
}
func (o *GetPlaylistMetadata) GetContent() *string {
if o == nil {
return nil
}
return o.Content
}
func (o *GetPlaylistMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetPlaylistMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetPlaylistMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *GetPlaylistMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetPlaylistMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetPlaylistMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *GetPlaylistMetadata) GetSmart() *bool {
if o == nil {
return nil
}
return o.Smart
}
func (o *GetPlaylistMetadata) GetPlaylistType() *string {
if o == nil {
return nil
}
return o.PlaylistType
}
func (o *GetPlaylistMetadata) GetComposite() *string {
if o == nil {
return nil
}
return o.Composite
}
func (o *GetPlaylistMetadata) GetIcon() *string {
if o == nil {
return nil
}
return o.Icon
}
func (o *GetPlaylistMetadata) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetPlaylistMetadata) GetLeafCount() *int {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *GetPlaylistMetadata) GetAddedAt() *int {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *GetPlaylistMetadata) GetUpdatedAt() *int {
if o == nil {
return nil
}
return o.UpdatedAt
}
type GetPlaylistMediaContainer struct {
Size *int `json:"size,omitempty"`
Metadata []GetPlaylistMetadata `json:"Metadata,omitempty"`
}
func (o *GetPlaylistMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetPlaylistMediaContainer) GetMetadata() []GetPlaylistMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// GetPlaylistResponseBody - The playlist
type GetPlaylistResponseBody struct {
MediaContainer *GetPlaylistMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetPlaylistResponseBody) GetMediaContainer() *GetPlaylistMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetPlaylistResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -64,8 +218,10 @@ type GetPlaylistResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// The playlist
TwoHundredApplicationJSONObject *GetPlaylistResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetPlaylistResponseBody
FourHundredAndOneApplicationJSONObject *GetPlaylistPlaylistsResponseBody
}
func (o *GetPlaylistResponse) GetContentType() string {
@@ -89,9 +245,16 @@ func (o *GetPlaylistResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *GetPlaylistResponse) GetObject() *GetPlaylistResponseBody {
func (o *GetPlaylistResponse) GetTwoHundredApplicationJSONObject() *GetPlaylistResponseBody {
if o == nil {
return nil
}
return o.Object
return o.TwoHundredApplicationJSONObject
}
func (o *GetPlaylistResponse) GetFourHundredAndOneApplicationJSONObject() *GetPlaylistPlaylistsResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -3,6 +3,8 @@
package operations
import (
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/types"
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
"net/http"
)
@@ -54,18 +56,652 @@ func (o *GetPlaylistContentsErrors) GetStatus() *float64 {
return o.Status
}
// GetPlaylistContentsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetPlaylistContentsResponseBody struct {
// GetPlaylistContentsPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetPlaylistContentsPlaylistsResponseBody struct {
Errors []GetPlaylistContentsErrors `json:"errors,omitempty"`
}
func (o *GetPlaylistContentsResponseBody) GetErrors() []GetPlaylistContentsErrors {
func (o *GetPlaylistContentsPlaylistsResponseBody) GetErrors() []GetPlaylistContentsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetPlaylistContentsPart struct {
ID *int `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
Duration *int `json:"duration,omitempty"`
File *string `json:"file,omitempty"`
Size *int `json:"size,omitempty"`
AudioProfile *string `json:"audioProfile,omitempty"`
Container *string `json:"container,omitempty"`
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
OptimizedForStreaming *bool `json:"optimizedForStreaming,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
}
func (o *GetPlaylistContentsPart) GetID() *int {
if o == nil {
return nil
}
return o.ID
}
func (o *GetPlaylistContentsPart) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetPlaylistContentsPart) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetPlaylistContentsPart) GetFile() *string {
if o == nil {
return nil
}
return o.File
}
func (o *GetPlaylistContentsPart) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetPlaylistContentsPart) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetPlaylistContentsPart) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetPlaylistContentsPart) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *GetPlaylistContentsPart) GetOptimizedForStreaming() *bool {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *GetPlaylistContentsPart) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
type GetPlaylistContentsMedia struct {
ID *int `json:"id,omitempty"`
Duration *int `json:"duration,omitempty"`
Bitrate *int `json:"bitrate,omitempty"`
Width *int `json:"width,omitempty"`
Height *int `json:"height,omitempty"`
AspectRatio *float64 `json:"aspectRatio,omitempty"`
AudioChannels *int `json:"audioChannels,omitempty"`
AudioCodec *string `json:"audioCodec,omitempty"`
VideoCodec *string `json:"videoCodec,omitempty"`
VideoResolution *string `json:"videoResolution,omitempty"`
Container *string `json:"container,omitempty"`
VideoFrameRate *string `json:"videoFrameRate,omitempty"`
OptimizedForStreaming *int `json:"optimizedForStreaming,omitempty"`
AudioProfile *string `json:"audioProfile,omitempty"`
Has64bitOffsets *bool `json:"has64bitOffsets,omitempty"`
VideoProfile *string `json:"videoProfile,omitempty"`
Part []GetPlaylistContentsPart `json:"Part,omitempty"`
}
func (o *GetPlaylistContentsMedia) GetID() *int {
if o == nil {
return nil
}
return o.ID
}
func (o *GetPlaylistContentsMedia) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetPlaylistContentsMedia) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetPlaylistContentsMedia) GetWidth() *int {
if o == nil {
return nil
}
return o.Width
}
func (o *GetPlaylistContentsMedia) GetHeight() *int {
if o == nil {
return nil
}
return o.Height
}
func (o *GetPlaylistContentsMedia) GetAspectRatio() *float64 {
if o == nil {
return nil
}
return o.AspectRatio
}
func (o *GetPlaylistContentsMedia) GetAudioChannels() *int {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *GetPlaylistContentsMedia) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *GetPlaylistContentsMedia) GetVideoCodec() *string {
if o == nil {
return nil
}
return o.VideoCodec
}
func (o *GetPlaylistContentsMedia) GetVideoResolution() *string {
if o == nil {
return nil
}
return o.VideoResolution
}
func (o *GetPlaylistContentsMedia) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetPlaylistContentsMedia) GetVideoFrameRate() *string {
if o == nil {
return nil
}
return o.VideoFrameRate
}
func (o *GetPlaylistContentsMedia) GetOptimizedForStreaming() *int {
if o == nil {
return nil
}
return o.OptimizedForStreaming
}
func (o *GetPlaylistContentsMedia) GetAudioProfile() *string {
if o == nil {
return nil
}
return o.AudioProfile
}
func (o *GetPlaylistContentsMedia) GetHas64bitOffsets() *bool {
if o == nil {
return nil
}
return o.Has64bitOffsets
}
func (o *GetPlaylistContentsMedia) GetVideoProfile() *string {
if o == nil {
return nil
}
return o.VideoProfile
}
func (o *GetPlaylistContentsMedia) GetPart() []GetPlaylistContentsPart {
if o == nil {
return nil
}
return o.Part
}
type GetPlaylistContentsGenre struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetPlaylistContentsGenre) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetPlaylistContentsCountry struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetPlaylistContentsCountry) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetPlaylistContentsDirector struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetPlaylistContentsDirector) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetPlaylistContentsWriter struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetPlaylistContentsWriter) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetPlaylistContentsRole struct {
Tag *string `json:"tag,omitempty"`
}
func (o *GetPlaylistContentsRole) GetTag() *string {
if o == nil {
return nil
}
return o.Tag
}
type GetPlaylistContentsMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Studio *string `json:"studio,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
TitleSort *string `json:"titleSort,omitempty"`
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
LibrarySectionID *int `json:"librarySectionID,omitempty"`
LibrarySectionKey *string `json:"librarySectionKey,omitempty"`
ContentRating *string `json:"contentRating,omitempty"`
Summary *string `json:"summary,omitempty"`
Rating *float64 `json:"rating,omitempty"`
AudienceRating *float64 `json:"audienceRating,omitempty"`
Year *int `json:"year,omitempty"`
Tagline *string `json:"tagline,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Art *string `json:"art,omitempty"`
Duration *int `json:"duration,omitempty"`
OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
AudienceRatingImage *string `json:"audienceRatingImage,omitempty"`
HasPremiumExtras *string `json:"hasPremiumExtras,omitempty"`
HasPremiumPrimaryExtra *string `json:"hasPremiumPrimaryExtra,omitempty"`
RatingImage *string `json:"ratingImage,omitempty"`
Media []GetPlaylistContentsMedia `json:"Media,omitempty"`
Genre []GetPlaylistContentsGenre `json:"Genre,omitempty"`
Country []GetPlaylistContentsCountry `json:"Country,omitempty"`
Director []GetPlaylistContentsDirector `json:"Director,omitempty"`
Writer []GetPlaylistContentsWriter `json:"Writer,omitempty"`
Role []GetPlaylistContentsRole `json:"Role,omitempty"`
}
func (g GetPlaylistContentsMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetPlaylistContentsMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetPlaylistContentsMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetPlaylistContentsMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetPlaylistContentsMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *GetPlaylistContentsMetadata) GetStudio() *string {
if o == nil {
return nil
}
return o.Studio
}
func (o *GetPlaylistContentsMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetPlaylistContentsMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetPlaylistContentsMetadata) GetTitleSort() *string {
if o == nil {
return nil
}
return o.TitleSort
}
func (o *GetPlaylistContentsMetadata) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetPlaylistContentsMetadata) GetLibrarySectionID() *int {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetPlaylistContentsMetadata) GetLibrarySectionKey() *string {
if o == nil {
return nil
}
return o.LibrarySectionKey
}
func (o *GetPlaylistContentsMetadata) GetContentRating() *string {
if o == nil {
return nil
}
return o.ContentRating
}
func (o *GetPlaylistContentsMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *GetPlaylistContentsMetadata) GetRating() *float64 {
if o == nil {
return nil
}
return o.Rating
}
func (o *GetPlaylistContentsMetadata) GetAudienceRating() *float64 {
if o == nil {
return nil
}
return o.AudienceRating
}
func (o *GetPlaylistContentsMetadata) GetYear() *int {
if o == nil {
return nil
}
return o.Year
}
func (o *GetPlaylistContentsMetadata) GetTagline() *string {
if o == nil {
return nil
}
return o.Tagline
}
func (o *GetPlaylistContentsMetadata) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetPlaylistContentsMetadata) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *GetPlaylistContentsMetadata) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetPlaylistContentsMetadata) GetOriginallyAvailableAt() *types.Date {
if o == nil {
return nil
}
return o.OriginallyAvailableAt
}
func (o *GetPlaylistContentsMetadata) GetAddedAt() *int {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *GetPlaylistContentsMetadata) GetUpdatedAt() *int {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *GetPlaylistContentsMetadata) GetAudienceRatingImage() *string {
if o == nil {
return nil
}
return o.AudienceRatingImage
}
func (o *GetPlaylistContentsMetadata) GetHasPremiumExtras() *string {
if o == nil {
return nil
}
return o.HasPremiumExtras
}
func (o *GetPlaylistContentsMetadata) GetHasPremiumPrimaryExtra() *string {
if o == nil {
return nil
}
return o.HasPremiumPrimaryExtra
}
func (o *GetPlaylistContentsMetadata) GetRatingImage() *string {
if o == nil {
return nil
}
return o.RatingImage
}
func (o *GetPlaylistContentsMetadata) GetMedia() []GetPlaylistContentsMedia {
if o == nil {
return nil
}
return o.Media
}
func (o *GetPlaylistContentsMetadata) GetGenre() []GetPlaylistContentsGenre {
if o == nil {
return nil
}
return o.Genre
}
func (o *GetPlaylistContentsMetadata) GetCountry() []GetPlaylistContentsCountry {
if o == nil {
return nil
}
return o.Country
}
func (o *GetPlaylistContentsMetadata) GetDirector() []GetPlaylistContentsDirector {
if o == nil {
return nil
}
return o.Director
}
func (o *GetPlaylistContentsMetadata) GetWriter() []GetPlaylistContentsWriter {
if o == nil {
return nil
}
return o.Writer
}
func (o *GetPlaylistContentsMetadata) GetRole() []GetPlaylistContentsRole {
if o == nil {
return nil
}
return o.Role
}
type GetPlaylistContentsMediaContainer struct {
Size *int `json:"size,omitempty"`
Composite *string `json:"composite,omitempty"`
Duration *int `json:"duration,omitempty"`
LeafCount *int `json:"leafCount,omitempty"`
PlaylistType *string `json:"playlistType,omitempty"`
RatingKey *string `json:"ratingKey,omitempty"`
Smart *bool `json:"smart,omitempty"`
Title *string `json:"title,omitempty"`
Metadata []GetPlaylistContentsMetadata `json:"Metadata,omitempty"`
}
func (o *GetPlaylistContentsMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetPlaylistContentsMediaContainer) GetComposite() *string {
if o == nil {
return nil
}
return o.Composite
}
func (o *GetPlaylistContentsMediaContainer) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetPlaylistContentsMediaContainer) GetLeafCount() *int {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *GetPlaylistContentsMediaContainer) GetPlaylistType() *string {
if o == nil {
return nil
}
return o.PlaylistType
}
func (o *GetPlaylistContentsMediaContainer) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetPlaylistContentsMediaContainer) GetSmart() *bool {
if o == nil {
return nil
}
return o.Smart
}
func (o *GetPlaylistContentsMediaContainer) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetPlaylistContentsMediaContainer) GetMetadata() []GetPlaylistContentsMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// GetPlaylistContentsResponseBody - The playlist contents
type GetPlaylistContentsResponseBody struct {
MediaContainer *GetPlaylistContentsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetPlaylistContentsResponseBody) GetMediaContainer() *GetPlaylistContentsMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetPlaylistContentsResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -73,8 +709,10 @@ type GetPlaylistContentsResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// The playlist contents
TwoHundredApplicationJSONObject *GetPlaylistContentsResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetPlaylistContentsResponseBody
FourHundredAndOneApplicationJSONObject *GetPlaylistContentsPlaylistsResponseBody
}
func (o *GetPlaylistContentsResponse) GetContentType() string {
@@ -98,9 +736,16 @@ func (o *GetPlaylistContentsResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *GetPlaylistContentsResponse) GetObject() *GetPlaylistContentsResponseBody {
func (o *GetPlaylistContentsResponse) GetTwoHundredApplicationJSONObject() *GetPlaylistContentsResponseBody {
if o == nil {
return nil
}
return o.Object
return o.TwoHundredApplicationJSONObject
}
func (o *GetPlaylistContentsResponse) GetFourHundredAndOneApplicationJSONObject() *GetPlaylistContentsPlaylistsResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -115,18 +115,180 @@ func (o *GetPlaylistsErrors) GetStatus() *float64 {
return o.Status
}
// GetPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetPlaylistsResponseBody struct {
// GetPlaylistsPlaylistsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetPlaylistsPlaylistsResponseBody struct {
Errors []GetPlaylistsErrors `json:"errors,omitempty"`
}
func (o *GetPlaylistsResponseBody) GetErrors() []GetPlaylistsErrors {
func (o *GetPlaylistsPlaylistsResponseBody) GetErrors() []GetPlaylistsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetPlaylistsMetadata struct {
RatingKey *string `json:"ratingKey,omitempty"`
Key *string `json:"key,omitempty"`
GUID *string `json:"guid,omitempty"`
Type *string `json:"type,omitempty"`
Title *string `json:"title,omitempty"`
Summary *string `json:"summary,omitempty"`
Smart *bool `json:"smart,omitempty"`
PlaylistType *string `json:"playlistType,omitempty"`
Composite *string `json:"composite,omitempty"`
Icon *string `json:"icon,omitempty"`
ViewCount *int `json:"viewCount,omitempty"`
LastViewedAt *int `json:"lastViewedAt,omitempty"`
Duration *int `json:"duration,omitempty"`
LeafCount *int `json:"leafCount,omitempty"`
AddedAt *int `json:"addedAt,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
}
func (o *GetPlaylistsMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetPlaylistsMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetPlaylistsMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *GetPlaylistsMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetPlaylistsMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetPlaylistsMetadata) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
func (o *GetPlaylistsMetadata) GetSmart() *bool {
if o == nil {
return nil
}
return o.Smart
}
func (o *GetPlaylistsMetadata) GetPlaylistType() *string {
if o == nil {
return nil
}
return o.PlaylistType
}
func (o *GetPlaylistsMetadata) GetComposite() *string {
if o == nil {
return nil
}
return o.Composite
}
func (o *GetPlaylistsMetadata) GetIcon() *string {
if o == nil {
return nil
}
return o.Icon
}
func (o *GetPlaylistsMetadata) GetViewCount() *int {
if o == nil {
return nil
}
return o.ViewCount
}
func (o *GetPlaylistsMetadata) GetLastViewedAt() *int {
if o == nil {
return nil
}
return o.LastViewedAt
}
func (o *GetPlaylistsMetadata) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetPlaylistsMetadata) GetLeafCount() *int {
if o == nil {
return nil
}
return o.LeafCount
}
func (o *GetPlaylistsMetadata) GetAddedAt() *int {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *GetPlaylistsMetadata) GetUpdatedAt() *int {
if o == nil {
return nil
}
return o.UpdatedAt
}
type GetPlaylistsMediaContainer struct {
Size *int `json:"size,omitempty"`
Metadata []GetPlaylistsMetadata `json:"Metadata,omitempty"`
}
func (o *GetPlaylistsMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetPlaylistsMediaContainer) GetMetadata() []GetPlaylistsMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// GetPlaylistsResponseBody - returns all playlists
type GetPlaylistsResponseBody struct {
MediaContainer *GetPlaylistsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetPlaylistsResponseBody) GetMediaContainer() *GetPlaylistsMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetPlaylistsResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -134,8 +296,10 @@ type GetPlaylistsResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// returns all playlists
TwoHundredApplicationJSONObject *GetPlaylistsResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetPlaylistsResponseBody
FourHundredAndOneApplicationJSONObject *GetPlaylistsPlaylistsResponseBody
}
func (o *GetPlaylistsResponse) GetContentType() string {
@@ -159,9 +323,16 @@ func (o *GetPlaylistsResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *GetPlaylistsResponse) GetObject() *GetPlaylistsResponseBody {
func (o *GetPlaylistsResponse) GetTwoHundredApplicationJSONObject() *GetPlaylistsResponseBody {
if o == nil {
return nil
}
return o.Object
return o.TwoHundredApplicationJSONObject
}
func (o *GetPlaylistsResponse) GetFourHundredAndOneApplicationJSONObject() *GetPlaylistsPlaylistsResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -80,7 +80,7 @@ func (o *GetServerIdentityMediaContainer) GetVersion() *string {
return o.Version
}
// GetServerIdentityResponseBody - The Transcode Sessions
// GetServerIdentityResponseBody - The Server Identity information
type GetServerIdentityResponseBody struct {
MediaContainer *GetServerIdentityMediaContainer `json:"MediaContainer,omitempty"`
}
@@ -99,7 +99,7 @@ type GetServerIdentityResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// The Transcode Sessions
// The Server Identity information
TwoHundredApplicationJSONObject *GetServerIdentityResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
FourHundredAndOneApplicationJSONObject *GetServerIdentityServerResponseBody

View File

@@ -3,6 +3,8 @@
package operations
import (
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/types"
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/pkg/utils"
"net/http"
)
@@ -33,18 +35,215 @@ func (o *GetSessionHistoryErrors) GetStatus() *float64 {
return o.Status
}
// GetSessionHistoryResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetSessionHistoryResponseBody struct {
// GetSessionHistorySessionsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetSessionHistorySessionsResponseBody struct {
Errors []GetSessionHistoryErrors `json:"errors,omitempty"`
}
func (o *GetSessionHistoryResponseBody) GetErrors() []GetSessionHistoryErrors {
func (o *GetSessionHistorySessionsResponseBody) GetErrors() []GetSessionHistoryErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetSessionHistoryMetadata struct {
HistoryKey *string `json:"historyKey,omitempty"`
Key *string `json:"key,omitempty"`
RatingKey *string `json:"ratingKey,omitempty"`
LibrarySectionID *string `json:"librarySectionID,omitempty"`
ParentKey *string `json:"parentKey,omitempty"`
GrandparentKey *string `json:"grandparentKey,omitempty"`
Title *string `json:"title,omitempty"`
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
Type *string `json:"type,omitempty"`
Thumb *string `json:"thumb,omitempty"`
ParentThumb *string `json:"parentThumb,omitempty"`
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
GrandparentArt *string `json:"grandparentArt,omitempty"`
Index *int `json:"index,omitempty"`
ParentIndex *int `json:"parentIndex,omitempty"`
OriginallyAvailableAt *types.Date `json:"originallyAvailableAt,omitempty"`
ViewedAt *int `json:"viewedAt,omitempty"`
AccountID *int `json:"accountID,omitempty"`
DeviceID *int `json:"deviceID,omitempty"`
}
func (g GetSessionHistoryMetadata) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetSessionHistoryMetadata) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetSessionHistoryMetadata) GetHistoryKey() *string {
if o == nil {
return nil
}
return o.HistoryKey
}
func (o *GetSessionHistoryMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetSessionHistoryMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetSessionHistoryMetadata) GetLibrarySectionID() *string {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetSessionHistoryMetadata) GetParentKey() *string {
if o == nil {
return nil
}
return o.ParentKey
}
func (o *GetSessionHistoryMetadata) GetGrandparentKey() *string {
if o == nil {
return nil
}
return o.GrandparentKey
}
func (o *GetSessionHistoryMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetSessionHistoryMetadata) GetGrandparentTitle() *string {
if o == nil {
return nil
}
return o.GrandparentTitle
}
func (o *GetSessionHistoryMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetSessionHistoryMetadata) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetSessionHistoryMetadata) GetParentThumb() *string {
if o == nil {
return nil
}
return o.ParentThumb
}
func (o *GetSessionHistoryMetadata) GetGrandparentThumb() *string {
if o == nil {
return nil
}
return o.GrandparentThumb
}
func (o *GetSessionHistoryMetadata) GetGrandparentArt() *string {
if o == nil {
return nil
}
return o.GrandparentArt
}
func (o *GetSessionHistoryMetadata) GetIndex() *int {
if o == nil {
return nil
}
return o.Index
}
func (o *GetSessionHistoryMetadata) GetParentIndex() *int {
if o == nil {
return nil
}
return o.ParentIndex
}
func (o *GetSessionHistoryMetadata) GetOriginallyAvailableAt() *types.Date {
if o == nil {
return nil
}
return o.OriginallyAvailableAt
}
func (o *GetSessionHistoryMetadata) GetViewedAt() *int {
if o == nil {
return nil
}
return o.ViewedAt
}
func (o *GetSessionHistoryMetadata) GetAccountID() *int {
if o == nil {
return nil
}
return o.AccountID
}
func (o *GetSessionHistoryMetadata) GetDeviceID() *int {
if o == nil {
return nil
}
return o.DeviceID
}
type GetSessionHistoryMediaContainer struct {
Size *int `json:"size,omitempty"`
Metadata []GetSessionHistoryMetadata `json:"Metadata,omitempty"`
}
func (o *GetSessionHistoryMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetSessionHistoryMediaContainer) GetMetadata() []GetSessionHistoryMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// GetSessionHistoryResponseBody - List of Plex Sessions
type GetSessionHistoryResponseBody struct {
MediaContainer *GetSessionHistoryMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetSessionHistoryResponseBody) GetMediaContainer() *GetSessionHistoryMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetSessionHistoryResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -52,8 +251,10 @@ type GetSessionHistoryResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// List of Plex Sessions
TwoHundredApplicationJSONObject *GetSessionHistoryResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetSessionHistoryResponseBody
FourHundredAndOneApplicationJSONObject *GetSessionHistorySessionsResponseBody
}
func (o *GetSessionHistoryResponse) GetContentType() string {
@@ -77,9 +278,16 @@ func (o *GetSessionHistoryResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *GetSessionHistoryResponse) GetObject() *GetSessionHistoryResponseBody {
func (o *GetSessionHistoryResponse) GetTwoHundredApplicationJSONObject() *GetSessionHistoryResponseBody {
if o == nil {
return nil
}
return o.Object
return o.TwoHundredApplicationJSONObject
}
func (o *GetSessionHistoryResponse) GetFourHundredAndOneApplicationJSONObject() *GetSessionHistorySessionsResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -33,18 +33,838 @@ func (o *GetSessionsErrors) GetStatus() *float64 {
return o.Status
}
// GetSessionsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetSessionsResponseBody struct {
// GetSessionsSessionsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetSessionsSessionsResponseBody struct {
Errors []GetSessionsErrors `json:"errors,omitempty"`
}
func (o *GetSessionsResponseBody) GetErrors() []GetSessionsErrors {
func (o *GetSessionsSessionsResponseBody) GetErrors() []GetSessionsErrors {
if o == nil {
return nil
}
return o.Errors
}
type GetSessionsStream struct {
AlbumGain *string `json:"albumGain,omitempty"`
AlbumPeak *string `json:"albumPeak,omitempty"`
AlbumRange *string `json:"albumRange,omitempty"`
AudioChannelLayout *string `json:"audioChannelLayout,omitempty"`
BitDepth *int `json:"bitDepth,omitempty"`
Bitrate *int `json:"bitrate,omitempty"`
Channels *int `json:"channels,omitempty"`
Codec *string `json:"codec,omitempty"`
DisplayTitle *string `json:"displayTitle,omitempty"`
ExtendedDisplayTitle *string `json:"extendedDisplayTitle,omitempty"`
Gain *string `json:"gain,omitempty"`
ID *string `json:"id,omitempty"`
Index *int `json:"index,omitempty"`
Loudness *string `json:"loudness,omitempty"`
Lra *string `json:"lra,omitempty"`
Peak *string `json:"peak,omitempty"`
SamplingRate *int `json:"samplingRate,omitempty"`
Selected *bool `json:"selected,omitempty"`
StreamType *int `json:"streamType,omitempty"`
Location *string `json:"location,omitempty"`
}
func (o *GetSessionsStream) GetAlbumGain() *string {
if o == nil {
return nil
}
return o.AlbumGain
}
func (o *GetSessionsStream) GetAlbumPeak() *string {
if o == nil {
return nil
}
return o.AlbumPeak
}
func (o *GetSessionsStream) GetAlbumRange() *string {
if o == nil {
return nil
}
return o.AlbumRange
}
func (o *GetSessionsStream) GetAudioChannelLayout() *string {
if o == nil {
return nil
}
return o.AudioChannelLayout
}
func (o *GetSessionsStream) GetBitDepth() *int {
if o == nil {
return nil
}
return o.BitDepth
}
func (o *GetSessionsStream) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetSessionsStream) GetChannels() *int {
if o == nil {
return nil
}
return o.Channels
}
func (o *GetSessionsStream) GetCodec() *string {
if o == nil {
return nil
}
return o.Codec
}
func (o *GetSessionsStream) GetDisplayTitle() *string {
if o == nil {
return nil
}
return o.DisplayTitle
}
func (o *GetSessionsStream) GetExtendedDisplayTitle() *string {
if o == nil {
return nil
}
return o.ExtendedDisplayTitle
}
func (o *GetSessionsStream) GetGain() *string {
if o == nil {
return nil
}
return o.Gain
}
func (o *GetSessionsStream) GetID() *string {
if o == nil {
return nil
}
return o.ID
}
func (o *GetSessionsStream) GetIndex() *int {
if o == nil {
return nil
}
return o.Index
}
func (o *GetSessionsStream) GetLoudness() *string {
if o == nil {
return nil
}
return o.Loudness
}
func (o *GetSessionsStream) GetLra() *string {
if o == nil {
return nil
}
return o.Lra
}
func (o *GetSessionsStream) GetPeak() *string {
if o == nil {
return nil
}
return o.Peak
}
func (o *GetSessionsStream) GetSamplingRate() *int {
if o == nil {
return nil
}
return o.SamplingRate
}
func (o *GetSessionsStream) GetSelected() *bool {
if o == nil {
return nil
}
return o.Selected
}
func (o *GetSessionsStream) GetStreamType() *int {
if o == nil {
return nil
}
return o.StreamType
}
func (o *GetSessionsStream) GetLocation() *string {
if o == nil {
return nil
}
return o.Location
}
type GetSessionsPart struct {
Container *string `json:"container,omitempty"`
Duration *int `json:"duration,omitempty"`
File *string `json:"file,omitempty"`
HasThumbnail *string `json:"hasThumbnail,omitempty"`
ID *string `json:"id,omitempty"`
Key *string `json:"key,omitempty"`
Size *int `json:"size,omitempty"`
Decision *string `json:"decision,omitempty"`
Selected *bool `json:"selected,omitempty"`
Stream []GetSessionsStream `json:"Stream,omitempty"`
}
func (o *GetSessionsPart) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetSessionsPart) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetSessionsPart) GetFile() *string {
if o == nil {
return nil
}
return o.File
}
func (o *GetSessionsPart) GetHasThumbnail() *string {
if o == nil {
return nil
}
return o.HasThumbnail
}
func (o *GetSessionsPart) GetID() *string {
if o == nil {
return nil
}
return o.ID
}
func (o *GetSessionsPart) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetSessionsPart) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetSessionsPart) GetDecision() *string {
if o == nil {
return nil
}
return o.Decision
}
func (o *GetSessionsPart) GetSelected() *bool {
if o == nil {
return nil
}
return o.Selected
}
func (o *GetSessionsPart) GetStream() []GetSessionsStream {
if o == nil {
return nil
}
return o.Stream
}
type GetSessionsMedia struct {
AudioChannels *int `json:"audioChannels,omitempty"`
AudioCodec *string `json:"audioCodec,omitempty"`
Bitrate *int `json:"bitrate,omitempty"`
Container *string `json:"container,omitempty"`
Duration *int `json:"duration,omitempty"`
ID *string `json:"id,omitempty"`
Selected *bool `json:"selected,omitempty"`
Part []GetSessionsPart `json:"Part,omitempty"`
}
func (o *GetSessionsMedia) GetAudioChannels() *int {
if o == nil {
return nil
}
return o.AudioChannels
}
func (o *GetSessionsMedia) GetAudioCodec() *string {
if o == nil {
return nil
}
return o.AudioCodec
}
func (o *GetSessionsMedia) GetBitrate() *int {
if o == nil {
return nil
}
return o.Bitrate
}
func (o *GetSessionsMedia) GetContainer() *string {
if o == nil {
return nil
}
return o.Container
}
func (o *GetSessionsMedia) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetSessionsMedia) GetID() *string {
if o == nil {
return nil
}
return o.ID
}
func (o *GetSessionsMedia) GetSelected() *bool {
if o == nil {
return nil
}
return o.Selected
}
func (o *GetSessionsMedia) GetPart() []GetSessionsPart {
if o == nil {
return nil
}
return o.Part
}
type User struct {
ID *string `json:"id,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Title *string `json:"title,omitempty"`
}
func (o *User) GetID() *string {
if o == nil {
return nil
}
return o.ID
}
func (o *User) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *User) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
type Player struct {
Address *string `json:"address,omitempty"`
MachineIdentifier *string `json:"machineIdentifier,omitempty"`
Model *string `json:"model,omitempty"`
Platform *string `json:"platform,omitempty"`
PlatformVersion *string `json:"platformVersion,omitempty"`
Product *string `json:"product,omitempty"`
Profile *string `json:"profile,omitempty"`
RemotePublicAddress *string `json:"remotePublicAddress,omitempty"`
State *string `json:"state,omitempty"`
Title *string `json:"title,omitempty"`
Version *string `json:"version,omitempty"`
Local *bool `json:"local,omitempty"`
Relayed *bool `json:"relayed,omitempty"`
Secure *bool `json:"secure,omitempty"`
UserID *int `json:"userID,omitempty"`
}
func (o *Player) GetAddress() *string {
if o == nil {
return nil
}
return o.Address
}
func (o *Player) GetMachineIdentifier() *string {
if o == nil {
return nil
}
return o.MachineIdentifier
}
func (o *Player) GetModel() *string {
if o == nil {
return nil
}
return o.Model
}
func (o *Player) GetPlatform() *string {
if o == nil {
return nil
}
return o.Platform
}
func (o *Player) GetPlatformVersion() *string {
if o == nil {
return nil
}
return o.PlatformVersion
}
func (o *Player) GetProduct() *string {
if o == nil {
return nil
}
return o.Product
}
func (o *Player) GetProfile() *string {
if o == nil {
return nil
}
return o.Profile
}
func (o *Player) GetRemotePublicAddress() *string {
if o == nil {
return nil
}
return o.RemotePublicAddress
}
func (o *Player) GetState() *string {
if o == nil {
return nil
}
return o.State
}
func (o *Player) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *Player) GetVersion() *string {
if o == nil {
return nil
}
return o.Version
}
func (o *Player) GetLocal() *bool {
if o == nil {
return nil
}
return o.Local
}
func (o *Player) GetRelayed() *bool {
if o == nil {
return nil
}
return o.Relayed
}
func (o *Player) GetSecure() *bool {
if o == nil {
return nil
}
return o.Secure
}
func (o *Player) GetUserID() *int {
if o == nil {
return nil
}
return o.UserID
}
type Session struct {
ID *string `json:"id,omitempty"`
Bandwidth *int `json:"bandwidth,omitempty"`
Location *string `json:"location,omitempty"`
}
func (o *Session) GetID() *string {
if o == nil {
return nil
}
return o.ID
}
func (o *Session) GetBandwidth() *int {
if o == nil {
return nil
}
return o.Bandwidth
}
func (o *Session) GetLocation() *string {
if o == nil {
return nil
}
return o.Location
}
type GetSessionsMetadata struct {
AddedAt *int `json:"addedAt,omitempty"`
Art *string `json:"art,omitempty"`
Duration *int `json:"duration,omitempty"`
GrandparentArt *string `json:"grandparentArt,omitempty"`
GrandparentGUID *string `json:"grandparentGuid,omitempty"`
GrandparentKey *string `json:"grandparentKey,omitempty"`
GrandparentRatingKey *string `json:"grandparentRatingKey,omitempty"`
GrandparentThumb *string `json:"grandparentThumb,omitempty"`
GrandparentTitle *string `json:"grandparentTitle,omitempty"`
GUID *string `json:"guid,omitempty"`
Index *int `json:"index,omitempty"`
Key *string `json:"key,omitempty"`
LibrarySectionID *string `json:"librarySectionID,omitempty"`
LibrarySectionKey *string `json:"librarySectionKey,omitempty"`
LibrarySectionTitle *string `json:"librarySectionTitle,omitempty"`
MusicAnalysisVersion *string `json:"musicAnalysisVersion,omitempty"`
ParentGUID *string `json:"parentGuid,omitempty"`
ParentIndex *int `json:"parentIndex,omitempty"`
ParentKey *string `json:"parentKey,omitempty"`
ParentRatingKey *string `json:"parentRatingKey,omitempty"`
ParentStudio *string `json:"parentStudio,omitempty"`
ParentThumb *string `json:"parentThumb,omitempty"`
ParentTitle *string `json:"parentTitle,omitempty"`
ParentYear *int `json:"parentYear,omitempty"`
RatingCount *int `json:"ratingCount,omitempty"`
RatingKey *string `json:"ratingKey,omitempty"`
SessionKey *string `json:"sessionKey,omitempty"`
Thumb *string `json:"thumb,omitempty"`
Title *string `json:"title,omitempty"`
TitleSort *string `json:"titleSort,omitempty"`
Type *string `json:"type,omitempty"`
UpdatedAt *int `json:"updatedAt,omitempty"`
ViewOffset *int `json:"viewOffset,omitempty"`
Media []GetSessionsMedia `json:"Media,omitempty"`
User *User `json:"User,omitempty"`
Player *Player `json:"Player,omitempty"`
Session *Session `json:"Session,omitempty"`
}
func (o *GetSessionsMetadata) GetAddedAt() *int {
if o == nil {
return nil
}
return o.AddedAt
}
func (o *GetSessionsMetadata) GetArt() *string {
if o == nil {
return nil
}
return o.Art
}
func (o *GetSessionsMetadata) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *GetSessionsMetadata) GetGrandparentArt() *string {
if o == nil {
return nil
}
return o.GrandparentArt
}
func (o *GetSessionsMetadata) GetGrandparentGUID() *string {
if o == nil {
return nil
}
return o.GrandparentGUID
}
func (o *GetSessionsMetadata) GetGrandparentKey() *string {
if o == nil {
return nil
}
return o.GrandparentKey
}
func (o *GetSessionsMetadata) GetGrandparentRatingKey() *string {
if o == nil {
return nil
}
return o.GrandparentRatingKey
}
func (o *GetSessionsMetadata) GetGrandparentThumb() *string {
if o == nil {
return nil
}
return o.GrandparentThumb
}
func (o *GetSessionsMetadata) GetGrandparentTitle() *string {
if o == nil {
return nil
}
return o.GrandparentTitle
}
func (o *GetSessionsMetadata) GetGUID() *string {
if o == nil {
return nil
}
return o.GUID
}
func (o *GetSessionsMetadata) GetIndex() *int {
if o == nil {
return nil
}
return o.Index
}
func (o *GetSessionsMetadata) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *GetSessionsMetadata) GetLibrarySectionID() *string {
if o == nil {
return nil
}
return o.LibrarySectionID
}
func (o *GetSessionsMetadata) GetLibrarySectionKey() *string {
if o == nil {
return nil
}
return o.LibrarySectionKey
}
func (o *GetSessionsMetadata) GetLibrarySectionTitle() *string {
if o == nil {
return nil
}
return o.LibrarySectionTitle
}
func (o *GetSessionsMetadata) GetMusicAnalysisVersion() *string {
if o == nil {
return nil
}
return o.MusicAnalysisVersion
}
func (o *GetSessionsMetadata) GetParentGUID() *string {
if o == nil {
return nil
}
return o.ParentGUID
}
func (o *GetSessionsMetadata) GetParentIndex() *int {
if o == nil {
return nil
}
return o.ParentIndex
}
func (o *GetSessionsMetadata) GetParentKey() *string {
if o == nil {
return nil
}
return o.ParentKey
}
func (o *GetSessionsMetadata) GetParentRatingKey() *string {
if o == nil {
return nil
}
return o.ParentRatingKey
}
func (o *GetSessionsMetadata) GetParentStudio() *string {
if o == nil {
return nil
}
return o.ParentStudio
}
func (o *GetSessionsMetadata) GetParentThumb() *string {
if o == nil {
return nil
}
return o.ParentThumb
}
func (o *GetSessionsMetadata) GetParentTitle() *string {
if o == nil {
return nil
}
return o.ParentTitle
}
func (o *GetSessionsMetadata) GetParentYear() *int {
if o == nil {
return nil
}
return o.ParentYear
}
func (o *GetSessionsMetadata) GetRatingCount() *int {
if o == nil {
return nil
}
return o.RatingCount
}
func (o *GetSessionsMetadata) GetRatingKey() *string {
if o == nil {
return nil
}
return o.RatingKey
}
func (o *GetSessionsMetadata) GetSessionKey() *string {
if o == nil {
return nil
}
return o.SessionKey
}
func (o *GetSessionsMetadata) GetThumb() *string {
if o == nil {
return nil
}
return o.Thumb
}
func (o *GetSessionsMetadata) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *GetSessionsMetadata) GetTitleSort() *string {
if o == nil {
return nil
}
return o.TitleSort
}
func (o *GetSessionsMetadata) GetType() *string {
if o == nil {
return nil
}
return o.Type
}
func (o *GetSessionsMetadata) GetUpdatedAt() *int {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *GetSessionsMetadata) GetViewOffset() *int {
if o == nil {
return nil
}
return o.ViewOffset
}
func (o *GetSessionsMetadata) GetMedia() []GetSessionsMedia {
if o == nil {
return nil
}
return o.Media
}
func (o *GetSessionsMetadata) GetUser() *User {
if o == nil {
return nil
}
return o.User
}
func (o *GetSessionsMetadata) GetPlayer() *Player {
if o == nil {
return nil
}
return o.Player
}
func (o *GetSessionsMetadata) GetSession() *Session {
if o == nil {
return nil
}
return o.Session
}
type GetSessionsMediaContainer struct {
Size *int `json:"size,omitempty"`
Metadata []GetSessionsMetadata `json:"Metadata,omitempty"`
}
func (o *GetSessionsMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetSessionsMediaContainer) GetMetadata() []GetSessionsMetadata {
if o == nil {
return nil
}
return o.Metadata
}
// GetSessionsResponseBody - List of Active Plex Sessions
type GetSessionsResponseBody struct {
MediaContainer *GetSessionsMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetSessionsResponseBody) GetMediaContainer() *GetSessionsMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetSessionsResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -52,8 +872,10 @@ type GetSessionsResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// List of Active Plex Sessions
TwoHundredApplicationJSONObject *GetSessionsResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetSessionsResponseBody
FourHundredAndOneApplicationJSONObject *GetSessionsSessionsResponseBody
}
func (o *GetSessionsResponse) GetContentType() string {
@@ -77,9 +899,16 @@ func (o *GetSessionsResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *GetSessionsResponse) GetObject() *GetSessionsResponseBody {
func (o *GetSessionsResponse) GetTwoHundredApplicationJSONObject() *GetSessionsResponseBody {
if o == nil {
return nil
}
return o.Object
return o.TwoHundredApplicationJSONObject
}
func (o *GetSessionsResponse) GetFourHundredAndOneApplicationJSONObject() *GetSessionsSessionsResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -50,20 +50,22 @@ type TranscodeSession struct {
Throttled *bool `json:"throttled,omitempty"`
Complete *bool `json:"complete,omitempty"`
Progress *float64 `json:"progress,omitempty"`
Size *float64 `json:"size,omitempty"`
Size *int `json:"size,omitempty"`
Speed *float64 `json:"speed,omitempty"`
Error *bool `json:"error,omitempty"`
Duration *float64 `json:"duration,omitempty"`
Duration *int `json:"duration,omitempty"`
Remaining *int `json:"remaining,omitempty"`
Context *string `json:"context,omitempty"`
SourceVideoCodec *string `json:"sourceVideoCodec,omitempty"`
SourceAudioCodec *string `json:"sourceAudioCodec,omitempty"`
VideoDecision *string `json:"videoDecision,omitempty"`
AudioDecision *string `json:"audioDecision,omitempty"`
SubtitleDecision *string `json:"subtitleDecision,omitempty"`
Protocol *string `json:"protocol,omitempty"`
Container *string `json:"container,omitempty"`
VideoCodec *string `json:"videoCodec,omitempty"`
AudioCodec *string `json:"audioCodec,omitempty"`
AudioChannels *float64 `json:"audioChannels,omitempty"`
AudioChannels *int `json:"audioChannels,omitempty"`
TranscodeHwRequested *bool `json:"transcodeHwRequested,omitempty"`
TimeStamp *float64 `json:"timeStamp,omitempty"`
MaxOffsetAvailable *float64 `json:"maxOffsetAvailable,omitempty"`
@@ -98,7 +100,7 @@ func (o *TranscodeSession) GetProgress() *float64 {
return o.Progress
}
func (o *TranscodeSession) GetSize() *float64 {
func (o *TranscodeSession) GetSize() *int {
if o == nil {
return nil
}
@@ -119,13 +121,20 @@ func (o *TranscodeSession) GetError() *bool {
return o.Error
}
func (o *TranscodeSession) GetDuration() *float64 {
func (o *TranscodeSession) GetDuration() *int {
if o == nil {
return nil
}
return o.Duration
}
func (o *TranscodeSession) GetRemaining() *int {
if o == nil {
return nil
}
return o.Remaining
}
func (o *TranscodeSession) GetContext() *string {
if o == nil {
return nil
@@ -161,6 +170,13 @@ func (o *TranscodeSession) GetAudioDecision() *string {
return o.AudioDecision
}
func (o *TranscodeSession) GetSubtitleDecision() *string {
if o == nil {
return nil
}
return o.SubtitleDecision
}
func (o *TranscodeSession) GetProtocol() *string {
if o == nil {
return nil
@@ -189,7 +205,7 @@ func (o *TranscodeSession) GetAudioCodec() *string {
return o.AudioCodec
}
func (o *TranscodeSession) GetAudioChannels() *float64 {
func (o *TranscodeSession) GetAudioChannels() *int {
if o == nil {
return nil
}
@@ -225,11 +241,11 @@ func (o *TranscodeSession) GetMinOffsetAvailable() *float64 {
}
type GetTranscodeSessionsMediaContainer struct {
Size *float64 `json:"size,omitempty"`
Size *int `json:"size,omitempty"`
TranscodeSession []TranscodeSession `json:"TranscodeSession,omitempty"`
}
func (o *GetTranscodeSessionsMediaContainer) GetSize() *float64 {
func (o *GetTranscodeSessionsMediaContainer) GetSize() *int {
if o == nil {
return nil
}

View File

@@ -33,18 +33,132 @@ func (o *GetUpdateStatusErrors) GetStatus() *float64 {
return o.Status
}
// GetUpdateStatusResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetUpdateStatusResponseBody struct {
// GetUpdateStatusUpdaterResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type GetUpdateStatusUpdaterResponseBody struct {
Errors []GetUpdateStatusErrors `json:"errors,omitempty"`
}
func (o *GetUpdateStatusResponseBody) GetErrors() []GetUpdateStatusErrors {
func (o *GetUpdateStatusUpdaterResponseBody) GetErrors() []GetUpdateStatusErrors {
if o == nil {
return nil
}
return o.Errors
}
type Release struct {
Key *string `json:"key,omitempty"`
Version *string `json:"version,omitempty"`
Added *string `json:"added,omitempty"`
Fixed *string `json:"fixed,omitempty"`
DownloadURL *string `json:"downloadURL,omitempty"`
State *string `json:"state,omitempty"`
}
func (o *Release) GetKey() *string {
if o == nil {
return nil
}
return o.Key
}
func (o *Release) GetVersion() *string {
if o == nil {
return nil
}
return o.Version
}
func (o *Release) GetAdded() *string {
if o == nil {
return nil
}
return o.Added
}
func (o *Release) GetFixed() *string {
if o == nil {
return nil
}
return o.Fixed
}
func (o *Release) GetDownloadURL() *string {
if o == nil {
return nil
}
return o.DownloadURL
}
func (o *Release) GetState() *string {
if o == nil {
return nil
}
return o.State
}
type GetUpdateStatusMediaContainer struct {
Size *int `json:"size,omitempty"`
CanInstall *bool `json:"canInstall,omitempty"`
CheckedAt *int `json:"checkedAt,omitempty"`
DownloadURL *string `json:"downloadURL,omitempty"`
Status *int `json:"status,omitempty"`
Release []Release `json:"Release,omitempty"`
}
func (o *GetUpdateStatusMediaContainer) GetSize() *int {
if o == nil {
return nil
}
return o.Size
}
func (o *GetUpdateStatusMediaContainer) GetCanInstall() *bool {
if o == nil {
return nil
}
return o.CanInstall
}
func (o *GetUpdateStatusMediaContainer) GetCheckedAt() *int {
if o == nil {
return nil
}
return o.CheckedAt
}
func (o *GetUpdateStatusMediaContainer) GetDownloadURL() *string {
if o == nil {
return nil
}
return o.DownloadURL
}
func (o *GetUpdateStatusMediaContainer) GetStatus() *int {
if o == nil {
return nil
}
return o.Status
}
func (o *GetUpdateStatusMediaContainer) GetRelease() []Release {
if o == nil {
return nil
}
return o.Release
}
// GetUpdateStatusResponseBody - The Server Updates
type GetUpdateStatusResponseBody struct {
MediaContainer *GetUpdateStatusMediaContainer `json:"MediaContainer,omitempty"`
}
func (o *GetUpdateStatusResponseBody) GetMediaContainer() *GetUpdateStatusMediaContainer {
if o == nil {
return nil
}
return o.MediaContainer
}
type GetUpdateStatusResponse struct {
// HTTP response content type for this operation
ContentType string
@@ -52,8 +166,10 @@ type GetUpdateStatusResponse struct {
StatusCode int
// Raw HTTP response; suitable for custom response parsing
RawResponse *http.Response
// The Server Updates
TwoHundredApplicationJSONObject *GetUpdateStatusResponseBody
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
Object *GetUpdateStatusResponseBody
FourHundredAndOneApplicationJSONObject *GetUpdateStatusUpdaterResponseBody
}
func (o *GetUpdateStatusResponse) GetContentType() string {
@@ -77,9 +193,16 @@ func (o *GetUpdateStatusResponse) GetRawResponse() *http.Response {
return o.RawResponse
}
func (o *GetUpdateStatusResponse) GetObject() *GetUpdateStatusResponseBody {
func (o *GetUpdateStatusResponse) GetTwoHundredApplicationJSONObject() *GetUpdateStatusResponseBody {
if o == nil {
return nil
}
return o.Object
return o.TwoHundredApplicationJSONObject
}
func (o *GetUpdateStatusResponse) GetFourHundredAndOneApplicationJSONObject() *GetUpdateStatusUpdaterResponseBody {
if o == nil {
return nil
}
return o.FourHundredAndOneApplicationJSONObject
}

View File

@@ -9,6 +9,10 @@ import (
type UpdatePlaylistRequest struct {
// the ID of the playlist
PlaylistID float64 `pathParam:"style=simple,explode=false,name=playlistID"`
// name of the playlist
Title *string `queryParam:"style=form,explode=true,name=title"`
// summary description of the playlist
Summary *string `queryParam:"style=form,explode=true,name=summary"`
}
func (o *UpdatePlaylistRequest) GetPlaylistID() float64 {
@@ -18,6 +22,20 @@ func (o *UpdatePlaylistRequest) GetPlaylistID() float64 {
return o.PlaylistID
}
func (o *UpdatePlaylistRequest) GetTitle() *string {
if o == nil {
return nil
}
return o.Title
}
func (o *UpdatePlaylistRequest) GetSummary() *string {
if o == nil {
return nil
}
return o.Summary
}
type UpdatePlaylistErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`

View File

@@ -8,8 +8,10 @@ import (
"net/http"
)
// Force - force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist.
// The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
// Force overwriting of duplicate playlists.
// By default, a playlist file uploaded with the same path will overwrite the existing playlist.
// The `force` argument is used to disable overwriting.
// If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
type Force int64
const (
@@ -46,8 +48,10 @@ type UploadPlaylistRequest struct {
// The GUID of each playlist is based on the filename.
//
Path string `queryParam:"style=form,explode=true,name=path"`
// force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist.
// The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
// Force overwriting of duplicate playlists.
// By default, a playlist file uploaded with the same path will overwrite the existing playlist.
// The `force` argument is used to disable overwriting.
// If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.
//
Force Force `queryParam:"style=form,explode=true,name=force"`
}

View File

@@ -30,7 +30,7 @@ func newPlaylists(sdkConfig sdkConfiguration) *Playlists {
// 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://...`).
// - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`).
// - `playQueueID` - To create a playlist from an existing play queue.
func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.CreatePlaylistRequest) (*operations.CreatePlaylistResponse, error) {
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
@@ -73,9 +73,6 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.CreatePlaylistResponseBody
@@ -83,7 +80,20 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.CreatePlaylistPlaylistsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
@@ -96,7 +106,7 @@ func (s *Playlists) CreatePlaylist(ctx context.Context, request operations.Creat
// Get All Playlists given the specified filters.
func (s *Playlists) GetPlaylists(ctx context.Context, request operations.GetPlaylistsRequest) (*operations.GetPlaylistsResponse, error) {
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
url := strings.TrimSuffix(baseURL, "/") + "/playlists/all"
url := strings.TrimSuffix(baseURL, "/") + "/playlists"
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
if err != nil {
@@ -135,9 +145,6 @@ func (s *Playlists) GetPlaylists(ctx context.Context, request operations.GetPlay
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetPlaylistsResponseBody
@@ -145,7 +152,20 @@ func (s *Playlists) GetPlaylists(ctx context.Context, request operations.GetPlay
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetPlaylistsPlaylistsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
@@ -197,9 +217,6 @@ func (s *Playlists) GetPlaylist(ctx context.Context, request operations.GetPlayl
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetPlaylistResponseBody
@@ -207,7 +224,20 @@ func (s *Playlists) GetPlaylist(ctx context.Context, request operations.GetPlayl
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetPlaylistPlaylistsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
@@ -293,6 +323,10 @@ func (s *Playlists) UpdatePlaylist(ctx context.Context, request operations.Updat
req.Header.Set("Accept", "application/json")
req.Header.Set("user-agent", s.sdkConfiguration.UserAgent)
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
return nil, fmt.Errorf("error populating query params: %w", err)
}
client := s.sdkConfiguration.SecurityClient
httpRes, err := client.Do(req)
@@ -387,9 +421,6 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, request operations.
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetPlaylistContentsResponseBody
@@ -397,7 +428,20 @@ func (s *Playlists) GetPlaylistContents(ctx context.Context, request operations.
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetPlaylistContentsPlaylistsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
@@ -468,7 +512,7 @@ func (s *Playlists) ClearPlaylistContents(ctx context.Context, request operation
}
// 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.
// Adds a generator to a playlist, same parameters as the POST to create. 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.
func (s *Playlists) AddPlaylistContents(ctx context.Context, request operations.AddPlaylistContentsRequest) (*operations.AddPlaylistContentsResponse, error) {
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
@@ -514,9 +558,6 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, request operations.
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.AddPlaylistContentsResponseBody
@@ -524,7 +565,20 @@ func (s *Playlists) AddPlaylistContents(ctx context.Context, request operations.
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.AddPlaylistContentsPlaylistsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}

View File

@@ -259,9 +259,9 @@ func New(opts ...SDKOption) *PlexAPI {
sdkConfiguration: sdkConfiguration{
Language: "go",
OpenAPIDocVersion: "0.0.3",
SDKVersion: "0.3.0",
SDKVersion: "0.3.1",
GenVersion: "2.237.3",
UserAgent: "speakeasy-sdk/go 0.3.0 2.237.3 0.0.3 PlexAPI",
UserAgent: "speakeasy-sdk/go 0.3.1 2.237.3 0.0.3 PlexAPI",
ServerDefaults: []map[string]string{
{
"protocol": "http",

View File

@@ -202,12 +202,12 @@ func (s *Server) GetAvailableClients(ctx context.Context) (*operations.GetAvaila
case httpRes.StatusCode == 200:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out []operations.ResponseBody
var out operations.GetAvailableClientsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.ResponseBodies = out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
@@ -215,12 +215,12 @@ func (s *Server) GetAvailableClients(ctx context.Context) (*operations.GetAvaila
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetAvailableClientsResponseBody
var out operations.GetAvailableClientsServerResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.Object = &out
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}

View File

@@ -64,9 +64,6 @@ func (s *Sessions) GetSessions(ctx context.Context) (*operations.GetSessionsResp
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetSessionsResponseBody
@@ -74,7 +71,20 @@ func (s *Sessions) GetSessions(ctx context.Context) (*operations.GetSessionsResp
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetSessionsSessionsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
@@ -122,9 +132,6 @@ func (s *Sessions) GetSessionHistory(ctx context.Context) (*operations.GetSessio
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetSessionHistoryResponseBody
@@ -132,7 +139,20 @@ func (s *Sessions) GetSessionHistory(ctx context.Context) (*operations.GetSessio
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetSessionHistorySessionsResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
@@ -250,7 +270,7 @@ func (s *Sessions) StopTranscodeSession(ctx context.Context, request operations.
RawResponse: httpRes,
}
switch {
case httpRes.StatusCode == 200:
case httpRes.StatusCode == 204:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:

View File

@@ -65,9 +65,6 @@ func (s *Updater) GetUpdateStatus(ctx context.Context) (*operations.GetUpdateSta
}
switch {
case httpRes.StatusCode == 200:
fallthrough
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetUpdateStatusResponseBody
@@ -75,7 +72,20 @@ func (s *Updater) GetUpdateStatus(ctx context.Context) (*operations.GetUpdateSta
return nil, err
}
res.Object = &out
res.TwoHundredApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}
case httpRes.StatusCode == 400:
case httpRes.StatusCode == 401:
switch {
case utils.MatchContentType(contentType, `application/json`):
var out operations.GetUpdateStatusUpdaterResponseBody
if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil {
return nil, err
}
res.FourHundredAndOneApplicationJSONObject = &out
default:
return nil, sdkerrors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", contentType), httpRes.StatusCode, string(rawBody), httpRes)
}