mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-07 12:37:45 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0e915da8b | ||
|
|
0077561a6a | ||
|
|
4b28ca3416 | ||
|
|
dd781d1e27 | ||
|
|
dcdcafc044 |
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -8,5 +8,4 @@
|
|||||||
*.bat text eol=crlf
|
*.bat text eol=crlf
|
||||||
|
|
||||||
# This allows generated code to be indexed correctly
|
# This allows generated code to be indexed correctly
|
||||||
*.java linguist-generated=false
|
*.java linguist-generated=false
|
||||||
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
**/.speakeasy/temp/
|
||||||
|
**/.speakeasy/logs/
|
||||||
.speakeasy/reports
|
.speakeasy/reports
|
||||||
# Ignore Gradle project-specific cache directory
|
# Ignore Gradle project-specific cache directory
|
||||||
.gradle
|
.gradle
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -11,11 +11,12 @@ generation:
|
|||||||
parameterOrderingFeb2024: true
|
parameterOrderingFeb2024: true
|
||||||
requestResponseComponentNamesFeb2024: true
|
requestResponseComponentNamesFeb2024: true
|
||||||
securityFeb2025: false
|
securityFeb2025: false
|
||||||
|
sharedErrorComponentsApr2025: false
|
||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
oAuth2PasswordEnabled: false
|
oAuth2PasswordEnabled: false
|
||||||
java:
|
java:
|
||||||
version: 0.14.0
|
version: 0.16.1
|
||||||
additionalDependencies: []
|
additionalDependencies: []
|
||||||
additionalPlugins: []
|
additionalPlugins: []
|
||||||
artifactID: plexapi
|
artifactID: plexapi
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
speakeasyVersion: 1.526.6
|
speakeasyVersion: 1.541.2
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
my-source:
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
@@ -8,19 +8,19 @@ sources:
|
|||||||
- latest
|
- latest
|
||||||
plexapi:
|
plexapi:
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf
|
sourceRevisionDigest: sha256:31ab7b2e65ccf1e0349bcd8b35791d1ce80091313481874749163fc0c80fd8ed
|
||||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
sourceBlobDigest: sha256:d971fff9723c626fe70403a2a83d813c396a20b06ccd6b899263762038cfdbb0
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- speakeasy-sdk-regen-1743440866
|
- speakeasy-sdk-regen-1746059587
|
||||||
targets:
|
targets:
|
||||||
plexjava:
|
plexjava:
|
||||||
source: plexapi
|
source: plexapi
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf
|
sourceRevisionDigest: sha256:31ab7b2e65ccf1e0349bcd8b35791d1ce80091313481874749163fc0c80fd8ed
|
||||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
sourceBlobDigest: sha256:d971fff9723c626fe70403a2a83d813c396a20b06ccd6b899263762038cfdbb0
|
||||||
codeSamplesNamespace: code-samples-java-plexjava
|
codeSamplesNamespace: code-samples-java-plexjava
|
||||||
codeSamplesRevisionDigest: sha256:efd9a529c906a73b2d32257e52235b87cdb19f16486800f6eb2172eec9454726
|
codeSamplesRevisionDigest: sha256:7014061698c081192d583b95c5cdcb4120fd314b9e0963b81fb16e74b320b426
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
|
|||||||
31
README.md
31
README.md
@@ -69,7 +69,7 @@ The samples below show how a published SDK artifact is used:
|
|||||||
|
|
||||||
Gradle:
|
Gradle:
|
||||||
```groovy
|
```groovy
|
||||||
implementation 'dev.plexapi:plexapi:0.14.0'
|
implementation 'dev.plexapi:plexapi:0.16.1'
|
||||||
```
|
```
|
||||||
|
|
||||||
Maven:
|
Maven:
|
||||||
@@ -77,7 +77,7 @@ Maven:
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>dev.plexapi</groupId>
|
<groupId>dev.plexapi</groupId>
|
||||||
<artifactId>plexapi</artifactId>
|
<artifactId>plexapi</artifactId>
|
||||||
<version>0.14.0</version>
|
<version>0.16.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -94,6 +94,29 @@ On Windows:
|
|||||||
```bash
|
```bash
|
||||||
gradlew.bat publishToMavenLocal -Pskip.signing
|
gradlew.bat publishToMavenLocal -Pskip.signing
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Logging
|
||||||
|
A logging framework/facade has not yet been adopted but is under consideration.
|
||||||
|
|
||||||
|
For request and response logging (especially json bodies) use:
|
||||||
|
```java
|
||||||
|
SpeakeasyHTTPClient.setDebugLogging(true); // experimental API only (may change without warning)
|
||||||
|
```
|
||||||
|
Example output:
|
||||||
|
```
|
||||||
|
Sending request: http://localhost:35123/bearer#global GET
|
||||||
|
Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]}
|
||||||
|
Received response: (GET http://localhost:35123/bearer#global) 200
|
||||||
|
Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]}
|
||||||
|
Response body:
|
||||||
|
{
|
||||||
|
"authenticated": true,
|
||||||
|
"token": "global"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
WARNING: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. <i>Authorization</i> headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`.
|
||||||
|
|
||||||
|
Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies.
|
||||||
<!-- End SDK Installation [installation] -->
|
<!-- End SDK Installation [installation] -->
|
||||||
|
|
||||||
<!-- Start SDK Example Usage [usage] -->
|
<!-- Start SDK Example Usage [usage] -->
|
||||||
@@ -177,6 +200,10 @@ public class Application {
|
|||||||
* [getActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media
|
* [getActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media
|
||||||
* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
||||||
* [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
* [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata
|
||||||
|
* [getMediaArts](docs/sdks/library/README.md#getmediaarts) - Get Media Background Artwork
|
||||||
|
* [postMediaArts](docs/sdks/library/README.md#postmediaarts) - Upload Media Background Artwork
|
||||||
|
* [getMediaPosters](docs/sdks/library/README.md#getmediaposters) - Get Media Posters
|
||||||
|
* [postMediaPoster](docs/sdks/library/README.md#postmediaposter) - Upload Media Poster
|
||||||
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children
|
||||||
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||||
|
|
||||||
|
|||||||
52
RELEASES.md
52
RELEASES.md
@@ -288,4 +288,54 @@ Based on:
|
|||||||
### Generated
|
### Generated
|
||||||
- [java v0.14.0] .
|
- [java v0.14.0] .
|
||||||
### Releases
|
### Releases
|
||||||
- [Maven Central v0.14.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.14.0 - .
|
- [Maven Central v0.14.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.14.0 - .
|
||||||
|
|
||||||
|
## 2025-04-03 00:27:41
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.528.1 (2.565.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [java v0.14.1] .
|
||||||
|
### Releases
|
||||||
|
- [Maven Central v0.14.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.14.1 - .
|
||||||
|
|
||||||
|
## 2025-04-06 00:30:19
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.529.1 (2.566.5) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [java v0.14.2] .
|
||||||
|
### Releases
|
||||||
|
- [Maven Central v0.14.2] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.14.2 - .
|
||||||
|
|
||||||
|
## 2025-04-14 00:30:37
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.531.4 (2.570.4) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [java v0.15.0] .
|
||||||
|
### Releases
|
||||||
|
- [Maven Central v0.15.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.15.0 - .
|
||||||
|
|
||||||
|
## 2025-04-19 00:27:27
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.535.1 (2.585.2) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [java v0.16.0] .
|
||||||
|
### Releases
|
||||||
|
- [Maven Central v0.16.0] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.16.0 - .
|
||||||
|
|
||||||
|
## 2025-05-01 00:32:51
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.541.2 (2.595.4) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [java v0.16.1] .
|
||||||
|
### Releases
|
||||||
|
- [Maven Central v0.16.1] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.16.1 - .
|
||||||
@@ -103,7 +103,7 @@ publishing {
|
|||||||
// https://github.com/gradle/gradle/issues/18619
|
// https://github.com/gradle/gradle/issues/18619
|
||||||
groupId = "dev.plexapi"
|
groupId = "dev.plexapi"
|
||||||
artifactId = "plexapi"
|
artifactId = "plexapi"
|
||||||
version = "0.14.0"
|
version = "0.16.1"
|
||||||
|
|
||||||
from components.java
|
from components.java
|
||||||
|
|
||||||
|
|||||||
806
codeSamples.yaml
806
codeSamples.yaml
File diff suppressed because it is too large
Load Diff
11
docs/models/operations/Attributes.md
Normal file
11
docs/models/operations/Attributes.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Attributes
|
||||||
|
|
||||||
|
Attributes associated with the marker.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
|
||||||
|
| `id` | *long* | :heavy_check_mark: | The identifier for the attributes. | 306970 |
|
||||||
|
| `version` | *Optional\<Long>* | :heavy_minus_sign: | The version number of the marker attributes. | 4 |
|
||||||
15
docs/models/operations/Chapter.md
Normal file
15
docs/models/operations/Chapter.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Chapter
|
||||||
|
|
||||||
|
The thumbnail for the chapter
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
||||||
|
| `id` | *long* | :heavy_check_mark: | N/A | 4 |
|
||||||
|
| `filter` | *String* | :heavy_check_mark: | N/A | thumb=4 |
|
||||||
|
| `index` | *long* | :heavy_check_mark: | N/A | 1 |
|
||||||
|
| `startTimeOffset` | *long* | :heavy_check_mark: | N/A | 0 |
|
||||||
|
| `endTimeOffset` | *long* | :heavy_check_mark: | N/A | 100100 |
|
||||||
|
| `thumb` | *String* | :heavy_check_mark: | N/A | /library/media/46883/chapterImages/1 |
|
||||||
@@ -7,6 +7,6 @@ The filter query string for country media items.
|
|||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | N/A | 259 |
|
| `id` | *int* | :heavy_check_mark: | N/A | 259 |
|
||||||
| `tag` | *String* | :heavy_check_mark: | The country of origin of this media item | United States of America |
|
| `tag` | *String* | :heavy_check_mark: | The country of origin of this media item | United States of America |
|
||||||
| `filter` | *Optional\<String>* | :heavy_minus_sign: | N/A | country=19 |
|
| `filter` | *Optional\<String>* | :heavy_minus_sign: | N/A | country=19 |
|
||||||
8
docs/models/operations/Extras.md
Normal file
8
docs/models/operations/Extras.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Extras
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- |
|
||||||
|
| `size` | *Optional\<Long>* | :heavy_minus_sign: | The size of the extras. | 1 |
|
||||||
@@ -3,26 +3,26 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | true |
|
| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false |
|
||||||
| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
|
| `art` | *String* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg |
|
||||||
| `composite` | *String* | :heavy_check_mark: | N/A | /library/sections/1/composite/1705615584 |
|
| `composite` | *String* | :heavy_check_mark: | The relative path to the composite media item. | /library/sections/1/composite/1743824484 |
|
||||||
| `filters` | *boolean* | :heavy_check_mark: | N/A | true |
|
| `filters` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
|
||||||
| `refreshing` | *boolean* | :heavy_check_mark: | N/A | false |
|
| `refreshing` | *boolean* | :heavy_check_mark: | Indicates whether the library is currently being refreshed or updated | true |
|
||||||
| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/movie.png |
|
| `thumb` | *String* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png |
|
||||||
| `key` | *String* | :heavy_check_mark: | N/A | 1 |
|
| `key` | *String* | :heavy_check_mark: | The library key representing the unique identifier | 1 |
|
||||||
| `type` | *String* | :heavy_check_mark: | N/A | movie |
|
| `type` | [GetAllLibrariesType](../../models/operations/GetAllLibrariesType.md) | :heavy_check_mark: | N/A | movie |
|
||||||
| `title` | *String* | :heavy_check_mark: | N/A | Movies |
|
| `title` | *String* | :heavy_check_mark: | The title of the library | Movies |
|
||||||
| `agent` | *String* | :heavy_check_mark: | N/A | tv.plex.agents.movie |
|
| `agent` | *String* | :heavy_check_mark: | The Plex agent used to match and retrieve media metadata. | tv.plex.agents.movie |
|
||||||
| `scanner` | *String* | :heavy_check_mark: | N/A | Plex Movie |
|
| `scanner` | *String* | :heavy_check_mark: | UNKNOWN | Plex Movie |
|
||||||
| `language` | *String* | :heavy_check_mark: | N/A | en-US |
|
| `language` | *String* | :heavy_check_mark: | The Plex library language that has been set | en-US |
|
||||||
| `uuid` | *String* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
| `uuid` | *String* | :heavy_check_mark: | The universally unique identifier for the library. | e69655a2-ef48-4aba-bb19-01e7d3cc34d6 |
|
||||||
| `updatedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
| `updatedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||||
| `createdAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
| `createdAt` | *Optional\<Long>* | :heavy_minus_sign: | N/A | 1556281940 |
|
||||||
| `scannedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
| `scannedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||||
| `content` | *boolean* | :heavy_check_mark: | N/A | true |
|
| `content` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
|
||||||
| `directory` | *boolean* | :heavy_check_mark: | N/A | true |
|
| `directory` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
|
||||||
| `contentChangedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
| `contentChangedAt` | *long* | :heavy_check_mark: | Timestamp (in seconds) representing the last time the content was modified.<br/>NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64<br/> | 9173960 |
|
||||||
| `hidden` | *int* | :heavy_check_mark: | N/A | 0 |
|
| `hidden` | [Optional\<Hidden>](../../models/operations/Hidden.md) | :heavy_minus_sign: | N/A | 1 |
|
||||||
| `location` | List\<[GetAllLibrariesLocation](../../models/operations/GetAllLibrariesLocation.md)> | :heavy_check_mark: | N/A | |
|
| `location` | List\<[GetAllLibrariesLocation](../../models/operations/GetAllLibrariesLocation.md)> | :heavy_check_mark: | N/A | |
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
| --------------------------- | --------------------------- | --------------------------- | --------------------------- | --------------------------- |
|
||||||
| `id` | *int* | :heavy_check_mark: | N/A | 1 |
|
| `id` | *int* | :heavy_check_mark: | The ID of the location. | 1 |
|
||||||
| `path` | *String* | :heavy_check_mark: | N/A | /movies |
|
| `path` | *String* | :heavy_check_mark: | The path to the media item. | /Movies |
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||||
| `size` | *int* | :heavy_check_mark: | N/A | 5 |
|
| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
|
||||||
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | false |
|
| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false |
|
||||||
| `title1` | *String* | :heavy_check_mark: | N/A | Plex Library |
|
| `title1` | *String* | :heavy_check_mark: | The primary title of the media container. | TV Series |
|
||||||
| `directory` | List\<[GetAllLibrariesDirectory](../../models/operations/GetAllLibrariesDirectory.md)> | :heavy_check_mark: | N/A | |
|
| `directory` | List\<[GetAllLibrariesDirectory](../../models/operations/GetAllLibrariesDirectory.md)> | :heavy_minus_sign: | N/A | |
|
||||||
@@ -5,6 +5,6 @@ The libraries available on the Server
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description |
|
||||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||||
| `mediaContainer` | [GetAllLibrariesMediaContainer](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_check_mark: | N/A |
|
| `mediaContainer` | [Optional\<GetAllLibrariesMediaContainer>](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_minus_sign: | N/A |
|
||||||
15
docs/models/operations/GetAllLibrariesType.md
Normal file
15
docs/models/operations/GetAllLibrariesType.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# GetAllLibrariesType
|
||||||
|
|
||||||
|
The library type
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| --------- | --------- |
|
||||||
|
| `Movie` | movie |
|
||||||
|
| `TvShow` | show |
|
||||||
|
| `Season` | season |
|
||||||
|
| `Episode` | episode |
|
||||||
|
| `Artist` | artist |
|
||||||
|
| `Album` | album |
|
||||||
@@ -3,54 +3,56 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
||||||
| `streamType` | *int* | :heavy_check_mark: | Stream type (1=video, 2=audio, 3=subtitle). | 1 |
|
| `streamType` | [GetAllMediaLibraryStreamType](../../models/operations/GetAllMediaLibraryStreamType.md) | :heavy_check_mark: | Stream type:<br/> - 1 = video<br/> - 2 = audio<br/> - 3 = subtitle<br/> | 1 |
|
||||||
| `default_` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
| `format` | *Optional\<String>* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt |
|
||||||
| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
| `default_` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
||||||
| `index` | *int* | :heavy_check_mark: | Index of the stream. | 0 |
|
| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
||||||
| `bitrate` | *Optional\<Integer>* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
| `index` | *Optional\<Integer>* | :heavy_minus_sign: | Index of the stream. | 0 |
|
||||||
| `language` | *Optional\<String>* | :heavy_minus_sign: | Language of the stream. | English |
|
| `bitrate` | *Optional\<Integer>* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
||||||
| `languageTag` | *Optional\<String>* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
| `language` | *Optional\<String>* | :heavy_minus_sign: | Language of the stream. | English |
|
||||||
| `languageCode` | *Optional\<String>* | :heavy_minus_sign: | ISO language code. | eng |
|
| `languageTag` | *Optional\<String>* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
||||||
| `headerCompression` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true |
|
| `languageCode` | *Optional\<String>* | :heavy_minus_sign: | ISO language code. | eng |
|
||||||
| `doviblCompatID` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 |
|
| `headerCompression` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true |
|
||||||
| `doviblPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true |
|
| `doviblCompatID` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 |
|
||||||
| `dovielPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false |
|
| `doviblPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true |
|
||||||
| `doviLevel` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision level. | 6 |
|
| `dovielPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false |
|
||||||
| `doviPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true |
|
| `doviLevel` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision level. | 6 |
|
||||||
| `doviProfile` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision profile. | 8 |
|
| `doviPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true |
|
||||||
| `dovirpuPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true |
|
| `doviProfile` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision profile. | 8 |
|
||||||
| `doviVersion` | *Optional\<String>* | :heavy_minus_sign: | Dolby Vision version. | 1.0 |
|
| `dovirpuPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true |
|
||||||
| `bitDepth` | *Optional\<Integer>* | :heavy_minus_sign: | Bit depth of the video stream. | 10 |
|
| `doviVersion` | *Optional\<String>* | :heavy_minus_sign: | Dolby Vision version. | 1.0 |
|
||||||
| `chromaLocation` | *Optional\<String>* | :heavy_minus_sign: | Chroma sample location. | topleft |
|
| `bitDepth` | *Optional\<Integer>* | :heavy_minus_sign: | Bit depth of the video stream. | 10 |
|
||||||
| `chromaSubsampling` | *Optional\<String>* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 |
|
| `chromaLocation` | *Optional\<String>* | :heavy_minus_sign: | Chroma sample location. | topleft |
|
||||||
| `codedHeight` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video height. | 1608 |
|
| `chromaSubsampling` | *Optional\<String>* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 |
|
||||||
| `codedWidth` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video width. | 3840 |
|
| `codedHeight` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video height. | 1608 |
|
||||||
| `closedCaptions` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
| `codedWidth` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video width. | 3840 |
|
||||||
| `colorPrimaries` | *Optional\<String>* | :heavy_minus_sign: | Color primaries used. | bt2020 |
|
| `closedCaptions` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||||
| `colorRange` | *Optional\<String>* | :heavy_minus_sign: | Color range (e.g., tv). | tv |
|
| `colorPrimaries` | *Optional\<String>* | :heavy_minus_sign: | Color primaries used. | bt2020 |
|
||||||
| `colorSpace` | *Optional\<String>* | :heavy_minus_sign: | Color space. | bt2020nc |
|
| `colorRange` | *Optional\<String>* | :heavy_minus_sign: | Color range (e.g., tv). | tv |
|
||||||
| `colorTrc` | *Optional\<String>* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
| `colorSpace` | *Optional\<String>* | :heavy_minus_sign: | Color space. | bt2020nc |
|
||||||
| `frameRate` | *Optional\<Float>* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
| `colorTrc` | *Optional\<String>* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||||
| `height` | *Optional\<Integer>* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
| `frameRate` | *Optional\<Float>* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
||||||
| `level` | *Optional\<Integer>* | :heavy_minus_sign: | Video level. | 150 |
|
| `key` | *Optional\<String>* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 |
|
||||||
| `original` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
| `height` | *Optional\<Integer>* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
||||||
| `hasScalingMatrix` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | false |
|
| `level` | *Optional\<Integer>* | :heavy_minus_sign: | Video level. | 150 |
|
||||||
| `profile` | *Optional\<String>* | :heavy_minus_sign: | Video profile. | main 10 |
|
| `original` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
||||||
| `scanType` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
| `hasScalingMatrix` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | false |
|
||||||
| `embeddedInVideo` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
| `profile` | *Optional\<String>* | :heavy_minus_sign: | Video profile. | main 10 |
|
||||||
| `refFrames` | *Optional\<Integer>* | :heavy_minus_sign: | Number of reference frames. | 1 |
|
| `scanType` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||||
| `width` | *Optional\<Integer>* | :heavy_minus_sign: | Width of the video stream. | 3840 |
|
| `embeddedInVideo` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||||
| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
| `refFrames` | *Optional\<Integer>* | :heavy_minus_sign: | Number of reference frames. | 1 |
|
||||||
| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
| `width` | *Optional\<Integer>* | :heavy_minus_sign: | Width of the video stream. | 3840 |
|
||||||
| `selected` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true |
|
| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||||
| `forced` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||||
| `channels` | *Optional\<Integer>* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 |
|
| `selected` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true |
|
||||||
| `audioChannelLayout` | *Optional\<String>* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) |
|
| `forced` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||||
| `samplingRate` | *Optional\<Integer>* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 |
|
| `channels` | *Optional\<Integer>* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 |
|
||||||
| `canAutoSync` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false |
|
| `audioChannelLayout` | *Optional\<String>* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) |
|
||||||
| `hearingImpaired` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true |
|
| `samplingRate` | *Optional\<Integer>* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 |
|
||||||
| `dub` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream is a dub. | true |
|
| `canAutoSync` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false |
|
||||||
| `title` | *Optional\<String>* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH |
|
| `hearingImpaired` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true |
|
||||||
|
| `dub` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream is a dub. | true |
|
||||||
|
| `title` | *Optional\<String>* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH |
|
||||||
16
docs/models/operations/GetAllMediaLibraryStreamType.md
Normal file
16
docs/models/operations/GetAllMediaLibraryStreamType.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# GetAllMediaLibraryStreamType
|
||||||
|
|
||||||
|
Stream type:
|
||||||
|
- 1 = video
|
||||||
|
- 2 = audio
|
||||||
|
- 3 = subtitle
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------- | ---------- |
|
||||||
|
| `Video` | 1 |
|
||||||
|
| `Audio` | 2 |
|
||||||
|
| `Subtitle` | 3 |
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `includeDetails` | [Optional\<IncludeDetails>](../../models/operations/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
|
| `includeDetails` | [Optional\<IncludeDetails>](../../models/operations/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).<br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
|
||||||
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
||||||
12
docs/models/operations/GetMediaArtsMediaContainer.md
Normal file
12
docs/models/operations/GetMediaArtsMediaContainer.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# GetMediaArtsMediaContainer
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||||
|
| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
|
||||||
|
| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 |
|
||||||
|
| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ |
|
||||||
|
| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library |
|
||||||
|
| `metadata` | List\<[GetMediaArtsMetadata](../../models/operations/GetMediaArtsMetadata.md)> | :heavy_check_mark: | N/A | |
|
||||||
12
docs/models/operations/GetMediaArtsMetadata.md
Normal file
12
docs/models/operations/GetMediaArtsMetadata.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# GetMediaArtsMetadata
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `key` | *String* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg |
|
||||||
|
| `provider` | *Optional\<String>* | :heavy_minus_sign: | The provider of the artwork. | tmdb |
|
||||||
|
| `ratingKey` | *String* | :heavy_check_mark: | The URL of the artwork. | https://image.tmdb.org/t/p/original/ixgFmf1X59PUZam2qbAfskx2gQr.jpg |
|
||||||
|
| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected artwork. | true |
|
||||||
|
| `thumb` | *String* | :heavy_check_mark: | The URL of the artwork thumbnail. | https://images.plex.tv/photo?height=270&width=480&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FixgFmf1X59PUZam2qbAfskx2gQr%2Ejpg |
|
||||||
8
docs/models/operations/GetMediaArtsRequest.md
Normal file
8
docs/models/operations/GetMediaArtsRequest.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# GetMediaArtsRequest
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||||
|
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 |
|
||||||
11
docs/models/operations/GetMediaArtsResponse.md
Normal file
11
docs/models/operations/GetMediaArtsResponse.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# GetMediaArtsResponse
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||||
|
| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||||
|
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||||
|
| `object` | [Optional\<GetMediaArtsResponseBody>](../../models/operations/GetMediaArtsResponseBody.md) | :heavy_minus_sign: | The available background artwork for the library item. |
|
||||||
10
docs/models/operations/GetMediaArtsResponseBody.md
Normal file
10
docs/models/operations/GetMediaArtsResponseBody.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# GetMediaArtsResponseBody
|
||||||
|
|
||||||
|
The available background artwork for the library item.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||||
|
| `mediaContainer` | [Optional\<GetMediaArtsMediaContainer>](../../models/operations/GetMediaArtsMediaContainer.md) | :heavy_minus_sign: | N/A |
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
# GetMediaMetaDataCountry
|
# GetMediaMetaDataCountry
|
||||||
|
|
||||||
|
The filter query string for country media items.
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||||
| `id` | *int* | :heavy_check_mark: | The unique country identifier. | 58591 |
|
| `id` | *int* | :heavy_check_mark: | N/A | 259 |
|
||||||
| `filter` | *String* | :heavy_check_mark: | The filter string for the country. | country=58591 |
|
| `tag` | *String* | :heavy_check_mark: | The country of origin of this media item | United States of America |
|
||||||
| `tag` | *String* | :heavy_check_mark: | The country name. | United States of America |
|
| `filter` | *Optional\<String>* | :heavy_minus_sign: | N/A | country=19 |
|
||||||
@@ -3,11 +3,10 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | The unique role identifier. | 109501 |
|
| `id` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 |
|
||||||
| `filter` | *String* | :heavy_check_mark: | The filter string for the role. | actor=109501 |
|
| `tag` | *String* | :heavy_check_mark: | The role of Director | Danny Boyle |
|
||||||
| `tag` | *String* | :heavy_check_mark: | The actor's name. | Bob Odenkirk |
|
| `filter` | *String* | :heavy_check_mark: | The filter string used to query this director. | director=235876 |
|
||||||
| `tagKey` | *String* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 |
|
| `tagKey` | *Optional\<String>* | :heavy_minus_sign: | A unique key associated with the director's tag, used for internal identification. | 5d776831151a60001f24d031 |
|
||||||
| `role` | *Optional\<String>* | :heavy_minus_sign: | The character name or role. | Jimmy McGill |
|
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | The URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg |
|
||||||
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg |
|
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
# GetMediaMetaDataGenre
|
# GetMediaMetaDataGenre
|
||||||
|
|
||||||
|
The filter query string for similar items.
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
|
| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | The unique genre identifier. | 1057 |
|
| `id` | *long* | :heavy_check_mark: | N/A | 259 |
|
||||||
| `filter` | *String* | :heavy_check_mark: | The filter string for the genre. | genre=1057 |
|
| `tag` | *String* | :heavy_check_mark: | The genre name of this media-item<br/> | Crime |
|
||||||
| `tag` | *String* | :heavy_check_mark: | The genre name. | Crime |
|
| `filter` | *String* | :heavy_check_mark: | N/A | genre=19 |
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||||
| `alt` | *String* | :heavy_check_mark: | Alternate text for the image. | Better Call Saul |
|
| `alt` | *String* | :heavy_check_mark: | N/A | Episode 1 |
|
||||||
| `type` | *String* | :heavy_check_mark: | The type of image (e.g., coverPoster, background, clearLogo). | coverPoster |
|
| `type` | [GetMediaMetaDataLibraryType](../../models/operations/GetMediaMetaDataLibraryType.md) | :heavy_check_mark: | N/A | background |
|
||||||
| `url` | *String* | :heavy_check_mark: | The URL of the image. | /library/metadata/44288/thumb/1736487993 |
|
| `url` | *String* | :heavy_check_mark: | N/A | /library/metadata/45521/thumb/1644710589 |
|
||||||
11
docs/models/operations/GetMediaMetaDataLibraryType.md
Normal file
11
docs/models/operations/GetMediaMetaDataLibraryType.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# GetMediaMetaDataLibraryType
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| -------------- | -------------- |
|
||||||
|
| `COVER_POSTER` | coverPoster |
|
||||||
|
| `BACKGROUND` | background |
|
||||||
|
| `SNAPSHOT` | snapshot |
|
||||||
|
| `CLEAR_LOGO` | clearLogo |
|
||||||
@@ -1,68 +1,83 @@
|
|||||||
# GetMediaMetaDataMetadata
|
# GetMediaMetaDataMetadata
|
||||||
|
|
||||||
|
Unknown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `ratingKey` | *String* | :heavy_check_mark: | The rating key of the metadata item. | 44288 |
|
| `ratingKey` | *String* | :heavy_check_mark: | The rating key (Media ID) of this media item. Note: Although this is always an integer, it is represented as a string in the API. | 58683 |
|
||||||
| `parentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | The rating key of the parent of this metadata item. | 48047 |
|
| `key` | *String* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 |
|
||||||
| `grandparentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | The rating key of the grandparent of this metadata item. | 45520 |
|
| `guid` | *String* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 |
|
||||||
| `parentGuid` | *Optional\<String>* | :heavy_minus_sign: | A GUID identifying the parent entity (e.g., season) for the item. | plex://season/618b89208dde18df707ad15c |
|
| `slug` | *String* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas |
|
||||||
| `grandparentGuid` | *Optional\<String>* | :heavy_minus_sign: | A GUID identifying the grandparent entity (e.g., show). | plex://show/5e16253691c20300412003a8 |
|
| `studio` | *Optional\<String>* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios |
|
||||||
| `grandparentSlug` | *Optional\<String>* | :heavy_minus_sign: | A URL-friendly identifier (slug) for the grandparent entity. | alice-in-borderland-2020 |
|
| `type` | [GetMediaMetaDataType](../../models/operations/GetMediaMetaDataType.md) | :heavy_check_mark: | N/A | movie |
|
||||||
| `grandparentKey` | *Optional\<String>* | :heavy_minus_sign: | A key identifying the grandparent metadata in the library. | /library/metadata/45520 |
|
| `title` | *String* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water |
|
||||||
| `parentKey` | *Optional\<String>* | :heavy_minus_sign: | A key identifying the parent metadata in the library. | /library/metadata/48047 |
|
| `titleSort` | *String* | :heavy_check_mark: | The sort title used for ordering media items. | Whale |
|
||||||
| `key` | *String* | :heavy_check_mark: | The API key to access metadata details. | /library/metadata/44288/children |
|
| `contentRating` | *Optional\<String>* | :heavy_minus_sign: | The content rating for the media item. | PG-13 |
|
||||||
| `guid` | *String* | :heavy_check_mark: | The globally unique identifier for the item. | plex://show/5d9c08254eefaa001f5d6dcb |
|
| `summary` | *String* | :heavy_check_mark: | A synopsis of the media item. | Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.<br/>Once a familiar threat returns to finish what was previously started, Jake must<br/>work with Neytiri and the army of the Na'vi race to protect their home.<br/> |
|
||||||
| `slug` | *Optional\<String>* | :heavy_minus_sign: | A URL-friendly identifier for the item. | better-call-saul |
|
| `rating` | *float* | :heavy_check_mark: | The critic rating for the media item. | 7.6 |
|
||||||
| `studio` | *Optional\<String>* | :heavy_minus_sign: | The studio that produced the content. | Sony Pictures Television |
|
| `audienceRating` | *double* | :heavy_check_mark: | The audience rating for the media item. | 9.2 |
|
||||||
| `type` | *String* | :heavy_check_mark: | The type of content (e.g., show, movie). | show |
|
| `year` | *Optional\<Integer>* | :heavy_minus_sign: | The release year of the media item. | 2022 |
|
||||||
| `title` | *String* | :heavy_check_mark: | The title of the content. | Better Call Saul |
|
| `tagline` | *String* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. |
|
||||||
| `originalTitle` | *Optional\<String>* | :heavy_minus_sign: | The original title of the content. | Wicked: Part I |
|
| `thumb` | *String* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 |
|
||||||
| `librarySectionTitle` | *String* | :heavy_check_mark: | The title of the library section. | TV Series |
|
| `art` | *String* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 |
|
||||||
| `librarySectionID` | *long* | :heavy_check_mark: | The ID of the library section. | 2 |
|
| `theme` | *String* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 |
|
||||||
| `librarySectionKey` | *String* | :heavy_check_mark: | The key of the library section. | /library/sections/2 |
|
| `index` | *int* | :heavy_check_mark: | The index position of the media item. | 1 |
|
||||||
| `contentRating` | *Optional\<String>* | :heavy_minus_sign: | The content rating (e.g., TV-MA). | TV-MA |
|
| `leafCount` | *Optional\<Integer>* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 |
|
||||||
| `summary` | *String* | :heavy_check_mark: | A summary of the content. | Before Saul Goodman, he was Jimmy McGill. And if you're calling Jimmy, you're in real trouble. The prequel to "Breaking Bad" follows small-time attorney, Jimmy McGill, as he transforms into Walter White's morally challenged lawyer, Saul Goodman. |
|
| `viewedLeafCount` | *Optional\<Integer>* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 |
|
||||||
| `index` | *Optional\<Long>* | :heavy_minus_sign: | The index or order of the item. | 1 |
|
| `childCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 |
|
||||||
| `grandparentTitle` | *Optional\<String>* | :heavy_minus_sign: | The title of the grandparent entity (typically the show's title). | Alice in Borderland |
|
| `seasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 |
|
||||||
| `parentTitle` | *Optional\<String>* | :heavy_minus_sign: | The title of the parent entity (typically the season's title). | Season 2 |
|
| `duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 |
|
||||||
| `audienceRating` | *Optional\<Float>* | :heavy_minus_sign: | The audience rating for the content. | 8.7 |
|
| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_check_mark: | The original release date of the media item. | 2022-12-14 |
|
||||||
| `viewCount` | *Optional\<Long>* | :heavy_minus_sign: | The number of times the item has been viewed. | 4 |
|
| `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 |
|
||||||
| `skipCount` | *Optional\<Long>* | :heavy_minus_sign: | The number of times the item has been skipped. | 1 |
|
| `updatedAt` | *Optional\<Long>* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 |
|
||||||
| `lastViewedAt` | *Optional\<Long>* | :heavy_minus_sign: | Unix timestamp of when the item was last viewed. | 1625764795 |
|
| `audienceRatingImage` | *Optional\<String>* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright |
|
||||||
| `year` | *int* | :heavy_check_mark: | The release year. | 2015 |
|
| `chapterSource` | *Optional\<String>* | :heavy_minus_sign: | The source from which chapter data is derived. | media |
|
||||||
| `rating` | *Optional\<Float>* | :heavy_minus_sign: | The general rating | 6 |
|
| `primaryExtraKey` | *Optional\<String>* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 |
|
||||||
| `ratingImage` | *Optional\<String>* | :heavy_minus_sign: | The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image). | rottentomatoes://image.rating.ripe |
|
| `originalTitle` | *Optional\<String>* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 |
|
||||||
| `tagline` | *Optional\<String>* | :heavy_minus_sign: | The tagline of the content. | Make the call |
|
| `parentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | The rating key of the parent media item. | 66 |
|
||||||
| `chapterSource` | *Optional\<String>* | :heavy_minus_sign: | N/A | media |
|
| `grandparentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 |
|
||||||
| `primaryExtraKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/134704 |
|
| `parentGuid` | *Optional\<String>* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||||
| `thumb` | *String* | :heavy_check_mark: | URL of the thumbnail image. | /library/metadata/44288/thumb/1736487993 |
|
| `grandparentGuid` | *Optional\<String>* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||||
| `art` | *String* | :heavy_check_mark: | URL of the art image. | /library/metadata/44288/art/1736487993 |
|
| `grandparentSlug` | *Optional\<String>* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 |
|
||||||
| `theme` | *Optional\<String>* | :heavy_minus_sign: | URL of the theme image. | /library/metadata/44288/theme/1736487993 |
|
| `grandparentKey` | *Optional\<String>* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 |
|
||||||
| `duration` | *int* | :heavy_check_mark: | Duration of the content in milliseconds. | 2700000 |
|
| `parentKey` | *Optional\<String>* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 |
|
||||||
| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date. | 2015-02-08 |
|
| `grandparentTitle` | *Optional\<String>* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica |
|
||||||
| `leafCount` | *Optional\<Long>* | :heavy_minus_sign: | The total number of episodes (or leaves). | 63 |
|
| `grandparentThumb` | *Optional\<String>* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 |
|
||||||
| `viewedLeafCount` | *Optional\<Long>* | :heavy_minus_sign: | The number of episodes that have been viewed. | 4 |
|
| `grandparentTheme` | *Optional\<String>* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 |
|
||||||
| `childCount` | *Optional\<Integer>* | :heavy_minus_sign: | The number of child items. | 6 |
|
| `grandparentArt` | *Optional\<String>* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 |
|
||||||
| `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 |
|
| `parentTitle` | *Optional\<String>* | :heavy_minus_sign: | The title of the parent media item. | Caprica |
|
||||||
| `updatedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 |
|
| `parentIndex` | *Optional\<Integer>* | :heavy_minus_sign: | The index position of the parent media item. | 1 |
|
||||||
| `audienceRatingImage` | *Optional\<String>* | :heavy_minus_sign: | The URL for the audience rating image. | themoviedb://image.rating |
|
| `parentThumb` | *Optional\<String>* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 |
|
||||||
| `parentIndex` | *Optional\<Long>* | :heavy_minus_sign: | The index number of the parent entity, which could indicate its order or position. | 2 |
|
| `ratingImage` | *Optional\<String>* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe |
|
||||||
| `parentThumb` | *Optional\<String>* | :heavy_minus_sign: | The URL of the parent's thumbnail image. | /library/metadata/48047/thumb/1671800243 |
|
| `viewCount` | *Optional\<Integer>* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 |
|
||||||
| `grandparentThumb` | *Optional\<String>* | :heavy_minus_sign: | The URL of the grandparent's thumbnail image. | /library/metadata/45520/thumb/1736488003 |
|
| `viewOffset` | *Optional\<Integer>* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 |
|
||||||
| `grandparentArt` | *Optional\<String>* | :heavy_minus_sign: | The URL of the grandparent's art image. | /library/metadata/45520/art/1736488003 |
|
| `skipCount` | *Optional\<Integer>* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 |
|
||||||
| `media` | List\<[GetMediaMetaDataMedia](../../models/operations/GetMediaMetaDataMedia.md)> | :heavy_minus_sign: | N/A | |
|
| `subtype` | *Optional\<String>* | :heavy_minus_sign: | A classification that further describes the type of media item. For example, 'clip' indicates that the item is a short video clip. | clip |
|
||||||
| `image` | List\<[GetMediaMetaDataImage](../../models/operations/GetMediaMetaDataImage.md)> | :heavy_check_mark: | An array of image objects. | |
|
| `lastRatedAt` | *Optional\<Long>* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 |
|
||||||
| `ultraBlurColors` | [GetMediaMetaDataUltraBlurColors](../../models/operations/GetMediaMetaDataUltraBlurColors.md) | :heavy_check_mark: | N/A | |
|
| `createdAtAccuracy` | *Optional\<String>* | :heavy_minus_sign: | The accuracy of the creation timestamp. This value indicates the format(s) provided (for example, 'epoch,local' means both epoch and local time formats are available). | epoch,local |
|
||||||
| `genre` | List\<[GetMediaMetaDataGenre](../../models/operations/GetMediaMetaDataGenre.md)> | :heavy_minus_sign: | An array of genre tags. | |
|
| `createdAtTZOffset` | *Optional\<String>* | :heavy_minus_sign: | The time zone offset for the creation timestamp, represented as a string. This offset indicates the difference from UTC. | 0 |
|
||||||
| `country` | List\<[GetMediaMetaDataCountry](../../models/operations/GetMediaMetaDataCountry.md)> | :heavy_minus_sign: | An array of country tags. | |
|
| `lastViewedAt` | *Optional\<Integer>* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 |
|
||||||
| `guids` | List\<[GetMediaMetaDataGuids](../../models/operations/GetMediaMetaDataGuids.md)> | :heavy_minus_sign: | An array of GUID objects. | |
|
| `userRating` | *Optional\<Float>* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 |
|
||||||
| `ratings` | List\<[Ratings](../../models/operations/Ratings.md)> | :heavy_minus_sign: | An array of rating objects. | |
|
| `image` | List\<[GetMediaMetaDataImage](../../models/operations/GetMediaMetaDataImage.md)> | :heavy_minus_sign: | N/A | |
|
||||||
| `role` | List\<[GetMediaMetaDataRole](../../models/operations/GetMediaMetaDataRole.md)> | :heavy_minus_sign: | An array of Actor roles. | |
|
| `ultraBlurColors` | [Optional\<GetMediaMetaDataUltraBlurColors>](../../models/operations/GetMediaMetaDataUltraBlurColors.md) | :heavy_minus_sign: | N/A | |
|
||||||
| `director` | List\<[GetMediaMetaDataDirector](../../models/operations/GetMediaMetaDataDirector.md)> | :heavy_minus_sign: | An array of Director roles. | |
|
| `librarySectionID` | *long* | :heavy_check_mark: | The identifier for the library section. | 1 |
|
||||||
| `writer` | List\<[GetMediaMetaDataWriter](../../models/operations/GetMediaMetaDataWriter.md)> | :heavy_minus_sign: | An array of Writer roles. | |
|
| `librarySectionTitle` | *String* | :heavy_check_mark: | The title of the library section. | Movies |
|
||||||
| `producer` | List\<[GetMediaMetaDataProducer](../../models/operations/GetMediaMetaDataProducer.md)> | :heavy_minus_sign: | An array of Writer roles. | |
|
| `librarySectionKey` | *String* | :heavy_check_mark: | The key corresponding to the library section. | /library/sections/1 |
|
||||||
| `similar` | List\<[GetMediaMetaDataSimilar](../../models/operations/GetMediaMetaDataSimilar.md)> | :heavy_minus_sign: | An array of similar content objects. | |
|
| `media` | List\<[GetMediaMetaDataMedia](../../models/operations/GetMediaMetaDataMedia.md)> | :heavy_minus_sign: | N/A | |
|
||||||
| `location` | List\<[GetMediaMetaDataLocation](../../models/operations/GetMediaMetaDataLocation.md)> | :heavy_minus_sign: | An array of location objects. | |
|
| `genre` | List\<[GetMediaMetaDataGenre](../../models/operations/GetMediaMetaDataGenre.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `country` | List\<[GetMediaMetaDataCountry](../../models/operations/GetMediaMetaDataCountry.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `director` | List\<[GetMediaMetaDataDirector](../../models/operations/GetMediaMetaDataDirector.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `writer` | List\<[GetMediaMetaDataWriter](../../models/operations/GetMediaMetaDataWriter.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `producer` | List\<[GetMediaMetaDataProducer](../../models/operations/GetMediaMetaDataProducer.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `role` | List\<[GetMediaMetaDataRole](../../models/operations/GetMediaMetaDataRole.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `guids` | List\<[GetMediaMetaDataGuids](../../models/operations/GetMediaMetaDataGuids.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `ratings` | List\<[Ratings](../../models/operations/Ratings.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `similar` | List\<[GetMediaMetaDataSimilar](../../models/operations/GetMediaMetaDataSimilar.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `location` | List\<[GetMediaMetaDataLocation](../../models/operations/GetMediaMetaDataLocation.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `chapter` | List\<[Chapter](../../models/operations/Chapter.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `marker` | List\<[Marker](../../models/operations/Marker.md)> | :heavy_minus_sign: | N/A | |
|
||||||
|
| `extras` | [Optional\<Extras>](../../models/operations/Extras.md) | :heavy_minus_sign: | N/A | |
|
||||||
@@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | The unique role identifier. | 109501 |
|
| `id` | *long* | :heavy_check_mark: | Unique identifier for the actor or role. | 126522 |
|
||||||
| `filter` | *String* | :heavy_check_mark: | The filter string for the role. | actor=109501 |
|
| `tag` | *String* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller |
|
||||||
| `tag` | *String* | :heavy_check_mark: | The actor's name. | Bob Odenkirk |
|
| `role` | *Optional\<String>* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge |
|
||||||
| `tagKey` | *String* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 |
|
| `filter` | *String* | :heavy_check_mark: | The filter string used to query this actor. For example, it may indicate that this is an actor with a given key. | actor=126522 |
|
||||||
| `role` | *Optional\<String>* | :heavy_minus_sign: | The character name or role. | Jimmy McGill |
|
| `tagKey` | *Optional\<String>* | :heavy_minus_sign: | A unique key associated with the actor's tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
||||||
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg |
|
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | The URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg |
|
||||||
@@ -3,54 +3,56 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
||||||
| `streamType` | *int* | :heavy_check_mark: | Stream type (1=video, 2=audio, 3=subtitle). | 1 |
|
| `streamType` | [GetMediaMetaDataStreamType](../../models/operations/GetMediaMetaDataStreamType.md) | :heavy_check_mark: | Stream type:<br/> - 1 = video<br/> - 2 = audio<br/> - 3 = subtitle<br/> | 1 |
|
||||||
| `default_` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
| `format` | *Optional\<String>* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt |
|
||||||
| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
| `default_` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
||||||
| `index` | *int* | :heavy_check_mark: | Index of the stream. | 0 |
|
| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
||||||
| `bitrate` | *Optional\<Integer>* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
| `index` | *Optional\<Integer>* | :heavy_minus_sign: | Index of the stream. | 0 |
|
||||||
| `language` | *Optional\<String>* | :heavy_minus_sign: | Language of the stream. | English |
|
| `bitrate` | *Optional\<Integer>* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
||||||
| `languageTag` | *Optional\<String>* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
| `language` | *Optional\<String>* | :heavy_minus_sign: | Language of the stream. | English |
|
||||||
| `languageCode` | *Optional\<String>* | :heavy_minus_sign: | ISO language code. | eng |
|
| `languageTag` | *Optional\<String>* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
||||||
| `headerCompression` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true |
|
| `languageCode` | *Optional\<String>* | :heavy_minus_sign: | ISO language code. | eng |
|
||||||
| `doviblCompatID` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 |
|
| `headerCompression` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true |
|
||||||
| `doviblPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true |
|
| `doviblCompatID` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 |
|
||||||
| `dovielPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false |
|
| `doviblPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true |
|
||||||
| `doviLevel` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision level. | 6 |
|
| `dovielPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false |
|
||||||
| `doviPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true |
|
| `doviLevel` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision level. | 6 |
|
||||||
| `doviProfile` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision profile. | 8 |
|
| `doviPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true |
|
||||||
| `dovirpuPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true |
|
| `doviProfile` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision profile. | 8 |
|
||||||
| `doviVersion` | *Optional\<String>* | :heavy_minus_sign: | Dolby Vision version. | 1.0 |
|
| `dovirpuPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true |
|
||||||
| `bitDepth` | *Optional\<Integer>* | :heavy_minus_sign: | Bit depth of the video stream. | 10 |
|
| `doviVersion` | *Optional\<String>* | :heavy_minus_sign: | Dolby Vision version. | 1.0 |
|
||||||
| `chromaLocation` | *Optional\<String>* | :heavy_minus_sign: | Chroma sample location. | topleft |
|
| `bitDepth` | *Optional\<Integer>* | :heavy_minus_sign: | Bit depth of the video stream. | 10 |
|
||||||
| `chromaSubsampling` | *Optional\<String>* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 |
|
| `chromaLocation` | *Optional\<String>* | :heavy_minus_sign: | Chroma sample location. | topleft |
|
||||||
| `codedHeight` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video height. | 1608 |
|
| `chromaSubsampling` | *Optional\<String>* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 |
|
||||||
| `codedWidth` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video width. | 3840 |
|
| `codedHeight` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video height. | 1608 |
|
||||||
| `closedCaptions` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
| `codedWidth` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video width. | 3840 |
|
||||||
| `colorPrimaries` | *Optional\<String>* | :heavy_minus_sign: | Color primaries used. | bt2020 |
|
| `closedCaptions` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||||
| `colorRange` | *Optional\<String>* | :heavy_minus_sign: | Color range (e.g., tv). | tv |
|
| `colorPrimaries` | *Optional\<String>* | :heavy_minus_sign: | Color primaries used. | bt2020 |
|
||||||
| `colorSpace` | *Optional\<String>* | :heavy_minus_sign: | Color space. | bt2020nc |
|
| `colorRange` | *Optional\<String>* | :heavy_minus_sign: | Color range (e.g., tv). | tv |
|
||||||
| `colorTrc` | *Optional\<String>* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
| `colorSpace` | *Optional\<String>* | :heavy_minus_sign: | Color space. | bt2020nc |
|
||||||
| `frameRate` | *Optional\<Float>* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
| `colorTrc` | *Optional\<String>* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||||
| `height` | *Optional\<Integer>* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
| `frameRate` | *Optional\<Float>* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
||||||
| `level` | *Optional\<Integer>* | :heavy_minus_sign: | Video level. | 150 |
|
| `key` | *Optional\<String>* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 |
|
||||||
| `original` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
| `height` | *Optional\<Integer>* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
||||||
| `hasScalingMatrix` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | false |
|
| `level` | *Optional\<Integer>* | :heavy_minus_sign: | Video level. | 150 |
|
||||||
| `profile` | *Optional\<String>* | :heavy_minus_sign: | Video profile. | main 10 |
|
| `original` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
||||||
| `scanType` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
| `hasScalingMatrix` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | false |
|
||||||
| `embeddedInVideo` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
| `profile` | *Optional\<String>* | :heavy_minus_sign: | Video profile. | main 10 |
|
||||||
| `refFrames` | *Optional\<Integer>* | :heavy_minus_sign: | Number of reference frames. | 1 |
|
| `scanType` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||||
| `width` | *Optional\<Integer>* | :heavy_minus_sign: | Width of the video stream. | 3840 |
|
| `embeddedInVideo` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||||
| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
| `refFrames` | *Optional\<Integer>* | :heavy_minus_sign: | Number of reference frames. | 1 |
|
||||||
| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
| `width` | *Optional\<Integer>* | :heavy_minus_sign: | Width of the video stream. | 3840 |
|
||||||
| `selected` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true |
|
| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||||
| `forced` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||||
| `channels` | *Optional\<Integer>* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 |
|
| `selected` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true |
|
||||||
| `audioChannelLayout` | *Optional\<String>* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) |
|
| `forced` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||||
| `samplingRate` | *Optional\<Integer>* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 |
|
| `channels` | *Optional\<Integer>* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 |
|
||||||
| `canAutoSync` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false |
|
| `audioChannelLayout` | *Optional\<String>* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) |
|
||||||
| `hearingImpaired` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true |
|
| `samplingRate` | *Optional\<Integer>* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 |
|
||||||
| `dub` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream is a dub. | true |
|
| `canAutoSync` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false |
|
||||||
| `title` | *Optional\<String>* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH |
|
| `hearingImpaired` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream is for the hearing impaired. | true |
|
||||||
|
| `dub` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream is a dub. | true |
|
||||||
|
| `title` | *Optional\<String>* | :heavy_minus_sign: | Optional title for the stream (e.g., language variant). | SDH |
|
||||||
16
docs/models/operations/GetMediaMetaDataStreamType.md
Normal file
16
docs/models/operations/GetMediaMetaDataStreamType.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# GetMediaMetaDataStreamType
|
||||||
|
|
||||||
|
Stream type:
|
||||||
|
- 1 = video
|
||||||
|
- 2 = audio
|
||||||
|
- 3 = subtitle
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------- | ---------- |
|
||||||
|
| `Video` | 1 |
|
||||||
|
| `Audio` | 2 |
|
||||||
|
| `Subtitle` | 3 |
|
||||||
16
docs/models/operations/GetMediaMetaDataType.md
Normal file
16
docs/models/operations/GetMediaMetaDataType.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# GetMediaMetaDataType
|
||||||
|
|
||||||
|
The type of media content
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| --------- | --------- |
|
||||||
|
| `Movie` | movie |
|
||||||
|
| `TvShow` | show |
|
||||||
|
| `Season` | season |
|
||||||
|
| `Episode` | episode |
|
||||||
|
| `Artist` | artist |
|
||||||
|
| `Album` | album |
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
|
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||||
| `topLeft` | *String* | :heavy_check_mark: | The top-left color value. | 11333a |
|
| `topLeft` | *String* | :heavy_check_mark: | N/A | 11333b |
|
||||||
| `topRight` | *String* | :heavy_check_mark: | The top-right color value. | 1d2721 |
|
| `topRight` | *String* | :heavy_check_mark: | N/A | 0a232d |
|
||||||
| `bottomRight` | *String* | :heavy_check_mark: | The bottom-right color value. | 5c451d |
|
| `bottomRight` | *String* | :heavy_check_mark: | N/A | 73958 |
|
||||||
| `bottomLeft` | *String* | :heavy_check_mark: | The bottom-left color value. | 372c10 |
|
| `bottomLeft` | *String* | :heavy_check_mark: | N/A | 1f5066 |
|
||||||
@@ -3,11 +3,10 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | The unique role identifier. | 109501 |
|
| `id` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 |
|
||||||
| `filter` | *String* | :heavy_check_mark: | The filter string for the role. | actor=109501 |
|
| `tag` | *String* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson |
|
||||||
| `tag` | *String* | :heavy_check_mark: | The actor's name. | Bob Odenkirk |
|
| `filter` | *String* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 |
|
||||||
| `tagKey` | *String* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 |
|
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | The URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg |
|
||||||
| `role` | *Optional\<String>* | :heavy_minus_sign: | The character name or role. | Jimmy McGill |
|
| `tagKey` | *Optional\<String>* | :heavy_minus_sign: | A unique key associated with the writers tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
||||||
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg |
|
|
||||||
12
docs/models/operations/GetMediaPostersMediaContainer.md
Normal file
12
docs/models/operations/GetMediaPostersMediaContainer.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# GetMediaPostersMediaContainer
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||||
|
| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
|
||||||
|
| `mediaTagVersion` | *long* | :heavy_check_mark: | The version number for media tags. | 1734362201 |
|
||||||
|
| `mediaTagPrefix` | *String* | :heavy_check_mark: | The prefix used for media tag resource paths. | /system/bundle/media/flags/ |
|
||||||
|
| `identifier` | *String* | :heavy_check_mark: | An plugin identifier for the media container. | com.plexapp.plugins.library |
|
||||||
|
| `metadata` | List\<[GetMediaPostersMetadata](../../models/operations/GetMediaPostersMetadata.md)> | :heavy_check_mark: | N/A | |
|
||||||
12
docs/models/operations/GetMediaPostersMetadata.md
Normal file
12
docs/models/operations/GetMediaPostersMetadata.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# GetMediaPostersMetadata
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `key` | *String* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg |
|
||||||
|
| `provider` | *Optional\<String>* | :heavy_minus_sign: | The provider of the poster. | tmdb |
|
||||||
|
| `ratingKey` | *String* | :heavy_check_mark: | The URL of the poster. | https://image.tmdb.org/t/p/original/hntBJjqbv4m0Iyniqaztv9xaudI.jpg |
|
||||||
|
| `selected` | *boolean* | :heavy_check_mark: | Whether this is the selected poster. | true |
|
||||||
|
| `thumb` | *String* | :heavy_check_mark: | The URL of the poster thumbnail. | https://images.plex.tv/photo?height=336&width=225&minSize=1&upscale=1&url=https%3A%2F%2Fimage%2Etmdb%2Eorg%2Ft%2Fp%2Foriginal%2FhntBJjqbv4m0Iyniqaztv9xaudI%2Ejpg |
|
||||||
8
docs/models/operations/GetMediaPostersRequest.md
Normal file
8
docs/models/operations/GetMediaPostersRequest.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# GetMediaPostersRequest
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||||
|
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 |
|
||||||
11
docs/models/operations/GetMediaPostersResponse.md
Normal file
11
docs/models/operations/GetMediaPostersResponse.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# GetMediaPostersResponse
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||||
|
| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||||
|
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||||
|
| `object` | [Optional\<GetMediaPostersResponseBody>](../../models/operations/GetMediaPostersResponseBody.md) | :heavy_minus_sign: | The available posters for the library item. |
|
||||||
10
docs/models/operations/GetMediaPostersResponseBody.md
Normal file
10
docs/models/operations/GetMediaPostersResponseBody.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# GetMediaPostersResponseBody
|
||||||
|
|
||||||
|
The available posters for the library item.
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||||
|
| `mediaContainer` | [Optional\<GetMediaPostersMediaContainer>](../../models/operations/GetMediaPostersMediaContainer.md) | :heavy_minus_sign: | N/A |
|
||||||
11
docs/models/operations/Hidden.md
Normal file
11
docs/models/operations/Hidden.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Hidden
|
||||||
|
|
||||||
|
UNKNOWN
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| --------- | --------- |
|
||||||
|
| `Disable` | 0 |
|
||||||
|
| `Enable` | 1 |
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# IncludeDetails
|
# IncludeDetails
|
||||||
|
|
||||||
Whether or not to include details for a section (types, filters, and sorts).
|
Whether or not to include details for a section (types, filters, and sorts).
|
||||||
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
|
Only exists for backwards compatibility, media providers other than the server libraries have it on always.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# Level
|
# Level
|
||||||
|
|
||||||
An integer log level to write to the PMS log with.
|
An integer log level to write to the PMS log with.
|
||||||
0: Error
|
0: Error
|
||||||
1: Warning
|
1: Warning
|
||||||
2: Info
|
2: Info
|
||||||
3: Debug
|
3: Debug
|
||||||
4: Verbose
|
4: Verbose
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||||
| `level` | [Level](../../models/operations/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | |
|
| `level` | [Level](../../models/operations/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.<br/>0: Error<br/>1: Warning<br/>2: Info<br/>3: Debug<br/>4: Verbose<br/> | |
|
||||||
| `message` | *String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
|
| `message` | *String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
|
||||||
| `source` | *String* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
|
| `source` | *String* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
|
||||||
15
docs/models/operations/Marker.md
Normal file
15
docs/models/operations/Marker.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Marker
|
||||||
|
|
||||||
|
The final status of the marker
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
|
||||||
|
| `id` | *long* | :heavy_check_mark: | N/A | 306970 |
|
||||||
|
| `type` | *String* | :heavy_check_mark: | N/A | credits |
|
||||||
|
| `startTimeOffset` | *long* | :heavy_check_mark: | N/A | 4176050 |
|
||||||
|
| `endTimeOffset` | *long* | :heavy_check_mark: | N/A | 4393389 |
|
||||||
|
| `final_` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||||
|
| `attributes` | [Optional\<Attributes>](../../models/operations/Attributes.md) | :heavy_minus_sign: | Attributes associated with the marker. | |
|
||||||
10
docs/models/operations/PostMediaArtsRequest.md
Normal file
10
docs/models/operations/PostMediaArtsRequest.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# PostMediaArtsRequest
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||||
|
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||||
|
| `url` | *Optional\<String>* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
|
||||||
|
| `requestBody` | *Optional\<byte[]>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||||
10
docs/models/operations/PostMediaArtsResponse.md
Normal file
10
docs/models/operations/PostMediaArtsResponse.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# PostMediaArtsResponse
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||||
|
| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||||
|
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||||
10
docs/models/operations/PostMediaPosterRequest.md
Normal file
10
docs/models/operations/PostMediaPosterRequest.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# PostMediaPosterRequest
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||||
|
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||||
|
| `url` | *Optional\<String>* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
|
||||||
|
| `requestBody` | *Optional\<byte[]>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||||
10
docs/models/operations/PostMediaPosterResponse.md
Normal file
10
docs/models/operations/PostMediaPosterResponse.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# PostMediaPosterResponse
|
||||||
|
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation |
|
||||||
|
| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
|
||||||
|
| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | Unique identifier for the producer. | 126522 |
|
| `id` | *int* | :heavy_check_mark: | Unique identifier for the producer. | 126522 |
|
||||||
| `filter` | *String* | :heavy_check_mark: | The filter string used to query this producer. | producer=126522 |
|
| `filter` | *String* | :heavy_check_mark: | The filter string used to query this producer. | producer=126522 |
|
||||||
| `tag` | *String* | :heavy_check_mark: | The name of the producer | Amelia Knapp |
|
| `tag` | *String* | :heavy_check_mark: | The name of the producer | Amelia Knapp |
|
||||||
| `tagKey` | *Optional\<String>* | :heavy_minus_sign: | A unique key associated with the producer's tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
| `tagKey` | *Optional\<String>* | :heavy_minus_sign: | A unique key associated with the producer's tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# QueryParamForce
|
# QueryParamForce
|
||||||
|
|
||||||
Force overwriting of duplicate playlists.
|
Force overwriting of duplicate playlists.
|
||||||
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
|
By default, a playlist file uploaded with the same path will overwrite the existing playlist.
|
||||||
The `force` argument is used to disable overwriting.
|
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.
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
||||||
| `streamType` | *int* | :heavy_check_mark: | Stream type (1=video, 2=audio, 3=subtitle). | 1 |
|
| `streamType` | [StreamType](../../models/operations/StreamType.md) | :heavy_check_mark: | Stream type:<br/> - 1 = video<br/> - 2 = audio<br/> - 3 = subtitle<br/> | 1 |
|
||||||
|
| `format` | *Optional\<String>* | :heavy_minus_sign: | Format of the stream (e.g., srt). | srt |
|
||||||
| `default_` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
| `default_` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
||||||
| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
||||||
| `index` | *int* | :heavy_check_mark: | Index of the stream. | 0 |
|
| `index` | *Optional\<Integer>* | :heavy_minus_sign: | Index of the stream. | 0 |
|
||||||
| `bitrate` | *Optional\<Integer>* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
| `bitrate` | *Optional\<Integer>* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
||||||
| `language` | *Optional\<String>* | :heavy_minus_sign: | Language of the stream. | English |
|
| `language` | *Optional\<String>* | :heavy_minus_sign: | Language of the stream. | English |
|
||||||
| `languageTag` | *Optional\<String>* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
| `languageTag` | *Optional\<String>* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
||||||
@@ -34,6 +35,7 @@
|
|||||||
| `colorSpace` | *Optional\<String>* | :heavy_minus_sign: | Color space. | bt2020nc |
|
| `colorSpace` | *Optional\<String>* | :heavy_minus_sign: | Color space. | bt2020nc |
|
||||||
| `colorTrc` | *Optional\<String>* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
| `colorTrc` | *Optional\<String>* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||||
| `frameRate` | *Optional\<Float>* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
| `frameRate` | *Optional\<Float>* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
||||||
|
| `key` | *Optional\<String>* | :heavy_minus_sign: | Key to access this stream part. | /library/streams/216389 |
|
||||||
| `height` | *Optional\<Integer>* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
| `height` | *Optional\<Integer>* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
||||||
| `level` | *Optional\<Integer>* | :heavy_minus_sign: | Video level. | 150 |
|
| `level` | *Optional\<Integer>* | :heavy_minus_sign: | Video level. | 150 |
|
||||||
| `original` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
| `original` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
||||||
|
|||||||
16
docs/models/operations/StreamType.md
Normal file
16
docs/models/operations/StreamType.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# StreamType
|
||||||
|
|
||||||
|
Stream type:
|
||||||
|
- 1 = video
|
||||||
|
- 2 = audio
|
||||||
|
- 3 = subtitle
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Name | Value |
|
||||||
|
| ---------- | ---------- |
|
||||||
|
| `Video` | 1 |
|
||||||
|
| `Audio` | 2 |
|
||||||
|
| `Subtitle` | 3 |
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
|
| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.<br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed.<br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
|
||||||
| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>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.<br/> | |
|
| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.<br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist.<br/>The `force` argument is used to disable overwriting.<br/>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.<br/> | |
|
||||||
| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
|
| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
| Field | Type | Required | Description | Example |
|
| Field | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||||
| `id` | *long* | :heavy_check_mark: | Unique identifier for the writer. | 126522 |
|
| `id` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 |
|
||||||
| `filter` | *String* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 |
|
| `filter` | *String* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 |
|
||||||
| `tag` | *String* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson |
|
| `tag` | *String* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson |
|
||||||
| `tagKey` | *Optional\<String>* | :heavy_minus_sign: | A unique key associated with the writers tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
| `tagKey` | *Optional\<String>* | :heavy_minus_sign: | A unique key associated with the writers tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
||||||
@@ -25,7 +25,6 @@ import dev.plexapi.sdk.PlexAPI;
|
|||||||
import dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest;
|
import dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest;
|
||||||
import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized;
|
import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized;
|
||||||
import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse;
|
import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse;
|
||||||
import dev.plexapi.sdk.models.operations.OnlyTransient;
|
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
@@ -37,8 +36,6 @@ public class Application {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs()
|
GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs()
|
||||||
.count(1262.49)
|
|
||||||
.onlyTransient(OnlyTransient.ONE)
|
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
@@ -136,7 +133,6 @@ import dev.plexapi.sdk.PlexAPI;
|
|||||||
import dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest;
|
import dev.plexapi.sdk.models.errors.GetLibraryHubsBadRequest;
|
||||||
import dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized;
|
import dev.plexapi.sdk.models.errors.GetLibraryHubsUnauthorized;
|
||||||
import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse;
|
import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse;
|
||||||
import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient;
|
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
@@ -149,8 +145,6 @@ public class Application {
|
|||||||
|
|
||||||
GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs()
|
GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs()
|
||||||
.sectionId(6728.76)
|
.sectionId(6728.76)
|
||||||
.count(6728.76)
|
|
||||||
.onlyTransient(QueryParamOnlyTransient.ZERO)
|
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ API Calls interacting with Plex Media Server Libraries
|
|||||||
* [getActorsLibrary](#getactorslibrary) - Get Actors of library media
|
* [getActorsLibrary](#getactorslibrary) - Get Actors of library media
|
||||||
* [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
|
* [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
|
||||||
* [getMediaMetaData](#getmediametadata) - Get Media Metadata
|
* [getMediaMetaData](#getmediametadata) - Get Media Metadata
|
||||||
|
* [getMediaArts](#getmediaarts) - Get Media Background Artwork
|
||||||
|
* [postMediaArts](#postmediaarts) - Upload Media Background Artwork
|
||||||
|
* [getMediaPosters](#getmediaposters) - Get Media Posters
|
||||||
|
* [postMediaPoster](#postmediaposter) - Upload Media Poster
|
||||||
* [getMetadataChildren](#getmetadatachildren) - Get Items Children
|
* [getMetadataChildren](#getmetadatachildren) - Get Items Children
|
||||||
* [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
|
* [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
|
||||||
|
|
||||||
@@ -50,7 +54,6 @@ public class Application {
|
|||||||
|
|
||||||
GetFileHashResponse res = sdk.library().getFileHash()
|
GetFileHashResponse res = sdk.library().getFileHash()
|
||||||
.url("file://C:\Image.png&type=13")
|
.url("file://C:\Image.png&type=13")
|
||||||
.type(4462.17)
|
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// handle response
|
||||||
@@ -205,14 +208,14 @@ public class Application {
|
|||||||
|
|
||||||
## Library Details Endpoint
|
## Library Details Endpoint
|
||||||
|
|
||||||
This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
|
This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
|
||||||
|
|
||||||
The details include:
|
The details include:
|
||||||
|
|
||||||
### Directories
|
### Directories
|
||||||
Organized into three categories:
|
Organized into three categories:
|
||||||
|
|
||||||
- **Primary Directories**:
|
- **Primary Directories**:
|
||||||
- Used in some clients for quick access to media subsets (e.g., "All", "On Deck").
|
- Used in some clients for quick access to media subsets (e.g., "All", "On Deck").
|
||||||
- Most can be replicated via media queries.
|
- Most can be replicated via media queries.
|
||||||
- Customizable by users.
|
- Customizable by users.
|
||||||
@@ -253,7 +256,6 @@ import dev.plexapi.sdk.PlexAPI;
|
|||||||
import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest;
|
import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest;
|
||||||
import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized;
|
import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized;
|
||||||
import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse;
|
import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse;
|
||||||
import dev.plexapi.sdk.models.operations.IncludeDetails;
|
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
@@ -265,7 +267,6 @@ public class Application {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetLibraryDetailsResponse res = sdk.library().getLibraryDetails()
|
GetLibraryDetailsResponse res = sdk.library().getLibraryDetails()
|
||||||
.includeDetails(IncludeDetails.ZERO)
|
|
||||||
.sectionKey(9518)
|
.sectionKey(9518)
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
@@ -278,10 +279,10 @@ public class Application {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `includeDetails` | [Optional\<IncludeDetails>](../../models/operations/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts). <br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
|
| `includeDetails` | [Optional\<IncludeDetails>](../../models/operations/IncludeDetails.md) | :heavy_minus_sign: | Whether or not to include details for a section (types, filters, and sorts).<br/>Only exists for backwards compatibility, media providers other than the server libraries have it on always.<br/> | |
|
||||||
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
| `sectionKey` | *int* | :heavy_check_mark: | The unique key of the Plex library. <br/>Note: This is unique in the context of the Plex server.<br/> | 9518 |
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -909,6 +910,200 @@ public class Application {
|
|||||||
| models/errors/GetMediaMetaDataUnauthorized | 401 | application/json |
|
| models/errors/GetMediaMetaDataUnauthorized | 401 | application/json |
|
||||||
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
||||||
|
|
||||||
|
## getMediaArts
|
||||||
|
|
||||||
|
Returns the background artwork for a library item.
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
```java
|
||||||
|
package hello.world;
|
||||||
|
|
||||||
|
import dev.plexapi.sdk.PlexAPI;
|
||||||
|
import dev.plexapi.sdk.models.operations.GetMediaArtsResponse;
|
||||||
|
import java.lang.Exception;
|
||||||
|
|
||||||
|
public class Application {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetMediaArtsResponse res = sdk.library().getMediaArts()
|
||||||
|
.ratingKey(16099L)
|
||||||
|
.call();
|
||||||
|
|
||||||
|
if (res.object().isPresent()) {
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||||
|
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the artwork of. | 16099 |
|
||||||
|
|
||||||
|
### Response
|
||||||
|
|
||||||
|
**[GetMediaArtsResponse](../../models/operations/GetMediaArtsResponse.md)**
|
||||||
|
|
||||||
|
### Errors
|
||||||
|
|
||||||
|
| Error Type | Status Code | Content Type |
|
||||||
|
| ---------------------- | ---------------------- | ---------------------- |
|
||||||
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
||||||
|
|
||||||
|
## postMediaArts
|
||||||
|
|
||||||
|
Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
```java
|
||||||
|
package hello.world;
|
||||||
|
|
||||||
|
import dev.plexapi.sdk.PlexAPI;
|
||||||
|
import dev.plexapi.sdk.models.operations.PostMediaArtsResponse;
|
||||||
|
import java.lang.Exception;
|
||||||
|
|
||||||
|
public class Application {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
PostMediaArtsResponse res = sdk.library().postMediaArts()
|
||||||
|
.ratingKey(2268L)
|
||||||
|
.url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b")
|
||||||
|
.call();
|
||||||
|
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||||
|
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||||
|
| `url` | *Optional\<String>* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
|
||||||
|
| `requestBody` | *Optional\<byte[]>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||||
|
|
||||||
|
### Response
|
||||||
|
|
||||||
|
**[PostMediaArtsResponse](../../models/operations/PostMediaArtsResponse.md)**
|
||||||
|
|
||||||
|
### Errors
|
||||||
|
|
||||||
|
| Error Type | Status Code | Content Type |
|
||||||
|
| ---------------------- | ---------------------- | ---------------------- |
|
||||||
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
||||||
|
|
||||||
|
## getMediaPosters
|
||||||
|
|
||||||
|
Returns the available posters for a library item.
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
```java
|
||||||
|
package hello.world;
|
||||||
|
|
||||||
|
import dev.plexapi.sdk.PlexAPI;
|
||||||
|
import dev.plexapi.sdk.models.operations.GetMediaPostersResponse;
|
||||||
|
import java.lang.Exception;
|
||||||
|
|
||||||
|
public class Application {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GetMediaPostersResponse res = sdk.library().getMediaPosters()
|
||||||
|
.ratingKey(16099L)
|
||||||
|
.call();
|
||||||
|
|
||||||
|
if (res.object().isPresent()) {
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Required | Description | Example |
|
||||||
|
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||||
|
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 16099 |
|
||||||
|
|
||||||
|
### Response
|
||||||
|
|
||||||
|
**[GetMediaPostersResponse](../../models/operations/GetMediaPostersResponse.md)**
|
||||||
|
|
||||||
|
### Errors
|
||||||
|
|
||||||
|
| Error Type | Status Code | Content Type |
|
||||||
|
| ---------------------- | ---------------------- | ---------------------- |
|
||||||
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
||||||
|
|
||||||
|
## postMediaPoster
|
||||||
|
|
||||||
|
Uploads a poster to a library item, either from a local file or a remote URL
|
||||||
|
|
||||||
|
### Example Usage
|
||||||
|
|
||||||
|
```java
|
||||||
|
package hello.world;
|
||||||
|
|
||||||
|
import dev.plexapi.sdk.PlexAPI;
|
||||||
|
import dev.plexapi.sdk.models.operations.PostMediaPosterResponse;
|
||||||
|
import java.lang.Exception;
|
||||||
|
|
||||||
|
public class Application {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
|
PlexAPI sdk = PlexAPI.builder()
|
||||||
|
.accessToken("<YOUR_API_KEY_HERE>")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
PostMediaPosterResponse res = sdk.library().postMediaPoster()
|
||||||
|
.ratingKey(2268L)
|
||||||
|
.url("https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b")
|
||||||
|
.call();
|
||||||
|
|
||||||
|
// handle response
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Required | Description | Example |
|
||||||
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||||
|
| `ratingKey` | *long* | :heavy_check_mark: | the id of the library item to return the posters of. | 2268 |
|
||||||
|
| `url` | *Optional\<String>* | :heavy_minus_sign: | The URL of the image, if uploading a remote image | https://api.mediux.pro/assets/fcfdc487-dd07-4993-a0c1-0a3015362e5b |
|
||||||
|
| `requestBody` | *Optional\<byte[]>* | :heavy_minus_sign: | The contents of the image, if uploading a local file | |
|
||||||
|
|
||||||
|
### Response
|
||||||
|
|
||||||
|
**[PostMediaPosterResponse](../../models/operations/PostMediaPosterResponse.md)**
|
||||||
|
|
||||||
|
### Errors
|
||||||
|
|
||||||
|
| Error Type | Status Code | Content Type |
|
||||||
|
| ---------------------- | ---------------------- | ---------------------- |
|
||||||
|
| models/errors/SDKError | 4XX, 5XX | \*/\* |
|
||||||
|
|
||||||
## getMetadataChildren
|
## getMetadataChildren
|
||||||
|
|
||||||
This endpoint will return the children of of a library item specified with the ratingKey.
|
This endpoint will return the children of of a library item specified with the ratingKey.
|
||||||
|
|||||||
@@ -50,11 +50,11 @@ public class Application {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||||
| `level` | [Level](../../models/operations/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with. <br/>0: Error <br/>1: Warning <br/>2: Info <br/>3: Debug <br/>4: Verbose<br/> | |
|
| `level` | [Level](../../models/operations/Level.md) | :heavy_check_mark: | An integer log level to write to the PMS log with.<br/>0: Error<br/>1: Warning<br/>2: Info<br/>3: Debug<br/>4: Verbose<br/> | |
|
||||||
| `message` | *String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
|
| `message` | *String* | :heavy_check_mark: | The text of the message to write to the log. | Test log message |
|
||||||
| `source` | *String* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
|
| `source` | *String* | :heavy_check_mark: | a string indicating the source of the message. | Postman |
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
@@ -70,13 +70,13 @@ public class Application {
|
|||||||
|
|
||||||
## logMultiLine
|
## logMultiLine
|
||||||
|
|
||||||
This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
|
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.
|
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'.
|
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`).
|
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.
|
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.
|
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:
|
The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
|
||||||
- `0`: Error - Critical issues that require immediate attention.
|
- `0`: Error - Critical issues that require immediate attention.
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
||||||
They can be organized in (optionally nesting) folders.
|
They can be organized in (optionally nesting) folders.
|
||||||
Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
||||||
This may cause the duration and number of items to change.
|
This may cause the duration and number of items to change.
|
||||||
|
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ package hello.world;
|
|||||||
import dev.plexapi.sdk.PlexAPI;
|
import dev.plexapi.sdk.PlexAPI;
|
||||||
import dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest;
|
import dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest;
|
||||||
import dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized;
|
import dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized;
|
||||||
import dev.plexapi.sdk.models.operations.*;
|
import dev.plexapi.sdk.models.operations.GetPlaylistsResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
@@ -107,8 +107,6 @@ public class Application {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetPlaylistsResponse res = sdk.playlists().getPlaylists()
|
GetPlaylistsResponse res = sdk.playlists().getPlaylists()
|
||||||
.playlistType(PlaylistType.AUDIO)
|
|
||||||
.smart(QueryParamSmart.ZERO)
|
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
if (res.object().isPresent()) {
|
if (res.object().isPresent()) {
|
||||||
@@ -268,8 +266,6 @@ public class Application {
|
|||||||
|
|
||||||
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
|
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
|
||||||
.playlistID(3915)
|
.playlistID(3915)
|
||||||
.title("<value>")
|
|
||||||
.summary("<value>")
|
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// handle response
|
||||||
@@ -503,11 +499,11 @@ public class Application {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
| Parameter | Type | Required | Description | Example |
|
| Parameter | Type | Required | Description | Example |
|
||||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. <br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed. <br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename. <br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. <br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
|
| `path` | *String* | :heavy_check_mark: | absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.<br/>If the `path` argument is a directory, that path will be scanned for playlist files to be processed.<br/>Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/>If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.<br/>The GUID of each playlist is based on the filename.<br/> | /home/barkley/playlist.m3u |
|
||||||
| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists. <br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist. <br/>The `force` argument is used to disable overwriting. <br/>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.<br/> | |
|
| `force` | [QueryParamForce](../../models/operations/QueryParamForce.md) | :heavy_check_mark: | Force overwriting of duplicate playlists.<br/>By default, a playlist file uploaded with the same path will overwrite the existing playlist.<br/>The `force` argument is used to disable overwriting.<br/>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.<br/> | |
|
||||||
| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
|
| `sectionID` | *long* | :heavy_check_mark: | Possibly the section ID to upload the playlist to, we are not certain. | 1 |
|
||||||
|
|
||||||
### Response
|
### Response
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ package hello.world;
|
|||||||
import dev.plexapi.sdk.PlexAPI;
|
import dev.plexapi.sdk.PlexAPI;
|
||||||
import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest;
|
import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest;
|
||||||
import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized;
|
import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized;
|
||||||
import dev.plexapi.sdk.models.operations.*;
|
import dev.plexapi.sdk.models.operations.GetServerResourcesResponse;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
@@ -237,9 +237,6 @@ public class Application {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
GetServerResourcesResponse res = sdk.plex().getServerResources()
|
GetServerResourcesResponse res = sdk.plex().getServerResources()
|
||||||
.includeHttps(IncludeHttps.Enable)
|
|
||||||
.includeRelay(IncludeRelay.Enable)
|
|
||||||
.includeIPv6(IncludeIPv6.Enable)
|
|
||||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ public class Application {
|
|||||||
|
|
||||||
PerformSearchResponse res = sdk.search().performSearch()
|
PerformSearchResponse res = sdk.search().performSearch()
|
||||||
.query("dylan")
|
.query("dylan")
|
||||||
.sectionId(9487.88)
|
|
||||||
.limit(5)
|
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// handle response
|
||||||
@@ -107,8 +105,6 @@ public class Application {
|
|||||||
|
|
||||||
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
|
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
|
||||||
.query("dead+poop")
|
.query("dead+poop")
|
||||||
.sectionId(4094.8)
|
|
||||||
.limit(5)
|
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
// handle response
|
// handle response
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
groupId=dev.plexapi
|
groupId=dev.plexapi
|
||||||
artifactId=plexapi
|
artifactId=plexapi
|
||||||
version=0.14.0
|
version=0.16.1
|
||||||
@@ -30,8 +30,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
|
* Activities are awesome. They provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
|
||||||
* Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity.
|
* Activities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity.
|
||||||
|
|||||||
@@ -47,8 +47,6 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API Calls regarding authentication for Plex Media Server
|
* API Calls regarding authentication for Plex Media Server
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Butler is the task manager of the Plex Media Server Ecosystem.
|
* Butler is the task manager of the Plex Media Server Ecosystem.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -39,8 +39,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
|
* Hubs are a structured two-dimensional container for media, generally represented by multiple horizontal rows.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -74,10 +74,18 @@ import dev.plexapi.sdk.models.operations.GetLibraryItemsRequest;
|
|||||||
import dev.plexapi.sdk.models.operations.GetLibraryItemsRequestBuilder;
|
import dev.plexapi.sdk.models.operations.GetLibraryItemsRequestBuilder;
|
||||||
import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse;
|
import dev.plexapi.sdk.models.operations.GetLibraryItemsResponse;
|
||||||
import dev.plexapi.sdk.models.operations.GetLibraryItemsResponseBody;
|
import dev.plexapi.sdk.models.operations.GetLibraryItemsResponseBody;
|
||||||
|
import dev.plexapi.sdk.models.operations.GetMediaArtsRequest;
|
||||||
|
import dev.plexapi.sdk.models.operations.GetMediaArtsRequestBuilder;
|
||||||
|
import dev.plexapi.sdk.models.operations.GetMediaArtsResponse;
|
||||||
|
import dev.plexapi.sdk.models.operations.GetMediaArtsResponseBody;
|
||||||
import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequest;
|
import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequest;
|
||||||
import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequestBuilder;
|
import dev.plexapi.sdk.models.operations.GetMediaMetaDataRequestBuilder;
|
||||||
import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponse;
|
import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponse;
|
||||||
import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponseBody;
|
import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponseBody;
|
||||||
|
import dev.plexapi.sdk.models.operations.GetMediaPostersRequest;
|
||||||
|
import dev.plexapi.sdk.models.operations.GetMediaPostersRequestBuilder;
|
||||||
|
import dev.plexapi.sdk.models.operations.GetMediaPostersResponse;
|
||||||
|
import dev.plexapi.sdk.models.operations.GetMediaPostersResponseBody;
|
||||||
import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequest;
|
import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequest;
|
||||||
import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequestBuilder;
|
import dev.plexapi.sdk.models.operations.GetMetadataChildrenRequestBuilder;
|
||||||
import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse;
|
import dev.plexapi.sdk.models.operations.GetMetadataChildrenResponse;
|
||||||
@@ -104,25 +112,32 @@ import dev.plexapi.sdk.models.operations.GetTopWatchedContentRequestBuilder;
|
|||||||
import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse;
|
import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponse;
|
||||||
import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponseBody;
|
import dev.plexapi.sdk.models.operations.GetTopWatchedContentResponseBody;
|
||||||
import dev.plexapi.sdk.models.operations.IncludeDetails;
|
import dev.plexapi.sdk.models.operations.IncludeDetails;
|
||||||
|
import dev.plexapi.sdk.models.operations.PostMediaArtsRequest;
|
||||||
|
import dev.plexapi.sdk.models.operations.PostMediaArtsRequestBuilder;
|
||||||
|
import dev.plexapi.sdk.models.operations.PostMediaArtsResponse;
|
||||||
|
import dev.plexapi.sdk.models.operations.PostMediaPosterRequest;
|
||||||
|
import dev.plexapi.sdk.models.operations.PostMediaPosterRequestBuilder;
|
||||||
|
import dev.plexapi.sdk.models.operations.PostMediaPosterResponse;
|
||||||
import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*;
|
import dev.plexapi.sdk.models.operations.SDKMethodInterfaces.*;
|
||||||
import dev.plexapi.sdk.utils.HTTPClient;
|
import dev.plexapi.sdk.utils.HTTPClient;
|
||||||
import dev.plexapi.sdk.utils.HTTPRequest;
|
import dev.plexapi.sdk.utils.HTTPRequest;
|
||||||
import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl;
|
import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl;
|
||||||
import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl;
|
import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl;
|
||||||
import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl;
|
import dev.plexapi.sdk.utils.Hook.BeforeRequestContextImpl;
|
||||||
|
import dev.plexapi.sdk.utils.SerializedBody;
|
||||||
|
import dev.plexapi.sdk.utils.Utils.JsonShape;
|
||||||
import dev.plexapi.sdk.utils.Utils;
|
import dev.plexapi.sdk.utils.Utils;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.lang.Double;
|
import java.lang.Double;
|
||||||
import java.lang.Exception;
|
import java.lang.Exception;
|
||||||
import java.lang.Long;
|
import java.lang.Long;
|
||||||
|
import java.lang.Object;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
import java.net.http.HttpRequest;
|
import java.net.http.HttpRequest;
|
||||||
import java.net.http.HttpResponse;
|
import java.net.http.HttpResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API Calls interacting with Plex Media Server Libraries
|
* API Calls interacting with Plex Media Server Libraries
|
||||||
*/
|
*/
|
||||||
@@ -141,6 +156,10 @@ public class Library implements
|
|||||||
MethodCallGetActorsLibrary,
|
MethodCallGetActorsLibrary,
|
||||||
MethodCallGetSearchAllLibraries,
|
MethodCallGetSearchAllLibraries,
|
||||||
MethodCallGetMediaMetaData,
|
MethodCallGetMediaMetaData,
|
||||||
|
MethodCallGetMediaArts,
|
||||||
|
MethodCallPostMediaArts,
|
||||||
|
MethodCallGetMediaPosters,
|
||||||
|
MethodCallPostMediaPoster,
|
||||||
MethodCallGetMetadataChildren,
|
MethodCallGetMetadataChildren,
|
||||||
MethodCallGetTopWatchedContent {
|
MethodCallGetTopWatchedContent {
|
||||||
|
|
||||||
@@ -681,14 +700,14 @@ public class Library implements
|
|||||||
*
|
*
|
||||||
* <p>## Library Details Endpoint
|
* <p>## Library Details Endpoint
|
||||||
*
|
*
|
||||||
* <p>This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
|
* <p>This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
|
||||||
*
|
*
|
||||||
* <p>The details include:
|
* <p>The details include:
|
||||||
*
|
*
|
||||||
* <p>### Directories
|
* <p>### Directories
|
||||||
* Organized into three categories:
|
* Organized into three categories:
|
||||||
*
|
*
|
||||||
* <p>- **Primary Directories**:
|
* <p>- **Primary Directories**:
|
||||||
* - Used in some clients for quick access to media subsets (e.g., "All", "On Deck").
|
* - Used in some clients for quick access to media subsets (e.g., "All", "On Deck").
|
||||||
* - Most can be replicated via media queries.
|
* - Most can be replicated via media queries.
|
||||||
* - Customizable by users.
|
* - Customizable by users.
|
||||||
@@ -730,14 +749,14 @@ public class Library implements
|
|||||||
*
|
*
|
||||||
* <p>## Library Details Endpoint
|
* <p>## Library Details Endpoint
|
||||||
*
|
*
|
||||||
* <p>This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
|
* <p>This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
|
||||||
*
|
*
|
||||||
* <p>The details include:
|
* <p>The details include:
|
||||||
*
|
*
|
||||||
* <p>### Directories
|
* <p>### Directories
|
||||||
* Organized into three categories:
|
* Organized into three categories:
|
||||||
*
|
*
|
||||||
* <p>- **Primary Directories**:
|
* <p>- **Primary Directories**:
|
||||||
* - Used in some clients for quick access to media subsets (e.g., "All", "On Deck").
|
* - Used in some clients for quick access to media subsets (e.g., "All", "On Deck").
|
||||||
* - Most can be replicated via media queries.
|
* - Most can be replicated via media queries.
|
||||||
* - Customizable by users.
|
* - Customizable by users.
|
||||||
@@ -784,14 +803,14 @@ public class Library implements
|
|||||||
*
|
*
|
||||||
* <p>## Library Details Endpoint
|
* <p>## Library Details Endpoint
|
||||||
*
|
*
|
||||||
* <p>This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
|
* <p>This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself.
|
||||||
*
|
*
|
||||||
* <p>The details include:
|
* <p>The details include:
|
||||||
*
|
*
|
||||||
* <p>### Directories
|
* <p>### Directories
|
||||||
* Organized into three categories:
|
* Organized into three categories:
|
||||||
*
|
*
|
||||||
* <p>- **Primary Directories**:
|
* <p>- **Primary Directories**:
|
||||||
* - Used in some clients for quick access to media subsets (e.g., "All", "On Deck").
|
* - Used in some clients for quick access to media subsets (e.g., "All", "On Deck").
|
||||||
* - Most can be replicated via media queries.
|
* - Most can be replicated via media queries.
|
||||||
* - Customizable by users.
|
* - Customizable by users.
|
||||||
@@ -822,7 +841,7 @@ public class Library implements
|
|||||||
*
|
*
|
||||||
* <p>> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered.
|
* <p>> **Note**: Filters and sorts are optional; without them, no filtering controls are rendered.
|
||||||
*
|
*
|
||||||
* @param includeDetails Whether or not to include details for a section (types, filters, and sorts).
|
* @param includeDetails Whether or not to include details for a section (types, filters, and sorts).
|
||||||
* Only exists for backwards compatibility, media providers other than the server libraries have it on always.
|
* Only exists for backwards compatibility, media providers other than the server libraries have it on always.
|
||||||
*
|
*
|
||||||
* @param sectionKey The unique key of the Plex library.
|
* @param sectionKey The unique key of the Plex library.
|
||||||
@@ -2860,6 +2879,618 @@ public class Library implements
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Media Background Artwork
|
||||||
|
*
|
||||||
|
* <p>Returns the background artwork for a library item.
|
||||||
|
*
|
||||||
|
* @return The call builder
|
||||||
|
*/
|
||||||
|
public GetMediaArtsRequestBuilder getMediaArts() {
|
||||||
|
return new GetMediaArtsRequestBuilder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Media Background Artwork
|
||||||
|
*
|
||||||
|
* <p>Returns the background artwork for a library item.
|
||||||
|
*
|
||||||
|
* @param ratingKey the id of the library item to return the artwork of.
|
||||||
|
* @return The response from the API call
|
||||||
|
* @throws Exception if the API call fails
|
||||||
|
*/
|
||||||
|
public GetMediaArtsResponse getMediaArts(
|
||||||
|
long ratingKey) throws Exception {
|
||||||
|
GetMediaArtsRequest request =
|
||||||
|
GetMediaArtsRequest
|
||||||
|
.builder()
|
||||||
|
.ratingKey(ratingKey)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
String _baseUrl = Utils.templateUrl(
|
||||||
|
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||||
|
String _url = Utils.generateURL(
|
||||||
|
GetMediaArtsRequest.class,
|
||||||
|
_baseUrl,
|
||||||
|
"/library/metadata/{ratingKey}/arts",
|
||||||
|
request, null);
|
||||||
|
|
||||||
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
|
_req.addHeader("Accept", "application/json")
|
||||||
|
.addHeader("user-agent",
|
||||||
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
|
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||||
|
Utils.configureSecurity(_req,
|
||||||
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
|
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||||
|
HttpRequest _r =
|
||||||
|
sdkConfiguration.hooks()
|
||||||
|
.beforeRequest(
|
||||||
|
new BeforeRequestContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"get-media-arts",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
_req.build());
|
||||||
|
HttpResponse<InputStream> _httpRes;
|
||||||
|
try {
|
||||||
|
_httpRes = _client.send(_r);
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX", "5XX")) {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterError(
|
||||||
|
new AfterErrorContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"get-media-arts",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
Optional.of(_httpRes),
|
||||||
|
Optional.empty());
|
||||||
|
} else {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterSuccess(
|
||||||
|
new AfterSuccessContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"get-media-arts",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
_httpRes);
|
||||||
|
}
|
||||||
|
} catch (Exception _e) {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterError(
|
||||||
|
new AfterErrorContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"get-media-arts",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
Optional.empty(),
|
||||||
|
Optional.of(_e));
|
||||||
|
}
|
||||||
|
String _contentType = _httpRes
|
||||||
|
.headers()
|
||||||
|
.firstValue("Content-Type")
|
||||||
|
.orElse("application/octet-stream");
|
||||||
|
GetMediaArtsResponse.Builder _resBuilder =
|
||||||
|
GetMediaArtsResponse
|
||||||
|
.builder()
|
||||||
|
.contentType(_contentType)
|
||||||
|
.statusCode(_httpRes.statusCode())
|
||||||
|
.rawResponse(_httpRes);
|
||||||
|
|
||||||
|
GetMediaArtsResponse _res = _resBuilder.build();
|
||||||
|
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
|
||||||
|
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||||
|
GetMediaArtsResponseBody _out = Utils.mapper().readValue(
|
||||||
|
Utils.toUtf8AndClose(_httpRes.body()),
|
||||||
|
new TypeReference<GetMediaArtsResponseBody>() {});
|
||||||
|
_res.withObject(Optional.ofNullable(_out));
|
||||||
|
return _res;
|
||||||
|
} else {
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"Unexpected content-type received: " + _contentType,
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX")) {
|
||||||
|
// no content
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"API error occurred",
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
|
||||||
|
// no content
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"API error occurred",
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"Unexpected status code received: " + _httpRes.statusCode(),
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload Media Background Artwork
|
||||||
|
*
|
||||||
|
* <p>Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
|
||||||
|
*
|
||||||
|
* @return The call builder
|
||||||
|
*/
|
||||||
|
public PostMediaArtsRequestBuilder postMediaArts() {
|
||||||
|
return new PostMediaArtsRequestBuilder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload Media Background Artwork
|
||||||
|
*
|
||||||
|
* <p>Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
|
||||||
|
*
|
||||||
|
* @param ratingKey the id of the library item to return the posters of.
|
||||||
|
* @return The response from the API call
|
||||||
|
* @throws Exception if the API call fails
|
||||||
|
*/
|
||||||
|
public PostMediaArtsResponse postMediaArts(
|
||||||
|
long ratingKey) throws Exception {
|
||||||
|
return postMediaArts(ratingKey, Optional.empty(), Optional.empty());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload Media Background Artwork
|
||||||
|
*
|
||||||
|
* <p>Uploads an image to use as the background artwork for a library item, either from a local file or a remote URL
|
||||||
|
*
|
||||||
|
* @param ratingKey the id of the library item to return the posters of.
|
||||||
|
* @param url The URL of the image, if uploading a remote image
|
||||||
|
* @param requestBody The contents of the image, if uploading a local file
|
||||||
|
* @return The response from the API call
|
||||||
|
* @throws Exception if the API call fails
|
||||||
|
*/
|
||||||
|
public PostMediaArtsResponse postMediaArts(
|
||||||
|
long ratingKey,
|
||||||
|
Optional<String> url,
|
||||||
|
Optional<byte[]> requestBody) throws Exception {
|
||||||
|
PostMediaArtsRequest request =
|
||||||
|
PostMediaArtsRequest
|
||||||
|
.builder()
|
||||||
|
.ratingKey(ratingKey)
|
||||||
|
.url(url)
|
||||||
|
.requestBody(requestBody)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
String _baseUrl = Utils.templateUrl(
|
||||||
|
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||||
|
String _url = Utils.generateURL(
|
||||||
|
PostMediaArtsRequest.class,
|
||||||
|
_baseUrl,
|
||||||
|
"/library/metadata/{ratingKey}/arts",
|
||||||
|
request, null);
|
||||||
|
|
||||||
|
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||||
|
Object _convertedRequest = Utils.convertToShape(
|
||||||
|
request,
|
||||||
|
JsonShape.DEFAULT,
|
||||||
|
new TypeReference<Object>() {});
|
||||||
|
SerializedBody _serializedRequestBody = Utils.serializeRequestBody(
|
||||||
|
_convertedRequest,
|
||||||
|
"requestBody",
|
||||||
|
"raw",
|
||||||
|
false);
|
||||||
|
_req.setBody(Optional.ofNullable(_serializedRequestBody));
|
||||||
|
_req.addHeader("Accept", "*/*")
|
||||||
|
.addHeader("user-agent",
|
||||||
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
|
PostMediaArtsRequest.class,
|
||||||
|
request,
|
||||||
|
null));
|
||||||
|
|
||||||
|
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||||
|
Utils.configureSecurity(_req,
|
||||||
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
|
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||||
|
HttpRequest _r =
|
||||||
|
sdkConfiguration.hooks()
|
||||||
|
.beforeRequest(
|
||||||
|
new BeforeRequestContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"post-media-arts",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
_req.build());
|
||||||
|
HttpResponse<InputStream> _httpRes;
|
||||||
|
try {
|
||||||
|
_httpRes = _client.send(_r);
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX", "5XX")) {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterError(
|
||||||
|
new AfterErrorContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"post-media-arts",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
Optional.of(_httpRes),
|
||||||
|
Optional.empty());
|
||||||
|
} else {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterSuccess(
|
||||||
|
new AfterSuccessContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"post-media-arts",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
_httpRes);
|
||||||
|
}
|
||||||
|
} catch (Exception _e) {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterError(
|
||||||
|
new AfterErrorContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"post-media-arts",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
Optional.empty(),
|
||||||
|
Optional.of(_e));
|
||||||
|
}
|
||||||
|
String _contentType = _httpRes
|
||||||
|
.headers()
|
||||||
|
.firstValue("Content-Type")
|
||||||
|
.orElse("application/octet-stream");
|
||||||
|
PostMediaArtsResponse.Builder _resBuilder =
|
||||||
|
PostMediaArtsResponse
|
||||||
|
.builder()
|
||||||
|
.contentType(_contentType)
|
||||||
|
.statusCode(_httpRes.statusCode())
|
||||||
|
.rawResponse(_httpRes);
|
||||||
|
|
||||||
|
PostMediaArtsResponse _res = _resBuilder.build();
|
||||||
|
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
|
||||||
|
// no content
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX")) {
|
||||||
|
// no content
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"API error occurred",
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
|
||||||
|
// no content
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"API error occurred",
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"Unexpected status code received: " + _httpRes.statusCode(),
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Media Posters
|
||||||
|
*
|
||||||
|
* <p>Returns the available posters for a library item.
|
||||||
|
*
|
||||||
|
* @return The call builder
|
||||||
|
*/
|
||||||
|
public GetMediaPostersRequestBuilder getMediaPosters() {
|
||||||
|
return new GetMediaPostersRequestBuilder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Media Posters
|
||||||
|
*
|
||||||
|
* <p>Returns the available posters for a library item.
|
||||||
|
*
|
||||||
|
* @param ratingKey the id of the library item to return the posters of.
|
||||||
|
* @return The response from the API call
|
||||||
|
* @throws Exception if the API call fails
|
||||||
|
*/
|
||||||
|
public GetMediaPostersResponse getMediaPosters(
|
||||||
|
long ratingKey) throws Exception {
|
||||||
|
GetMediaPostersRequest request =
|
||||||
|
GetMediaPostersRequest
|
||||||
|
.builder()
|
||||||
|
.ratingKey(ratingKey)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
String _baseUrl = Utils.templateUrl(
|
||||||
|
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||||
|
String _url = Utils.generateURL(
|
||||||
|
GetMediaPostersRequest.class,
|
||||||
|
_baseUrl,
|
||||||
|
"/library/metadata/{ratingKey}/posters",
|
||||||
|
request, null);
|
||||||
|
|
||||||
|
HTTPRequest _req = new HTTPRequest(_url, "GET");
|
||||||
|
_req.addHeader("Accept", "application/json")
|
||||||
|
.addHeader("user-agent",
|
||||||
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
|
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||||
|
Utils.configureSecurity(_req,
|
||||||
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
|
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||||
|
HttpRequest _r =
|
||||||
|
sdkConfiguration.hooks()
|
||||||
|
.beforeRequest(
|
||||||
|
new BeforeRequestContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"get-media-posters",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
_req.build());
|
||||||
|
HttpResponse<InputStream> _httpRes;
|
||||||
|
try {
|
||||||
|
_httpRes = _client.send(_r);
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX", "5XX")) {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterError(
|
||||||
|
new AfterErrorContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"get-media-posters",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
Optional.of(_httpRes),
|
||||||
|
Optional.empty());
|
||||||
|
} else {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterSuccess(
|
||||||
|
new AfterSuccessContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"get-media-posters",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
_httpRes);
|
||||||
|
}
|
||||||
|
} catch (Exception _e) {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterError(
|
||||||
|
new AfterErrorContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"get-media-posters",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
Optional.empty(),
|
||||||
|
Optional.of(_e));
|
||||||
|
}
|
||||||
|
String _contentType = _httpRes
|
||||||
|
.headers()
|
||||||
|
.firstValue("Content-Type")
|
||||||
|
.orElse("application/octet-stream");
|
||||||
|
GetMediaPostersResponse.Builder _resBuilder =
|
||||||
|
GetMediaPostersResponse
|
||||||
|
.builder()
|
||||||
|
.contentType(_contentType)
|
||||||
|
.statusCode(_httpRes.statusCode())
|
||||||
|
.rawResponse(_httpRes);
|
||||||
|
|
||||||
|
GetMediaPostersResponse _res = _resBuilder.build();
|
||||||
|
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
|
||||||
|
if (Utils.contentTypeMatches(_contentType, "application/json")) {
|
||||||
|
GetMediaPostersResponseBody _out = Utils.mapper().readValue(
|
||||||
|
Utils.toUtf8AndClose(_httpRes.body()),
|
||||||
|
new TypeReference<GetMediaPostersResponseBody>() {});
|
||||||
|
_res.withObject(Optional.ofNullable(_out));
|
||||||
|
return _res;
|
||||||
|
} else {
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"Unexpected content-type received: " + _contentType,
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX")) {
|
||||||
|
// no content
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"API error occurred",
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
|
||||||
|
// no content
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"API error occurred",
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"Unexpected status code received: " + _httpRes.statusCode(),
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload Media Poster
|
||||||
|
*
|
||||||
|
* <p>Uploads a poster to a library item, either from a local file or a remote URL
|
||||||
|
*
|
||||||
|
* @return The call builder
|
||||||
|
*/
|
||||||
|
public PostMediaPosterRequestBuilder postMediaPoster() {
|
||||||
|
return new PostMediaPosterRequestBuilder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload Media Poster
|
||||||
|
*
|
||||||
|
* <p>Uploads a poster to a library item, either from a local file or a remote URL
|
||||||
|
*
|
||||||
|
* @param ratingKey the id of the library item to return the posters of.
|
||||||
|
* @return The response from the API call
|
||||||
|
* @throws Exception if the API call fails
|
||||||
|
*/
|
||||||
|
public PostMediaPosterResponse postMediaPoster(
|
||||||
|
long ratingKey) throws Exception {
|
||||||
|
return postMediaPoster(ratingKey, Optional.empty(), Optional.empty());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload Media Poster
|
||||||
|
*
|
||||||
|
* <p>Uploads a poster to a library item, either from a local file or a remote URL
|
||||||
|
*
|
||||||
|
* @param ratingKey the id of the library item to return the posters of.
|
||||||
|
* @param url The URL of the image, if uploading a remote image
|
||||||
|
* @param requestBody The contents of the image, if uploading a local file
|
||||||
|
* @return The response from the API call
|
||||||
|
* @throws Exception if the API call fails
|
||||||
|
*/
|
||||||
|
public PostMediaPosterResponse postMediaPoster(
|
||||||
|
long ratingKey,
|
||||||
|
Optional<String> url,
|
||||||
|
Optional<byte[]> requestBody) throws Exception {
|
||||||
|
PostMediaPosterRequest request =
|
||||||
|
PostMediaPosterRequest
|
||||||
|
.builder()
|
||||||
|
.ratingKey(ratingKey)
|
||||||
|
.url(url)
|
||||||
|
.requestBody(requestBody)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
String _baseUrl = Utils.templateUrl(
|
||||||
|
this.sdkConfiguration.serverUrl, this.sdkConfiguration.getServerVariableDefaults());
|
||||||
|
String _url = Utils.generateURL(
|
||||||
|
PostMediaPosterRequest.class,
|
||||||
|
_baseUrl,
|
||||||
|
"/library/metadata/{ratingKey}/posters",
|
||||||
|
request, null);
|
||||||
|
|
||||||
|
HTTPRequest _req = new HTTPRequest(_url, "POST");
|
||||||
|
Object _convertedRequest = Utils.convertToShape(
|
||||||
|
request,
|
||||||
|
JsonShape.DEFAULT,
|
||||||
|
new TypeReference<Object>() {});
|
||||||
|
SerializedBody _serializedRequestBody = Utils.serializeRequestBody(
|
||||||
|
_convertedRequest,
|
||||||
|
"requestBody",
|
||||||
|
"raw",
|
||||||
|
false);
|
||||||
|
_req.setBody(Optional.ofNullable(_serializedRequestBody));
|
||||||
|
_req.addHeader("Accept", "*/*")
|
||||||
|
.addHeader("user-agent",
|
||||||
|
SDKConfiguration.USER_AGENT);
|
||||||
|
|
||||||
|
_req.addQueryParams(Utils.getQueryParams(
|
||||||
|
PostMediaPosterRequest.class,
|
||||||
|
request,
|
||||||
|
null));
|
||||||
|
|
||||||
|
Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource();
|
||||||
|
Utils.configureSecurity(_req,
|
||||||
|
this.sdkConfiguration.securitySource.getSecurity());
|
||||||
|
HTTPClient _client = this.sdkConfiguration.defaultClient;
|
||||||
|
HttpRequest _r =
|
||||||
|
sdkConfiguration.hooks()
|
||||||
|
.beforeRequest(
|
||||||
|
new BeforeRequestContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"post-media-poster",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
_req.build());
|
||||||
|
HttpResponse<InputStream> _httpRes;
|
||||||
|
try {
|
||||||
|
_httpRes = _client.send(_r);
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX", "5XX")) {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterError(
|
||||||
|
new AfterErrorContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"post-media-poster",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
Optional.of(_httpRes),
|
||||||
|
Optional.empty());
|
||||||
|
} else {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterSuccess(
|
||||||
|
new AfterSuccessContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"post-media-poster",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
_httpRes);
|
||||||
|
}
|
||||||
|
} catch (Exception _e) {
|
||||||
|
_httpRes = sdkConfiguration.hooks()
|
||||||
|
.afterError(
|
||||||
|
new AfterErrorContextImpl(
|
||||||
|
_baseUrl,
|
||||||
|
"post-media-poster",
|
||||||
|
Optional.of(List.of()),
|
||||||
|
_hookSecuritySource),
|
||||||
|
Optional.empty(),
|
||||||
|
Optional.of(_e));
|
||||||
|
}
|
||||||
|
String _contentType = _httpRes
|
||||||
|
.headers()
|
||||||
|
.firstValue("Content-Type")
|
||||||
|
.orElse("application/octet-stream");
|
||||||
|
PostMediaPosterResponse.Builder _resBuilder =
|
||||||
|
PostMediaPosterResponse
|
||||||
|
.builder()
|
||||||
|
.contentType(_contentType)
|
||||||
|
.statusCode(_httpRes.statusCode())
|
||||||
|
.rawResponse(_httpRes);
|
||||||
|
|
||||||
|
PostMediaPosterResponse _res = _resBuilder.build();
|
||||||
|
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) {
|
||||||
|
// no content
|
||||||
|
return _res;
|
||||||
|
}
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "4XX")) {
|
||||||
|
// no content
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"API error occurred",
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) {
|
||||||
|
// no content
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"API error occurred",
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
throw new SDKError(
|
||||||
|
_httpRes,
|
||||||
|
_httpRes.statusCode(),
|
||||||
|
"Unexpected status code received: " + _httpRes.statusCode(),
|
||||||
|
Utils.extractByteArrayFromBody(_httpRes));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Items Children
|
* Get Items Children
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -37,8 +37,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Submit logs to the Log Handler for Plex Media Server
|
* Submit logs to the Log Handler for Plex Media Server
|
||||||
*/
|
*/
|
||||||
@@ -70,11 +68,11 @@ public class Log implements
|
|||||||
*
|
*
|
||||||
* <p>This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
|
* <p>This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
|
||||||
*
|
*
|
||||||
* @param level An integer log level to write to the PMS log with.
|
* @param level An integer log level to write to the PMS log with.
|
||||||
* 0: Error
|
* 0: Error
|
||||||
* 1: Warning
|
* 1: Warning
|
||||||
* 2: Info
|
* 2: Info
|
||||||
* 3: Debug
|
* 3: Debug
|
||||||
* 4: Verbose
|
* 4: Verbose
|
||||||
*
|
*
|
||||||
* @param message The text of the message to write to the log.
|
* @param message The text of the message to write to the log.
|
||||||
@@ -234,13 +232,13 @@ public class Log implements
|
|||||||
/**
|
/**
|
||||||
* Logging a multi-line message
|
* Logging a multi-line message
|
||||||
*
|
*
|
||||||
* <p>This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
|
* <p>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.
|
* 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'.
|
* Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
|
||||||
*
|
*
|
||||||
* <p>Log entries are separated by a newline character (`\n`).
|
* <p>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.
|
* 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.
|
* This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
|
||||||
*
|
*
|
||||||
* <p>The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
|
* <p>The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
|
||||||
* - `0`: Error - Critical issues that require immediate attention.
|
* - `0`: Error - Critical issues that require immediate attention.
|
||||||
@@ -265,13 +263,13 @@ public class Log implements
|
|||||||
/**
|
/**
|
||||||
* Logging a multi-line message
|
* Logging a multi-line message
|
||||||
*
|
*
|
||||||
* <p>This endpoint allows for the batch addition of log entries to the main Plex Media Server log.
|
* <p>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.
|
* 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'.
|
* Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'.
|
||||||
*
|
*
|
||||||
* <p>Log entries are separated by a newline character (`\n`).
|
* <p>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.
|
* 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.
|
* This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests.
|
||||||
*
|
*
|
||||||
* <p>The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
|
* <p>The 'level' parameter specifies the log entry's severity or importance, with the following integer values:
|
||||||
* - `0`: Error - Critical issues that require immediate attention.
|
* - `0`: Error - Critical issues that require immediate attention.
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API Calls interacting with Plex Media Server Media
|
* API Calls interacting with Plex Media Server Media
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -75,12 +75,10 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
||||||
* They can be organized in (optionally nesting) folders.
|
* They can be organized in (optionally nesting) folders.
|
||||||
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
||||||
* This may cause the duration and number of items to change.
|
* This may cause the duration and number of items to change.
|
||||||
*/
|
*/
|
||||||
public class Playlists implements
|
public class Playlists implements
|
||||||
@@ -1564,16 +1562,16 @@ public class Playlists implements
|
|||||||
*
|
*
|
||||||
* <p>Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
|
* <p>Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
|
||||||
*
|
*
|
||||||
* @param path absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
|
* @param path absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server.
|
||||||
* If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
|
* If the `path` argument is a directory, that path will be scanned for playlist files to be processed.
|
||||||
* Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
|
* Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it.
|
||||||
* The GUID of each playlist is based on the filename.
|
* The GUID of each playlist is based on the filename.
|
||||||
* If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
|
* If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it.
|
||||||
* The GUID of each playlist is based on the filename.
|
* The GUID of each playlist is based on the filename.
|
||||||
*
|
*
|
||||||
* @param force Force overwriting of duplicate playlists.
|
* @param force Force overwriting of duplicate playlists.
|
||||||
* By default, a playlist file uploaded with the same path will overwrite the existing playlist.
|
* By default, a playlist file uploaded with the same path will overwrite the existing playlist.
|
||||||
* The `force` argument is used to disable overwriting.
|
* 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.
|
* 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.
|
||||||
*
|
*
|
||||||
* @param sectionID Possibly the section ID to upload the playlist to, we are not certain.
|
* @param sectionID Possibly the section ID to upload the playlist to, we are not certain.
|
||||||
|
|||||||
@@ -61,8 +61,6 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API Calls that perform operations directly against https://Plex.tv
|
* API Calls that perform operations directly against https://Plex.tv
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ import java.util.Objects;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server
|
* Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server
|
||||||
*
|
*
|
||||||
@@ -119,9 +117,9 @@ public class PlexAPI {
|
|||||||
private final Log log;
|
private final Log log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
||||||
* They can be organized in (optionally nesting) folders.
|
* They can be organized in (optionally nesting) folders.
|
||||||
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
||||||
* This may cause the duration and number of items to change.
|
* This may cause the duration and number of items to change.
|
||||||
*/
|
*/
|
||||||
private final Playlists playlists;
|
private final Playlists playlists;
|
||||||
@@ -233,9 +231,9 @@ public class PlexAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
* Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017").
|
||||||
* They can be organized in (optionally nesting) folders.
|
* They can be organized in (optionally nesting) folders.
|
||||||
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
* Retrieving a playlist, or its items, will trigger a refresh of its metadata.
|
||||||
* This may cause the duration and number of items to change.
|
* This may cause the duration and number of items to change.
|
||||||
*/
|
*/
|
||||||
public Playlists playlists() {
|
public Playlists playlists() {
|
||||||
@@ -510,4 +508,5 @@ public class PlexAPI {
|
|||||||
this.updater = new Updater(sdkConfiguration);
|
this.updater = new Updater(sdkConfiguration);
|
||||||
this.users = new Users(sdkConfiguration);
|
this.users = new Users(sdkConfiguration);
|
||||||
this.sdkConfiguration.initialize();
|
this.sdkConfiguration.initialize();
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SDKConfiguration {
|
class SDKConfiguration {
|
||||||
public SecuritySource securitySource;
|
public SecuritySource securitySource;
|
||||||
|
|
||||||
@@ -44,8 +42,8 @@ class SDKConfiguration {
|
|||||||
} };
|
} };
|
||||||
private static final String LANGUAGE = "java";
|
private static final String LANGUAGE = "java";
|
||||||
public static final String OPENAPI_DOC_VERSION = "0.0.3";
|
public static final String OPENAPI_DOC_VERSION = "0.0.3";
|
||||||
public static final String SDK_VERSION = "0.14.0";
|
public static final String SDK_VERSION = "0.16.1";
|
||||||
public static final String GEN_VERSION = "2.563.1";
|
public static final String GEN_VERSION = "2.595.4";
|
||||||
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
|
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
|
||||||
public static final String USER_AGENT =
|
public static final String USER_AGENT =
|
||||||
String.format("speakeasy-sdk/%s %s %s %s %s",
|
String.format("speakeasy-sdk/%s %s %s %s %s",
|
||||||
|
|||||||
@@ -37,8 +37,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API Calls that perform search operations with Plex Media Server
|
* API Calls that perform search operations with Plex Media Server
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ package dev.plexapi.sdk;
|
|||||||
|
|
||||||
import dev.plexapi.sdk.utils.HasSecurity;
|
import dev.plexapi.sdk.utils.HasSecurity;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface SecuritySource {
|
public interface SecuritySource {
|
||||||
|
|
||||||
HasSecurity getSecurity();
|
HasSecurity getSecurity();
|
||||||
|
|||||||
@@ -65,8 +65,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operations against the Plex Media Server System.
|
* Operations against the Plex Media Server System.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API Calls that perform search operations with Plex Media Server Sessions
|
* API Calls that perform search operations with Plex Media Server Sessions
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -39,8 +39,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API Calls that perform operations with Plex Media Server Statistics
|
* API Calls that perform operations with Plex Media Server Statistics
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This describes the API for searching and applying updates to the Plex Media Server.
|
* This describes the API for searching and applying updates to the Plex Media Server.
|
||||||
* Updates to the status can be observed via the Event API.
|
* Updates to the status can be observed via the Event API.
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Users implements
|
public class Users implements
|
||||||
MethodCallGetUsers {
|
MethodCallGetUsers {
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ import java.net.http.HttpResponse;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API Calls that perform operations with Plex Media Server Videos
|
* API Calls that perform operations with Plex Media Server Videos
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API Calls that perform operations with Plex Media Server Watchlists
|
* API Calls that perform operations with Plex Media Server Watchlists
|
||||||
*/
|
*/
|
||||||
|
|||||||
172
src/main/java/dev/plexapi/sdk/models/operations/Attributes.java
Normal file
172
src/main/java/dev/plexapi/sdk/models/operations/Attributes.java
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
/*
|
||||||
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||||
|
*/
|
||||||
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import dev.plexapi.sdk.utils.Utils;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Override;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attributes
|
||||||
|
*
|
||||||
|
* <p>Attributes associated with the marker.
|
||||||
|
*/
|
||||||
|
public class Attributes {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier for the attributes.
|
||||||
|
*/
|
||||||
|
@JsonProperty("id")
|
||||||
|
private long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The version number of the marker attributes.
|
||||||
|
*/
|
||||||
|
@JsonInclude(Include.NON_ABSENT)
|
||||||
|
@JsonProperty("version")
|
||||||
|
private Optional<Long> version;
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public Attributes(
|
||||||
|
@JsonProperty("id") long id,
|
||||||
|
@JsonProperty("version") Optional<Long> version) {
|
||||||
|
Utils.checkNotNull(id, "id");
|
||||||
|
Utils.checkNotNull(version, "version");
|
||||||
|
this.id = id;
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Attributes(
|
||||||
|
long id) {
|
||||||
|
this(id, Optional.empty());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier for the attributes.
|
||||||
|
*/
|
||||||
|
@JsonIgnore
|
||||||
|
public long id() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The version number of the marker attributes.
|
||||||
|
*/
|
||||||
|
@JsonIgnore
|
||||||
|
public Optional<Long> version() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final static Builder builder() {
|
||||||
|
return new Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier for the attributes.
|
||||||
|
*/
|
||||||
|
public Attributes withId(long id) {
|
||||||
|
Utils.checkNotNull(id, "id");
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The version number of the marker attributes.
|
||||||
|
*/
|
||||||
|
public Attributes withVersion(long version) {
|
||||||
|
Utils.checkNotNull(version, "version");
|
||||||
|
this.version = Optional.ofNullable(version);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The version number of the marker attributes.
|
||||||
|
*/
|
||||||
|
public Attributes withVersion(Optional<Long> version) {
|
||||||
|
Utils.checkNotNull(version, "version");
|
||||||
|
this.version = version;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Attributes other = (Attributes) o;
|
||||||
|
return
|
||||||
|
Objects.deepEquals(this.id, other.id) &&
|
||||||
|
Objects.deepEquals(this.version, other.version);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(
|
||||||
|
id,
|
||||||
|
version);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return Utils.toString(Attributes.class,
|
||||||
|
"id", id,
|
||||||
|
"version", version);
|
||||||
|
}
|
||||||
|
|
||||||
|
public final static class Builder {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Optional<Long> version = Optional.empty();
|
||||||
|
|
||||||
|
private Builder() {
|
||||||
|
// force use of static builder() method
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier for the attributes.
|
||||||
|
*/
|
||||||
|
public Builder id(long id) {
|
||||||
|
Utils.checkNotNull(id, "id");
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The version number of the marker attributes.
|
||||||
|
*/
|
||||||
|
public Builder version(long version) {
|
||||||
|
Utils.checkNotNull(version, "version");
|
||||||
|
this.version = Optional.ofNullable(version);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The version number of the marker attributes.
|
||||||
|
*/
|
||||||
|
public Builder version(Optional<Long> version) {
|
||||||
|
Utils.checkNotNull(version, "version");
|
||||||
|
this.version = version;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Attributes build() {
|
||||||
|
return new Attributes(
|
||||||
|
id,
|
||||||
|
version);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
237
src/main/java/dev/plexapi/sdk/models/operations/Chapter.java
Normal file
237
src/main/java/dev/plexapi/sdk/models/operations/Chapter.java
Normal file
@@ -0,0 +1,237 @@
|
|||||||
|
/*
|
||||||
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||||
|
*/
|
||||||
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import dev.plexapi.sdk.utils.Utils;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Override;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chapter
|
||||||
|
*
|
||||||
|
* <p>The thumbnail for the chapter
|
||||||
|
*/
|
||||||
|
public class Chapter {
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
|
private long id;
|
||||||
|
|
||||||
|
@JsonProperty("filter")
|
||||||
|
private String filter;
|
||||||
|
|
||||||
|
@JsonProperty("index")
|
||||||
|
private long index;
|
||||||
|
|
||||||
|
@JsonProperty("startTimeOffset")
|
||||||
|
private long startTimeOffset;
|
||||||
|
|
||||||
|
@JsonProperty("endTimeOffset")
|
||||||
|
private long endTimeOffset;
|
||||||
|
|
||||||
|
@JsonProperty("thumb")
|
||||||
|
private String thumb;
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public Chapter(
|
||||||
|
@JsonProperty("id") long id,
|
||||||
|
@JsonProperty("filter") String filter,
|
||||||
|
@JsonProperty("index") long index,
|
||||||
|
@JsonProperty("startTimeOffset") long startTimeOffset,
|
||||||
|
@JsonProperty("endTimeOffset") long endTimeOffset,
|
||||||
|
@JsonProperty("thumb") String thumb) {
|
||||||
|
Utils.checkNotNull(id, "id");
|
||||||
|
Utils.checkNotNull(filter, "filter");
|
||||||
|
Utils.checkNotNull(index, "index");
|
||||||
|
Utils.checkNotNull(startTimeOffset, "startTimeOffset");
|
||||||
|
Utils.checkNotNull(endTimeOffset, "endTimeOffset");
|
||||||
|
Utils.checkNotNull(thumb, "thumb");
|
||||||
|
this.id = id;
|
||||||
|
this.filter = filter;
|
||||||
|
this.index = index;
|
||||||
|
this.startTimeOffset = startTimeOffset;
|
||||||
|
this.endTimeOffset = endTimeOffset;
|
||||||
|
this.thumb = thumb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
public long id() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
public String filter() {
|
||||||
|
return filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
public long index() {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
public long startTimeOffset() {
|
||||||
|
return startTimeOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
public long endTimeOffset() {
|
||||||
|
return endTimeOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
public String thumb() {
|
||||||
|
return thumb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final static Builder builder() {
|
||||||
|
return new Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Chapter withId(long id) {
|
||||||
|
Utils.checkNotNull(id, "id");
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Chapter withFilter(String filter) {
|
||||||
|
Utils.checkNotNull(filter, "filter");
|
||||||
|
this.filter = filter;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Chapter withIndex(long index) {
|
||||||
|
Utils.checkNotNull(index, "index");
|
||||||
|
this.index = index;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Chapter withStartTimeOffset(long startTimeOffset) {
|
||||||
|
Utils.checkNotNull(startTimeOffset, "startTimeOffset");
|
||||||
|
this.startTimeOffset = startTimeOffset;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Chapter withEndTimeOffset(long endTimeOffset) {
|
||||||
|
Utils.checkNotNull(endTimeOffset, "endTimeOffset");
|
||||||
|
this.endTimeOffset = endTimeOffset;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Chapter withThumb(String thumb) {
|
||||||
|
Utils.checkNotNull(thumb, "thumb");
|
||||||
|
this.thumb = thumb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Chapter other = (Chapter) o;
|
||||||
|
return
|
||||||
|
Objects.deepEquals(this.id, other.id) &&
|
||||||
|
Objects.deepEquals(this.filter, other.filter) &&
|
||||||
|
Objects.deepEquals(this.index, other.index) &&
|
||||||
|
Objects.deepEquals(this.startTimeOffset, other.startTimeOffset) &&
|
||||||
|
Objects.deepEquals(this.endTimeOffset, other.endTimeOffset) &&
|
||||||
|
Objects.deepEquals(this.thumb, other.thumb);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(
|
||||||
|
id,
|
||||||
|
filter,
|
||||||
|
index,
|
||||||
|
startTimeOffset,
|
||||||
|
endTimeOffset,
|
||||||
|
thumb);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return Utils.toString(Chapter.class,
|
||||||
|
"id", id,
|
||||||
|
"filter", filter,
|
||||||
|
"index", index,
|
||||||
|
"startTimeOffset", startTimeOffset,
|
||||||
|
"endTimeOffset", endTimeOffset,
|
||||||
|
"thumb", thumb);
|
||||||
|
}
|
||||||
|
|
||||||
|
public final static class Builder {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String filter;
|
||||||
|
|
||||||
|
private Long index;
|
||||||
|
|
||||||
|
private Long startTimeOffset;
|
||||||
|
|
||||||
|
private Long endTimeOffset;
|
||||||
|
|
||||||
|
private String thumb;
|
||||||
|
|
||||||
|
private Builder() {
|
||||||
|
// force use of static builder() method
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder id(long id) {
|
||||||
|
Utils.checkNotNull(id, "id");
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder filter(String filter) {
|
||||||
|
Utils.checkNotNull(filter, "filter");
|
||||||
|
this.filter = filter;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder index(long index) {
|
||||||
|
Utils.checkNotNull(index, "index");
|
||||||
|
this.index = index;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder startTimeOffset(long startTimeOffset) {
|
||||||
|
Utils.checkNotNull(startTimeOffset, "startTimeOffset");
|
||||||
|
this.startTimeOffset = startTimeOffset;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder endTimeOffset(long endTimeOffset) {
|
||||||
|
Utils.checkNotNull(endTimeOffset, "endTimeOffset");
|
||||||
|
this.endTimeOffset = endTimeOffset;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder thumb(String thumb) {
|
||||||
|
Utils.checkNotNull(thumb, "thumb");
|
||||||
|
this.thumb = thumb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Chapter build() {
|
||||||
|
return new Chapter(
|
||||||
|
id,
|
||||||
|
filter,
|
||||||
|
index,
|
||||||
|
startTimeOffset,
|
||||||
|
endTimeOffset,
|
||||||
|
thumb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import dev.plexapi.sdk.utils.Utils;
|
import dev.plexapi.sdk.utils.Utils;
|
||||||
import java.lang.Long;
|
import java.lang.Integer;
|
||||||
import java.lang.Override;
|
import java.lang.Override;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -23,7 +23,7 @@ import java.util.Optional;
|
|||||||
public class Country {
|
public class Country {
|
||||||
|
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private long id;
|
private int id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The country of origin of this media item
|
* The country of origin of this media item
|
||||||
@@ -37,7 +37,7 @@ public class Country {
|
|||||||
|
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
public Country(
|
public Country(
|
||||||
@JsonProperty("id") long id,
|
@JsonProperty("id") int id,
|
||||||
@JsonProperty("tag") String tag,
|
@JsonProperty("tag") String tag,
|
||||||
@JsonProperty("filter") Optional<String> filter) {
|
@JsonProperty("filter") Optional<String> filter) {
|
||||||
Utils.checkNotNull(id, "id");
|
Utils.checkNotNull(id, "id");
|
||||||
@@ -49,13 +49,13 @@ public class Country {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Country(
|
public Country(
|
||||||
long id,
|
int id,
|
||||||
String tag) {
|
String tag) {
|
||||||
this(id, tag, Optional.empty());
|
this(id, tag, Optional.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public long id() {
|
public int id() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ public class Country {
|
|||||||
return new Builder();
|
return new Builder();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Country withId(long id) {
|
public Country withId(int id) {
|
||||||
Utils.checkNotNull(id, "id");
|
Utils.checkNotNull(id, "id");
|
||||||
this.id = id;
|
this.id = id;
|
||||||
return this;
|
return this;
|
||||||
@@ -137,7 +137,7 @@ public class Country {
|
|||||||
|
|
||||||
public final static class Builder {
|
public final static class Builder {
|
||||||
|
|
||||||
private Long id;
|
private Integer id;
|
||||||
|
|
||||||
private String tag;
|
private String tag;
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ public class Country {
|
|||||||
// force use of static builder() method
|
// force use of static builder() method
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder id(long id) {
|
public Builder id(int id) {
|
||||||
Utils.checkNotNull(id, "id");
|
Utils.checkNotNull(id, "id");
|
||||||
this.id = id;
|
this.id = id;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -3,39 +3,186 @@
|
|||||||
*/
|
*/
|
||||||
package dev.plexapi.sdk.models.operations;
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.core.JacksonException;
|
||||||
|
import com.fasterxml.jackson.core.JsonGenerator;
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
|
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.Override;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
|
import java.lang.SuppressWarnings;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||||
|
* to evolve (particularly with the addition of enum members over time). If an
|
||||||
|
* open enum is used then the appearance of unexpected enum values (say in a
|
||||||
|
* response from an updated an API) will not bring about a runtime error thus
|
||||||
|
* ensuring that non-updated client versions can continue to work without error.
|
||||||
|
*
|
||||||
|
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||||
|
* cache is maintained to ensure that). As a consequence instances created with the
|
||||||
|
* same value will satisfy reference equality (via {@code ==}).
|
||||||
|
*
|
||||||
|
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||||
|
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||||
|
* Java does not permit the use of an instance in a switch expression but you can
|
||||||
|
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||||
|
*
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* CreatePlaylistQueryParamType
|
* CreatePlaylistQueryParamType
|
||||||
*
|
*
|
||||||
* <p>type of playlist to create
|
* <p>type of playlist to create
|
||||||
*/
|
*/
|
||||||
public enum CreatePlaylistQueryParamType {
|
@JsonDeserialize(using = CreatePlaylistQueryParamType._Deserializer.class)
|
||||||
AUDIO("audio"),
|
@JsonSerialize(using = CreatePlaylistQueryParamType._Serializer.class)
|
||||||
VIDEO("video"),
|
public class CreatePlaylistQueryParamType {
|
||||||
PHOTO("photo");
|
|
||||||
|
public static final CreatePlaylistQueryParamType AUDIO = new CreatePlaylistQueryParamType("audio");
|
||||||
|
public static final CreatePlaylistQueryParamType VIDEO = new CreatePlaylistQueryParamType("video");
|
||||||
|
public static final CreatePlaylistQueryParamType PHOTO = new CreatePlaylistQueryParamType("photo");
|
||||||
|
|
||||||
|
// This map will grow whenever a Color gets created with a new
|
||||||
|
// unrecognized value (a potential memory leak if the user is not
|
||||||
|
// careful). Keep this field lower case to avoid clashing with
|
||||||
|
// generated member names which will always be upper cased (Java
|
||||||
|
// convention)
|
||||||
|
private static final Map<String, CreatePlaylistQueryParamType> values = createValuesMap();
|
||||||
|
private static final Map<String, CreatePlaylistQueryParamTypeEnum> enums = createEnumsMap();
|
||||||
|
|
||||||
@JsonValue
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
private CreatePlaylistQueryParamType(String value) {
|
private CreatePlaylistQueryParamType(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a CreatePlaylistQueryParamType with the given value. For a specific value the
|
||||||
|
* returned object will always be a singleton so reference equality
|
||||||
|
* is satisfied when the values are the same.
|
||||||
|
*
|
||||||
|
* @param value value to be wrapped as CreatePlaylistQueryParamType
|
||||||
|
*/
|
||||||
|
public static CreatePlaylistQueryParamType of(String value) {
|
||||||
|
synchronized (CreatePlaylistQueryParamType.class) {
|
||||||
|
return values.computeIfAbsent(value, v -> new CreatePlaylistQueryParamType(v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public String value() {
|
public String value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Optional<CreatePlaylistQueryParamType> fromValue(String value) {
|
public Optional<CreatePlaylistQueryParamTypeEnum> asEnum() {
|
||||||
for (CreatePlaylistQueryParamType o: CreatePlaylistQueryParamType.values()) {
|
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||||
if (Objects.deepEquals(o.value, value)) {
|
}
|
||||||
return Optional.of(o);
|
|
||||||
}
|
public boolean isKnown() {
|
||||||
|
return asEnum().isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object obj) {
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
if (getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
CreatePlaylistQueryParamType other = (CreatePlaylistQueryParamType) obj;
|
||||||
|
return Objects.equals(value, other.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "CreatePlaylistQueryParamType [value=" + value + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
// return an array just like an enum
|
||||||
|
public static CreatePlaylistQueryParamType[] values() {
|
||||||
|
synchronized (CreatePlaylistQueryParamType.class) {
|
||||||
|
return values.values().toArray(new CreatePlaylistQueryParamType[] {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, CreatePlaylistQueryParamType> createValuesMap() {
|
||||||
|
Map<String, CreatePlaylistQueryParamType> map = new LinkedHashMap<>();
|
||||||
|
map.put("audio", AUDIO);
|
||||||
|
map.put("video", VIDEO);
|
||||||
|
map.put("photo", PHOTO);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, CreatePlaylistQueryParamTypeEnum> createEnumsMap() {
|
||||||
|
Map<String, CreatePlaylistQueryParamTypeEnum> map = new HashMap<>();
|
||||||
|
map.put("audio", CreatePlaylistQueryParamTypeEnum.AUDIO);
|
||||||
|
map.put("video", CreatePlaylistQueryParamTypeEnum.VIDEO);
|
||||||
|
map.put("photo", CreatePlaylistQueryParamTypeEnum.PHOTO);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Serializer extends StdSerializer<CreatePlaylistQueryParamType> {
|
||||||
|
|
||||||
|
protected _Serializer() {
|
||||||
|
super(CreatePlaylistQueryParamType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serialize(CreatePlaylistQueryParamType value, JsonGenerator g, SerializerProvider provider)
|
||||||
|
throws IOException, JsonProcessingException {
|
||||||
|
g.writeObject(value.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Deserializer extends StdDeserializer<CreatePlaylistQueryParamType> {
|
||||||
|
|
||||||
|
protected _Deserializer() {
|
||||||
|
super(CreatePlaylistQueryParamType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CreatePlaylistQueryParamType deserialize(JsonParser p, DeserializationContext ctxt)
|
||||||
|
throws IOException, JacksonException {
|
||||||
|
String v = p.readValueAs(new TypeReference<String>() {});
|
||||||
|
// use the factory method to ensure we get singletons
|
||||||
|
return CreatePlaylistQueryParamType.of(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum CreatePlaylistQueryParamTypeEnum {
|
||||||
|
|
||||||
|
AUDIO("audio"),
|
||||||
|
VIDEO("video"),
|
||||||
|
PHOTO("photo"),;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
private CreatePlaylistQueryParamTypeEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String value() {
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
return Optional.empty();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,38 +3,182 @@
|
|||||||
*/
|
*/
|
||||||
package dev.plexapi.sdk.models.operations;
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.core.JacksonException;
|
||||||
|
import com.fasterxml.jackson.core.JsonGenerator;
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
|
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.Override;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
|
import java.lang.SuppressWarnings;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||||
|
* to evolve (particularly with the addition of enum members over time). If an
|
||||||
|
* open enum is used then the appearance of unexpected enum values (say in a
|
||||||
|
* response from an updated an API) will not bring about a runtime error thus
|
||||||
|
* ensuring that non-updated client versions can continue to work without error.
|
||||||
|
*
|
||||||
|
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||||
|
* cache is maintained to ensure that). As a consequence instances created with the
|
||||||
|
* same value will satisfy reference equality (via {@code ==}).
|
||||||
|
*
|
||||||
|
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||||
|
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||||
|
* Java does not permit the use of an instance in a switch expression but you can
|
||||||
|
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||||
|
*
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* EnableCreditsMarkerGeneration
|
* EnableCreditsMarkerGeneration
|
||||||
*
|
*
|
||||||
* <p>Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
* <p>Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||||
*/
|
*/
|
||||||
public enum EnableCreditsMarkerGeneration {
|
@JsonDeserialize(using = EnableCreditsMarkerGeneration._Deserializer.class)
|
||||||
LibraryDefault("-1"),
|
@JsonSerialize(using = EnableCreditsMarkerGeneration._Serializer.class)
|
||||||
Disabled("0");
|
public class EnableCreditsMarkerGeneration {
|
||||||
|
|
||||||
|
public static final EnableCreditsMarkerGeneration LibraryDefault = new EnableCreditsMarkerGeneration("-1");
|
||||||
|
public static final EnableCreditsMarkerGeneration Disabled = new EnableCreditsMarkerGeneration("0");
|
||||||
|
|
||||||
|
// This map will grow whenever a Color gets created with a new
|
||||||
|
// unrecognized value (a potential memory leak if the user is not
|
||||||
|
// careful). Keep this field lower case to avoid clashing with
|
||||||
|
// generated member names which will always be upper cased (Java
|
||||||
|
// convention)
|
||||||
|
private static final Map<String, EnableCreditsMarkerGeneration> values = createValuesMap();
|
||||||
|
private static final Map<String, EnableCreditsMarkerGenerationEnum> enums = createEnumsMap();
|
||||||
|
|
||||||
@JsonValue
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
private EnableCreditsMarkerGeneration(String value) {
|
private EnableCreditsMarkerGeneration(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a EnableCreditsMarkerGeneration with the given value. For a specific value the
|
||||||
|
* returned object will always be a singleton so reference equality
|
||||||
|
* is satisfied when the values are the same.
|
||||||
|
*
|
||||||
|
* @param value value to be wrapped as EnableCreditsMarkerGeneration
|
||||||
|
*/
|
||||||
|
public static EnableCreditsMarkerGeneration of(String value) {
|
||||||
|
synchronized (EnableCreditsMarkerGeneration.class) {
|
||||||
|
return values.computeIfAbsent(value, v -> new EnableCreditsMarkerGeneration(v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public String value() {
|
public String value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Optional<EnableCreditsMarkerGeneration> fromValue(String value) {
|
public Optional<EnableCreditsMarkerGenerationEnum> asEnum() {
|
||||||
for (EnableCreditsMarkerGeneration o: EnableCreditsMarkerGeneration.values()) {
|
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||||
if (Objects.deepEquals(o.value, value)) {
|
}
|
||||||
return Optional.of(o);
|
|
||||||
}
|
public boolean isKnown() {
|
||||||
|
return asEnum().isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object obj) {
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
if (getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
EnableCreditsMarkerGeneration other = (EnableCreditsMarkerGeneration) obj;
|
||||||
|
return Objects.equals(value, other.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "EnableCreditsMarkerGeneration [value=" + value + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
// return an array just like an enum
|
||||||
|
public static EnableCreditsMarkerGeneration[] values() {
|
||||||
|
synchronized (EnableCreditsMarkerGeneration.class) {
|
||||||
|
return values.values().toArray(new EnableCreditsMarkerGeneration[] {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, EnableCreditsMarkerGeneration> createValuesMap() {
|
||||||
|
Map<String, EnableCreditsMarkerGeneration> map = new LinkedHashMap<>();
|
||||||
|
map.put("-1", LibraryDefault);
|
||||||
|
map.put("0", Disabled);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, EnableCreditsMarkerGenerationEnum> createEnumsMap() {
|
||||||
|
Map<String, EnableCreditsMarkerGenerationEnum> map = new HashMap<>();
|
||||||
|
map.put("-1", EnableCreditsMarkerGenerationEnum.LibraryDefault);
|
||||||
|
map.put("0", EnableCreditsMarkerGenerationEnum.Disabled);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Serializer extends StdSerializer<EnableCreditsMarkerGeneration> {
|
||||||
|
|
||||||
|
protected _Serializer() {
|
||||||
|
super(EnableCreditsMarkerGeneration.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serialize(EnableCreditsMarkerGeneration value, JsonGenerator g, SerializerProvider provider)
|
||||||
|
throws IOException, JsonProcessingException {
|
||||||
|
g.writeObject(value.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Deserializer extends StdDeserializer<EnableCreditsMarkerGeneration> {
|
||||||
|
|
||||||
|
protected _Deserializer() {
|
||||||
|
super(EnableCreditsMarkerGeneration.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnableCreditsMarkerGeneration deserialize(JsonParser p, DeserializationContext ctxt)
|
||||||
|
throws IOException, JacksonException {
|
||||||
|
String v = p.readValueAs(new TypeReference<String>() {});
|
||||||
|
// use the factory method to ensure we get singletons
|
||||||
|
return EnableCreditsMarkerGeneration.of(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum EnableCreditsMarkerGenerationEnum {
|
||||||
|
|
||||||
|
LibraryDefault("-1"),
|
||||||
|
Disabled("0"),;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
private EnableCreditsMarkerGenerationEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String value() {
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
return Optional.empty();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,39 +3,186 @@
|
|||||||
*/
|
*/
|
||||||
package dev.plexapi.sdk.models.operations;
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.core.JacksonException;
|
||||||
|
import com.fasterxml.jackson.core.JsonGenerator;
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
|
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.Override;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
|
import java.lang.SuppressWarnings;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||||
|
* to evolve (particularly with the addition of enum members over time). If an
|
||||||
|
* open enum is used then the appearance of unexpected enum values (say in a
|
||||||
|
* response from an updated an API) will not bring about a runtime error thus
|
||||||
|
* ensuring that non-updated client versions can continue to work without error.
|
||||||
|
*
|
||||||
|
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||||
|
* cache is maintained to ensure that). As a consequence instances created with the
|
||||||
|
* same value will satisfy reference equality (via {@code ==}).
|
||||||
|
*
|
||||||
|
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||||
|
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||||
|
* Java does not permit the use of an instance in a switch expression but you can
|
||||||
|
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||||
|
*
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* EpisodeSort
|
* EpisodeSort
|
||||||
*
|
*
|
||||||
* <p>Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
* <p>Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||||
*/
|
*/
|
||||||
public enum EpisodeSort {
|
@JsonDeserialize(using = EpisodeSort._Deserializer.class)
|
||||||
LibraryDefault("-1"),
|
@JsonSerialize(using = EpisodeSort._Serializer.class)
|
||||||
OldestFirst("0"),
|
public class EpisodeSort {
|
||||||
NewestFirst("1");
|
|
||||||
|
public static final EpisodeSort LibraryDefault = new EpisodeSort("-1");
|
||||||
|
public static final EpisodeSort OldestFirst = new EpisodeSort("0");
|
||||||
|
public static final EpisodeSort NewestFirst = new EpisodeSort("1");
|
||||||
|
|
||||||
|
// This map will grow whenever a Color gets created with a new
|
||||||
|
// unrecognized value (a potential memory leak if the user is not
|
||||||
|
// careful). Keep this field lower case to avoid clashing with
|
||||||
|
// generated member names which will always be upper cased (Java
|
||||||
|
// convention)
|
||||||
|
private static final Map<String, EpisodeSort> values = createValuesMap();
|
||||||
|
private static final Map<String, EpisodeSortEnum> enums = createEnumsMap();
|
||||||
|
|
||||||
@JsonValue
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
private EpisodeSort(String value) {
|
private EpisodeSort(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a EpisodeSort with the given value. For a specific value the
|
||||||
|
* returned object will always be a singleton so reference equality
|
||||||
|
* is satisfied when the values are the same.
|
||||||
|
*
|
||||||
|
* @param value value to be wrapped as EpisodeSort
|
||||||
|
*/
|
||||||
|
public static EpisodeSort of(String value) {
|
||||||
|
synchronized (EpisodeSort.class) {
|
||||||
|
return values.computeIfAbsent(value, v -> new EpisodeSort(v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public String value() {
|
public String value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Optional<EpisodeSort> fromValue(String value) {
|
public Optional<EpisodeSortEnum> asEnum() {
|
||||||
for (EpisodeSort o: EpisodeSort.values()) {
|
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||||
if (Objects.deepEquals(o.value, value)) {
|
}
|
||||||
return Optional.of(o);
|
|
||||||
}
|
public boolean isKnown() {
|
||||||
|
return asEnum().isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object obj) {
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
if (getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
EpisodeSort other = (EpisodeSort) obj;
|
||||||
|
return Objects.equals(value, other.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "EpisodeSort [value=" + value + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
// return an array just like an enum
|
||||||
|
public static EpisodeSort[] values() {
|
||||||
|
synchronized (EpisodeSort.class) {
|
||||||
|
return values.values().toArray(new EpisodeSort[] {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, EpisodeSort> createValuesMap() {
|
||||||
|
Map<String, EpisodeSort> map = new LinkedHashMap<>();
|
||||||
|
map.put("-1", LibraryDefault);
|
||||||
|
map.put("0", OldestFirst);
|
||||||
|
map.put("1", NewestFirst);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, EpisodeSortEnum> createEnumsMap() {
|
||||||
|
Map<String, EpisodeSortEnum> map = new HashMap<>();
|
||||||
|
map.put("-1", EpisodeSortEnum.LibraryDefault);
|
||||||
|
map.put("0", EpisodeSortEnum.OldestFirst);
|
||||||
|
map.put("1", EpisodeSortEnum.NewestFirst);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Serializer extends StdSerializer<EpisodeSort> {
|
||||||
|
|
||||||
|
protected _Serializer() {
|
||||||
|
super(EpisodeSort.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serialize(EpisodeSort value, JsonGenerator g, SerializerProvider provider)
|
||||||
|
throws IOException, JsonProcessingException {
|
||||||
|
g.writeObject(value.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Deserializer extends StdDeserializer<EpisodeSort> {
|
||||||
|
|
||||||
|
protected _Deserializer() {
|
||||||
|
super(EpisodeSort.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EpisodeSort deserialize(JsonParser p, DeserializationContext ctxt)
|
||||||
|
throws IOException, JacksonException {
|
||||||
|
String v = p.readValueAs(new TypeReference<String>() {});
|
||||||
|
// use the factory method to ensure we get singletons
|
||||||
|
return EpisodeSort.of(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum EpisodeSortEnum {
|
||||||
|
|
||||||
|
LibraryDefault("-1"),
|
||||||
|
OldestFirst("0"),
|
||||||
|
NewestFirst("1"),;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
private EpisodeSortEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String value() {
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
return Optional.empty();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
125
src/main/java/dev/plexapi/sdk/models/operations/Extras.java
Normal file
125
src/main/java/dev/plexapi/sdk/models/operations/Extras.java
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
/*
|
||||||
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||||
|
*/
|
||||||
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import dev.plexapi.sdk.utils.Utils;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Override;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
public class Extras {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The size of the extras.
|
||||||
|
*/
|
||||||
|
@JsonInclude(Include.NON_ABSENT)
|
||||||
|
@JsonProperty("size")
|
||||||
|
private Optional<Long> size;
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public Extras(
|
||||||
|
@JsonProperty("size") Optional<Long> size) {
|
||||||
|
Utils.checkNotNull(size, "size");
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Extras() {
|
||||||
|
this(Optional.empty());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The size of the extras.
|
||||||
|
*/
|
||||||
|
@JsonIgnore
|
||||||
|
public Optional<Long> size() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final static Builder builder() {
|
||||||
|
return new Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The size of the extras.
|
||||||
|
*/
|
||||||
|
public Extras withSize(long size) {
|
||||||
|
Utils.checkNotNull(size, "size");
|
||||||
|
this.size = Optional.ofNullable(size);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The size of the extras.
|
||||||
|
*/
|
||||||
|
public Extras withSize(Optional<Long> size) {
|
||||||
|
Utils.checkNotNull(size, "size");
|
||||||
|
this.size = size;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Extras other = (Extras) o;
|
||||||
|
return
|
||||||
|
Objects.deepEquals(this.size, other.size);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(
|
||||||
|
size);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return Utils.toString(Extras.class,
|
||||||
|
"size", size);
|
||||||
|
}
|
||||||
|
|
||||||
|
public final static class Builder {
|
||||||
|
|
||||||
|
private Optional<Long> size = Optional.empty();
|
||||||
|
|
||||||
|
private Builder() {
|
||||||
|
// force use of static builder() method
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The size of the extras.
|
||||||
|
*/
|
||||||
|
public Builder size(long size) {
|
||||||
|
Utils.checkNotNull(size, "size");
|
||||||
|
this.size = Optional.ofNullable(size);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The size of the extras.
|
||||||
|
*/
|
||||||
|
public Builder size(Optional<Long> size) {
|
||||||
|
Utils.checkNotNull(size, "size");
|
||||||
|
this.size = size;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Extras build() {
|
||||||
|
return new Extras(
|
||||||
|
size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,39 +3,186 @@
|
|||||||
*/
|
*/
|
||||||
package dev.plexapi.sdk.models.operations;
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.core.JacksonException;
|
||||||
|
import com.fasterxml.jackson.core.JsonGenerator;
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
|
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.Override;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
|
import java.lang.SuppressWarnings;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||||
|
* to evolve (particularly with the addition of enum members over time). If an
|
||||||
|
* open enum is used then the appearance of unexpected enum values (say in a
|
||||||
|
* response from an updated an API) will not bring about a runtime error thus
|
||||||
|
* ensuring that non-updated client versions can continue to work without error.
|
||||||
|
*
|
||||||
|
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||||
|
* cache is maintained to ensure that). As a consequence instances created with the
|
||||||
|
* same value will satisfy reference equality (via {@code ==}).
|
||||||
|
*
|
||||||
|
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||||
|
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||||
|
* Java does not permit the use of an instance in a switch expression but you can
|
||||||
|
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||||
|
*
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* Filter
|
* Filter
|
||||||
*
|
*
|
||||||
* <p>Filter
|
* <p>Filter
|
||||||
*/
|
*/
|
||||||
public enum Filter {
|
@JsonDeserialize(using = Filter._Deserializer.class)
|
||||||
ALL("all"),
|
@JsonSerialize(using = Filter._Serializer.class)
|
||||||
AVAILABLE("available"),
|
public class Filter {
|
||||||
RELEASED("released");
|
|
||||||
|
public static final Filter ALL = new Filter("all");
|
||||||
|
public static final Filter AVAILABLE = new Filter("available");
|
||||||
|
public static final Filter RELEASED = new Filter("released");
|
||||||
|
|
||||||
|
// This map will grow whenever a Color gets created with a new
|
||||||
|
// unrecognized value (a potential memory leak if the user is not
|
||||||
|
// careful). Keep this field lower case to avoid clashing with
|
||||||
|
// generated member names which will always be upper cased (Java
|
||||||
|
// convention)
|
||||||
|
private static final Map<String, Filter> values = createValuesMap();
|
||||||
|
private static final Map<String, FilterEnum> enums = createEnumsMap();
|
||||||
|
|
||||||
@JsonValue
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
private Filter(String value) {
|
private Filter(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a Filter with the given value. For a specific value the
|
||||||
|
* returned object will always be a singleton so reference equality
|
||||||
|
* is satisfied when the values are the same.
|
||||||
|
*
|
||||||
|
* @param value value to be wrapped as Filter
|
||||||
|
*/
|
||||||
|
public static Filter of(String value) {
|
||||||
|
synchronized (Filter.class) {
|
||||||
|
return values.computeIfAbsent(value, v -> new Filter(v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public String value() {
|
public String value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Optional<Filter> fromValue(String value) {
|
public Optional<FilterEnum> asEnum() {
|
||||||
for (Filter o: Filter.values()) {
|
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||||
if (Objects.deepEquals(o.value, value)) {
|
}
|
||||||
return Optional.of(o);
|
|
||||||
}
|
public boolean isKnown() {
|
||||||
|
return asEnum().isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object obj) {
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
if (getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
Filter other = (Filter) obj;
|
||||||
|
return Objects.equals(value, other.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Filter [value=" + value + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
// return an array just like an enum
|
||||||
|
public static Filter[] values() {
|
||||||
|
synchronized (Filter.class) {
|
||||||
|
return values.values().toArray(new Filter[] {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, Filter> createValuesMap() {
|
||||||
|
Map<String, Filter> map = new LinkedHashMap<>();
|
||||||
|
map.put("all", ALL);
|
||||||
|
map.put("available", AVAILABLE);
|
||||||
|
map.put("released", RELEASED);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, FilterEnum> createEnumsMap() {
|
||||||
|
Map<String, FilterEnum> map = new HashMap<>();
|
||||||
|
map.put("all", FilterEnum.ALL);
|
||||||
|
map.put("available", FilterEnum.AVAILABLE);
|
||||||
|
map.put("released", FilterEnum.RELEASED);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Serializer extends StdSerializer<Filter> {
|
||||||
|
|
||||||
|
protected _Serializer() {
|
||||||
|
super(Filter.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serialize(Filter value, JsonGenerator g, SerializerProvider provider)
|
||||||
|
throws IOException, JsonProcessingException {
|
||||||
|
g.writeObject(value.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Deserializer extends StdDeserializer<Filter> {
|
||||||
|
|
||||||
|
protected _Deserializer() {
|
||||||
|
super(Filter.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Filter deserialize(JsonParser p, DeserializationContext ctxt)
|
||||||
|
throws IOException, JacksonException {
|
||||||
|
String v = p.readValueAs(new TypeReference<String>() {});
|
||||||
|
// use the factory method to ensure we get singletons
|
||||||
|
return Filter.of(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum FilterEnum {
|
||||||
|
|
||||||
|
ALL("all"),
|
||||||
|
AVAILABLE("available"),
|
||||||
|
RELEASED("released"),;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
private FilterEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String value() {
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
return Optional.empty();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,39 +3,186 @@
|
|||||||
*/
|
*/
|
||||||
package dev.plexapi.sdk.models.operations;
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.core.JacksonException;
|
||||||
|
import com.fasterxml.jackson.core.JsonGenerator;
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
|
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.Override;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
|
import java.lang.SuppressWarnings;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||||
|
* to evolve (particularly with the addition of enum members over time). If an
|
||||||
|
* open enum is used then the appearance of unexpected enum values (say in a
|
||||||
|
* response from an updated an API) will not bring about a runtime error thus
|
||||||
|
* ensuring that non-updated client versions can continue to work without error.
|
||||||
|
*
|
||||||
|
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||||
|
* cache is maintained to ensure that). As a consequence instances created with the
|
||||||
|
* same value will satisfy reference equality (via {@code ==}).
|
||||||
|
*
|
||||||
|
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||||
|
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||||
|
* Java does not permit the use of an instance in a switch expression but you can
|
||||||
|
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||||
|
*
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* FlattenSeasons
|
* FlattenSeasons
|
||||||
*
|
*
|
||||||
* <p>Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
* <p>Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
||||||
*/
|
*/
|
||||||
public enum FlattenSeasons {
|
@JsonDeserialize(using = FlattenSeasons._Deserializer.class)
|
||||||
LibraryDefault("-1"),
|
@JsonSerialize(using = FlattenSeasons._Serializer.class)
|
||||||
Hide("0"),
|
public class FlattenSeasons {
|
||||||
Show("1");
|
|
||||||
|
public static final FlattenSeasons LibraryDefault = new FlattenSeasons("-1");
|
||||||
|
public static final FlattenSeasons Hide = new FlattenSeasons("0");
|
||||||
|
public static final FlattenSeasons Show = new FlattenSeasons("1");
|
||||||
|
|
||||||
|
// This map will grow whenever a Color gets created with a new
|
||||||
|
// unrecognized value (a potential memory leak if the user is not
|
||||||
|
// careful). Keep this field lower case to avoid clashing with
|
||||||
|
// generated member names which will always be upper cased (Java
|
||||||
|
// convention)
|
||||||
|
private static final Map<String, FlattenSeasons> values = createValuesMap();
|
||||||
|
private static final Map<String, FlattenSeasonsEnum> enums = createEnumsMap();
|
||||||
|
|
||||||
@JsonValue
|
|
||||||
private final String value;
|
private final String value;
|
||||||
|
|
||||||
private FlattenSeasons(String value) {
|
private FlattenSeasons(String value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a FlattenSeasons with the given value. For a specific value the
|
||||||
|
* returned object will always be a singleton so reference equality
|
||||||
|
* is satisfied when the values are the same.
|
||||||
|
*
|
||||||
|
* @param value value to be wrapped as FlattenSeasons
|
||||||
|
*/
|
||||||
|
public static FlattenSeasons of(String value) {
|
||||||
|
synchronized (FlattenSeasons.class) {
|
||||||
|
return values.computeIfAbsent(value, v -> new FlattenSeasons(v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public String value() {
|
public String value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Optional<FlattenSeasons> fromValue(String value) {
|
public Optional<FlattenSeasonsEnum> asEnum() {
|
||||||
for (FlattenSeasons o: FlattenSeasons.values()) {
|
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||||
if (Objects.deepEquals(o.value, value)) {
|
}
|
||||||
return Optional.of(o);
|
|
||||||
}
|
public boolean isKnown() {
|
||||||
|
return asEnum().isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object obj) {
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
if (getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
FlattenSeasons other = (FlattenSeasons) obj;
|
||||||
|
return Objects.equals(value, other.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "FlattenSeasons [value=" + value + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
// return an array just like an enum
|
||||||
|
public static FlattenSeasons[] values() {
|
||||||
|
synchronized (FlattenSeasons.class) {
|
||||||
|
return values.values().toArray(new FlattenSeasons[] {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, FlattenSeasons> createValuesMap() {
|
||||||
|
Map<String, FlattenSeasons> map = new LinkedHashMap<>();
|
||||||
|
map.put("-1", LibraryDefault);
|
||||||
|
map.put("0", Hide);
|
||||||
|
map.put("1", Show);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, FlattenSeasonsEnum> createEnumsMap() {
|
||||||
|
Map<String, FlattenSeasonsEnum> map = new HashMap<>();
|
||||||
|
map.put("-1", FlattenSeasonsEnum.LibraryDefault);
|
||||||
|
map.put("0", FlattenSeasonsEnum.Hide);
|
||||||
|
map.put("1", FlattenSeasonsEnum.Show);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Serializer extends StdSerializer<FlattenSeasons> {
|
||||||
|
|
||||||
|
protected _Serializer() {
|
||||||
|
super(FlattenSeasons.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serialize(FlattenSeasons value, JsonGenerator g, SerializerProvider provider)
|
||||||
|
throws IOException, JsonProcessingException {
|
||||||
|
g.writeObject(value.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Deserializer extends StdDeserializer<FlattenSeasons> {
|
||||||
|
|
||||||
|
protected _Deserializer() {
|
||||||
|
super(FlattenSeasons.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FlattenSeasons deserialize(JsonParser p, DeserializationContext ctxt)
|
||||||
|
throws IOException, JacksonException {
|
||||||
|
String v = p.readValueAs(new TypeReference<String>() {});
|
||||||
|
// use the factory method to ensure we get singletons
|
||||||
|
return FlattenSeasons.of(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum FlattenSeasonsEnum {
|
||||||
|
|
||||||
|
LibraryDefault("-1"),
|
||||||
|
Hide("0"),
|
||||||
|
Show("1"),;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
private FlattenSeasonsEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String value() {
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
return Optional.empty();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,45 @@
|
|||||||
*/
|
*/
|
||||||
package dev.plexapi.sdk.models.operations;
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.core.JacksonException;
|
||||||
|
import com.fasterxml.jackson.core.JsonGenerator;
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
|
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.Long;
|
||||||
|
import java.lang.Override;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.lang.SuppressWarnings;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||||
|
* to evolve (particularly with the addition of enum members over time). If an
|
||||||
|
* open enum is used then the appearance of unexpected enum values (say in a
|
||||||
|
* response from an updated an API) will not bring about a runtime error thus
|
||||||
|
* ensuring that non-updated client versions can continue to work without error.
|
||||||
|
*
|
||||||
|
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||||
|
* cache is maintained to ensure that). As a consequence instances created with the
|
||||||
|
* same value will satisfy reference equality (via {@code ==}).
|
||||||
|
*
|
||||||
|
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||||
|
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||||
|
* Java does not permit the use of an instance in a switch expression but you can
|
||||||
|
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||||
|
*
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* GetActorsLibraryQueryParamType
|
* GetActorsLibraryQueryParamType
|
||||||
*
|
*
|
||||||
@@ -17,33 +52,159 @@ import java.util.Optional;
|
|||||||
* 4 = episode
|
* 4 = episode
|
||||||
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
|
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
|
||||||
*/
|
*/
|
||||||
public enum GetActorsLibraryQueryParamType {
|
@JsonDeserialize(using = GetActorsLibraryQueryParamType._Deserializer.class)
|
||||||
Movie(1L),
|
@JsonSerialize(using = GetActorsLibraryQueryParamType._Serializer.class)
|
||||||
TvShow(2L),
|
public class GetActorsLibraryQueryParamType {
|
||||||
Season(3L),
|
|
||||||
Episode(4L),
|
public static final GetActorsLibraryQueryParamType Movie = new GetActorsLibraryQueryParamType(1L);
|
||||||
Audio(8L),
|
public static final GetActorsLibraryQueryParamType TvShow = new GetActorsLibraryQueryParamType(2L);
|
||||||
Album(9L),
|
public static final GetActorsLibraryQueryParamType Season = new GetActorsLibraryQueryParamType(3L);
|
||||||
Track(10L);
|
public static final GetActorsLibraryQueryParamType Episode = new GetActorsLibraryQueryParamType(4L);
|
||||||
|
public static final GetActorsLibraryQueryParamType Audio = new GetActorsLibraryQueryParamType(8L);
|
||||||
|
public static final GetActorsLibraryQueryParamType Album = new GetActorsLibraryQueryParamType(9L);
|
||||||
|
public static final GetActorsLibraryQueryParamType Track = new GetActorsLibraryQueryParamType(10L);
|
||||||
|
|
||||||
|
// This map will grow whenever a Color gets created with a new
|
||||||
|
// unrecognized value (a potential memory leak if the user is not
|
||||||
|
// careful). Keep this field lower case to avoid clashing with
|
||||||
|
// generated member names which will always be upper cased (Java
|
||||||
|
// convention)
|
||||||
|
private static final Map<Long, GetActorsLibraryQueryParamType> values = createValuesMap();
|
||||||
|
private static final Map<Long, GetActorsLibraryQueryParamTypeEnum> enums = createEnumsMap();
|
||||||
|
|
||||||
@JsonValue
|
|
||||||
private final long value;
|
private final long value;
|
||||||
|
|
||||||
private GetActorsLibraryQueryParamType(long value) {
|
private GetActorsLibraryQueryParamType(long value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a GetActorsLibraryQueryParamType with the given value. For a specific value the
|
||||||
|
* returned object will always be a singleton so reference equality
|
||||||
|
* is satisfied when the values are the same.
|
||||||
|
*
|
||||||
|
* @param value value to be wrapped as GetActorsLibraryQueryParamType
|
||||||
|
*/
|
||||||
|
public static GetActorsLibraryQueryParamType of(long value) {
|
||||||
|
synchronized (GetActorsLibraryQueryParamType.class) {
|
||||||
|
return values.computeIfAbsent(value, v -> new GetActorsLibraryQueryParamType(v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public long value() {
|
public long value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Optional<GetActorsLibraryQueryParamType> fromValue(long value) {
|
public Optional<GetActorsLibraryQueryParamTypeEnum> asEnum() {
|
||||||
for (GetActorsLibraryQueryParamType o: GetActorsLibraryQueryParamType.values()) {
|
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||||
if (Objects.deepEquals(o.value, value)) {
|
}
|
||||||
return Optional.of(o);
|
|
||||||
}
|
public boolean isKnown() {
|
||||||
|
return asEnum().isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object obj) {
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
if (getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
GetActorsLibraryQueryParamType other = (GetActorsLibraryQueryParamType) obj;
|
||||||
|
return Objects.equals(value, other.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "GetActorsLibraryQueryParamType [value=" + value + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
// return an array just like an enum
|
||||||
|
public static GetActorsLibraryQueryParamType[] values() {
|
||||||
|
synchronized (GetActorsLibraryQueryParamType.class) {
|
||||||
|
return values.values().toArray(new GetActorsLibraryQueryParamType[] {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<Long, GetActorsLibraryQueryParamType> createValuesMap() {
|
||||||
|
Map<Long, GetActorsLibraryQueryParamType> map = new LinkedHashMap<>();
|
||||||
|
map.put(1L, Movie);
|
||||||
|
map.put(2L, TvShow);
|
||||||
|
map.put(3L, Season);
|
||||||
|
map.put(4L, Episode);
|
||||||
|
map.put(8L, Audio);
|
||||||
|
map.put(9L, Album);
|
||||||
|
map.put(10L, Track);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<Long, GetActorsLibraryQueryParamTypeEnum> createEnumsMap() {
|
||||||
|
Map<Long, GetActorsLibraryQueryParamTypeEnum> map = new HashMap<>();
|
||||||
|
map.put(1L, GetActorsLibraryQueryParamTypeEnum.Movie);
|
||||||
|
map.put(2L, GetActorsLibraryQueryParamTypeEnum.TvShow);
|
||||||
|
map.put(3L, GetActorsLibraryQueryParamTypeEnum.Season);
|
||||||
|
map.put(4L, GetActorsLibraryQueryParamTypeEnum.Episode);
|
||||||
|
map.put(8L, GetActorsLibraryQueryParamTypeEnum.Audio);
|
||||||
|
map.put(9L, GetActorsLibraryQueryParamTypeEnum.Album);
|
||||||
|
map.put(10L, GetActorsLibraryQueryParamTypeEnum.Track);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Serializer extends StdSerializer<GetActorsLibraryQueryParamType> {
|
||||||
|
|
||||||
|
protected _Serializer() {
|
||||||
|
super(GetActorsLibraryQueryParamType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serialize(GetActorsLibraryQueryParamType value, JsonGenerator g, SerializerProvider provider)
|
||||||
|
throws IOException, JsonProcessingException {
|
||||||
|
g.writeObject(value.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Deserializer extends StdDeserializer<GetActorsLibraryQueryParamType> {
|
||||||
|
|
||||||
|
protected _Deserializer() {
|
||||||
|
super(GetActorsLibraryQueryParamType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetActorsLibraryQueryParamType deserialize(JsonParser p, DeserializationContext ctxt)
|
||||||
|
throws IOException, JacksonException {
|
||||||
|
long v = p.readValueAs(new TypeReference<Long>() {});
|
||||||
|
// use the factory method to ensure we get singletons
|
||||||
|
return GetActorsLibraryQueryParamType.of(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum GetActorsLibraryQueryParamTypeEnum {
|
||||||
|
|
||||||
|
Movie(1L),
|
||||||
|
TvShow(2L),
|
||||||
|
Season(3L),
|
||||||
|
Episode(4L),
|
||||||
|
Audio(8L),
|
||||||
|
Album(9L),
|
||||||
|
Track(10L),;
|
||||||
|
|
||||||
|
private final long value;
|
||||||
|
|
||||||
|
private GetActorsLibraryQueryParamTypeEnum(long value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long value() {
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
return Optional.empty();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,54 +5,95 @@ package dev.plexapi.sdk.models.operations;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import dev.plexapi.sdk.utils.LazySingletonValue;
|
||||||
import dev.plexapi.sdk.utils.Utils;
|
import dev.plexapi.sdk.utils.Utils;
|
||||||
import java.lang.Boolean;
|
import java.lang.Boolean;
|
||||||
import java.lang.Integer;
|
|
||||||
import java.lang.Long;
|
import java.lang.Long;
|
||||||
import java.lang.Override;
|
import java.lang.Override;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
|
import java.lang.SuppressWarnings;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
public class GetAllLibrariesDirectory {
|
public class GetAllLibrariesDirectory {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether syncing is allowed.
|
||||||
|
*/
|
||||||
@JsonProperty("allowSync")
|
@JsonProperty("allowSync")
|
||||||
private boolean allowSync;
|
private boolean allowSync;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL for the background artwork of the media container.
|
||||||
|
*/
|
||||||
@JsonProperty("art")
|
@JsonProperty("art")
|
||||||
private String art;
|
private String art;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The relative path to the composite media item.
|
||||||
|
*/
|
||||||
@JsonProperty("composite")
|
@JsonProperty("composite")
|
||||||
private String composite;
|
private String composite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
@JsonProperty("filters")
|
@JsonProperty("filters")
|
||||||
private boolean filters;
|
private boolean filters;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether the library is currently being refreshed or updated
|
||||||
|
*/
|
||||||
@JsonProperty("refreshing")
|
@JsonProperty("refreshing")
|
||||||
private boolean refreshing;
|
private boolean refreshing;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL for the thumbnail image of the media container.
|
||||||
|
*/
|
||||||
@JsonProperty("thumb")
|
@JsonProperty("thumb")
|
||||||
private String thumb;
|
private String thumb;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The library key representing the unique identifier
|
||||||
|
*/
|
||||||
@JsonProperty("key")
|
@JsonProperty("key")
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
@JsonProperty("type")
|
@JsonProperty("type")
|
||||||
private String type;
|
private GetAllLibrariesType type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The title of the library
|
||||||
|
*/
|
||||||
@JsonProperty("title")
|
@JsonProperty("title")
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Plex agent used to match and retrieve media metadata.
|
||||||
|
*/
|
||||||
@JsonProperty("agent")
|
@JsonProperty("agent")
|
||||||
private String agent;
|
private String agent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
@JsonProperty("scanner")
|
@JsonProperty("scanner")
|
||||||
private String scanner;
|
private String scanner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Plex library language that has been set
|
||||||
|
*/
|
||||||
@JsonProperty("language")
|
@JsonProperty("language")
|
||||||
private String language;
|
private String language;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The universally unique identifier for the library.
|
||||||
|
*/
|
||||||
@JsonProperty("uuid")
|
@JsonProperty("uuid")
|
||||||
private String uuid;
|
private String uuid;
|
||||||
|
|
||||||
@@ -62,11 +103,9 @@ public class GetAllLibrariesDirectory {
|
|||||||
@JsonProperty("updatedAt")
|
@JsonProperty("updatedAt")
|
||||||
private long updatedAt;
|
private long updatedAt;
|
||||||
|
|
||||||
/**
|
@JsonInclude(Include.NON_ABSENT)
|
||||||
* Unix epoch datetime in seconds
|
|
||||||
*/
|
|
||||||
@JsonProperty("createdAt")
|
@JsonProperty("createdAt")
|
||||||
private long createdAt;
|
private Optional<Long> createdAt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unix epoch datetime in seconds
|
* Unix epoch datetime in seconds
|
||||||
@@ -74,20 +113,28 @@ public class GetAllLibrariesDirectory {
|
|||||||
@JsonProperty("scannedAt")
|
@JsonProperty("scannedAt")
|
||||||
private long scannedAt;
|
private long scannedAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
@JsonProperty("content")
|
@JsonProperty("content")
|
||||||
private boolean content;
|
private boolean content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
@JsonProperty("directory")
|
@JsonProperty("directory")
|
||||||
private boolean directory;
|
private boolean directory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unix epoch datetime in seconds
|
* Timestamp (in seconds) representing the last time the content was modified.
|
||||||
|
* NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64
|
||||||
*/
|
*/
|
||||||
@JsonProperty("contentChangedAt")
|
@JsonProperty("contentChangedAt")
|
||||||
private long contentChangedAt;
|
private long contentChangedAt;
|
||||||
|
|
||||||
|
@JsonInclude(Include.NON_ABSENT)
|
||||||
@JsonProperty("hidden")
|
@JsonProperty("hidden")
|
||||||
private int hidden;
|
private Optional<? extends Hidden> hidden;
|
||||||
|
|
||||||
@JsonProperty("Location")
|
@JsonProperty("Location")
|
||||||
private List<GetAllLibrariesLocation> location;
|
private List<GetAllLibrariesLocation> location;
|
||||||
@@ -101,19 +148,19 @@ public class GetAllLibrariesDirectory {
|
|||||||
@JsonProperty("refreshing") boolean refreshing,
|
@JsonProperty("refreshing") boolean refreshing,
|
||||||
@JsonProperty("thumb") String thumb,
|
@JsonProperty("thumb") String thumb,
|
||||||
@JsonProperty("key") String key,
|
@JsonProperty("key") String key,
|
||||||
@JsonProperty("type") String type,
|
@JsonProperty("type") GetAllLibrariesType type,
|
||||||
@JsonProperty("title") String title,
|
@JsonProperty("title") String title,
|
||||||
@JsonProperty("agent") String agent,
|
@JsonProperty("agent") String agent,
|
||||||
@JsonProperty("scanner") String scanner,
|
@JsonProperty("scanner") String scanner,
|
||||||
@JsonProperty("language") String language,
|
@JsonProperty("language") String language,
|
||||||
@JsonProperty("uuid") String uuid,
|
@JsonProperty("uuid") String uuid,
|
||||||
@JsonProperty("updatedAt") long updatedAt,
|
@JsonProperty("updatedAt") long updatedAt,
|
||||||
@JsonProperty("createdAt") long createdAt,
|
@JsonProperty("createdAt") Optional<Long> createdAt,
|
||||||
@JsonProperty("scannedAt") long scannedAt,
|
@JsonProperty("scannedAt") long scannedAt,
|
||||||
@JsonProperty("content") boolean content,
|
@JsonProperty("content") boolean content,
|
||||||
@JsonProperty("directory") boolean directory,
|
@JsonProperty("directory") boolean directory,
|
||||||
@JsonProperty("contentChangedAt") long contentChangedAt,
|
@JsonProperty("contentChangedAt") long contentChangedAt,
|
||||||
@JsonProperty("hidden") int hidden,
|
@JsonProperty("hidden") Optional<? extends Hidden> hidden,
|
||||||
@JsonProperty("Location") List<GetAllLibrariesLocation> location) {
|
@JsonProperty("Location") List<GetAllLibrariesLocation> location) {
|
||||||
Utils.checkNotNull(allowSync, "allowSync");
|
Utils.checkNotNull(allowSync, "allowSync");
|
||||||
Utils.checkNotNull(art, "art");
|
Utils.checkNotNull(art, "art");
|
||||||
@@ -158,67 +205,126 @@ public class GetAllLibrariesDirectory {
|
|||||||
this.hidden = hidden;
|
this.hidden = hidden;
|
||||||
this.location = location;
|
this.location = location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GetAllLibrariesDirectory(
|
||||||
|
boolean allowSync,
|
||||||
|
String art,
|
||||||
|
String composite,
|
||||||
|
boolean filters,
|
||||||
|
boolean refreshing,
|
||||||
|
String thumb,
|
||||||
|
String key,
|
||||||
|
GetAllLibrariesType type,
|
||||||
|
String title,
|
||||||
|
String agent,
|
||||||
|
String scanner,
|
||||||
|
String language,
|
||||||
|
String uuid,
|
||||||
|
long updatedAt,
|
||||||
|
long scannedAt,
|
||||||
|
boolean content,
|
||||||
|
boolean directory,
|
||||||
|
long contentChangedAt,
|
||||||
|
List<GetAllLibrariesLocation> location) {
|
||||||
|
this(allowSync, art, composite, filters, refreshing, thumb, key, type, title, agent, scanner, language, uuid, updatedAt, Optional.empty(), scannedAt, content, directory, contentChangedAt, Optional.empty(), location);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether syncing is allowed.
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean allowSync() {
|
public boolean allowSync() {
|
||||||
return allowSync;
|
return allowSync;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL for the background artwork of the media container.
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String art() {
|
public String art() {
|
||||||
return art;
|
return art;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The relative path to the composite media item.
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String composite() {
|
public String composite() {
|
||||||
return composite;
|
return composite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean filters() {
|
public boolean filters() {
|
||||||
return filters;
|
return filters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether the library is currently being refreshed or updated
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean refreshing() {
|
public boolean refreshing() {
|
||||||
return refreshing;
|
return refreshing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL for the thumbnail image of the media container.
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String thumb() {
|
public String thumb() {
|
||||||
return thumb;
|
return thumb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The library key representing the unique identifier
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String key() {
|
public String key() {
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String type() {
|
public GetAllLibrariesType type() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The title of the library
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String title() {
|
public String title() {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Plex agent used to match and retrieve media metadata.
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String agent() {
|
public String agent() {
|
||||||
return agent;
|
return agent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String scanner() {
|
public String scanner() {
|
||||||
return scanner;
|
return scanner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Plex library language that has been set
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String language() {
|
public String language() {
|
||||||
return language;
|
return language;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The universally unique identifier for the library.
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String uuid() {
|
public String uuid() {
|
||||||
return uuid;
|
return uuid;
|
||||||
@@ -232,11 +338,8 @@ public class GetAllLibrariesDirectory {
|
|||||||
return updatedAt;
|
return updatedAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Unix epoch datetime in seconds
|
|
||||||
*/
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public long createdAt() {
|
public Optional<Long> createdAt() {
|
||||||
return createdAt;
|
return createdAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,27 +351,35 @@ public class GetAllLibrariesDirectory {
|
|||||||
return scannedAt;
|
return scannedAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean content() {
|
public boolean content() {
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean directory() {
|
public boolean directory() {
|
||||||
return directory;
|
return directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unix epoch datetime in seconds
|
* Timestamp (in seconds) representing the last time the content was modified.
|
||||||
|
* NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64
|
||||||
*/
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public long contentChangedAt() {
|
public long contentChangedAt() {
|
||||||
return contentChangedAt;
|
return contentChangedAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public int hidden() {
|
public Optional<Hidden> hidden() {
|
||||||
return hidden;
|
return (Optional<Hidden>) hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@@ -280,78 +391,114 @@ public class GetAllLibrariesDirectory {
|
|||||||
return new Builder();
|
return new Builder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether syncing is allowed.
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withAllowSync(boolean allowSync) {
|
public GetAllLibrariesDirectory withAllowSync(boolean allowSync) {
|
||||||
Utils.checkNotNull(allowSync, "allowSync");
|
Utils.checkNotNull(allowSync, "allowSync");
|
||||||
this.allowSync = allowSync;
|
this.allowSync = allowSync;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL for the background artwork of the media container.
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withArt(String art) {
|
public GetAllLibrariesDirectory withArt(String art) {
|
||||||
Utils.checkNotNull(art, "art");
|
Utils.checkNotNull(art, "art");
|
||||||
this.art = art;
|
this.art = art;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The relative path to the composite media item.
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withComposite(String composite) {
|
public GetAllLibrariesDirectory withComposite(String composite) {
|
||||||
Utils.checkNotNull(composite, "composite");
|
Utils.checkNotNull(composite, "composite");
|
||||||
this.composite = composite;
|
this.composite = composite;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withFilters(boolean filters) {
|
public GetAllLibrariesDirectory withFilters(boolean filters) {
|
||||||
Utils.checkNotNull(filters, "filters");
|
Utils.checkNotNull(filters, "filters");
|
||||||
this.filters = filters;
|
this.filters = filters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether the library is currently being refreshed or updated
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withRefreshing(boolean refreshing) {
|
public GetAllLibrariesDirectory withRefreshing(boolean refreshing) {
|
||||||
Utils.checkNotNull(refreshing, "refreshing");
|
Utils.checkNotNull(refreshing, "refreshing");
|
||||||
this.refreshing = refreshing;
|
this.refreshing = refreshing;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL for the thumbnail image of the media container.
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withThumb(String thumb) {
|
public GetAllLibrariesDirectory withThumb(String thumb) {
|
||||||
Utils.checkNotNull(thumb, "thumb");
|
Utils.checkNotNull(thumb, "thumb");
|
||||||
this.thumb = thumb;
|
this.thumb = thumb;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The library key representing the unique identifier
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withKey(String key) {
|
public GetAllLibrariesDirectory withKey(String key) {
|
||||||
Utils.checkNotNull(key, "key");
|
Utils.checkNotNull(key, "key");
|
||||||
this.key = key;
|
this.key = key;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GetAllLibrariesDirectory withType(String type) {
|
public GetAllLibrariesDirectory withType(GetAllLibrariesType type) {
|
||||||
Utils.checkNotNull(type, "type");
|
Utils.checkNotNull(type, "type");
|
||||||
this.type = type;
|
this.type = type;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The title of the library
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withTitle(String title) {
|
public GetAllLibrariesDirectory withTitle(String title) {
|
||||||
Utils.checkNotNull(title, "title");
|
Utils.checkNotNull(title, "title");
|
||||||
this.title = title;
|
this.title = title;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Plex agent used to match and retrieve media metadata.
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withAgent(String agent) {
|
public GetAllLibrariesDirectory withAgent(String agent) {
|
||||||
Utils.checkNotNull(agent, "agent");
|
Utils.checkNotNull(agent, "agent");
|
||||||
this.agent = agent;
|
this.agent = agent;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withScanner(String scanner) {
|
public GetAllLibrariesDirectory withScanner(String scanner) {
|
||||||
Utils.checkNotNull(scanner, "scanner");
|
Utils.checkNotNull(scanner, "scanner");
|
||||||
this.scanner = scanner;
|
this.scanner = scanner;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Plex library language that has been set
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withLanguage(String language) {
|
public GetAllLibrariesDirectory withLanguage(String language) {
|
||||||
Utils.checkNotNull(language, "language");
|
Utils.checkNotNull(language, "language");
|
||||||
this.language = language;
|
this.language = language;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The universally unique identifier for the library.
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withUuid(String uuid) {
|
public GetAllLibrariesDirectory withUuid(String uuid) {
|
||||||
Utils.checkNotNull(uuid, "uuid");
|
Utils.checkNotNull(uuid, "uuid");
|
||||||
this.uuid = uuid;
|
this.uuid = uuid;
|
||||||
@@ -367,10 +514,13 @@ public class GetAllLibrariesDirectory {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Unix epoch datetime in seconds
|
|
||||||
*/
|
|
||||||
public GetAllLibrariesDirectory withCreatedAt(long createdAt) {
|
public GetAllLibrariesDirectory withCreatedAt(long createdAt) {
|
||||||
|
Utils.checkNotNull(createdAt, "createdAt");
|
||||||
|
this.createdAt = Optional.ofNullable(createdAt);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetAllLibrariesDirectory withCreatedAt(Optional<Long> createdAt) {
|
||||||
Utils.checkNotNull(createdAt, "createdAt");
|
Utils.checkNotNull(createdAt, "createdAt");
|
||||||
this.createdAt = createdAt;
|
this.createdAt = createdAt;
|
||||||
return this;
|
return this;
|
||||||
@@ -385,12 +535,18 @@ public class GetAllLibrariesDirectory {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withContent(boolean content) {
|
public GetAllLibrariesDirectory withContent(boolean content) {
|
||||||
Utils.checkNotNull(content, "content");
|
Utils.checkNotNull(content, "content");
|
||||||
this.content = content;
|
this.content = content;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
public GetAllLibrariesDirectory withDirectory(boolean directory) {
|
public GetAllLibrariesDirectory withDirectory(boolean directory) {
|
||||||
Utils.checkNotNull(directory, "directory");
|
Utils.checkNotNull(directory, "directory");
|
||||||
this.directory = directory;
|
this.directory = directory;
|
||||||
@@ -398,7 +554,8 @@ public class GetAllLibrariesDirectory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unix epoch datetime in seconds
|
* Timestamp (in seconds) representing the last time the content was modified.
|
||||||
|
* NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64
|
||||||
*/
|
*/
|
||||||
public GetAllLibrariesDirectory withContentChangedAt(long contentChangedAt) {
|
public GetAllLibrariesDirectory withContentChangedAt(long contentChangedAt) {
|
||||||
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
|
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
|
||||||
@@ -406,7 +563,13 @@ public class GetAllLibrariesDirectory {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GetAllLibrariesDirectory withHidden(int hidden) {
|
public GetAllLibrariesDirectory withHidden(Hidden hidden) {
|
||||||
|
Utils.checkNotNull(hidden, "hidden");
|
||||||
|
this.hidden = Optional.ofNullable(hidden);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetAllLibrariesDirectory withHidden(Optional<? extends Hidden> hidden) {
|
||||||
Utils.checkNotNull(hidden, "hidden");
|
Utils.checkNotNull(hidden, "hidden");
|
||||||
this.hidden = hidden;
|
this.hidden = hidden;
|
||||||
return this;
|
return this;
|
||||||
@@ -520,7 +683,7 @@ public class GetAllLibrariesDirectory {
|
|||||||
|
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
private String type;
|
private GetAllLibrariesType type;
|
||||||
|
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
@@ -534,7 +697,7 @@ public class GetAllLibrariesDirectory {
|
|||||||
|
|
||||||
private Long updatedAt;
|
private Long updatedAt;
|
||||||
|
|
||||||
private Long createdAt;
|
private Optional<Long> createdAt = Optional.empty();
|
||||||
|
|
||||||
private Long scannedAt;
|
private Long scannedAt;
|
||||||
|
|
||||||
@@ -544,7 +707,7 @@ public class GetAllLibrariesDirectory {
|
|||||||
|
|
||||||
private Long contentChangedAt;
|
private Long contentChangedAt;
|
||||||
|
|
||||||
private Integer hidden;
|
private Optional<? extends Hidden> hidden;
|
||||||
|
|
||||||
private List<GetAllLibrariesLocation> location;
|
private List<GetAllLibrariesLocation> location;
|
||||||
|
|
||||||
@@ -552,78 +715,114 @@ public class GetAllLibrariesDirectory {
|
|||||||
// force use of static builder() method
|
// force use of static builder() method
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether syncing is allowed.
|
||||||
|
*/
|
||||||
public Builder allowSync(boolean allowSync) {
|
public Builder allowSync(boolean allowSync) {
|
||||||
Utils.checkNotNull(allowSync, "allowSync");
|
Utils.checkNotNull(allowSync, "allowSync");
|
||||||
this.allowSync = allowSync;
|
this.allowSync = allowSync;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL for the background artwork of the media container.
|
||||||
|
*/
|
||||||
public Builder art(String art) {
|
public Builder art(String art) {
|
||||||
Utils.checkNotNull(art, "art");
|
Utils.checkNotNull(art, "art");
|
||||||
this.art = art;
|
this.art = art;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The relative path to the composite media item.
|
||||||
|
*/
|
||||||
public Builder composite(String composite) {
|
public Builder composite(String composite) {
|
||||||
Utils.checkNotNull(composite, "composite");
|
Utils.checkNotNull(composite, "composite");
|
||||||
this.composite = composite;
|
this.composite = composite;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
public Builder filters(boolean filters) {
|
public Builder filters(boolean filters) {
|
||||||
Utils.checkNotNull(filters, "filters");
|
Utils.checkNotNull(filters, "filters");
|
||||||
this.filters = filters;
|
this.filters = filters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether the library is currently being refreshed or updated
|
||||||
|
*/
|
||||||
public Builder refreshing(boolean refreshing) {
|
public Builder refreshing(boolean refreshing) {
|
||||||
Utils.checkNotNull(refreshing, "refreshing");
|
Utils.checkNotNull(refreshing, "refreshing");
|
||||||
this.refreshing = refreshing;
|
this.refreshing = refreshing;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL for the thumbnail image of the media container.
|
||||||
|
*/
|
||||||
public Builder thumb(String thumb) {
|
public Builder thumb(String thumb) {
|
||||||
Utils.checkNotNull(thumb, "thumb");
|
Utils.checkNotNull(thumb, "thumb");
|
||||||
this.thumb = thumb;
|
this.thumb = thumb;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The library key representing the unique identifier
|
||||||
|
*/
|
||||||
public Builder key(String key) {
|
public Builder key(String key) {
|
||||||
Utils.checkNotNull(key, "key");
|
Utils.checkNotNull(key, "key");
|
||||||
this.key = key;
|
this.key = key;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder type(String type) {
|
public Builder type(GetAllLibrariesType type) {
|
||||||
Utils.checkNotNull(type, "type");
|
Utils.checkNotNull(type, "type");
|
||||||
this.type = type;
|
this.type = type;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The title of the library
|
||||||
|
*/
|
||||||
public Builder title(String title) {
|
public Builder title(String title) {
|
||||||
Utils.checkNotNull(title, "title");
|
Utils.checkNotNull(title, "title");
|
||||||
this.title = title;
|
this.title = title;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Plex agent used to match and retrieve media metadata.
|
||||||
|
*/
|
||||||
public Builder agent(String agent) {
|
public Builder agent(String agent) {
|
||||||
Utils.checkNotNull(agent, "agent");
|
Utils.checkNotNull(agent, "agent");
|
||||||
this.agent = agent;
|
this.agent = agent;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
public Builder scanner(String scanner) {
|
public Builder scanner(String scanner) {
|
||||||
Utils.checkNotNull(scanner, "scanner");
|
Utils.checkNotNull(scanner, "scanner");
|
||||||
this.scanner = scanner;
|
this.scanner = scanner;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Plex library language that has been set
|
||||||
|
*/
|
||||||
public Builder language(String language) {
|
public Builder language(String language) {
|
||||||
Utils.checkNotNull(language, "language");
|
Utils.checkNotNull(language, "language");
|
||||||
this.language = language;
|
this.language = language;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The universally unique identifier for the library.
|
||||||
|
*/
|
||||||
public Builder uuid(String uuid) {
|
public Builder uuid(String uuid) {
|
||||||
Utils.checkNotNull(uuid, "uuid");
|
Utils.checkNotNull(uuid, "uuid");
|
||||||
this.uuid = uuid;
|
this.uuid = uuid;
|
||||||
@@ -639,10 +838,13 @@ public class GetAllLibrariesDirectory {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Unix epoch datetime in seconds
|
|
||||||
*/
|
|
||||||
public Builder createdAt(long createdAt) {
|
public Builder createdAt(long createdAt) {
|
||||||
|
Utils.checkNotNull(createdAt, "createdAt");
|
||||||
|
this.createdAt = Optional.ofNullable(createdAt);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder createdAt(Optional<Long> createdAt) {
|
||||||
Utils.checkNotNull(createdAt, "createdAt");
|
Utils.checkNotNull(createdAt, "createdAt");
|
||||||
this.createdAt = createdAt;
|
this.createdAt = createdAt;
|
||||||
return this;
|
return this;
|
||||||
@@ -657,12 +859,18 @@ public class GetAllLibrariesDirectory {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
public Builder content(boolean content) {
|
public Builder content(boolean content) {
|
||||||
Utils.checkNotNull(content, "content");
|
Utils.checkNotNull(content, "content");
|
||||||
this.content = content;
|
this.content = content;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UNKNOWN
|
||||||
|
*/
|
||||||
public Builder directory(boolean directory) {
|
public Builder directory(boolean directory) {
|
||||||
Utils.checkNotNull(directory, "directory");
|
Utils.checkNotNull(directory, "directory");
|
||||||
this.directory = directory;
|
this.directory = directory;
|
||||||
@@ -670,7 +878,8 @@ public class GetAllLibrariesDirectory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unix epoch datetime in seconds
|
* Timestamp (in seconds) representing the last time the content was modified.
|
||||||
|
* NOTE: Some Plex server have some absurd values for this field, like 8457612157633039800 so it should be int64
|
||||||
*/
|
*/
|
||||||
public Builder contentChangedAt(long contentChangedAt) {
|
public Builder contentChangedAt(long contentChangedAt) {
|
||||||
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
|
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
|
||||||
@@ -678,7 +887,13 @@ public class GetAllLibrariesDirectory {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder hidden(int hidden) {
|
public Builder hidden(Hidden hidden) {
|
||||||
|
Utils.checkNotNull(hidden, "hidden");
|
||||||
|
this.hidden = Optional.ofNullable(hidden);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder hidden(Optional<? extends Hidden> hidden) {
|
||||||
Utils.checkNotNull(hidden, "hidden");
|
Utils.checkNotNull(hidden, "hidden");
|
||||||
this.hidden = hidden;
|
this.hidden = hidden;
|
||||||
return this;
|
return this;
|
||||||
@@ -691,6 +906,9 @@ public class GetAllLibrariesDirectory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public GetAllLibrariesDirectory build() {
|
public GetAllLibrariesDirectory build() {
|
||||||
|
if (hidden == null) {
|
||||||
|
hidden = _SINGLETON_VALUE_Hidden.value();
|
||||||
|
}
|
||||||
return new GetAllLibrariesDirectory(
|
return new GetAllLibrariesDirectory(
|
||||||
allowSync,
|
allowSync,
|
||||||
art,
|
art,
|
||||||
@@ -714,5 +932,11 @@ public class GetAllLibrariesDirectory {
|
|||||||
hidden,
|
hidden,
|
||||||
location);
|
location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final LazySingletonValue<Optional<? extends Hidden>> _SINGLETON_VALUE_Hidden =
|
||||||
|
new LazySingletonValue<>(
|
||||||
|
"hidden",
|
||||||
|
"0",
|
||||||
|
new TypeReference<Optional<? extends Hidden>>() {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,15 @@ import java.util.Objects;
|
|||||||
|
|
||||||
public class GetAllLibrariesLocation {
|
public class GetAllLibrariesLocation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ID of the location.
|
||||||
|
*/
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
private int id;
|
private int id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The path to the media item.
|
||||||
|
*/
|
||||||
@JsonProperty("path")
|
@JsonProperty("path")
|
||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
@@ -30,11 +36,17 @@ public class GetAllLibrariesLocation {
|
|||||||
this.path = path;
|
this.path = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ID of the location.
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public int id() {
|
public int id() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The path to the media item.
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String path() {
|
public String path() {
|
||||||
return path;
|
return path;
|
||||||
@@ -44,12 +56,18 @@ public class GetAllLibrariesLocation {
|
|||||||
return new Builder();
|
return new Builder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ID of the location.
|
||||||
|
*/
|
||||||
public GetAllLibrariesLocation withId(int id) {
|
public GetAllLibrariesLocation withId(int id) {
|
||||||
Utils.checkNotNull(id, "id");
|
Utils.checkNotNull(id, "id");
|
||||||
this.id = id;
|
this.id = id;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The path to the media item.
|
||||||
|
*/
|
||||||
public GetAllLibrariesLocation withPath(String path) {
|
public GetAllLibrariesLocation withPath(String path) {
|
||||||
Utils.checkNotNull(path, "path");
|
Utils.checkNotNull(path, "path");
|
||||||
this.path = path;
|
this.path = path;
|
||||||
@@ -95,12 +113,18 @@ public class GetAllLibrariesLocation {
|
|||||||
// force use of static builder() method
|
// force use of static builder() method
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ID of the location.
|
||||||
|
*/
|
||||||
public Builder id(int id) {
|
public Builder id(int id) {
|
||||||
Utils.checkNotNull(id, "id");
|
Utils.checkNotNull(id, "id");
|
||||||
this.id = id;
|
this.id = id;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The path to the media item.
|
||||||
|
*/
|
||||||
public Builder path(String path) {
|
public Builder path(String path) {
|
||||||
Utils.checkNotNull(path, "path");
|
Utils.checkNotNull(path, "path");
|
||||||
this.path = path;
|
this.path = path;
|
||||||
|
|||||||
@@ -5,35 +5,49 @@ package dev.plexapi.sdk.models.operations;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import dev.plexapi.sdk.utils.Utils;
|
import dev.plexapi.sdk.utils.Utils;
|
||||||
import java.lang.Boolean;
|
import java.lang.Boolean;
|
||||||
import java.lang.Integer;
|
import java.lang.Integer;
|
||||||
import java.lang.Override;
|
import java.lang.Override;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
|
import java.lang.SuppressWarnings;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
public class GetAllLibrariesMediaContainer {
|
public class GetAllLibrariesMediaContainer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of media items returned in this response.
|
||||||
|
*/
|
||||||
@JsonProperty("size")
|
@JsonProperty("size")
|
||||||
private int size;
|
private int size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether syncing is allowed.
|
||||||
|
*/
|
||||||
@JsonProperty("allowSync")
|
@JsonProperty("allowSync")
|
||||||
private boolean allowSync;
|
private boolean allowSync;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The primary title of the media container.
|
||||||
|
*/
|
||||||
@JsonProperty("title1")
|
@JsonProperty("title1")
|
||||||
private String title1;
|
private String title1;
|
||||||
|
|
||||||
|
@JsonInclude(Include.NON_ABSENT)
|
||||||
@JsonProperty("Directory")
|
@JsonProperty("Directory")
|
||||||
private List<GetAllLibrariesDirectory> directory;
|
private Optional<? extends List<GetAllLibrariesDirectory>> directory;
|
||||||
|
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
public GetAllLibrariesMediaContainer(
|
public GetAllLibrariesMediaContainer(
|
||||||
@JsonProperty("size") int size,
|
@JsonProperty("size") int size,
|
||||||
@JsonProperty("allowSync") boolean allowSync,
|
@JsonProperty("allowSync") boolean allowSync,
|
||||||
@JsonProperty("title1") String title1,
|
@JsonProperty("title1") String title1,
|
||||||
@JsonProperty("Directory") List<GetAllLibrariesDirectory> directory) {
|
@JsonProperty("Directory") Optional<? extends List<GetAllLibrariesDirectory>> directory) {
|
||||||
Utils.checkNotNull(size, "size");
|
Utils.checkNotNull(size, "size");
|
||||||
Utils.checkNotNull(allowSync, "allowSync");
|
Utils.checkNotNull(allowSync, "allowSync");
|
||||||
Utils.checkNotNull(title1, "title1");
|
Utils.checkNotNull(title1, "title1");
|
||||||
@@ -43,43 +57,69 @@ public class GetAllLibrariesMediaContainer {
|
|||||||
this.title1 = title1;
|
this.title1 = title1;
|
||||||
this.directory = directory;
|
this.directory = directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GetAllLibrariesMediaContainer(
|
||||||
|
int size,
|
||||||
|
boolean allowSync,
|
||||||
|
String title1) {
|
||||||
|
this(size, allowSync, title1, Optional.empty());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of media items returned in this response.
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public int size() {
|
public int size() {
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether syncing is allowed.
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public boolean allowSync() {
|
public boolean allowSync() {
|
||||||
return allowSync;
|
return allowSync;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The primary title of the media container.
|
||||||
|
*/
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String title1() {
|
public String title1() {
|
||||||
return title1;
|
return title1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public List<GetAllLibrariesDirectory> directory() {
|
public Optional<List<GetAllLibrariesDirectory>> directory() {
|
||||||
return directory;
|
return (Optional<List<GetAllLibrariesDirectory>>) directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final static Builder builder() {
|
public final static Builder builder() {
|
||||||
return new Builder();
|
return new Builder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of media items returned in this response.
|
||||||
|
*/
|
||||||
public GetAllLibrariesMediaContainer withSize(int size) {
|
public GetAllLibrariesMediaContainer withSize(int size) {
|
||||||
Utils.checkNotNull(size, "size");
|
Utils.checkNotNull(size, "size");
|
||||||
this.size = size;
|
this.size = size;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether syncing is allowed.
|
||||||
|
*/
|
||||||
public GetAllLibrariesMediaContainer withAllowSync(boolean allowSync) {
|
public GetAllLibrariesMediaContainer withAllowSync(boolean allowSync) {
|
||||||
Utils.checkNotNull(allowSync, "allowSync");
|
Utils.checkNotNull(allowSync, "allowSync");
|
||||||
this.allowSync = allowSync;
|
this.allowSync = allowSync;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The primary title of the media container.
|
||||||
|
*/
|
||||||
public GetAllLibrariesMediaContainer withTitle1(String title1) {
|
public GetAllLibrariesMediaContainer withTitle1(String title1) {
|
||||||
Utils.checkNotNull(title1, "title1");
|
Utils.checkNotNull(title1, "title1");
|
||||||
this.title1 = title1;
|
this.title1 = title1;
|
||||||
@@ -87,6 +127,12 @@ public class GetAllLibrariesMediaContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public GetAllLibrariesMediaContainer withDirectory(List<GetAllLibrariesDirectory> directory) {
|
public GetAllLibrariesMediaContainer withDirectory(List<GetAllLibrariesDirectory> directory) {
|
||||||
|
Utils.checkNotNull(directory, "directory");
|
||||||
|
this.directory = Optional.ofNullable(directory);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetAllLibrariesMediaContainer withDirectory(Optional<? extends List<GetAllLibrariesDirectory>> directory) {
|
||||||
Utils.checkNotNull(directory, "directory");
|
Utils.checkNotNull(directory, "directory");
|
||||||
this.directory = directory;
|
this.directory = directory;
|
||||||
return this;
|
return this;
|
||||||
@@ -135,24 +181,33 @@ public class GetAllLibrariesMediaContainer {
|
|||||||
|
|
||||||
private String title1;
|
private String title1;
|
||||||
|
|
||||||
private List<GetAllLibrariesDirectory> directory;
|
private Optional<? extends List<GetAllLibrariesDirectory>> directory = Optional.empty();
|
||||||
|
|
||||||
private Builder() {
|
private Builder() {
|
||||||
// force use of static builder() method
|
// force use of static builder() method
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of media items returned in this response.
|
||||||
|
*/
|
||||||
public Builder size(int size) {
|
public Builder size(int size) {
|
||||||
Utils.checkNotNull(size, "size");
|
Utils.checkNotNull(size, "size");
|
||||||
this.size = size;
|
this.size = size;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether syncing is allowed.
|
||||||
|
*/
|
||||||
public Builder allowSync(boolean allowSync) {
|
public Builder allowSync(boolean allowSync) {
|
||||||
Utils.checkNotNull(allowSync, "allowSync");
|
Utils.checkNotNull(allowSync, "allowSync");
|
||||||
this.allowSync = allowSync;
|
this.allowSync = allowSync;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The primary title of the media container.
|
||||||
|
*/
|
||||||
public Builder title1(String title1) {
|
public Builder title1(String title1) {
|
||||||
Utils.checkNotNull(title1, "title1");
|
Utils.checkNotNull(title1, "title1");
|
||||||
this.title1 = title1;
|
this.title1 = title1;
|
||||||
@@ -160,6 +215,12 @@ public class GetAllLibrariesMediaContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Builder directory(List<GetAllLibrariesDirectory> directory) {
|
public Builder directory(List<GetAllLibrariesDirectory> directory) {
|
||||||
|
Utils.checkNotNull(directory, "directory");
|
||||||
|
this.directory = Optional.ofNullable(directory);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder directory(Optional<? extends List<GetAllLibrariesDirectory>> directory) {
|
||||||
Utils.checkNotNull(directory, "directory");
|
Utils.checkNotNull(directory, "directory");
|
||||||
this.directory = directory;
|
this.directory = directory;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -5,11 +5,15 @@ package dev.plexapi.sdk.models.operations;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import dev.plexapi.sdk.utils.Utils;
|
import dev.plexapi.sdk.utils.Utils;
|
||||||
import java.lang.Override;
|
import java.lang.Override;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
|
import java.lang.SuppressWarnings;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GetAllLibrariesResponseBody
|
* GetAllLibrariesResponseBody
|
||||||
@@ -18,19 +22,25 @@ import java.util.Objects;
|
|||||||
*/
|
*/
|
||||||
public class GetAllLibrariesResponseBody {
|
public class GetAllLibrariesResponseBody {
|
||||||
|
|
||||||
|
@JsonInclude(Include.NON_ABSENT)
|
||||||
@JsonProperty("MediaContainer")
|
@JsonProperty("MediaContainer")
|
||||||
private GetAllLibrariesMediaContainer mediaContainer;
|
private Optional<? extends GetAllLibrariesMediaContainer> mediaContainer;
|
||||||
|
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
public GetAllLibrariesResponseBody(
|
public GetAllLibrariesResponseBody(
|
||||||
@JsonProperty("MediaContainer") GetAllLibrariesMediaContainer mediaContainer) {
|
@JsonProperty("MediaContainer") Optional<? extends GetAllLibrariesMediaContainer> mediaContainer) {
|
||||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||||
this.mediaContainer = mediaContainer;
|
this.mediaContainer = mediaContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GetAllLibrariesResponseBody() {
|
||||||
|
this(Optional.empty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public GetAllLibrariesMediaContainer mediaContainer() {
|
public Optional<GetAllLibrariesMediaContainer> mediaContainer() {
|
||||||
return mediaContainer;
|
return (Optional<GetAllLibrariesMediaContainer>) mediaContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final static Builder builder() {
|
public final static Builder builder() {
|
||||||
@@ -38,6 +48,12 @@ public class GetAllLibrariesResponseBody {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public GetAllLibrariesResponseBody withMediaContainer(GetAllLibrariesMediaContainer mediaContainer) {
|
public GetAllLibrariesResponseBody withMediaContainer(GetAllLibrariesMediaContainer mediaContainer) {
|
||||||
|
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||||
|
this.mediaContainer = Optional.ofNullable(mediaContainer);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetAllLibrariesResponseBody withMediaContainer(Optional<? extends GetAllLibrariesMediaContainer> mediaContainer) {
|
||||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||||
this.mediaContainer = mediaContainer;
|
this.mediaContainer = mediaContainer;
|
||||||
return this;
|
return this;
|
||||||
@@ -71,13 +87,19 @@ public class GetAllLibrariesResponseBody {
|
|||||||
|
|
||||||
public final static class Builder {
|
public final static class Builder {
|
||||||
|
|
||||||
private GetAllLibrariesMediaContainer mediaContainer;
|
private Optional<? extends GetAllLibrariesMediaContainer> mediaContainer = Optional.empty();
|
||||||
|
|
||||||
private Builder() {
|
private Builder() {
|
||||||
// force use of static builder() method
|
// force use of static builder() method
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder mediaContainer(GetAllLibrariesMediaContainer mediaContainer) {
|
public Builder mediaContainer(GetAllLibrariesMediaContainer mediaContainer) {
|
||||||
|
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||||
|
this.mediaContainer = Optional.ofNullable(mediaContainer);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mediaContainer(Optional<? extends GetAllLibrariesMediaContainer> mediaContainer) {
|
||||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||||
this.mediaContainer = mediaContainer;
|
this.mediaContainer = mediaContainer;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -0,0 +1,200 @@
|
|||||||
|
/*
|
||||||
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
||||||
|
*/
|
||||||
|
package dev.plexapi.sdk.models.operations;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JacksonException;
|
||||||
|
import com.fasterxml.jackson.core.JsonGenerator;
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
|
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.Override;
|
||||||
|
import java.lang.String;
|
||||||
|
import java.lang.SuppressWarnings;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>Wrapper class for an "open" enum. "Open" enums are those that are expected
|
||||||
|
* to evolve (particularly with the addition of enum members over time). If an
|
||||||
|
* open enum is used then the appearance of unexpected enum values (say in a
|
||||||
|
* response from an updated an API) will not bring about a runtime error thus
|
||||||
|
* ensuring that non-updated client versions can continue to work without error.
|
||||||
|
*
|
||||||
|
* <p>Note that instances are immutable and are singletons (an internal thread-safe
|
||||||
|
* cache is maintained to ensure that). As a consequence instances created with the
|
||||||
|
* same value will satisfy reference equality (via {@code ==}).
|
||||||
|
*
|
||||||
|
* <p>This class is intended to emulate an enum (in terms of common usage and with
|
||||||
|
* reference equality) but with the ability to carry unknown values. Unfortunately
|
||||||
|
* Java does not permit the use of an instance in a switch expression but you can
|
||||||
|
* use the {@code asEnum()} method (after dealing with the `Optional` appropriately).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* GetAllLibrariesType
|
||||||
|
*
|
||||||
|
* <p>The library type
|
||||||
|
*/
|
||||||
|
@JsonDeserialize(using = GetAllLibrariesType._Deserializer.class)
|
||||||
|
@JsonSerialize(using = GetAllLibrariesType._Serializer.class)
|
||||||
|
public class GetAllLibrariesType {
|
||||||
|
|
||||||
|
public static final GetAllLibrariesType Movie = new GetAllLibrariesType("movie");
|
||||||
|
public static final GetAllLibrariesType TvShow = new GetAllLibrariesType("show");
|
||||||
|
public static final GetAllLibrariesType Season = new GetAllLibrariesType("season");
|
||||||
|
public static final GetAllLibrariesType Episode = new GetAllLibrariesType("episode");
|
||||||
|
public static final GetAllLibrariesType Artist = new GetAllLibrariesType("artist");
|
||||||
|
public static final GetAllLibrariesType Album = new GetAllLibrariesType("album");
|
||||||
|
|
||||||
|
// This map will grow whenever a Color gets created with a new
|
||||||
|
// unrecognized value (a potential memory leak if the user is not
|
||||||
|
// careful). Keep this field lower case to avoid clashing with
|
||||||
|
// generated member names which will always be upper cased (Java
|
||||||
|
// convention)
|
||||||
|
private static final Map<String, GetAllLibrariesType> values = createValuesMap();
|
||||||
|
private static final Map<String, GetAllLibrariesTypeEnum> enums = createEnumsMap();
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
private GetAllLibrariesType(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a GetAllLibrariesType with the given value. For a specific value the
|
||||||
|
* returned object will always be a singleton so reference equality
|
||||||
|
* is satisfied when the values are the same.
|
||||||
|
*
|
||||||
|
* @param value value to be wrapped as GetAllLibrariesType
|
||||||
|
*/
|
||||||
|
public static GetAllLibrariesType of(String value) {
|
||||||
|
synchronized (GetAllLibrariesType.class) {
|
||||||
|
return values.computeIfAbsent(value, v -> new GetAllLibrariesType(v));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String value() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Optional<GetAllLibrariesTypeEnum> asEnum() {
|
||||||
|
return Optional.ofNullable(enums.getOrDefault(value, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isKnown() {
|
||||||
|
return asEnum().isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object obj) {
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
if (getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
GetAllLibrariesType other = (GetAllLibrariesType) obj;
|
||||||
|
return Objects.equals(value, other.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "GetAllLibrariesType [value=" + value + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
// return an array just like an enum
|
||||||
|
public static GetAllLibrariesType[] values() {
|
||||||
|
synchronized (GetAllLibrariesType.class) {
|
||||||
|
return values.values().toArray(new GetAllLibrariesType[] {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, GetAllLibrariesType> createValuesMap() {
|
||||||
|
Map<String, GetAllLibrariesType> map = new LinkedHashMap<>();
|
||||||
|
map.put("movie", Movie);
|
||||||
|
map.put("show", TvShow);
|
||||||
|
map.put("season", Season);
|
||||||
|
map.put("episode", Episode);
|
||||||
|
map.put("artist", Artist);
|
||||||
|
map.put("album", Album);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, GetAllLibrariesTypeEnum> createEnumsMap() {
|
||||||
|
Map<String, GetAllLibrariesTypeEnum> map = new HashMap<>();
|
||||||
|
map.put("movie", GetAllLibrariesTypeEnum.Movie);
|
||||||
|
map.put("show", GetAllLibrariesTypeEnum.TvShow);
|
||||||
|
map.put("season", GetAllLibrariesTypeEnum.Season);
|
||||||
|
map.put("episode", GetAllLibrariesTypeEnum.Episode);
|
||||||
|
map.put("artist", GetAllLibrariesTypeEnum.Artist);
|
||||||
|
map.put("album", GetAllLibrariesTypeEnum.Album);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Serializer extends StdSerializer<GetAllLibrariesType> {
|
||||||
|
|
||||||
|
protected _Serializer() {
|
||||||
|
super(GetAllLibrariesType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serialize(GetAllLibrariesType value, JsonGenerator g, SerializerProvider provider)
|
||||||
|
throws IOException, JsonProcessingException {
|
||||||
|
g.writeObject(value.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public static final class _Deserializer extends StdDeserializer<GetAllLibrariesType> {
|
||||||
|
|
||||||
|
protected _Deserializer() {
|
||||||
|
super(GetAllLibrariesType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetAllLibrariesType deserialize(JsonParser p, DeserializationContext ctxt)
|
||||||
|
throws IOException, JacksonException {
|
||||||
|
String v = p.readValueAs(new TypeReference<String>() {});
|
||||||
|
// use the factory method to ensure we get singletons
|
||||||
|
return GetAllLibrariesType.of(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum GetAllLibrariesTypeEnum {
|
||||||
|
|
||||||
|
Movie("movie"),
|
||||||
|
TvShow("show"),
|
||||||
|
Season("season"),
|
||||||
|
Episode("episode"),
|
||||||
|
Artist("artist"),
|
||||||
|
Album("album"),;
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
private GetAllLibrariesTypeEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String value() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user