mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-06 20:47:45 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37569715a6 | ||
|
|
c0e915da8b | ||
|
|
0077561a6a | ||
|
|
4b28ca3416 | ||
|
|
dd781d1e27 | ||
|
|
dcdcafc044 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -9,4 +9,3 @@
|
||||
|
||||
# This allows generated code to be indexed correctly
|
||||
*.java linguist-generated=false
|
||||
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
**/.speakeasy/temp/
|
||||
**/.speakeasy/logs/
|
||||
.speakeasy/reports
|
||||
# Ignore Gradle project-specific cache directory
|
||||
.gradle
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -11,11 +11,12 @@ generation:
|
||||
parameterOrderingFeb2024: true
|
||||
requestResponseComponentNamesFeb2024: true
|
||||
securityFeb2025: false
|
||||
sharedErrorComponentsApr2025: false
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
oAuth2PasswordEnabled: false
|
||||
java:
|
||||
version: 0.14.0
|
||||
version: 0.16.2
|
||||
additionalDependencies: []
|
||||
additionalPlugins: []
|
||||
artifactID: plexapi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
speakeasyVersion: 1.526.6
|
||||
speakeasyVersion: 1.542.1
|
||||
sources:
|
||||
my-source:
|
||||
sourceNamespace: my-source
|
||||
@@ -8,19 +8,19 @@ sources:
|
||||
- latest
|
||||
plexapi:
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf
|
||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
||||
sourceRevisionDigest: sha256:37adc934a79841fb00cfe6ed569f5b1c88534b20202ecbde64b4e84828cee22a
|
||||
sourceBlobDigest: sha256:ffb5b8d288111a763e4d035c8c9e37f5c89690d146b7297493b43a71d8298e6c
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1743440866
|
||||
- speakeasy-sdk-regen-1746405115
|
||||
targets:
|
||||
plexjava:
|
||||
source: plexapi
|
||||
sourceNamespace: plexapi
|
||||
sourceRevisionDigest: sha256:cffb18feaa0523b300655a6f0073caad99133b143f5a420fddbb1e1efe47bcaf
|
||||
sourceBlobDigest: sha256:1737023e29cd9cf36c07ccd8c8c48c47e14f47ce22b4d6ba9ee241afbbd8f351
|
||||
sourceRevisionDigest: sha256:37adc934a79841fb00cfe6ed569f5b1c88534b20202ecbde64b4e84828cee22a
|
||||
sourceBlobDigest: sha256:ffb5b8d288111a763e4d035c8c9e37f5c89690d146b7297493b43a71d8298e6c
|
||||
codeSamplesNamespace: code-samples-java-plexjava
|
||||
codeSamplesRevisionDigest: sha256:efd9a529c906a73b2d32257e52235b87cdb19f16486800f6eb2172eec9454726
|
||||
codeSamplesRevisionDigest: sha256:5ae904090d6739e899706a85cf9894383ad162f6ea644e5e60d5056518afbf57
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: latest
|
||||
|
||||
31
README.md
31
README.md
@@ -69,7 +69,7 @@ The samples below show how a published SDK artifact is used:
|
||||
|
||||
Gradle:
|
||||
```groovy
|
||||
implementation 'dev.plexapi:plexapi:0.14.0'
|
||||
implementation 'dev.plexapi:plexapi:0.16.2'
|
||||
```
|
||||
|
||||
Maven:
|
||||
@@ -77,7 +77,7 @@ Maven:
|
||||
<dependency>
|
||||
<groupId>dev.plexapi</groupId>
|
||||
<artifactId>plexapi</artifactId>
|
||||
<version>0.14.0</version>
|
||||
<version>0.16.2</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@@ -94,6 +94,29 @@ On Windows:
|
||||
```bash
|
||||
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] -->
|
||||
|
||||
<!-- Start SDK Example Usage [usage] -->
|
||||
@@ -177,6 +200,10 @@ public class Application {
|
||||
* [getActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media
|
||||
* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries
|
||||
* [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
|
||||
* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content
|
||||
|
||||
|
||||
60
RELEASES.md
60
RELEASES.md
@@ -289,3 +289,63 @@ Based on:
|
||||
- [java v0.14.0] .
|
||||
### Releases
|
||||
- [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 - .
|
||||
|
||||
## 2025-05-05 00:31:37
|
||||
### Changes
|
||||
Based on:
|
||||
- OpenAPI Doc
|
||||
- Speakeasy CLI 1.542.1 (2.597.9) https://github.com/speakeasy-api/speakeasy
|
||||
### Generated
|
||||
- [java v0.16.2] .
|
||||
### Releases
|
||||
- [Maven Central v0.16.2] https://central.sonatype.com/artifact/dev.plexapi/plexapi/0.16.2 - .
|
||||
@@ -103,7 +103,7 @@ publishing {
|
||||
// https://github.com/gradle/gradle/issues/18619
|
||||
groupId = "dev.plexapi"
|
||||
artifactId = "plexapi"
|
||||
version = "0.14.0"
|
||||
version = "0.16.2"
|
||||
|
||||
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 |
|
||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||
| `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 |
|
||||
| `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
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||
| `art` | *String* | :heavy_check_mark: | N/A | /:/resources/movie-fanart.jpg |
|
||||
| `composite` | *String* | :heavy_check_mark: | N/A | /library/sections/1/composite/1705615584 |
|
||||
| `filters` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||
| `refreshing` | *boolean* | :heavy_check_mark: | N/A | false |
|
||||
| `thumb` | *String* | :heavy_check_mark: | N/A | /:/resources/movie.png |
|
||||
| `key` | *String* | :heavy_check_mark: | N/A | 1 |
|
||||
| `type` | *String* | :heavy_check_mark: | N/A | movie |
|
||||
| `title` | *String* | :heavy_check_mark: | N/A | Movies |
|
||||
| `agent` | *String* | :heavy_check_mark: | N/A | tv.plex.agents.movie |
|
||||
| `scanner` | *String* | :heavy_check_mark: | N/A | Plex Movie |
|
||||
| `language` | *String* | :heavy_check_mark: | N/A | en-US |
|
||||
| `uuid` | *String* | :heavy_check_mark: | N/A | 322a231a-b7f7-49f5-920f-14c61199cd30 |
|
||||
| `updatedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||
| `createdAt` | *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 |
|
||||
| `directory` | *boolean* | :heavy_check_mark: | N/A | true |
|
||||
| `contentChangedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||
| `hidden` | *int* | :heavy_check_mark: | N/A | 0 |
|
||||
| `location` | List\<[GetAllLibrariesLocation](../../models/operations/GetAllLibrariesLocation.md)> | :heavy_check_mark: | N/A | |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false |
|
||||
| `art` | *String* | :heavy_check_mark: | URL for the background artwork of the media container. | /:/resources/show-fanart.jpg |
|
||||
| `composite` | *String* | :heavy_check_mark: | The relative path to the composite media item. | /library/sections/1/composite/1743824484 |
|
||||
| `filters` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
|
||||
| `refreshing` | *boolean* | :heavy_check_mark: | Indicates whether the library is currently being refreshed or updated | true |
|
||||
| `thumb` | *String* | :heavy_check_mark: | URL for the thumbnail image of the media container. | /:/resources/show.png |
|
||||
| `key` | *String* | :heavy_check_mark: | The library key representing the unique identifier | 1 |
|
||||
| `type` | [GetAllLibrariesType](../../models/operations/GetAllLibrariesType.md) | :heavy_check_mark: | N/A | movie |
|
||||
| `title` | *String* | :heavy_check_mark: | The title of the library | Movies |
|
||||
| `agent` | *String* | :heavy_check_mark: | The Plex agent used to match and retrieve media metadata. | tv.plex.agents.movie |
|
||||
| `scanner` | *String* | :heavy_check_mark: | UNKNOWN | Plex Movie |
|
||||
| `language` | *String* | :heavy_check_mark: | The Plex library language that has been set | en-US |
|
||||
| `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 |
|
||||
| `createdAt` | *Optional\<Long>* | :heavy_minus_sign: | N/A | 1556281940 |
|
||||
| `scannedAt` | *long* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
|
||||
| `content` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
|
||||
| `directory` | *boolean* | :heavy_check_mark: | UNKNOWN | true |
|
||||
| `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` | [Optional\<Hidden>](../../models/operations/Hidden.md) | :heavy_minus_sign: | The Plex library visibility setting | 1 |
|
||||
| `location` | List\<[GetAllLibrariesLocation](../../models/operations/GetAllLibrariesLocation.md)> | :heavy_check_mark: | N/A | |
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `id` | *int* | :heavy_check_mark: | N/A | 1 |
|
||||
| `path` | *String* | :heavy_check_mark: | N/A | /movies |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------- | --------------------------- | --------------------------- | --------------------------- | --------------------------- |
|
||||
| `id` | *int* | :heavy_check_mark: | The ID of the location. | 1 |
|
||||
| `path` | *String* | :heavy_check_mark: | The path to the media item. | /Movies |
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| `size` | *int* | :heavy_check_mark: | N/A | 5 |
|
||||
| `allowSync` | *boolean* | :heavy_check_mark: | N/A | false |
|
||||
| `title1` | *String* | :heavy_check_mark: | N/A | Plex Library |
|
||||
| `directory` | List\<[GetAllLibrariesDirectory](../../models/operations/GetAllLibrariesDirectory.md)> | :heavy_check_mark: | N/A | |
|
||||
| `size` | *int* | :heavy_check_mark: | Number of media items returned in this response. | 50 |
|
||||
| `allowSync` | *boolean* | :heavy_check_mark: | Indicates whether syncing is allowed. | false |
|
||||
| `title1` | *String* | :heavy_check_mark: | The primary title of the media container. | TV Series |
|
||||
| `directory` | List\<[GetAllLibrariesDirectory](../../models/operations/GetAllLibrariesDirectory.md)> | :heavy_minus_sign: | N/A | |
|
||||
@@ -5,6 +5,6 @@ The libraries available on the Server
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `mediaContainer` | [GetAllLibrariesMediaContainer](../../models/operations/GetAllLibrariesMediaContainer.md) | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| `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
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
||||
| `streamType` | *int* | :heavy_check_mark: | Stream type (1=video, 2=audio, 3=subtitle). | 1 |
|
||||
| `default_` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
||||
| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
||||
| `index` | *int* | :heavy_check_mark: | Index of the stream. | 0 |
|
||||
| `bitrate` | *Optional\<Integer>* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
||||
| `language` | *Optional\<String>* | :heavy_minus_sign: | Language of the stream. | English |
|
||||
| `languageTag` | *Optional\<String>* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
||||
| `languageCode` | *Optional\<String>* | :heavy_minus_sign: | ISO language code. | eng |
|
||||
| `headerCompression` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true |
|
||||
| `doviblCompatID` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 |
|
||||
| `doviblPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true |
|
||||
| `dovielPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false |
|
||||
| `doviLevel` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision level. | 6 |
|
||||
| `doviPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true |
|
||||
| `doviProfile` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision profile. | 8 |
|
||||
| `dovirpuPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true |
|
||||
| `doviVersion` | *Optional\<String>* | :heavy_minus_sign: | Dolby Vision version. | 1.0 |
|
||||
| `bitDepth` | *Optional\<Integer>* | :heavy_minus_sign: | Bit depth of the video stream. | 10 |
|
||||
| `chromaLocation` | *Optional\<String>* | :heavy_minus_sign: | Chroma sample location. | topleft |
|
||||
| `chromaSubsampling` | *Optional\<String>* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 |
|
||||
| `codedHeight` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video height. | 1608 |
|
||||
| `codedWidth` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video width. | 3840 |
|
||||
| `closedCaptions` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `colorPrimaries` | *Optional\<String>* | :heavy_minus_sign: | Color primaries used. | bt2020 |
|
||||
| `colorRange` | *Optional\<String>* | :heavy_minus_sign: | Color range (e.g., tv). | tv |
|
||||
| `colorSpace` | *Optional\<String>* | :heavy_minus_sign: | Color space. | bt2020nc |
|
||||
| `colorTrc` | *Optional\<String>* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||
| `frameRate` | *Optional\<Float>* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
||||
| `height` | *Optional\<Integer>* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
||||
| `level` | *Optional\<Integer>* | :heavy_minus_sign: | Video level. | 150 |
|
||||
| `original` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
||||
| `hasScalingMatrix` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | false |
|
||||
| `profile` | *Optional\<String>* | :heavy_minus_sign: | Video profile. | main 10 |
|
||||
| `scanType` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||
| `embeddedInVideo` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||
| `refFrames` | *Optional\<Integer>* | :heavy_minus_sign: | Number of reference frames. | 1 |
|
||||
| `width` | *Optional\<Integer>* | :heavy_minus_sign: | Width of the video stream. | 3840 |
|
||||
| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||
| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||
| `selected` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true |
|
||||
| `forced` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `channels` | *Optional\<Integer>* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 |
|
||||
| `audioChannelLayout` | *Optional\<String>* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) |
|
||||
| `samplingRate` | *Optional\<Integer>* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 |
|
||||
| `canAutoSync` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false |
|
||||
| `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 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||
| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
||||
| `streamType` | [GetAllMediaLibraryStreamType](../../models/operations/GetAllMediaLibraryStreamType.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 |
|
||||
| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
||||
| `index` | *Optional\<Integer>* | :heavy_minus_sign: | Index of the stream. | 0 |
|
||||
| `bitrate` | *Optional\<Integer>* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
||||
| `language` | *Optional\<String>* | :heavy_minus_sign: | Language of the stream. | English |
|
||||
| `languageTag` | *Optional\<String>* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
||||
| `languageCode` | *Optional\<String>* | :heavy_minus_sign: | ISO language code. | eng |
|
||||
| `headerCompression` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true |
|
||||
| `doviblCompatID` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 |
|
||||
| `doviblPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true |
|
||||
| `dovielPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false |
|
||||
| `doviLevel` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision level. | 6 |
|
||||
| `doviPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true |
|
||||
| `doviProfile` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision profile. | 8 |
|
||||
| `dovirpuPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true |
|
||||
| `doviVersion` | *Optional\<String>* | :heavy_minus_sign: | Dolby Vision version. | 1.0 |
|
||||
| `bitDepth` | *Optional\<Integer>* | :heavy_minus_sign: | Bit depth of the video stream. | 10 |
|
||||
| `chromaLocation` | *Optional\<String>* | :heavy_minus_sign: | Chroma sample location. | topleft |
|
||||
| `chromaSubsampling` | *Optional\<String>* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 |
|
||||
| `codedHeight` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video height. | 1608 |
|
||||
| `codedWidth` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video width. | 3840 |
|
||||
| `closedCaptions` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `colorPrimaries` | *Optional\<String>* | :heavy_minus_sign: | Color primaries used. | bt2020 |
|
||||
| `colorRange` | *Optional\<String>* | :heavy_minus_sign: | Color range (e.g., tv). | tv |
|
||||
| `colorSpace` | *Optional\<String>* | :heavy_minus_sign: | Color space. | bt2020nc |
|
||||
| `colorTrc` | *Optional\<String>* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||
| `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 |
|
||||
| `level` | *Optional\<Integer>* | :heavy_minus_sign: | Video level. | 150 |
|
||||
| `original` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
||||
| `hasScalingMatrix` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | false |
|
||||
| `profile` | *Optional\<String>* | :heavy_minus_sign: | Video profile. | main 10 |
|
||||
| `scanType` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||
| `embeddedInVideo` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||
| `refFrames` | *Optional\<Integer>* | :heavy_minus_sign: | Number of reference frames. | 1 |
|
||||
| `width` | *Optional\<Integer>* | :heavy_minus_sign: | Width of the video stream. | 3840 |
|
||||
| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||
| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||
| `selected` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true |
|
||||
| `forced` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `channels` | *Optional\<Integer>* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 |
|
||||
| `audioChannelLayout` | *Optional\<String>* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) |
|
||||
| `samplingRate` | *Optional\<Integer>* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 |
|
||||
| `canAutoSync` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false |
|
||||
| `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
|
||||
|
||||
| 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/> | |
|
||||
| `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 |
|
||||
| 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/> | |
|
||||
| `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
|
||||
|
||||
The filter query string for country media items.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
||||
| `id` | *int* | :heavy_check_mark: | The unique country identifier. | 58591 |
|
||||
| `filter` | *String* | :heavy_check_mark: | The filter string for the country. | country=58591 |
|
||||
| `tag` | *String* | :heavy_check_mark: | The country name. | United States of America |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||
| `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 |
|
||||
| `filter` | *Optional\<String>* | :heavy_minus_sign: | N/A | country=19 |
|
||||
@@ -3,11 +3,10 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `id` | *long* | :heavy_check_mark: | The unique role identifier. | 109501 |
|
||||
| `filter` | *String* | :heavy_check_mark: | The filter string for the role. | actor=109501 |
|
||||
| `tag` | *String* | :heavy_check_mark: | The actor's name. | Bob Odenkirk |
|
||||
| `tagKey` | *String* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 |
|
||||
| `role` | *Optional\<String>* | :heavy_minus_sign: | The character name or role. | Jimmy McGill |
|
||||
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `id` | *int* | :heavy_check_mark: | Unique identifier for the director. | 126522 |
|
||||
| `tag` | *String* | :heavy_check_mark: | The role of Director | Danny Boyle |
|
||||
| `filter` | *String* | :heavy_check_mark: | The filter string used to query this director. | director=235876 |
|
||||
| `tagKey` | *Optional\<String>* | :heavy_minus_sign: | A unique key associated with the director's tag, used for internal identification. | 5d776831151a60001f24d031 |
|
||||
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | The URL of the thumbnail image for the director. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg |
|
||||
@@ -1,10 +1,12 @@
|
||||
# GetMediaMetaDataGenre
|
||||
|
||||
The filter query string for similar items.
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
|
||||
| `id` | *long* | :heavy_check_mark: | The unique genre identifier. | 1057 |
|
||||
| `filter` | *String* | :heavy_check_mark: | The filter string for the genre. | genre=1057 |
|
||||
| `tag` | *String* | :heavy_check_mark: | The genre name. | Crime |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
||||
| `id` | *long* | :heavy_check_mark: | N/A | 259 |
|
||||
| `tag` | *String* | :heavy_check_mark: | The genre name of this media-item<br/> | Crime |
|
||||
| `filter` | *String* | :heavy_check_mark: | N/A | genre=19 |
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
|
||||
| `alt` | *String* | :heavy_check_mark: | Alternate text for the image. | Better Call Saul |
|
||||
| `type` | *String* | :heavy_check_mark: | The type of image (e.g., coverPoster, background, clearLogo). | coverPoster |
|
||||
| `url` | *String* | :heavy_check_mark: | The URL of the image. | /library/metadata/44288/thumb/1736487993 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `alt` | *String* | :heavy_check_mark: | N/A | Episode 1 |
|
||||
| `type` | [GetMediaMetaDataLibraryType](../../models/operations/GetMediaMetaDataLibraryType.md) | :heavy_check_mark: | N/A | background |
|
||||
| `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
|
||||
|
||||
Unknown
|
||||
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `ratingKey` | *String* | :heavy_check_mark: | The rating key of the metadata item. | 44288 |
|
||||
| `parentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | The rating key of the parent of this metadata item. | 48047 |
|
||||
| `grandparentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | The rating key of the grandparent of this metadata item. | 45520 |
|
||||
| `parentGuid` | *Optional\<String>* | :heavy_minus_sign: | A GUID identifying the parent entity (e.g., season) for the item. | plex://season/618b89208dde18df707ad15c |
|
||||
| `grandparentGuid` | *Optional\<String>* | :heavy_minus_sign: | A GUID identifying the grandparent entity (e.g., show). | plex://show/5e16253691c20300412003a8 |
|
||||
| `grandparentSlug` | *Optional\<String>* | :heavy_minus_sign: | A URL-friendly identifier (slug) for the grandparent entity. | alice-in-borderland-2020 |
|
||||
| `grandparentKey` | *Optional\<String>* | :heavy_minus_sign: | A key identifying the grandparent metadata in the library. | /library/metadata/45520 |
|
||||
| `parentKey` | *Optional\<String>* | :heavy_minus_sign: | A key identifying the parent metadata in the library. | /library/metadata/48047 |
|
||||
| `key` | *String* | :heavy_check_mark: | The API key to access metadata details. | /library/metadata/44288/children |
|
||||
| `guid` | *String* | :heavy_check_mark: | The globally unique identifier for the item. | plex://show/5d9c08254eefaa001f5d6dcb |
|
||||
| `slug` | *Optional\<String>* | :heavy_minus_sign: | A URL-friendly identifier for the item. | better-call-saul |
|
||||
| `studio` | *Optional\<String>* | :heavy_minus_sign: | The studio that produced the content. | Sony Pictures Television |
|
||||
| `type` | *String* | :heavy_check_mark: | The type of content (e.g., show, movie). | show |
|
||||
| `title` | *String* | :heavy_check_mark: | The title of the content. | Better Call Saul |
|
||||
| `originalTitle` | *Optional\<String>* | :heavy_minus_sign: | The original title of the content. | Wicked: Part I |
|
||||
| `librarySectionTitle` | *String* | :heavy_check_mark: | The title of the library section. | TV Series |
|
||||
| `librarySectionID` | *long* | :heavy_check_mark: | The ID of the library section. | 2 |
|
||||
| `librarySectionKey` | *String* | :heavy_check_mark: | The key of the library section. | /library/sections/2 |
|
||||
| `contentRating` | *Optional\<String>* | :heavy_minus_sign: | The content rating (e.g., TV-MA). | TV-MA |
|
||||
| `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. |
|
||||
| `index` | *Optional\<Long>* | :heavy_minus_sign: | The index or order of the item. | 1 |
|
||||
| `grandparentTitle` | *Optional\<String>* | :heavy_minus_sign: | The title of the grandparent entity (typically the show's title). | Alice in Borderland |
|
||||
| `parentTitle` | *Optional\<String>* | :heavy_minus_sign: | The title of the parent entity (typically the season's title). | Season 2 |
|
||||
| `audienceRating` | *Optional\<Float>* | :heavy_minus_sign: | The audience rating for the content. | 8.7 |
|
||||
| `viewCount` | *Optional\<Long>* | :heavy_minus_sign: | The number of times the item has been viewed. | 4 |
|
||||
| `skipCount` | *Optional\<Long>* | :heavy_minus_sign: | The number of times the item has been skipped. | 1 |
|
||||
| `lastViewedAt` | *Optional\<Long>* | :heavy_minus_sign: | Unix timestamp of when the item was last viewed. | 1625764795 |
|
||||
| `year` | *int* | :heavy_check_mark: | The release year. | 2015 |
|
||||
| `rating` | *Optional\<Float>* | :heavy_minus_sign: | The general rating | 6 |
|
||||
| `ratingImage` | *Optional\<String>* | :heavy_minus_sign: | The URL or identifier for the rating image (e.g., Rotten Tomatoes rating image). | rottentomatoes://image.rating.ripe |
|
||||
| `tagline` | *Optional\<String>* | :heavy_minus_sign: | The tagline of the content. | Make the call |
|
||||
| `chapterSource` | *Optional\<String>* | :heavy_minus_sign: | N/A | media |
|
||||
| `primaryExtraKey` | *Optional\<String>* | :heavy_minus_sign: | N/A | /library/metadata/134704 |
|
||||
| `thumb` | *String* | :heavy_check_mark: | URL of the thumbnail image. | /library/metadata/44288/thumb/1736487993 |
|
||||
| `art` | *String* | :heavy_check_mark: | URL of the art image. | /library/metadata/44288/art/1736487993 |
|
||||
| `theme` | *Optional\<String>* | :heavy_minus_sign: | URL of the theme image. | /library/metadata/44288/theme/1736487993 |
|
||||
| `duration` | *int* | :heavy_check_mark: | Duration of the content in milliseconds. | 2700000 |
|
||||
| `originallyAvailableAt` | [LocalDate](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html) | :heavy_minus_sign: | The original release date. | 2015-02-08 |
|
||||
| `leafCount` | *Optional\<Long>* | :heavy_minus_sign: | The total number of episodes (or leaves). | 63 |
|
||||
| `viewedLeafCount` | *Optional\<Long>* | :heavy_minus_sign: | The number of episodes that have been viewed. | 4 |
|
||||
| `childCount` | *Optional\<Integer>* | :heavy_minus_sign: | The number of child items. | 6 |
|
||||
| `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 |
|
||||
| `updatedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 |
|
||||
| `audienceRatingImage` | *Optional\<String>* | :heavy_minus_sign: | The URL for the audience rating image. | themoviedb://image.rating |
|
||||
| `parentIndex` | *Optional\<Long>* | :heavy_minus_sign: | The index number of the parent entity, which could indicate its order or position. | 2 |
|
||||
| `parentThumb` | *Optional\<String>* | :heavy_minus_sign: | The URL of the parent's thumbnail image. | /library/metadata/48047/thumb/1671800243 |
|
||||
| `grandparentThumb` | *Optional\<String>* | :heavy_minus_sign: | The URL of the grandparent's thumbnail image. | /library/metadata/45520/thumb/1736488003 |
|
||||
| `grandparentArt` | *Optional\<String>* | :heavy_minus_sign: | The URL of the grandparent's art image. | /library/metadata/45520/art/1736488003 |
|
||||
| `media` | List\<[GetMediaMetaDataMedia](../../models/operations/GetMediaMetaDataMedia.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `image` | List\<[GetMediaMetaDataImage](../../models/operations/GetMediaMetaDataImage.md)> | :heavy_check_mark: | An array of image objects. | |
|
||||
| `ultraBlurColors` | [GetMediaMetaDataUltraBlurColors](../../models/operations/GetMediaMetaDataUltraBlurColors.md) | :heavy_check_mark: | N/A | |
|
||||
| `genre` | List\<[GetMediaMetaDataGenre](../../models/operations/GetMediaMetaDataGenre.md)> | :heavy_minus_sign: | An array of genre tags. | |
|
||||
| `country` | List\<[GetMediaMetaDataCountry](../../models/operations/GetMediaMetaDataCountry.md)> | :heavy_minus_sign: | An array of country tags. | |
|
||||
| `guids` | List\<[GetMediaMetaDataGuids](../../models/operations/GetMediaMetaDataGuids.md)> | :heavy_minus_sign: | An array of GUID objects. | |
|
||||
| `ratings` | List\<[Ratings](../../models/operations/Ratings.md)> | :heavy_minus_sign: | An array of rating objects. | |
|
||||
| `role` | List\<[GetMediaMetaDataRole](../../models/operations/GetMediaMetaDataRole.md)> | :heavy_minus_sign: | An array of Actor roles. | |
|
||||
| `director` | List\<[GetMediaMetaDataDirector](../../models/operations/GetMediaMetaDataDirector.md)> | :heavy_minus_sign: | An array of Director roles. | |
|
||||
| `writer` | List\<[GetMediaMetaDataWriter](../../models/operations/GetMediaMetaDataWriter.md)> | :heavy_minus_sign: | An array of Writer roles. | |
|
||||
| `producer` | List\<[GetMediaMetaDataProducer](../../models/operations/GetMediaMetaDataProducer.md)> | :heavy_minus_sign: | An array of Writer roles. | |
|
||||
| `similar` | List\<[GetMediaMetaDataSimilar](../../models/operations/GetMediaMetaDataSimilar.md)> | :heavy_minus_sign: | An array of similar content objects. | |
|
||||
| `location` | List\<[GetMediaMetaDataLocation](../../models/operations/GetMediaMetaDataLocation.md)> | :heavy_minus_sign: | An array of location objects. | |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
| `key` | *String* | :heavy_check_mark: | The unique key for the media item. | /library/metadata/58683 |
|
||||
| `guid` | *String* | :heavy_check_mark: | The globally unique identifier for the media item. | plex://movie/5d7768ba96b655001fdc0408 |
|
||||
| `slug` | *String* | :heavy_check_mark: | A URL‐friendly version of the media title. | 4-for-texas |
|
||||
| `studio` | *Optional\<String>* | :heavy_minus_sign: | The studio that produced the media item. | 20th Century Studios |
|
||||
| `type` | [GetMediaMetaDataType](../../models/operations/GetMediaMetaDataType.md) | :heavy_check_mark: | N/A | movie |
|
||||
| `title` | *String* | :heavy_check_mark: | The title of the media item. | Avatar: The Way of Water |
|
||||
| `titleSort` | *String* | :heavy_check_mark: | The sort title used for ordering media items. | Whale |
|
||||
| `contentRating` | *Optional\<String>* | :heavy_minus_sign: | The content rating for the media item. | PG-13 |
|
||||
| `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/> |
|
||||
| `rating` | *float* | :heavy_check_mark: | The critic rating for the media item. | 7.6 |
|
||||
| `audienceRating` | *double* | :heavy_check_mark: | The audience rating for the media item. | 9.2 |
|
||||
| `year` | *Optional\<Integer>* | :heavy_minus_sign: | The release year of the media item. | 2022 |
|
||||
| `tagline` | *String* | :heavy_check_mark: | A brief tagline for the media item. | Return to Pandora. |
|
||||
| `thumb` | *String* | :heavy_check_mark: | The thumbnail image URL for the media item. | /library/metadata/58683/thumb/1703239236 |
|
||||
| `art` | *String* | :heavy_check_mark: | The art image URL for the media item. | /library/metadata/58683/art/1703239236 |
|
||||
| `theme` | *String* | :heavy_check_mark: | The theme URL for the media item. | /library/metadata/1/theme/1705636920 |
|
||||
| `index` | *int* | :heavy_check_mark: | The index position of the media item. | 1 |
|
||||
| `leafCount` | *Optional\<Integer>* | :heavy_minus_sign: | The number of leaf items (end nodes) under this media item. | 14 |
|
||||
| `viewedLeafCount` | *Optional\<Integer>* | :heavy_minus_sign: | The number of leaf items that have been viewed. | 0 |
|
||||
| `childCount` | *int* | :heavy_check_mark: | The number of child items associated with this media item. | 1 |
|
||||
| `seasonCount` | *int* | :heavy_check_mark: | The total number of seasons (for TV shows). | 2022 |
|
||||
| `duration` | *int* | :heavy_check_mark: | The duration of the media item in milliseconds. | 11558112 |
|
||||
| `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 |
|
||||
| `addedAt` | *long* | :heavy_check_mark: | N/A | 1556281940 |
|
||||
| `updatedAt` | *Optional\<Long>* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 |
|
||||
| `audienceRatingImage` | *Optional\<String>* | :heavy_minus_sign: | The URL for the audience rating image. | rottentomatoes://image.rating.upright |
|
||||
| `chapterSource` | *Optional\<String>* | :heavy_minus_sign: | The source from which chapter data is derived. | media |
|
||||
| `primaryExtraKey` | *Optional\<String>* | :heavy_minus_sign: | The primary extra key associated with this media item. | /library/metadata/58684 |
|
||||
| `originalTitle` | *Optional\<String>* | :heavy_minus_sign: | The original title of the media item (if different). | 映画 ブラッククローバー 魔法帝の剣 |
|
||||
| `parentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | The rating key of the parent media item. | 66 |
|
||||
| `grandparentRatingKey` | *Optional\<String>* | :heavy_minus_sign: | The rating key of the grandparent media item. | 66 |
|
||||
| `parentGuid` | *Optional\<String>* | :heavy_minus_sign: | The GUID of the parent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||
| `grandparentGuid` | *Optional\<String>* | :heavy_minus_sign: | The GUID of the grandparent media item. | plex://show/5d9c081b170e24001f2a7be4 |
|
||||
| `grandparentSlug` | *Optional\<String>* | :heavy_minus_sign: | The slug for the grandparent media item. | alice-in-borderland-2020 |
|
||||
| `grandparentKey` | *Optional\<String>* | :heavy_minus_sign: | The key of the grandparent media item. | /library/metadata/66 |
|
||||
| `parentKey` | *Optional\<String>* | :heavy_minus_sign: | The key of the parent media item. | /library/metadata/66 |
|
||||
| `grandparentTitle` | *Optional\<String>* | :heavy_minus_sign: | The title of the grandparent media item. | Caprica |
|
||||
| `grandparentThumb` | *Optional\<String>* | :heavy_minus_sign: | The thumbnail URL for the grandparent media item. | /library/metadata/66/thumb/1705716261 |
|
||||
| `grandparentTheme` | *Optional\<String>* | :heavy_minus_sign: | The theme URL for the grandparent media item. | /library/metadata/66/theme/1705716261 |
|
||||
| `grandparentArt` | *Optional\<String>* | :heavy_minus_sign: | The art URL for the grandparent media item. | /library/metadata/66/art/1705716261 |
|
||||
| `parentTitle` | *Optional\<String>* | :heavy_minus_sign: | The title of the parent media item. | Caprica |
|
||||
| `parentIndex` | *Optional\<Integer>* | :heavy_minus_sign: | The index position of the parent media item. | 1 |
|
||||
| `parentThumb` | *Optional\<String>* | :heavy_minus_sign: | The thumbnail URL for the parent media item. | /library/metadata/66/thumb/1705716261 |
|
||||
| `ratingImage` | *Optional\<String>* | :heavy_minus_sign: | The URL for the rating image. | rottentomatoes://image.rating.ripe |
|
||||
| `viewCount` | *Optional\<Integer>* | :heavy_minus_sign: | The number of times this media item has been viewed. | 1 |
|
||||
| `viewOffset` | *Optional\<Integer>* | :heavy_minus_sign: | The current playback offset (in milliseconds). | 5222500 |
|
||||
| `skipCount` | *Optional\<Integer>* | :heavy_minus_sign: | The number of times this media item has been skipped. | 1 |
|
||||
| `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 |
|
||||
| `lastRatedAt` | *Optional\<Long>* | :heavy_minus_sign: | The Unix timestamp representing the last time the item was rated. | 1721813113 |
|
||||
| `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 |
|
||||
| `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 |
|
||||
| `lastViewedAt` | *Optional\<Integer>* | :heavy_minus_sign: | Unix timestamp for when the media item was last viewed. | 1682752242 |
|
||||
| `userRating` | *Optional\<Float>* | :heavy_minus_sign: | The rating provided by a user for the item. This value is expressed as a decimal number. | 10 |
|
||||
| `image` | List\<[GetMediaMetaDataImage](../../models/operations/GetMediaMetaDataImage.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `ultraBlurColors` | [Optional\<GetMediaMetaDataUltraBlurColors>](../../models/operations/GetMediaMetaDataUltraBlurColors.md) | :heavy_minus_sign: | N/A | |
|
||||
| `librarySectionID` | *long* | :heavy_check_mark: | The identifier for the library section. | 1 |
|
||||
| `librarySectionTitle` | *String* | :heavy_check_mark: | The title of the library section. | Movies |
|
||||
| `librarySectionKey` | *String* | :heavy_check_mark: | The key corresponding to the library section. | /library/sections/1 |
|
||||
| `media` | List\<[GetMediaMetaDataMedia](../../models/operations/GetMediaMetaDataMedia.md)> | :heavy_minus_sign: | N/A | |
|
||||
| `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
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `id` | *long* | :heavy_check_mark: | The unique role identifier. | 109501 |
|
||||
| `filter` | *String* | :heavy_check_mark: | The filter string for the role. | actor=109501 |
|
||||
| `tag` | *String* | :heavy_check_mark: | The actor's name. | Bob Odenkirk |
|
||||
| `tagKey` | *String* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 |
|
||||
| `role` | *Optional\<String>* | :heavy_minus_sign: | The character name or role. | Jimmy McGill |
|
||||
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *long* | :heavy_check_mark: | Unique identifier for the actor or role. | 126522 |
|
||||
| `tag` | *String* | :heavy_check_mark: | The display tag for the actor (typically the actor's name). | Teller |
|
||||
| `role` | *Optional\<String>* | :heavy_minus_sign: | The role played by the actor in the media item. | Self - Judge |
|
||||
| `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 |
|
||||
| `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: | The URL of the thumbnail image for the actor. | https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg |
|
||||
@@ -3,54 +3,56 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
||||
| `streamType` | *int* | :heavy_check_mark: | Stream type (1=video, 2=audio, 3=subtitle). | 1 |
|
||||
| `default_` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is default. | true |
|
||||
| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
||||
| `index` | *int* | :heavy_check_mark: | Index of the stream. | 0 |
|
||||
| `bitrate` | *Optional\<Integer>* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
||||
| `language` | *Optional\<String>* | :heavy_minus_sign: | Language of the stream. | English |
|
||||
| `languageTag` | *Optional\<String>* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
||||
| `languageCode` | *Optional\<String>* | :heavy_minus_sign: | ISO language code. | eng |
|
||||
| `headerCompression` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true |
|
||||
| `doviblCompatID` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 |
|
||||
| `doviblPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true |
|
||||
| `dovielPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false |
|
||||
| `doviLevel` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision level. | 6 |
|
||||
| `doviPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true |
|
||||
| `doviProfile` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision profile. | 8 |
|
||||
| `dovirpuPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true |
|
||||
| `doviVersion` | *Optional\<String>* | :heavy_minus_sign: | Dolby Vision version. | 1.0 |
|
||||
| `bitDepth` | *Optional\<Integer>* | :heavy_minus_sign: | Bit depth of the video stream. | 10 |
|
||||
| `chromaLocation` | *Optional\<String>* | :heavy_minus_sign: | Chroma sample location. | topleft |
|
||||
| `chromaSubsampling` | *Optional\<String>* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 |
|
||||
| `codedHeight` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video height. | 1608 |
|
||||
| `codedWidth` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video width. | 3840 |
|
||||
| `closedCaptions` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `colorPrimaries` | *Optional\<String>* | :heavy_minus_sign: | Color primaries used. | bt2020 |
|
||||
| `colorRange` | *Optional\<String>* | :heavy_minus_sign: | Color range (e.g., tv). | tv |
|
||||
| `colorSpace` | *Optional\<String>* | :heavy_minus_sign: | Color space. | bt2020nc |
|
||||
| `colorTrc` | *Optional\<String>* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||
| `frameRate` | *Optional\<Float>* | :heavy_minus_sign: | Frame rate of the stream. | 23.976 |
|
||||
| `height` | *Optional\<Integer>* | :heavy_minus_sign: | Height of the video stream. | 1602 |
|
||||
| `level` | *Optional\<Integer>* | :heavy_minus_sign: | Video level. | 150 |
|
||||
| `original` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
||||
| `hasScalingMatrix` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | false |
|
||||
| `profile` | *Optional\<String>* | :heavy_minus_sign: | Video profile. | main 10 |
|
||||
| `scanType` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||
| `embeddedInVideo` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||
| `refFrames` | *Optional\<Integer>* | :heavy_minus_sign: | Number of reference frames. | 1 |
|
||||
| `width` | *Optional\<Integer>* | :heavy_minus_sign: | Width of the video stream. | 3840 |
|
||||
| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||
| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||
| `selected` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true |
|
||||
| `forced` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `channels` | *Optional\<Integer>* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 |
|
||||
| `audioChannelLayout` | *Optional\<String>* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) |
|
||||
| `samplingRate` | *Optional\<Integer>* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 |
|
||||
| `canAutoSync` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false |
|
||||
| `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 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||
| `id` | *long* | :heavy_check_mark: | Unique stream identifier. | 1002625 |
|
||||
| `streamType` | [GetMediaMetaDataStreamType](../../models/operations/GetMediaMetaDataStreamType.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 |
|
||||
| `codec` | *String* | :heavy_check_mark: | Codec used by the stream. | hevc |
|
||||
| `index` | *Optional\<Integer>* | :heavy_minus_sign: | Index of the stream. | 0 |
|
||||
| `bitrate` | *Optional\<Integer>* | :heavy_minus_sign: | Bitrate of the stream. | 24743 |
|
||||
| `language` | *Optional\<String>* | :heavy_minus_sign: | Language of the stream. | English |
|
||||
| `languageTag` | *Optional\<String>* | :heavy_minus_sign: | Language tag (e.g., en). | en |
|
||||
| `languageCode` | *Optional\<String>* | :heavy_minus_sign: | ISO language code. | eng |
|
||||
| `headerCompression` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates whether header compression is enabled. | true |
|
||||
| `doviblCompatID` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision BL compatibility ID. | 1 |
|
||||
| `doviblPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision BL is present. | true |
|
||||
| `dovielPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision EL is present. | false |
|
||||
| `doviLevel` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision level. | 6 |
|
||||
| `doviPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision is present. | true |
|
||||
| `doviProfile` | *Optional\<Integer>* | :heavy_minus_sign: | Dolby Vision profile. | 8 |
|
||||
| `dovirpuPresent` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if Dolby Vision RPU is present. | true |
|
||||
| `doviVersion` | *Optional\<String>* | :heavy_minus_sign: | Dolby Vision version. | 1.0 |
|
||||
| `bitDepth` | *Optional\<Integer>* | :heavy_minus_sign: | Bit depth of the video stream. | 10 |
|
||||
| `chromaLocation` | *Optional\<String>* | :heavy_minus_sign: | Chroma sample location. | topleft |
|
||||
| `chromaSubsampling` | *Optional\<String>* | :heavy_minus_sign: | Chroma subsampling format. | 4:2:0 |
|
||||
| `codedHeight` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video height. | 1608 |
|
||||
| `codedWidth` | *Optional\<Integer>* | :heavy_minus_sign: | Coded video width. | 3840 |
|
||||
| `closedCaptions` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `colorPrimaries` | *Optional\<String>* | :heavy_minus_sign: | Color primaries used. | bt2020 |
|
||||
| `colorRange` | *Optional\<String>* | :heavy_minus_sign: | Color range (e.g., tv). | tv |
|
||||
| `colorSpace` | *Optional\<String>* | :heavy_minus_sign: | Color space. | bt2020nc |
|
||||
| `colorTrc` | *Optional\<String>* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||
| `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 |
|
||||
| `level` | *Optional\<Integer>* | :heavy_minus_sign: | Video level. | 150 |
|
||||
| `original` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this is the original stream. | true |
|
||||
| `hasScalingMatrix` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | false |
|
||||
| `profile` | *Optional\<String>* | :heavy_minus_sign: | Video profile. | main 10 |
|
||||
| `scanType` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||
| `embeddedInVideo` | *Optional\<String>* | :heavy_minus_sign: | N/A | progressive |
|
||||
| `refFrames` | *Optional\<Integer>* | :heavy_minus_sign: | Number of reference frames. | 1 |
|
||||
| `width` | *Optional\<Integer>* | :heavy_minus_sign: | Width of the video stream. | 3840 |
|
||||
| `displayTitle` | *String* | :heavy_check_mark: | Display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||
| `extendedDisplayTitle` | *String* | :heavy_check_mark: | Extended display title for the stream. | 4K DoVi/HDR10 (HEVC Main 10) |
|
||||
| `selected` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if this stream is selected (applicable for audio streams). | true |
|
||||
| `forced` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | true |
|
||||
| `channels` | *Optional\<Integer>* | :heavy_minus_sign: | Number of audio channels (for audio streams). | 6 |
|
||||
| `audioChannelLayout` | *Optional\<String>* | :heavy_minus_sign: | Audio channel layout. | 5.1(side) |
|
||||
| `samplingRate` | *Optional\<Integer>* | :heavy_minus_sign: | Sampling rate for the audio stream. | 48000 |
|
||||
| `canAutoSync` | *Optional\<Boolean>* | :heavy_minus_sign: | Indicates if the stream can auto-sync. | false |
|
||||
| `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
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- |
|
||||
| `topLeft` | *String* | :heavy_check_mark: | The top-left color value. | 11333a |
|
||||
| `topRight` | *String* | :heavy_check_mark: | The top-right color value. | 1d2721 |
|
||||
| `bottomRight` | *String* | :heavy_check_mark: | The bottom-right color value. | 5c451d |
|
||||
| `bottomLeft` | *String* | :heavy_check_mark: | The bottom-left color value. | 372c10 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `topLeft` | *String* | :heavy_check_mark: | N/A | 11333b |
|
||||
| `topRight` | *String* | :heavy_check_mark: | N/A | 0a232d |
|
||||
| `bottomRight` | *String* | :heavy_check_mark: | N/A | 73958 |
|
||||
| `bottomLeft` | *String* | :heavy_check_mark: | N/A | 1f5066 |
|
||||
@@ -3,11 +3,10 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `id` | *long* | :heavy_check_mark: | The unique role identifier. | 109501 |
|
||||
| `filter` | *String* | :heavy_check_mark: | The filter string for the role. | actor=109501 |
|
||||
| `tag` | *String* | :heavy_check_mark: | The actor's name. | Bob Odenkirk |
|
||||
| `tagKey` | *String* | :heavy_check_mark: | A key associated with the actor tag. | 5d77683254f42c001f8c3f69 |
|
||||
| `role` | *Optional\<String>* | :heavy_minus_sign: | The character name or role. | Jimmy McGill |
|
||||
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | URL for the role thumbnail image. | https://metadata-static.plex.tv/f/people/f2ca7b474cc984efbdd5c503a096285a.jpg |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| `id` | *int* | :heavy_check_mark: | Unique identifier for the writer. | 126522 |
|
||||
| `tag` | *String* | :heavy_check_mark: | The role of Writer | Jamie P. Hanson |
|
||||
| `filter` | *String* | :heavy_check_mark: | The filter string used to query this writer. | writer=126522 |
|
||||
| `thumb` | *Optional\<String>* | :heavy_minus_sign: | The URL of the thumbnail image for the writer. | https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg |
|
||||
| `tagKey` | *Optional\<String>* | :heavy_minus_sign: | A unique key associated with the writers tag, used for internal identification. | 5d77683d85719b001f3a535e |
|
||||
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 |
|
||||
12
docs/models/operations/Hidden.md
Normal file
12
docs/models/operations/Hidden.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Hidden
|
||||
|
||||
The Plex library visibility setting
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ---------------------------------- | ---------------------------------- |
|
||||
| `Visible` | 0 |
|
||||
| `ExcludeHomeScreen` | 1 |
|
||||
| `ExcludeHomeScreenAndGlobalSearch` | 2 |
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| 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/> | |
|
||||
| `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 |
|
||||
| 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/> | |
|
||||
| `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 |
|
||||
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 |
|
||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
| `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 |
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
| `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 |
|
||||
| `language` | *Optional\<String>* | :heavy_minus_sign: | Language of the stream. | English |
|
||||
| `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 |
|
||||
| `colorTrc` | *Optional\<String>* | :heavy_minus_sign: | Color transfer characteristics. | smpte2084 |
|
||||
| `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 |
|
||||
| `level` | *Optional\<Integer>* | :heavy_minus_sign: | Video level. | 150 |
|
||||
| `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
|
||||
|
||||
| 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 |
|
||||
| `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 |
|
||||
| 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 |
|
||||
| `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 |
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
| 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 |
|
||||
| `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 |
|
||||
@@ -25,7 +25,6 @@ import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.GetGlobalHubsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetGlobalHubsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetGlobalHubsResponse;
|
||||
import dev.plexapi.sdk.models.operations.OnlyTransient;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
@@ -37,8 +36,6 @@ public class Application {
|
||||
.build();
|
||||
|
||||
GetGlobalHubsResponse res = sdk.hubs().getGlobalHubs()
|
||||
.count(1262.49)
|
||||
.onlyTransient(OnlyTransient.ONE)
|
||||
.call();
|
||||
|
||||
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.GetLibraryHubsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetLibraryHubsResponse;
|
||||
import dev.plexapi.sdk.models.operations.QueryParamOnlyTransient;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
@@ -149,8 +145,6 @@ public class Application {
|
||||
|
||||
GetLibraryHubsResponse res = sdk.hubs().getLibraryHubs()
|
||||
.sectionId(6728.76)
|
||||
.count(6728.76)
|
||||
.onlyTransient(QueryParamOnlyTransient.ZERO)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
|
||||
@@ -22,6 +22,10 @@ API Calls interacting with Plex Media Server Libraries
|
||||
* [getActorsLibrary](#getactorslibrary) - Get Actors of library media
|
||||
* [getSearchAllLibraries](#getsearchalllibraries) - Search All Libraries
|
||||
* [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
|
||||
* [getTopWatchedContent](#gettopwatchedcontent) - Get Top Watched Content
|
||||
|
||||
@@ -50,7 +54,6 @@ public class Application {
|
||||
|
||||
GetFileHashResponse res = sdk.library().getFileHash()
|
||||
.url("file://C:\Image.png&type=13")
|
||||
.type(4462.17)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
@@ -253,7 +256,6 @@ import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryDetailsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetLibraryDetailsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.GetLibraryDetailsResponse;
|
||||
import dev.plexapi.sdk.models.operations.IncludeDetails;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
@@ -265,7 +267,6 @@ public class Application {
|
||||
.build();
|
||||
|
||||
GetLibraryDetailsResponse res = sdk.library().getLibraryDetails()
|
||||
.includeDetails(IncludeDetails.ZERO)
|
||||
.sectionKey(9518)
|
||||
.call();
|
||||
|
||||
@@ -278,10 +279,10 @@ public class Application {
|
||||
|
||||
### Parameters
|
||||
|
||||
| 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/> | |
|
||||
| `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 |
|
||||
| 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/> | |
|
||||
| `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
|
||||
|
||||
@@ -909,6 +910,200 @@ public class Application {
|
||||
| models/errors/GetMediaMetaDataUnauthorized | 401 | application/json |
|
||||
| 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
|
||||
|
||||
This endpoint will return the children of of a library item specified with the ratingKey.
|
||||
|
||||
@@ -50,11 +50,11 @@ public class Application {
|
||||
|
||||
### Parameters
|
||||
|
||||
| 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/> | |
|
||||
| `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 |
|
||||
| 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/> | |
|
||||
| `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 |
|
||||
|
||||
### Response
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ package hello.world;
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistsBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetPlaylistsUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.*;
|
||||
import dev.plexapi.sdk.models.operations.GetPlaylistsResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
@@ -107,8 +107,6 @@ public class Application {
|
||||
.build();
|
||||
|
||||
GetPlaylistsResponse res = sdk.playlists().getPlaylists()
|
||||
.playlistType(PlaylistType.AUDIO)
|
||||
.smart(QueryParamSmart.ZERO)
|
||||
.call();
|
||||
|
||||
if (res.object().isPresent()) {
|
||||
@@ -268,8 +266,6 @@ public class Application {
|
||||
|
||||
UpdatePlaylistResponse res = sdk.playlists().updatePlaylist()
|
||||
.playlistID(3915)
|
||||
.title("<value>")
|
||||
.summary("<value>")
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
@@ -503,11 +499,11 @@ public class Application {
|
||||
|
||||
### Parameters
|
||||
|
||||
| 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 |
|
||||
| `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 |
|
||||
| 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 |
|
||||
| `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 |
|
||||
|
||||
### Response
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ package hello.world;
|
||||
import dev.plexapi.sdk.PlexAPI;
|
||||
import dev.plexapi.sdk.models.errors.GetServerResourcesBadRequest;
|
||||
import dev.plexapi.sdk.models.errors.GetServerResourcesUnauthorized;
|
||||
import dev.plexapi.sdk.models.operations.*;
|
||||
import dev.plexapi.sdk.models.operations.GetServerResourcesResponse;
|
||||
import java.lang.Exception;
|
||||
|
||||
public class Application {
|
||||
@@ -237,9 +237,6 @@ public class Application {
|
||||
.build();
|
||||
|
||||
GetServerResourcesResponse res = sdk.plex().getServerResources()
|
||||
.includeHttps(IncludeHttps.Enable)
|
||||
.includeRelay(IncludeRelay.Enable)
|
||||
.includeIPv6(IncludeIPv6.Enable)
|
||||
.clientID("3381b62b-9ab7-4e37-827b-203e9809eb58")
|
||||
.call();
|
||||
|
||||
|
||||
@@ -49,8 +49,6 @@ public class Application {
|
||||
|
||||
PerformSearchResponse res = sdk.search().performSearch()
|
||||
.query("dylan")
|
||||
.sectionId(9487.88)
|
||||
.limit(5)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
@@ -107,8 +105,6 @@ public class Application {
|
||||
|
||||
PerformVoiceSearchResponse res = sdk.search().performVoiceSearch()
|
||||
.query("dead+poop")
|
||||
.sectionId(4094.8)
|
||||
.limit(5)
|
||||
.call();
|
||||
|
||||
// handle response
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
groupId=dev.plexapi
|
||||
artifactId=plexapi
|
||||
version=0.14.0
|
||||
version=0.16.2
|
||||
@@ -30,8 +30,6 @@ import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
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 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.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* API Calls regarding authentication for Plex Media Server
|
||||
*/
|
||||
|
||||
@@ -45,8 +45,6 @@ import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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.GetLibraryItemsResponse;
|
||||
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.GetMediaMetaDataRequestBuilder;
|
||||
import dev.plexapi.sdk.models.operations.GetMediaMetaDataResponse;
|
||||
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.GetMetadataChildrenRequestBuilder;
|
||||
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.GetTopWatchedContentResponseBody;
|
||||
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.utils.HTTPClient;
|
||||
import dev.plexapi.sdk.utils.HTTPRequest;
|
||||
import dev.plexapi.sdk.utils.Hook.AfterErrorContextImpl;
|
||||
import dev.plexapi.sdk.utils.Hook.AfterSuccessContextImpl;
|
||||
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 java.io.InputStream;
|
||||
import java.lang.Double;
|
||||
import java.lang.Exception;
|
||||
import java.lang.Long;
|
||||
import java.lang.Object;
|
||||
import java.lang.String;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* API Calls interacting with Plex Media Server Libraries
|
||||
*/
|
||||
@@ -141,6 +156,10 @@ public class Library implements
|
||||
MethodCallGetActorsLibrary,
|
||||
MethodCallGetSearchAllLibraries,
|
||||
MethodCallGetMediaMetaData,
|
||||
MethodCallGetMediaArts,
|
||||
MethodCallPostMediaArts,
|
||||
MethodCallGetMediaPosters,
|
||||
MethodCallPostMediaPoster,
|
||||
MethodCallGetMetadataChildren,
|
||||
MethodCallGetTopWatchedContent {
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
@@ -37,8 +37,6 @@ import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Submit logs to the Log Handler for Plex Media Server
|
||||
*/
|
||||
|
||||
@@ -45,8 +45,6 @@ import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* API Calls interacting with Plex Media Server Media
|
||||
*/
|
||||
|
||||
@@ -75,8 +75,6 @@ import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
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").
|
||||
* They can be organized in (optionally nesting) folders.
|
||||
|
||||
@@ -61,8 +61,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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.function.Consumer;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Plex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server
|
||||
*
|
||||
@@ -54,7 +52,7 @@ public class PlexAPI {
|
||||
/**
|
||||
* The full address of your Plex Server
|
||||
*/
|
||||
"{protocol}://{ip}:{port}",
|
||||
"https://10.10.10.47:32400",
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -510,4 +508,5 @@ public class PlexAPI {
|
||||
this.updater = new Updater(sdkConfiguration);
|
||||
this.users = new Users(sdkConfiguration);
|
||||
this.sdkConfiguration.initialize();
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
class SDKConfiguration {
|
||||
public SecuritySource securitySource;
|
||||
|
||||
@@ -44,8 +42,8 @@ class SDKConfiguration {
|
||||
} };
|
||||
private static final String LANGUAGE = "java";
|
||||
public static final String OPENAPI_DOC_VERSION = "0.0.3";
|
||||
public static final String SDK_VERSION = "0.14.0";
|
||||
public static final String GEN_VERSION = "2.563.1";
|
||||
public static final String SDK_VERSION = "0.16.2";
|
||||
public static final String GEN_VERSION = "2.597.9";
|
||||
private static final String BASE_PACKAGE = "dev.plexapi.sdk";
|
||||
public static final String USER_AGENT =
|
||||
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.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* API Calls that perform search operations with Plex Media Server
|
||||
*/
|
||||
|
||||
@@ -5,8 +5,6 @@ package dev.plexapi.sdk;
|
||||
|
||||
import dev.plexapi.sdk.utils.HasSecurity;
|
||||
|
||||
|
||||
|
||||
public interface SecuritySource {
|
||||
|
||||
HasSecurity getSecurity();
|
||||
|
||||
@@ -65,8 +65,6 @@ import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Operations against the Plex Media Server System.
|
||||
*/
|
||||
|
||||
@@ -43,8 +43,6 @@ import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
||||
@@ -26,8 +26,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
public class Users implements
|
||||
MethodCallGetUsers {
|
||||
|
||||
|
||||
@@ -30,8 +30,6 @@ import java.net.http.HttpResponse;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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.Optional;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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.JsonProperty;
|
||||
import dev.plexapi.sdk.utils.Utils;
|
||||
import java.lang.Long;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Objects;
|
||||
@@ -23,7 +23,7 @@ import java.util.Optional;
|
||||
public class Country {
|
||||
|
||||
@JsonProperty("id")
|
||||
private long id;
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The country of origin of this media item
|
||||
@@ -37,7 +37,7 @@ public class Country {
|
||||
|
||||
@JsonCreator
|
||||
public Country(
|
||||
@JsonProperty("id") long id,
|
||||
@JsonProperty("id") int id,
|
||||
@JsonProperty("tag") String tag,
|
||||
@JsonProperty("filter") Optional<String> filter) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
@@ -49,13 +49,13 @@ public class Country {
|
||||
}
|
||||
|
||||
public Country(
|
||||
long id,
|
||||
int id,
|
||||
String tag) {
|
||||
this(id, tag, Optional.empty());
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public long id() {
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class Country {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Country withId(long id) {
|
||||
public Country withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
@@ -137,7 +137,7 @@ public class Country {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private Long id;
|
||||
private Integer id;
|
||||
|
||||
private String tag;
|
||||
|
||||
@@ -147,7 +147,7 @@ public class Country {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
|
||||
@@ -3,39 +3,186 @@
|
||||
*/
|
||||
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.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).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* CreatePlaylistQueryParamType
|
||||
*
|
||||
* <p>type of playlist to create
|
||||
*/
|
||||
public enum CreatePlaylistQueryParamType {
|
||||
AUDIO("audio"),
|
||||
VIDEO("video"),
|
||||
PHOTO("photo");
|
||||
@JsonDeserialize(using = CreatePlaylistQueryParamType._Deserializer.class)
|
||||
@JsonSerialize(using = CreatePlaylistQueryParamType._Serializer.class)
|
||||
public class CreatePlaylistQueryParamType {
|
||||
|
||||
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 CreatePlaylistQueryParamType(String 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() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<CreatePlaylistQueryParamType> fromValue(String value) {
|
||||
for (CreatePlaylistQueryParamType o: CreatePlaylistQueryParamType.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
public Optional<CreatePlaylistQueryParamTypeEnum> 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;
|
||||
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;
|
||||
|
||||
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.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).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* EnableCreditsMarkerGeneration
|
||||
*
|
||||
* <p>Setting that indicates if credits markers detection is enabled. (-1 = Library default, 0 = Disabled).
|
||||
*/
|
||||
public enum EnableCreditsMarkerGeneration {
|
||||
LibraryDefault("-1"),
|
||||
Disabled("0");
|
||||
@JsonDeserialize(using = EnableCreditsMarkerGeneration._Deserializer.class)
|
||||
@JsonSerialize(using = EnableCreditsMarkerGeneration._Serializer.class)
|
||||
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 EnableCreditsMarkerGeneration(String 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() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<EnableCreditsMarkerGeneration> fromValue(String value) {
|
||||
for (EnableCreditsMarkerGeneration o: EnableCreditsMarkerGeneration.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
public Optional<EnableCreditsMarkerGenerationEnum> 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;
|
||||
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;
|
||||
|
||||
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.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).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* EpisodeSort
|
||||
*
|
||||
* <p>Setting that indicates how episodes are sorted for the show. (-1 = Library default, 0 = Oldest first, 1 = Newest first).
|
||||
*/
|
||||
public enum EpisodeSort {
|
||||
LibraryDefault("-1"),
|
||||
OldestFirst("0"),
|
||||
NewestFirst("1");
|
||||
@JsonDeserialize(using = EpisodeSort._Deserializer.class)
|
||||
@JsonSerialize(using = EpisodeSort._Serializer.class)
|
||||
public class EpisodeSort {
|
||||
|
||||
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 EpisodeSort(String 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() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<EpisodeSort> fromValue(String value) {
|
||||
for (EpisodeSort o: EpisodeSort.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
public Optional<EpisodeSortEnum> 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;
|
||||
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;
|
||||
|
||||
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.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).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* Filter
|
||||
*
|
||||
* <p>Filter
|
||||
*/
|
||||
public enum Filter {
|
||||
ALL("all"),
|
||||
AVAILABLE("available"),
|
||||
RELEASED("released");
|
||||
@JsonDeserialize(using = Filter._Deserializer.class)
|
||||
@JsonSerialize(using = Filter._Serializer.class)
|
||||
public class Filter {
|
||||
|
||||
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 Filter(String 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() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<Filter> fromValue(String value) {
|
||||
for (Filter o: Filter.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
public Optional<FilterEnum> 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;
|
||||
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;
|
||||
|
||||
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.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).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* FlattenSeasons
|
||||
*
|
||||
* <p>Setting that indicates if seasons are set to hidden for the show. (-1 = Library default, 0 = Hide, 1 = Show).
|
||||
*/
|
||||
public enum FlattenSeasons {
|
||||
LibraryDefault("-1"),
|
||||
Hide("0"),
|
||||
Show("1");
|
||||
@JsonDeserialize(using = FlattenSeasons._Deserializer.class)
|
||||
@JsonSerialize(using = FlattenSeasons._Serializer.class)
|
||||
public class FlattenSeasons {
|
||||
|
||||
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 FlattenSeasons(String 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() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<FlattenSeasons> fromValue(String value) {
|
||||
for (FlattenSeasons o: FlattenSeasons.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
public Optional<FlattenSeasonsEnum> 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;
|
||||
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;
|
||||
|
||||
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.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
|
||||
*
|
||||
@@ -17,33 +52,159 @@ import java.util.Optional;
|
||||
* 4 = episode
|
||||
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
|
||||
*/
|
||||
public enum GetActorsLibraryQueryParamType {
|
||||
Movie(1L),
|
||||
TvShow(2L),
|
||||
Season(3L),
|
||||
Episode(4L),
|
||||
Audio(8L),
|
||||
Album(9L),
|
||||
Track(10L);
|
||||
@JsonDeserialize(using = GetActorsLibraryQueryParamType._Deserializer.class)
|
||||
@JsonSerialize(using = GetActorsLibraryQueryParamType._Serializer.class)
|
||||
public class GetActorsLibraryQueryParamType {
|
||||
|
||||
public static final GetActorsLibraryQueryParamType Movie = new GetActorsLibraryQueryParamType(1L);
|
||||
public static final GetActorsLibraryQueryParamType TvShow = new GetActorsLibraryQueryParamType(2L);
|
||||
public static final GetActorsLibraryQueryParamType Season = new GetActorsLibraryQueryParamType(3L);
|
||||
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 GetActorsLibraryQueryParamType(long 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() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<GetActorsLibraryQueryParamType> fromValue(long value) {
|
||||
for (GetActorsLibraryQueryParamType o: GetActorsLibraryQueryParamType.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
public Optional<GetActorsLibraryQueryParamTypeEnum> 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;
|
||||
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.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
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 java.lang.Boolean;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Long;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetAllLibrariesDirectory {
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
@JsonProperty("allowSync")
|
||||
private boolean allowSync;
|
||||
|
||||
/**
|
||||
* URL for the background artwork of the media container.
|
||||
*/
|
||||
@JsonProperty("art")
|
||||
private String art;
|
||||
|
||||
/**
|
||||
* The relative path to the composite media item.
|
||||
*/
|
||||
@JsonProperty("composite")
|
||||
private String composite;
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonProperty("filters")
|
||||
private boolean filters;
|
||||
|
||||
/**
|
||||
* Indicates whether the library is currently being refreshed or updated
|
||||
*/
|
||||
@JsonProperty("refreshing")
|
||||
private boolean refreshing;
|
||||
|
||||
/**
|
||||
* URL for the thumbnail image of the media container.
|
||||
*/
|
||||
@JsonProperty("thumb")
|
||||
private String thumb;
|
||||
|
||||
/**
|
||||
* The library key representing the unique identifier
|
||||
*/
|
||||
@JsonProperty("key")
|
||||
private String key;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
private GetAllLibrariesType type;
|
||||
|
||||
/**
|
||||
* The title of the library
|
||||
*/
|
||||
@JsonProperty("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* The Plex agent used to match and retrieve media metadata.
|
||||
*/
|
||||
@JsonProperty("agent")
|
||||
private String agent;
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonProperty("scanner")
|
||||
private String scanner;
|
||||
|
||||
/**
|
||||
* The Plex library language that has been set
|
||||
*/
|
||||
@JsonProperty("language")
|
||||
private String language;
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library.
|
||||
*/
|
||||
@JsonProperty("uuid")
|
||||
private String uuid;
|
||||
|
||||
@@ -62,11 +103,9 @@ public class GetAllLibrariesDirectory {
|
||||
@JsonProperty("updatedAt")
|
||||
private long updatedAt;
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("createdAt")
|
||||
private long createdAt;
|
||||
private Optional<Long> createdAt;
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
@@ -74,20 +113,31 @@ public class GetAllLibrariesDirectory {
|
||||
@JsonProperty("scannedAt")
|
||||
private long scannedAt;
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonProperty("content")
|
||||
private boolean content;
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonProperty("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")
|
||||
private long contentChangedAt;
|
||||
|
||||
/**
|
||||
* The Plex library visibility setting
|
||||
*/
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("hidden")
|
||||
private int hidden;
|
||||
private Optional<? extends Hidden> hidden;
|
||||
|
||||
@JsonProperty("Location")
|
||||
private List<GetAllLibrariesLocation> location;
|
||||
@@ -101,19 +151,19 @@ public class GetAllLibrariesDirectory {
|
||||
@JsonProperty("refreshing") boolean refreshing,
|
||||
@JsonProperty("thumb") String thumb,
|
||||
@JsonProperty("key") String key,
|
||||
@JsonProperty("type") String type,
|
||||
@JsonProperty("type") GetAllLibrariesType type,
|
||||
@JsonProperty("title") String title,
|
||||
@JsonProperty("agent") String agent,
|
||||
@JsonProperty("scanner") String scanner,
|
||||
@JsonProperty("language") String language,
|
||||
@JsonProperty("uuid") String uuid,
|
||||
@JsonProperty("updatedAt") long updatedAt,
|
||||
@JsonProperty("createdAt") long createdAt,
|
||||
@JsonProperty("createdAt") Optional<Long> createdAt,
|
||||
@JsonProperty("scannedAt") long scannedAt,
|
||||
@JsonProperty("content") boolean content,
|
||||
@JsonProperty("directory") boolean directory,
|
||||
@JsonProperty("contentChangedAt") long contentChangedAt,
|
||||
@JsonProperty("hidden") int hidden,
|
||||
@JsonProperty("hidden") Optional<? extends Hidden> hidden,
|
||||
@JsonProperty("Location") List<GetAllLibrariesLocation> location) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
Utils.checkNotNull(art, "art");
|
||||
@@ -159,66 +209,125 @@ public class GetAllLibrariesDirectory {
|
||||
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
|
||||
public boolean allowSync() {
|
||||
return allowSync;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the background artwork of the media container.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String art() {
|
||||
return art;
|
||||
}
|
||||
|
||||
/**
|
||||
* The relative path to the composite media item.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String composite() {
|
||||
return composite;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean filters() {
|
||||
return filters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the library is currently being refreshed or updated
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean refreshing() {
|
||||
return refreshing;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the thumbnail image of the media container.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String thumb() {
|
||||
return thumb;
|
||||
}
|
||||
|
||||
/**
|
||||
* The library key representing the unique identifier
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String key() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String type() {
|
||||
public GetAllLibrariesType type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String title() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex agent used to match and retrieve media metadata.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String agent() {
|
||||
return agent;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String scanner() {
|
||||
return scanner;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex library language that has been set
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String language() {
|
||||
return language;
|
||||
}
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String uuid() {
|
||||
return uuid;
|
||||
@@ -232,11 +341,8 @@ public class GetAllLibrariesDirectory {
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
*/
|
||||
@JsonIgnore
|
||||
public long createdAt() {
|
||||
public Optional<Long> createdAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
@@ -248,27 +354,38 @@ public class GetAllLibrariesDirectory {
|
||||
return scannedAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean content() {
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean 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
|
||||
public long contentChangedAt() {
|
||||
return contentChangedAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex library visibility setting
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public int hidden() {
|
||||
return hidden;
|
||||
public Optional<Hidden> hidden() {
|
||||
return (Optional<Hidden>) hidden;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
@@ -280,78 +397,114 @@ public class GetAllLibrariesDirectory {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withAllowSync(boolean allowSync) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
this.allowSync = allowSync;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the background artwork of the media container.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withArt(String art) {
|
||||
Utils.checkNotNull(art, "art");
|
||||
this.art = art;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The relative path to the composite media item.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withComposite(String composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = composite;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public GetAllLibrariesDirectory withFilters(boolean filters) {
|
||||
Utils.checkNotNull(filters, "filters");
|
||||
this.filters = filters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the library is currently being refreshed or updated
|
||||
*/
|
||||
public GetAllLibrariesDirectory withRefreshing(boolean refreshing) {
|
||||
Utils.checkNotNull(refreshing, "refreshing");
|
||||
this.refreshing = refreshing;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the thumbnail image of the media container.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withThumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The library key representing the unique identifier
|
||||
*/
|
||||
public GetAllLibrariesDirectory withKey(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesDirectory withType(String type) {
|
||||
public GetAllLibrariesDirectory withType(GetAllLibrariesType type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library
|
||||
*/
|
||||
public GetAllLibrariesDirectory withTitle(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex agent used to match and retrieve media metadata.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withAgent(String agent) {
|
||||
Utils.checkNotNull(agent, "agent");
|
||||
this.agent = agent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public GetAllLibrariesDirectory withScanner(String scanner) {
|
||||
Utils.checkNotNull(scanner, "scanner");
|
||||
this.scanner = scanner;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex library language that has been set
|
||||
*/
|
||||
public GetAllLibrariesDirectory withLanguage(String language) {
|
||||
Utils.checkNotNull(language, "language");
|
||||
this.language = language;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library.
|
||||
*/
|
||||
public GetAllLibrariesDirectory withUuid(String uuid) {
|
||||
Utils.checkNotNull(uuid, "uuid");
|
||||
this.uuid = uuid;
|
||||
@@ -367,10 +520,13 @@ public class GetAllLibrariesDirectory {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
*/
|
||||
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");
|
||||
this.createdAt = createdAt;
|
||||
return this;
|
||||
@@ -385,12 +541,18 @@ public class GetAllLibrariesDirectory {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public GetAllLibrariesDirectory withContent(boolean content) {
|
||||
Utils.checkNotNull(content, "content");
|
||||
this.content = content;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public GetAllLibrariesDirectory withDirectory(boolean directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = directory;
|
||||
@@ -398,7 +560,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) {
|
||||
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
|
||||
@@ -406,7 +569,19 @@ public class GetAllLibrariesDirectory {
|
||||
return this;
|
||||
}
|
||||
|
||||
public GetAllLibrariesDirectory withHidden(int hidden) {
|
||||
/**
|
||||
* The Plex library visibility setting
|
||||
*/
|
||||
public GetAllLibrariesDirectory withHidden(Hidden hidden) {
|
||||
Utils.checkNotNull(hidden, "hidden");
|
||||
this.hidden = Optional.ofNullable(hidden);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex library visibility setting
|
||||
*/
|
||||
public GetAllLibrariesDirectory withHidden(Optional<? extends Hidden> hidden) {
|
||||
Utils.checkNotNull(hidden, "hidden");
|
||||
this.hidden = hidden;
|
||||
return this;
|
||||
@@ -520,7 +695,7 @@ public class GetAllLibrariesDirectory {
|
||||
|
||||
private String key;
|
||||
|
||||
private String type;
|
||||
private GetAllLibrariesType type;
|
||||
|
||||
private String title;
|
||||
|
||||
@@ -534,7 +709,7 @@ public class GetAllLibrariesDirectory {
|
||||
|
||||
private Long updatedAt;
|
||||
|
||||
private Long createdAt;
|
||||
private Optional<Long> createdAt = Optional.empty();
|
||||
|
||||
private Long scannedAt;
|
||||
|
||||
@@ -544,7 +719,7 @@ public class GetAllLibrariesDirectory {
|
||||
|
||||
private Long contentChangedAt;
|
||||
|
||||
private Integer hidden;
|
||||
private Optional<? extends Hidden> hidden;
|
||||
|
||||
private List<GetAllLibrariesLocation> location;
|
||||
|
||||
@@ -552,78 +727,114 @@ public class GetAllLibrariesDirectory {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
public Builder allowSync(boolean allowSync) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
this.allowSync = allowSync;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the background artwork of the media container.
|
||||
*/
|
||||
public Builder art(String art) {
|
||||
Utils.checkNotNull(art, "art");
|
||||
this.art = art;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The relative path to the composite media item.
|
||||
*/
|
||||
public Builder composite(String composite) {
|
||||
Utils.checkNotNull(composite, "composite");
|
||||
this.composite = composite;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public Builder filters(boolean filters) {
|
||||
Utils.checkNotNull(filters, "filters");
|
||||
this.filters = filters;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the library is currently being refreshed or updated
|
||||
*/
|
||||
public Builder refreshing(boolean refreshing) {
|
||||
Utils.checkNotNull(refreshing, "refreshing");
|
||||
this.refreshing = refreshing;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL for the thumbnail image of the media container.
|
||||
*/
|
||||
public Builder thumb(String thumb) {
|
||||
Utils.checkNotNull(thumb, "thumb");
|
||||
this.thumb = thumb;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The library key representing the unique identifier
|
||||
*/
|
||||
public Builder key(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
this.key = key;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder type(String type) {
|
||||
public Builder type(GetAllLibrariesType type) {
|
||||
Utils.checkNotNull(type, "type");
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The title of the library
|
||||
*/
|
||||
public Builder title(String title) {
|
||||
Utils.checkNotNull(title, "title");
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex agent used to match and retrieve media metadata.
|
||||
*/
|
||||
public Builder agent(String agent) {
|
||||
Utils.checkNotNull(agent, "agent");
|
||||
this.agent = agent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public Builder scanner(String scanner) {
|
||||
Utils.checkNotNull(scanner, "scanner");
|
||||
this.scanner = scanner;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex library language that has been set
|
||||
*/
|
||||
public Builder language(String language) {
|
||||
Utils.checkNotNull(language, "language");
|
||||
this.language = language;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The universally unique identifier for the library.
|
||||
*/
|
||||
public Builder uuid(String uuid) {
|
||||
Utils.checkNotNull(uuid, "uuid");
|
||||
this.uuid = uuid;
|
||||
@@ -639,10 +850,13 @@ public class GetAllLibrariesDirectory {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unix epoch datetime in seconds
|
||||
*/
|
||||
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");
|
||||
this.createdAt = createdAt;
|
||||
return this;
|
||||
@@ -657,12 +871,18 @@ public class GetAllLibrariesDirectory {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public Builder content(boolean content) {
|
||||
Utils.checkNotNull(content, "content");
|
||||
this.content = content;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* UNKNOWN
|
||||
*/
|
||||
public Builder directory(boolean directory) {
|
||||
Utils.checkNotNull(directory, "directory");
|
||||
this.directory = directory;
|
||||
@@ -670,7 +890,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) {
|
||||
Utils.checkNotNull(contentChangedAt, "contentChangedAt");
|
||||
@@ -678,7 +899,19 @@ public class GetAllLibrariesDirectory {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder hidden(int hidden) {
|
||||
/**
|
||||
* The Plex library visibility setting
|
||||
*/
|
||||
public Builder hidden(Hidden hidden) {
|
||||
Utils.checkNotNull(hidden, "hidden");
|
||||
this.hidden = Optional.ofNullable(hidden);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Plex library visibility setting
|
||||
*/
|
||||
public Builder hidden(Optional<? extends Hidden> hidden) {
|
||||
Utils.checkNotNull(hidden, "hidden");
|
||||
this.hidden = hidden;
|
||||
return this;
|
||||
@@ -691,6 +924,9 @@ public class GetAllLibrariesDirectory {
|
||||
}
|
||||
|
||||
public GetAllLibrariesDirectory build() {
|
||||
if (hidden == null) {
|
||||
hidden = _SINGLETON_VALUE_Hidden.value();
|
||||
}
|
||||
return new GetAllLibrariesDirectory(
|
||||
allowSync,
|
||||
art,
|
||||
@@ -714,5 +950,11 @@ public class GetAllLibrariesDirectory {
|
||||
hidden,
|
||||
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 {
|
||||
|
||||
/**
|
||||
* The ID of the location.
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
private int id;
|
||||
|
||||
/**
|
||||
* The path to the media item.
|
||||
*/
|
||||
@JsonProperty("path")
|
||||
private String path;
|
||||
|
||||
@@ -30,11 +36,17 @@ public class GetAllLibrariesLocation {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the location.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public int id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* The path to the media item.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String path() {
|
||||
return path;
|
||||
@@ -44,12 +56,18 @@ public class GetAllLibrariesLocation {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the location.
|
||||
*/
|
||||
public GetAllLibrariesLocation withId(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The path to the media item.
|
||||
*/
|
||||
public GetAllLibrariesLocation withPath(String path) {
|
||||
Utils.checkNotNull(path, "path");
|
||||
this.path = path;
|
||||
@@ -95,12 +113,18 @@ public class GetAllLibrariesLocation {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the location.
|
||||
*/
|
||||
public Builder id(int id) {
|
||||
Utils.checkNotNull(id, "id");
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The path to the media item.
|
||||
*/
|
||||
public Builder path(String path) {
|
||||
Utils.checkNotNull(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.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.Boolean;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public class GetAllLibrariesMediaContainer {
|
||||
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
@JsonProperty("size")
|
||||
private int size;
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
@JsonProperty("allowSync")
|
||||
private boolean allowSync;
|
||||
|
||||
/**
|
||||
* The primary title of the media container.
|
||||
*/
|
||||
@JsonProperty("title1")
|
||||
private String title1;
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("Directory")
|
||||
private List<GetAllLibrariesDirectory> directory;
|
||||
private Optional<? extends List<GetAllLibrariesDirectory>> directory;
|
||||
|
||||
@JsonCreator
|
||||
public GetAllLibrariesMediaContainer(
|
||||
@JsonProperty("size") int size,
|
||||
@JsonProperty("allowSync") boolean allowSync,
|
||||
@JsonProperty("title1") String title1,
|
||||
@JsonProperty("Directory") List<GetAllLibrariesDirectory> directory) {
|
||||
@JsonProperty("Directory") Optional<? extends List<GetAllLibrariesDirectory>> directory) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
Utils.checkNotNull(title1, "title1");
|
||||
@@ -44,42 +58,68 @@ public class GetAllLibrariesMediaContainer {
|
||||
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
|
||||
public int size() {
|
||||
return size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public boolean allowSync() {
|
||||
return allowSync;
|
||||
}
|
||||
|
||||
/**
|
||||
* The primary title of the media container.
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String title1() {
|
||||
return title1;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public List<GetAllLibrariesDirectory> directory() {
|
||||
return directory;
|
||||
public Optional<List<GetAllLibrariesDirectory>> directory() {
|
||||
return (Optional<List<GetAllLibrariesDirectory>>) directory;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
public GetAllLibrariesMediaContainer withSize(int size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
public GetAllLibrariesMediaContainer withAllowSync(boolean allowSync) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
this.allowSync = allowSync;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The primary title of the media container.
|
||||
*/
|
||||
public GetAllLibrariesMediaContainer withTitle1(String title1) {
|
||||
Utils.checkNotNull(title1, "title1");
|
||||
this.title1 = title1;
|
||||
@@ -87,6 +127,12 @@ public class GetAllLibrariesMediaContainer {
|
||||
}
|
||||
|
||||
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");
|
||||
this.directory = directory;
|
||||
return this;
|
||||
@@ -135,24 +181,33 @@ public class GetAllLibrariesMediaContainer {
|
||||
|
||||
private String title1;
|
||||
|
||||
private List<GetAllLibrariesDirectory> directory;
|
||||
private Optional<? extends List<GetAllLibrariesDirectory>> directory = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
/**
|
||||
* Number of media items returned in this response.
|
||||
*/
|
||||
public Builder size(int size) {
|
||||
Utils.checkNotNull(size, "size");
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether syncing is allowed.
|
||||
*/
|
||||
public Builder allowSync(boolean allowSync) {
|
||||
Utils.checkNotNull(allowSync, "allowSync");
|
||||
this.allowSync = allowSync;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The primary title of the media container.
|
||||
*/
|
||||
public Builder title1(String title1) {
|
||||
Utils.checkNotNull(title1, "title1");
|
||||
this.title1 = title1;
|
||||
@@ -160,6 +215,12 @@ public class GetAllLibrariesMediaContainer {
|
||||
}
|
||||
|
||||
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");
|
||||
this.directory = directory;
|
||||
return this;
|
||||
|
||||
@@ -5,11 +5,15 @@ 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.Override;
|
||||
import java.lang.String;
|
||||
import java.lang.SuppressWarnings;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* GetAllLibrariesResponseBody
|
||||
@@ -18,19 +22,25 @@ import java.util.Objects;
|
||||
*/
|
||||
public class GetAllLibrariesResponseBody {
|
||||
|
||||
@JsonInclude(Include.NON_ABSENT)
|
||||
@JsonProperty("MediaContainer")
|
||||
private GetAllLibrariesMediaContainer mediaContainer;
|
||||
private Optional<? extends GetAllLibrariesMediaContainer> mediaContainer;
|
||||
|
||||
@JsonCreator
|
||||
public GetAllLibrariesResponseBody(
|
||||
@JsonProperty("MediaContainer") GetAllLibrariesMediaContainer mediaContainer) {
|
||||
@JsonProperty("MediaContainer") Optional<? extends GetAllLibrariesMediaContainer> mediaContainer) {
|
||||
Utils.checkNotNull(mediaContainer, "mediaContainer");
|
||||
this.mediaContainer = mediaContainer;
|
||||
}
|
||||
|
||||
public GetAllLibrariesResponseBody() {
|
||||
this(Optional.empty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@JsonIgnore
|
||||
public GetAllLibrariesMediaContainer mediaContainer() {
|
||||
return mediaContainer;
|
||||
public Optional<GetAllLibrariesMediaContainer> mediaContainer() {
|
||||
return (Optional<GetAllLibrariesMediaContainer>) mediaContainer;
|
||||
}
|
||||
|
||||
public final static Builder builder() {
|
||||
@@ -38,6 +48,12 @@ public class GetAllLibrariesResponseBody {
|
||||
}
|
||||
|
||||
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");
|
||||
this.mediaContainer = mediaContainer;
|
||||
return this;
|
||||
@@ -71,13 +87,19 @@ public class GetAllLibrariesResponseBody {
|
||||
|
||||
public final static class Builder {
|
||||
|
||||
private GetAllLibrariesMediaContainer mediaContainer;
|
||||
private Optional<? extends GetAllLibrariesMediaContainer> mediaContainer = Optional.empty();
|
||||
|
||||
private Builder() {
|
||||
// force use of static builder() method
|
||||
}
|
||||
|
||||
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");
|
||||
this.mediaContainer = mediaContainer;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,35 +3,185 @@
|
||||
*/
|
||||
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.SuppressWarnings;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
public enum GetAllMediaLibraryLibraryResponseType {
|
||||
COVER_POSTER("coverPoster"),
|
||||
BACKGROUND("background"),
|
||||
SNAPSHOT("snapshot"),
|
||||
CLEAR_LOGO("clearLogo");
|
||||
/**
|
||||
* <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).
|
||||
*
|
||||
*/
|
||||
@JsonDeserialize(using = GetAllMediaLibraryLibraryResponseType._Deserializer.class)
|
||||
@JsonSerialize(using = GetAllMediaLibraryLibraryResponseType._Serializer.class)
|
||||
public class GetAllMediaLibraryLibraryResponseType {
|
||||
|
||||
public static final GetAllMediaLibraryLibraryResponseType COVER_POSTER = new GetAllMediaLibraryLibraryResponseType("coverPoster");
|
||||
public static final GetAllMediaLibraryLibraryResponseType BACKGROUND = new GetAllMediaLibraryLibraryResponseType("background");
|
||||
public static final GetAllMediaLibraryLibraryResponseType SNAPSHOT = new GetAllMediaLibraryLibraryResponseType("snapshot");
|
||||
public static final GetAllMediaLibraryLibraryResponseType CLEAR_LOGO = new GetAllMediaLibraryLibraryResponseType("clearLogo");
|
||||
|
||||
// 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, GetAllMediaLibraryLibraryResponseType> values = createValuesMap();
|
||||
private static final Map<String, GetAllMediaLibraryLibraryResponseTypeEnum> enums = createEnumsMap();
|
||||
|
||||
@JsonValue
|
||||
private final String value;
|
||||
|
||||
private GetAllMediaLibraryLibraryResponseType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a GetAllMediaLibraryLibraryResponseType 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 GetAllMediaLibraryLibraryResponseType
|
||||
*/
|
||||
public static GetAllMediaLibraryLibraryResponseType of(String value) {
|
||||
synchronized (GetAllMediaLibraryLibraryResponseType.class) {
|
||||
return values.computeIfAbsent(value, v -> new GetAllMediaLibraryLibraryResponseType(v));
|
||||
}
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<GetAllMediaLibraryLibraryResponseType> fromValue(String value) {
|
||||
for (GetAllMediaLibraryLibraryResponseType o: GetAllMediaLibraryLibraryResponseType.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
public Optional<GetAllMediaLibraryLibraryResponseTypeEnum> 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;
|
||||
GetAllMediaLibraryLibraryResponseType other = (GetAllMediaLibraryLibraryResponseType) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetAllMediaLibraryLibraryResponseType [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static GetAllMediaLibraryLibraryResponseType[] values() {
|
||||
synchronized (GetAllMediaLibraryLibraryResponseType.class) {
|
||||
return values.values().toArray(new GetAllMediaLibraryLibraryResponseType[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<String, GetAllMediaLibraryLibraryResponseType> createValuesMap() {
|
||||
Map<String, GetAllMediaLibraryLibraryResponseType> map = new LinkedHashMap<>();
|
||||
map.put("coverPoster", COVER_POSTER);
|
||||
map.put("background", BACKGROUND);
|
||||
map.put("snapshot", SNAPSHOT);
|
||||
map.put("clearLogo", CLEAR_LOGO);
|
||||
return map;
|
||||
}
|
||||
|
||||
private static final Map<String, GetAllMediaLibraryLibraryResponseTypeEnum> createEnumsMap() {
|
||||
Map<String, GetAllMediaLibraryLibraryResponseTypeEnum> map = new HashMap<>();
|
||||
map.put("coverPoster", GetAllMediaLibraryLibraryResponseTypeEnum.COVER_POSTER);
|
||||
map.put("background", GetAllMediaLibraryLibraryResponseTypeEnum.BACKGROUND);
|
||||
map.put("snapshot", GetAllMediaLibraryLibraryResponseTypeEnum.SNAPSHOT);
|
||||
map.put("clearLogo", GetAllMediaLibraryLibraryResponseTypeEnum.CLEAR_LOGO);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<GetAllMediaLibraryLibraryResponseType> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(GetAllMediaLibraryLibraryResponseType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(GetAllMediaLibraryLibraryResponseType value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<GetAllMediaLibraryLibraryResponseType> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(GetAllMediaLibraryLibraryResponseType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetAllMediaLibraryLibraryResponseType 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 GetAllMediaLibraryLibraryResponseType.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum GetAllMediaLibraryLibraryResponseTypeEnum {
|
||||
|
||||
COVER_POSTER("coverPoster"),
|
||||
BACKGROUND("background"),
|
||||
SNAPSHOT("snapshot"),
|
||||
CLEAR_LOGO("clearLogo"),;
|
||||
|
||||
private final String value;
|
||||
|
||||
private GetAllMediaLibraryLibraryResponseTypeEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,42 +3,198 @@
|
||||
*/
|
||||
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.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).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* GetAllMediaLibraryLibraryType
|
||||
*
|
||||
* <p>The type of media content
|
||||
*/
|
||||
public enum GetAllMediaLibraryLibraryType {
|
||||
Movie("movie"),
|
||||
TvShow("show"),
|
||||
Season("season"),
|
||||
Episode("episode"),
|
||||
Artist("artist"),
|
||||
Album("album");
|
||||
@JsonDeserialize(using = GetAllMediaLibraryLibraryType._Deserializer.class)
|
||||
@JsonSerialize(using = GetAllMediaLibraryLibraryType._Serializer.class)
|
||||
public class GetAllMediaLibraryLibraryType {
|
||||
|
||||
public static final GetAllMediaLibraryLibraryType Movie = new GetAllMediaLibraryLibraryType("movie");
|
||||
public static final GetAllMediaLibraryLibraryType TvShow = new GetAllMediaLibraryLibraryType("show");
|
||||
public static final GetAllMediaLibraryLibraryType Season = new GetAllMediaLibraryLibraryType("season");
|
||||
public static final GetAllMediaLibraryLibraryType Episode = new GetAllMediaLibraryLibraryType("episode");
|
||||
public static final GetAllMediaLibraryLibraryType Artist = new GetAllMediaLibraryLibraryType("artist");
|
||||
public static final GetAllMediaLibraryLibraryType Album = new GetAllMediaLibraryLibraryType("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, GetAllMediaLibraryLibraryType> values = createValuesMap();
|
||||
private static final Map<String, GetAllMediaLibraryLibraryTypeEnum> enums = createEnumsMap();
|
||||
|
||||
@JsonValue
|
||||
private final String value;
|
||||
|
||||
private GetAllMediaLibraryLibraryType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a GetAllMediaLibraryLibraryType 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 GetAllMediaLibraryLibraryType
|
||||
*/
|
||||
public static GetAllMediaLibraryLibraryType of(String value) {
|
||||
synchronized (GetAllMediaLibraryLibraryType.class) {
|
||||
return values.computeIfAbsent(value, v -> new GetAllMediaLibraryLibraryType(v));
|
||||
}
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<GetAllMediaLibraryLibraryType> fromValue(String value) {
|
||||
for (GetAllMediaLibraryLibraryType o: GetAllMediaLibraryLibraryType.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
public Optional<GetAllMediaLibraryLibraryTypeEnum> 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;
|
||||
GetAllMediaLibraryLibraryType other = (GetAllMediaLibraryLibraryType) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetAllMediaLibraryLibraryType [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static GetAllMediaLibraryLibraryType[] values() {
|
||||
synchronized (GetAllMediaLibraryLibraryType.class) {
|
||||
return values.values().toArray(new GetAllMediaLibraryLibraryType[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<String, GetAllMediaLibraryLibraryType> createValuesMap() {
|
||||
Map<String, GetAllMediaLibraryLibraryType> 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, GetAllMediaLibraryLibraryTypeEnum> createEnumsMap() {
|
||||
Map<String, GetAllMediaLibraryLibraryTypeEnum> map = new HashMap<>();
|
||||
map.put("movie", GetAllMediaLibraryLibraryTypeEnum.Movie);
|
||||
map.put("show", GetAllMediaLibraryLibraryTypeEnum.TvShow);
|
||||
map.put("season", GetAllMediaLibraryLibraryTypeEnum.Season);
|
||||
map.put("episode", GetAllMediaLibraryLibraryTypeEnum.Episode);
|
||||
map.put("artist", GetAllMediaLibraryLibraryTypeEnum.Artist);
|
||||
map.put("album", GetAllMediaLibraryLibraryTypeEnum.Album);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<GetAllMediaLibraryLibraryType> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(GetAllMediaLibraryLibraryType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(GetAllMediaLibraryLibraryType value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<GetAllMediaLibraryLibraryType> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(GetAllMediaLibraryLibraryType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetAllMediaLibraryLibraryType 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 GetAllMediaLibraryLibraryType.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum GetAllMediaLibraryLibraryTypeEnum {
|
||||
|
||||
Movie("movie"),
|
||||
TvShow("show"),
|
||||
Season("season"),
|
||||
Episode("episode"),
|
||||
Artist("artist"),
|
||||
Album("album"),;
|
||||
|
||||
private final String value;
|
||||
|
||||
private GetAllMediaLibraryLibraryTypeEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return value;
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,45 @@
|
||||
*/
|
||||
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.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).
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* GetAllMediaLibraryQueryParamType
|
||||
*
|
||||
@@ -17,33 +52,159 @@ import java.util.Optional;
|
||||
* 4 = episode
|
||||
* E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
|
||||
*/
|
||||
public enum GetAllMediaLibraryQueryParamType {
|
||||
Movie(1L),
|
||||
TvShow(2L),
|
||||
Season(3L),
|
||||
Episode(4L),
|
||||
Audio(8L),
|
||||
Album(9L),
|
||||
Track(10L);
|
||||
@JsonDeserialize(using = GetAllMediaLibraryQueryParamType._Deserializer.class)
|
||||
@JsonSerialize(using = GetAllMediaLibraryQueryParamType._Serializer.class)
|
||||
public class GetAllMediaLibraryQueryParamType {
|
||||
|
||||
public static final GetAllMediaLibraryQueryParamType Movie = new GetAllMediaLibraryQueryParamType(1L);
|
||||
public static final GetAllMediaLibraryQueryParamType TvShow = new GetAllMediaLibraryQueryParamType(2L);
|
||||
public static final GetAllMediaLibraryQueryParamType Season = new GetAllMediaLibraryQueryParamType(3L);
|
||||
public static final GetAllMediaLibraryQueryParamType Episode = new GetAllMediaLibraryQueryParamType(4L);
|
||||
public static final GetAllMediaLibraryQueryParamType Audio = new GetAllMediaLibraryQueryParamType(8L);
|
||||
public static final GetAllMediaLibraryQueryParamType Album = new GetAllMediaLibraryQueryParamType(9L);
|
||||
public static final GetAllMediaLibraryQueryParamType Track = new GetAllMediaLibraryQueryParamType(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, GetAllMediaLibraryQueryParamType> values = createValuesMap();
|
||||
private static final Map<Long, GetAllMediaLibraryQueryParamTypeEnum> enums = createEnumsMap();
|
||||
|
||||
@JsonValue
|
||||
private final long value;
|
||||
|
||||
private GetAllMediaLibraryQueryParamType(long value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a GetAllMediaLibraryQueryParamType 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 GetAllMediaLibraryQueryParamType
|
||||
*/
|
||||
public static GetAllMediaLibraryQueryParamType of(long value) {
|
||||
synchronized (GetAllMediaLibraryQueryParamType.class) {
|
||||
return values.computeIfAbsent(value, v -> new GetAllMediaLibraryQueryParamType(v));
|
||||
}
|
||||
}
|
||||
|
||||
public long value() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static Optional<GetAllMediaLibraryQueryParamType> fromValue(long value) {
|
||||
for (GetAllMediaLibraryQueryParamType o: GetAllMediaLibraryQueryParamType.values()) {
|
||||
if (Objects.deepEquals(o.value, value)) {
|
||||
return Optional.of(o);
|
||||
}
|
||||
public Optional<GetAllMediaLibraryQueryParamTypeEnum> 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;
|
||||
GetAllMediaLibraryQueryParamType other = (GetAllMediaLibraryQueryParamType) obj;
|
||||
return Objects.equals(value, other.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GetAllMediaLibraryQueryParamType [value=" + value + "]";
|
||||
}
|
||||
|
||||
// return an array just like an enum
|
||||
public static GetAllMediaLibraryQueryParamType[] values() {
|
||||
synchronized (GetAllMediaLibraryQueryParamType.class) {
|
||||
return values.values().toArray(new GetAllMediaLibraryQueryParamType[] {});
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<Long, GetAllMediaLibraryQueryParamType> createValuesMap() {
|
||||
Map<Long, GetAllMediaLibraryQueryParamType> 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, GetAllMediaLibraryQueryParamTypeEnum> createEnumsMap() {
|
||||
Map<Long, GetAllMediaLibraryQueryParamTypeEnum> map = new HashMap<>();
|
||||
map.put(1L, GetAllMediaLibraryQueryParamTypeEnum.Movie);
|
||||
map.put(2L, GetAllMediaLibraryQueryParamTypeEnum.TvShow);
|
||||
map.put(3L, GetAllMediaLibraryQueryParamTypeEnum.Season);
|
||||
map.put(4L, GetAllMediaLibraryQueryParamTypeEnum.Episode);
|
||||
map.put(8L, GetAllMediaLibraryQueryParamTypeEnum.Audio);
|
||||
map.put(9L, GetAllMediaLibraryQueryParamTypeEnum.Album);
|
||||
map.put(10L, GetAllMediaLibraryQueryParamTypeEnum.Track);
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Serializer extends StdSerializer<GetAllMediaLibraryQueryParamType> {
|
||||
|
||||
protected _Serializer() {
|
||||
super(GetAllMediaLibraryQueryParamType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(GetAllMediaLibraryQueryParamType value, JsonGenerator g, SerializerProvider provider)
|
||||
throws IOException, JsonProcessingException {
|
||||
g.writeObject(value.value);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static final class _Deserializer extends StdDeserializer<GetAllMediaLibraryQueryParamType> {
|
||||
|
||||
protected _Deserializer() {
|
||||
super(GetAllMediaLibraryQueryParamType.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetAllMediaLibraryQueryParamType 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 GetAllMediaLibraryQueryParamType.of(v);
|
||||
}
|
||||
}
|
||||
|
||||
public enum GetAllMediaLibraryQueryParamTypeEnum {
|
||||
|
||||
Movie(1L),
|
||||
TvShow(2L),
|
||||
Season(3L),
|
||||
Episode(4L),
|
||||
Audio(8L),
|
||||
Album(9L),
|
||||
Track(10L),;
|
||||
|
||||
private final long value;
|
||||
|
||||
private GetAllMediaLibraryQueryParamTypeEnum(long value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public long value() {
|
||||
return value;
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user