diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 865d76a..0552d74 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,18 +1,18 @@ lockVersion: 2.0.0 id: b4f7f2df-6c4d-4150-a18f-8b74fe44eb22 management: - docChecksum: b5a2c208bc36f884f74846e5b9777fb8 + docChecksum: 59634240879b8bce1b699c21c7f4f276 docVersion: 1.0.0 - speakeasyVersion: 1.363.1 - generationVersion: 2.396.0 - releaseVersion: 0.4.0 - configChecksum: 7d6f5183f0f9da49f264d8b474501c0d + speakeasyVersion: 1.377.1 + generationVersion: 2.404.1 + releaseVersion: 0.5.0 + configChecksum: 3b33f25e938c6a67453f8e636f88064a repoURL: https://github.com/livepeer/livepeer-java.git features: java: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.1 - core: 3.28.1 + core: 3.29.4 deprecations: 2.81.1 flattening: 2.81.1 globalSecurity: 2.82.7 @@ -588,7 +588,6 @@ generatedFiles: - docs/models/components/UserTags.md - docs/models/components/Multistream.md - docs/models/components/TargetSpec.md - - docs/models/components/Target.md - docs/models/components/InputCreatorIdType.md - docs/models/components/InputCreatorId1.md - docs/models/components/InputCreatorId.md @@ -627,13 +626,11 @@ generatedFiles: - docs/models/components/TargetAddPayloadSpec.md - docs/models/components/TargetAddPayload.md - docs/models/components/MultistreamTarget.md - - docs/models/components/MultistreamTargetInput.md - docs/models/components/MultistreamTargetPatchPayload.md - docs/models/components/Events.md - docs/models/components/LastFailure.md - docs/models/components/Status.md - docs/models/components/Webhook.md - - docs/models/components/WebhookInput.md - docs/models/components/Request.md - docs/models/components/Response.md - docs/models/components/WebhookLog.md @@ -646,7 +643,6 @@ generatedFiles: - docs/models/components/NftMetadata.md - docs/models/components/Spec.md - docs/models/components/NewAssetFromUrlPayload.md - - docs/models/components/Encryption.md - docs/models/components/Ipfs1.md - docs/models/components/Ipfs.md - docs/models/components/Storage.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index bf68374..4d8f487 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true java: - version: 0.4.0 + version: 0.5.0 additionalDependencies: [] additionalPlugins: [] artifactID: livepeer diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 29523f8..647effc 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.363.1 +speakeasyVersion: 1.377.1 sources: Livepeer: sourceNamespace: livepeer @@ -8,8 +8,8 @@ sources: - latest livepeer-studio-api: sourceNamespace: livepeer-studio-api - sourceRevisionDigest: sha256:0dbaf8a7778fa745fcd3d24d1e96021ba6b57b27ea1a0b2f0496721ad0e044f8 - sourceBlobDigest: sha256:e52a771ee6c6da0462e04215ca8263268a4464d44554e9089aec8c03b65037a6 + sourceRevisionDigest: sha256:9333277669bf8fb46063579d611518570aff37c2bfb20e0a90fd3b0c030ca2ad + sourceBlobDigest: sha256:1705d75b1de89f7c2e60643ed2c2aaced22b577da6f2935b1c2e09d533bb7182 tags: - latest - main @@ -17,8 +17,8 @@ targets: livepeer-java: source: livepeer-studio-api sourceNamespace: livepeer-studio-api - sourceRevisionDigest: sha256:0dbaf8a7778fa745fcd3d24d1e96021ba6b57b27ea1a0b2f0496721ad0e044f8 - sourceBlobDigest: sha256:e52a771ee6c6da0462e04215ca8263268a4464d44554e9089aec8c03b65037a6 + sourceRevisionDigest: sha256:9333277669bf8fb46063579d611518570aff37c2bfb20e0a90fd3b0c030ca2ad + sourceBlobDigest: sha256:1705d75b1de89f7c2e60643ed2c2aaced22b577da6f2935b1c2e09d533bb7182 outLocation: /github/workspace/repo my-first-target: source: Livepeer diff --git a/README.md b/README.md index 5a4c8dc..cb7a2f0 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'studio.livepeer:livepeer:0.4.0' +implementation 'studio.livepeer:livepeer:0.5.0' ``` Maven: @@ -26,7 +26,7 @@ Maven: studio.livepeer livepeer - 0.4.0 + 0.5.0 ``` diff --git a/RELEASES.md b/RELEASES.md index cc78889..b1002f1 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -38,4 +38,12 @@ Based on: - OpenAPI Doc - Speakeasy CLI 1.363.1 (2.396.0) https://github.com/speakeasy-api/speakeasy ### Generated -- [java v0.4.0] . \ No newline at end of file +- [java v0.4.0] . + +## 2024-08-22 00:09:34 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.377.1 (2.404.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.5.0] . \ No newline at end of file diff --git a/build.gradle b/build.gradle index 4158c6d..630190a 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,8 @@ plugins { // Apply the java-library plugin for API and implementation separation. id 'java-library' + id 'maven-publish' + id 'signing' } compileJava.options.encoding = "UTF-8" @@ -30,15 +32,99 @@ java { withJavadocJar() } +model { + tasks.generatePomFileForMavenPublication { + destination = file("$buildDir/pom.xml") + } +} + +jar { + dependsOn(":generatePomFileForMavenPublication") + + into("META-INF/maven/studio.livepeer/livepeer") { + from("$buildDir/pom.xml") + } +} + +javadoc { + options.encoding = "UTF-8" + + if(JavaVersion.current().isJava9Compatible()) { + options.addBooleanOption('html5', true) + } + options.addStringOption('Xdoclint:none', '-quiet') +} + tasks.withType(Javadoc) { failOnError false options.addStringOption('Xdoclint:none', '-quiet') } +group = "studio.livepeer" +version = "0.5.0" + +sourcesJar { + archiveBaseName = "livepeer" +} + +javadocJar { + archiveBaseName = "livepeer" +} + + +publishing { + + publications { + maven(MavenPublication) { + groupId = 'studio.livepeer' + artifactId = 'livepeer' + version = '0.5.0' + + from components.java + + pom { + name = 'My Company Java SDK' + description = 'SDK enabling Java developers to easily integrate with the My Company API.' + url = 'https://github.com/owner/repo' + scm { + url = 'github.com/owner/repo' + connection = 'scm:git:ssh://git@github.com/owner/repo.git' + } + licenses { + license { + name = 'The MIT License (MIT)' + url = 'https://mit-license.org/' + } + } + developers { + developer { + name = 'My Company' + organization = 'My Company' + email = 'info@mycompany.com' + } + } + organization { + name = 'My Company' + url = 'www.mycompany.com' + } + } + } + } +} + +if (!project.hasProperty('skip.signing')) { + signing { + def signingKey = findProperty("signingKey") + def signingPassphrase = findProperty("signingPassphrase") + useInMemoryPgpKeys(signingKey, signingPassphrase) + sign publishing.publications.maven + } +} + dependencies { - implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0' - implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.0' - implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.0' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' implementation 'org.apache.httpcomponents:httpclient:4.5.14' implementation 'org.apache.httpcomponents:httpmime:4.5.14' diff --git a/codeSamples.yaml b/codeSamples.yaml index 0d1a870..cde5191 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,18 +3,18 @@ info: title: CodeSamples overlay for java target version: 0.0.0 actions: - - target: $["paths"]["/room/{id}/egress"]["delete"] + - target: $["paths"]["/access-control/signing-key"]["post"] update: x-codeSamples: - lang: java - label: stopRoomEgress + label: createSigningKey source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.StopRoomEgressResponse; + import studio.livepeer.livepeer.models.operations.CreateSigningKeyResponse; public class Application { @@ -24,11 +24,12 @@ actions: .apiKey("") .build(); - StopRoomEgressResponse res = sdk.room().stopEgress() - .id("") + CreateSigningKeyResponse res = sdk.accessControl().create() .call(); - // handle response + if (res.signingKey().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -39,19 +40,18 @@ actions: } } - - target: $["paths"]["/room/{id}/user"]["post"] + - target: $["paths"]["/playback/{id}"]["get"] update: x-codeSamples: - lang: java - label: createRoomUser + label: getPlaybackInfo source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.RoomUserPayload; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.CreateRoomUserResponse; + import studio.livepeer.livepeer.models.operations.GetPlaybackInfoResponse; public class Application { @@ -61,18 +61,16 @@ actions: .apiKey("") .build(); - CreateRoomUserResponse res = sdk.room().createUser() + GetPlaybackInfoResponse res = sdk.playback().get() .id("") - .roomUserPayload(RoomUserPayload.builder() - .name("name") - .canPublish(true) - .canPublishData(true) - .build()) .call(); - if (res.roomUserResponse().isPresent()) { + if (res.playbackInfo().isPresent()) { // handle response } + } catch (studio.livepeer.livepeer.models.errors.Error e) { + // handle exception + throw e; } catch (SDKError e) { // handle exception throw e; @@ -83,18 +81,18 @@ actions: } } - - target: $["paths"]["/multistream/target"]["get"] + - target: $["paths"]["/stream/{id}"]["delete"] update: x-codeSamples: - lang: java - label: getMultistreamTargets + label: deleteStream source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetMultistreamTargetsResponse; + import studio.livepeer.livepeer.models.operations.DeleteStreamResponse; public class Application { @@ -104,10 +102,47 @@ actions: .apiKey("") .build(); - GetMultistreamTargetsResponse res = sdk.multistream().getAll() + DeleteStreamResponse res = sdk.stream().delete() + .id("") .call(); - if (res.data().isPresent()) { + // handle response + } catch (SDKError e) { + // handle exception + throw e; + } catch (Exception e) { + // handle exception + throw e; + } + + } + } + - target: $["paths"]["/multistream/target/{id}"]["get"] + update: + x-codeSamples: + - lang: java + label: getMultistreamTarget + source: |- + package hello.world; + + import java.lang.Exception; + import studio.livepeer.livepeer.Livepeer; + import studio.livepeer.livepeer.models.errors.SDKError; + import studio.livepeer.livepeer.models.operations.GetMultistreamTargetResponse; + + public class Application { + + public static void main(String[] args) throws Exception { + try { + Livepeer sdk = Livepeer.builder() + .apiKey("") + .build(); + + GetMultistreamTargetResponse res = sdk.multistream().get() + .id("") + .call(); + + if (res.multistreamTarget().isPresent()) { // handle response } } catch (SDKError e) { @@ -120,19 +155,21 @@ actions: } } - - target: $["paths"]["/stream/{parentId}/sessions"]["get"] + - target: $["paths"]["/webhook"]["post"] update: x-codeSamples: - lang: java - label: getRecordedSessions + label: createWebhook source: |- package hello.world; import java.lang.Exception; + import java.util.List; import studio.livepeer.livepeer.Livepeer; + import studio.livepeer.livepeer.models.components.Events; + import studio.livepeer.livepeer.models.components.WebhookInput; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetRecordedSessionsResponse; - import studio.livepeer.livepeer.models.operations.Record; + import studio.livepeer.livepeer.models.operations.CreateWebhookResponse; public class Application { @@ -142,12 +179,22 @@ actions: .apiKey("") .build(); - GetRecordedSessionsResponse res = sdk.session().getRecorded() - .parentId("") - .record(Record.of(true)) + WebhookInput req = WebhookInput.builder() + .name("test_webhook") + .url("https://my-service.com/webhook") + .projectId("aac12556-4d65-4d34-9fb6-d1f0985eb0a9") + .events(List.of( + Events.STREAM_STARTED, + Events.STREAM_IDLE)) + .sharedSecret("my-secret") + .streamId("de7818e7-610a-4057-8f6f-b785dc1e6f88") + .build(); + + CreateWebhookResponse res = sdk.webhook().create() + .request(req) .call(); - if (res.data().isPresent()) { + if (res.webhook().isPresent()) { // handle response } } catch (SDKError e) { @@ -235,18 +282,18 @@ actions: } } - - target: $["paths"]["/room/{id}/user/{userId}"]["delete"] + - target: $["paths"]["/stream/{id}/clips"]["get"] update: x-codeSamples: - lang: java - label: deleteRoomUser + label: getClips source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.DeleteRoomUserResponse; + import studio.livepeer.livepeer.models.operations.GetClipsResponse; public class Application { @@ -256,12 +303,13 @@ actions: .apiKey("") .build(); - DeleteRoomUserResponse res = sdk.room().deleteUser() + GetClipsResponse res = sdk.stream().getClips() .id("") - .userId("") .call(); - // handle response + if (res.data().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -272,20 +320,18 @@ actions: } } - - target: $["paths"]["/data/views/now"]["get"] + - target: $["paths"]["/task/{taskId}"]["get"] update: x-codeSamples: - lang: java - label: getRealtimeViewershipNow + label: getTask source: |- package hello.world; import java.lang.Exception; - import java.util.List; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.BreakdownBy; - import studio.livepeer.livepeer.models.operations.GetRealtimeViewershipNowResponse; + import studio.livepeer.livepeer.models.operations.GetTaskResponse; public class Application { @@ -295,14 +341,11 @@ actions: .apiKey("") .build(); - GetRealtimeViewershipNowResponse res = sdk.metrics().getRealtimeViewership() - .playbackId("") - .creatorId("") - .breakdownBy(List.of( - BreakdownBy.PLAYBACK_ID)) + GetTaskResponse res = sdk.task().get() + .taskId("") .call(); - if (res.data().isPresent()) { + if (res.task().isPresent()) { // handle response } } catch (SDKError e) { @@ -315,18 +358,19 @@ actions: } } - - target: $["paths"]["/stream/{id}"]["get"] + - target: $["paths"]["/clip"]["post"] update: x-codeSamples: - lang: java - label: getStream + label: createClip source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; + import studio.livepeer.livepeer.models.components.ClipPayload; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetStreamResponse; + import studio.livepeer.livepeer.models.operations.CreateClipResponse; public class Application { @@ -336,11 +380,19 @@ actions: .apiKey("") .build(); - GetStreamResponse res = sdk.stream().get() - .id("") + ClipPayload req = ClipPayload.builder() + .playbackId("eaw4nk06ts2d0mzb") + .startTime(1587667174725d) + .endTime(1587667174725d) + .name("My Clip") + .sessionId("de7818e7-610a-4057-8f6f-b785dc1e6f88") + .build(); + + CreateClipResponse res = sdk.stream().createClip() + .request(req) .call(); - if (res.stream().isPresent()) { + if (res.data().isPresent()) { // handle response } } catch (SDKError e) { @@ -353,18 +405,21 @@ actions: } } - - target: $["paths"]["/room/{id}"]["get"] + - target: $["paths"]["/webhook/{id}"]["put"] update: x-codeSamples: - lang: java - label: getRoom + label: updateWebhook source: |- package hello.world; import java.lang.Exception; + import java.util.List; import studio.livepeer.livepeer.Livepeer; + import studio.livepeer.livepeer.models.components.Events; + import studio.livepeer.livepeer.models.components.WebhookInput; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetRoomResponse; + import studio.livepeer.livepeer.models.operations.UpdateWebhookResponse; public class Application { @@ -374,11 +429,21 @@ actions: .apiKey("") .build(); - GetRoomResponse res = sdk.room().get() + UpdateWebhookResponse res = sdk.webhook().update() .id("") + .webhook(WebhookInput.builder() + .name("test_webhook") + .url("https://my-service.com/webhook") + .projectId("aac12556-4d65-4d34-9fb6-d1f0985eb0a9") + .events(List.of( + Events.STREAM_STARTED, + Events.STREAM_IDLE)) + .sharedSecret("my-secret") + .streamId("de7818e7-610a-4057-8f6f-b785dc1e6f88") + .build()) .call(); - if (res.room().isPresent()) { + if (res.webhook().isPresent()) { // handle response } } catch (SDKError e) { @@ -391,18 +456,18 @@ actions: } } - - target: $["paths"]["/stream"]["get"] + - target: $["paths"]["/room/{id}/egress"]["delete"] update: x-codeSamples: - lang: java - label: getStreams + label: stopRoomEgress source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetStreamsResponse; + import studio.livepeer.livepeer.models.operations.StopRoomEgressResponse; public class Application { @@ -412,13 +477,11 @@ actions: .apiKey("") .build(); - GetStreamsResponse res = sdk.stream().getAll() - .streamsonly("") + StopRoomEgressResponse res = sdk.room().stopEgress() + .id("") .call(); - if (res.data().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -429,19 +492,19 @@ actions: } } - - target: $["paths"]["/clip"]["post"] + - target: $["paths"]["/data/views/query"]["get"] update: x-codeSamples: - lang: java - label: createClip + label: getViewershipMetrics source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.ClipPayload; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.CreateClipResponse; + import studio.livepeer.livepeer.models.operations.GetViewershipMetricsRequest; + import studio.livepeer.livepeer.models.operations.GetViewershipMetricsResponse; public class Application { @@ -451,15 +514,10 @@ actions: .apiKey("") .build(); - ClipPayload req = ClipPayload.builder() - .playbackId("eaw4nk06ts2d0mzb") - .startTime(1587667174725d) - .endTime(1587667174725d) - .name("My Clip") - .sessionId("de7818e7-610a-4057-8f6f-b785dc1e6f88") + GetViewershipMetricsRequest req = GetViewershipMetricsRequest.builder() .build(); - CreateClipResponse res = sdk.stream().createClip() + GetViewershipMetricsResponse res = sdk.metrics().getViewership() .request(req) .call(); @@ -476,18 +534,18 @@ actions: } } - - target: $["paths"]["/stream/{id}/clips"]["get"] + - target: $["paths"]["/access-control/signing-key"]["get"] update: x-codeSamples: - lang: java - label: getClips + label: getSigningKeys source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetClipsResponse; + import studio.livepeer.livepeer.models.operations.GetSigningKeysResponse; public class Application { @@ -497,8 +555,7 @@ actions: .apiKey("") .build(); - GetClipsResponse res = sdk.stream().getClips() - .id("") + GetSigningKeysResponse res = sdk.accessControl().getAll() .call(); if (res.data().isPresent()) { @@ -561,18 +618,18 @@ actions: } } - - target: $["paths"]["/playback/{id}"]["get"] + - target: $["paths"]["/room"]["post"] update: x-codeSamples: - lang: java - label: getPlaybackInfo + label: createRoom source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetPlaybackInfoResponse; + import studio.livepeer.livepeer.models.operations.CreateRoomResponse; public class Application { @@ -582,16 +639,12 @@ actions: .apiKey("") .build(); - GetPlaybackInfoResponse res = sdk.playback().get() - .id("") + CreateRoomResponse res = sdk.room().create() .call(); - if (res.playbackInfo().isPresent()) { + if (res.createRoomResponse().isPresent()) { // handle response } - } catch (studio.livepeer.livepeer.models.errors.Error e) { - // handle exception - throw e; } catch (SDKError e) { // handle exception throw e; @@ -602,18 +655,18 @@ actions: } } - - target: $["paths"]["/stream/{id}"]["delete"] + - target: $["paths"]["/room/{id}"]["get"] update: x-codeSamples: - lang: java - label: deleteStream + label: getRoom source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.DeleteStreamResponse; + import studio.livepeer.livepeer.models.operations.GetRoomResponse; public class Application { @@ -623,11 +676,13 @@ actions: .apiKey("") .build(); - DeleteStreamResponse res = sdk.stream().delete() + GetRoomResponse res = sdk.room().get() .id("") .call(); - // handle response + if (res.room().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -638,19 +693,18 @@ actions: } } - - target: $["paths"]["/room/{id}/user/{userId}"]["put"] + - target: $["paths"]["/room/{id}"]["delete"] update: x-codeSamples: - lang: java - label: updateRoomUser + label: deleteRoom source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.RoomUserUpdatePayload; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.UpdateRoomUserResponse; + import studio.livepeer.livepeer.models.operations.DeleteRoomResponse; public class Application { @@ -660,13 +714,8 @@ actions: .apiKey("") .build(); - UpdateRoomUserResponse res = sdk.room().updateUser() + DeleteRoomResponse res = sdk.room().delete() .id("") - .userId("") - .roomUserUpdatePayload(RoomUserUpdatePayload.builder() - .canPublish(true) - .canPublishData(true) - .build()) .call(); // handle response @@ -680,34 +729,18 @@ actions: } } - - target: $["paths"]["/stream"]["post"] + - target: $["paths"]["/room/{id}/user/{userId}"]["get"] update: x-codeSamples: - lang: java - label: createStream + label: getRoomUser source: |- package hello.world; import java.lang.Exception; - import java.util.List; - import java.util.Map; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.FfmpegProfile; - import studio.livepeer.livepeer.models.components.Location; - import studio.livepeer.livepeer.models.components.Multistream; - import studio.livepeer.livepeer.models.components.NewStreamPayload; - import studio.livepeer.livepeer.models.components.NewStreamPayloadRecordingSpec; - import studio.livepeer.livepeer.models.components.PlaybackPolicy; - import studio.livepeer.livepeer.models.components.Profile; - import studio.livepeer.livepeer.models.components.Pull; - import studio.livepeer.livepeer.models.components.Target; - import studio.livepeer.livepeer.models.components.TargetSpec; - import studio.livepeer.livepeer.models.components.TranscodeProfile; - import studio.livepeer.livepeer.models.components.TranscodeProfileEncoder; - import studio.livepeer.livepeer.models.components.TranscodeProfileProfile; - import studio.livepeer.livepeer.models.components.Type; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.CreateStreamResponse; + import studio.livepeer.livepeer.models.operations.GetRoomUserResponse; public class Application { @@ -717,71 +750,12 @@ actions: .apiKey("") .build(); - NewStreamPayload req = NewStreamPayload.builder() - .name("test_stream") - .pull(Pull.builder() - .source("https://myservice.com/live/stream.flv") - .headers(Map.ofEntries( - Map.entry("Authorization", "Bearer 123"))) - .location(Location.builder() - .lat(39.739d) - .lon(-104.988d) - .build()) - .build()) - .playbackPolicy(PlaybackPolicy.builder() - .type(Type.WEBHOOK) - .webhookId("1bde4o2i6xycudoy") - .webhookContext(Map.ofEntries( - Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) - .build()) - .profiles(List.of( - FfmpegProfile.builder() - .width(1280L) - .name("720p") - .height(720L) - .bitrate(3000000L) - .fps(30L) - .fpsDen(1L) - .quality(23L) - .gop("2") - .profile(Profile.H264_BASELINE) - .build())) - .record(false) - .recordingSpec(NewStreamPayloadRecordingSpec.builder() - .profiles(List.of( - TranscodeProfile.builder() - .bitrate(3000000L) - .width(1280L) - .name("720p") - .height(720L) - .quality(23L) - .fps(30L) - .fpsDen(1L) - .gop("2") - .profile(TranscodeProfileProfile.H264_BASELINE) - .encoder(TranscodeProfileEncoder.H264) - .build())) - .build()) - .multistream(Multistream.builder() - .targets(List.of( - Target.builder() - .profile("720p0") - .videoOnly(false) - .id("PUSH123") - .spec(TargetSpec.builder() - .url("rtmps://live.my-service.tv/channel/secretKey") - .name("My target") - .build()) - .build())) - .build()) - .build(); - - CreateStreamResponse res = sdk.stream().create() - .request(req) + GetRoomUserResponse res = sdk.room().getUser() + .id("") + .userId("") .call(); - if (res.stream().isPresent()) { + if (res.getRoomUserResponse().isPresent()) { // handle response } } catch (SDKError e) { @@ -794,18 +768,18 @@ actions: } } - - target: $["paths"]["/multistream/target/{id}"]["delete"] + - target: $["paths"]["/webhook"]["get"] update: x-codeSamples: - lang: java - label: deleteMultistreamTarget + label: getWebhooks source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.DeleteMultistreamTargetResponse; + import studio.livepeer.livepeer.models.operations.GetWebhooksResponse; public class Application { @@ -815,11 +789,12 @@ actions: .apiKey("") .build(); - DeleteMultistreamTargetResponse res = sdk.multistream().delete() - .id("") + GetWebhooksResponse res = sdk.webhook().getAll() .call(); - // handle response + if (res.data().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -830,18 +805,18 @@ actions: } } - - target: $["paths"]["/webhook/{id}/log/{logId}"]["get"] + - target: $["paths"]["/webhook/{id}"]["get"] update: x-codeSamples: - lang: java - label: getWebhookLog + label: getWebhook source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetWebhookLogResponse; + import studio.livepeer.livepeer.models.operations.GetWebhookResponse; public class Application { @@ -851,12 +826,11 @@ actions: .apiKey("") .build(); - GetWebhookLogResponse res = sdk.webhook().getLog() + GetWebhookResponse res = sdk.webhook().get() .id("") - .logId("") .call(); - if (res.webhookLog().isPresent()) { + if (res.webhook().isPresent()) { // handle response } } catch (SDKError e) { @@ -869,26 +843,19 @@ actions: } } - - target: $["paths"]["/asset/upload/url"]["post"] + - target: $["paths"]["/room/{id}/user"]["post"] update: x-codeSamples: - lang: java - label: uploadAsset + label: createRoomUser source: |- package hello.world; import java.lang.Exception; - import java.util.List; - import java.util.Map; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.NewAssetFromUrlPayload; - import studio.livepeer.livepeer.models.components.PlaybackPolicy; - import studio.livepeer.livepeer.models.components.TranscodeProfile; - import studio.livepeer.livepeer.models.components.TranscodeProfileEncoder; - import studio.livepeer.livepeer.models.components.TranscodeProfileProfile; - import studio.livepeer.livepeer.models.components.Type; + import studio.livepeer.livepeer.models.components.RoomUserPayload; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.UploadAssetResponse; + import studio.livepeer.livepeer.models.operations.CreateRoomUserResponse; public class Application { @@ -898,37 +865,16 @@ actions: .apiKey("") .build(); - NewAssetFromUrlPayload req = NewAssetFromUrlPayload.builder() - .name("filename.mp4") - .url("https://s3.amazonaws.com/my-bucket/path/filename.mp4") - .staticMp4(true) - .playbackPolicy(PlaybackPolicy.builder() - .type(Type.WEBHOOK) - .webhookId("1bde4o2i6xycudoy") - .webhookContext(Map.ofEntries( - Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) + CreateRoomUserResponse res = sdk.room().createUser() + .id("") + .roomUserPayload(RoomUserPayload.builder() + .name("name") + .canPublish(true) + .canPublishData(true) .build()) - .profiles(List.of( - TranscodeProfile.builder() - .bitrate(3000000L) - .width(1280L) - .name("720p") - .height(720L) - .quality(23L) - .fps(30L) - .fpsDen(1L) - .gop("2") - .profile(TranscodeProfileProfile.H264_BASELINE) - .encoder(TranscodeProfileEncoder.H264) - .build())) - .build(); - - UploadAssetResponse res = sdk.asset().createViaUrl() - .request(req) .call(); - if (res.twoHundredApplicationJsonData().isPresent()) { + if (res.roomUserResponse().isPresent()) { // handle response } } catch (SDKError e) { @@ -941,18 +887,19 @@ actions: } } - - target: $["paths"]["/session"]["get"] + - target: $["paths"]["/multistream/target"]["post"] update: x-codeSamples: - lang: java - label: getSessions + label: createMultistreamTarget source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; + import studio.livepeer.livepeer.models.components.MultistreamTargetInput; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetSessionsResponse; + import studio.livepeer.livepeer.models.operations.CreateMultistreamTargetResponse; public class Application { @@ -962,10 +909,15 @@ actions: .apiKey("") .build(); - GetSessionsResponse res = sdk.session().getAll() + MultistreamTargetInput req = MultistreamTargetInput.builder() + .url("rtmps://live.my-service.tv/channel/secretKey") + .build(); + + CreateMultistreamTargetResponse res = sdk.multistream().create() + .request(req) .call(); - if (res.data().isPresent()) { + if (res.multistreamTarget().isPresent()) { // handle response } } catch (SDKError e) { @@ -978,19 +930,19 @@ actions: } } - - target: $["paths"]["/data/usage/query"]["get"] + - target: $["paths"]["/multistream/target/{id}"]["patch"] update: x-codeSamples: - lang: java - label: getUsageMetrics + label: updateMultistreamTarget source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; + import studio.livepeer.livepeer.models.components.MultistreamTargetPatchPayload; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetUsageMetricsRequest; - import studio.livepeer.livepeer.models.operations.GetUsageMetricsResponse; + import studio.livepeer.livepeer.models.operations.UpdateMultistreamTargetResponse; public class Application { @@ -1000,16 +952,14 @@ actions: .apiKey("") .build(); - GetUsageMetricsRequest req = GetUsageMetricsRequest.builder() - .build(); - - GetUsageMetricsResponse res = sdk.metrics().getUsage() - .request(req) + UpdateMultistreamTargetResponse res = sdk.multistream().update() + .id("") + .multistreamTargetPatchPayload(MultistreamTargetPatchPayload.builder() + .url("rtmps://live.my-service.tv/channel/secretKey") + .build()) .call(); - if (res.usageMetric().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -1020,18 +970,26 @@ actions: } } - - target: $["paths"]["/task"]["get"] + - target: $["paths"]["/asset/request-upload"]["post"] update: x-codeSamples: - lang: java - label: getTasks + label: requestUpload source: |- package hello.world; import java.lang.Exception; + import java.util.List; + import java.util.Map; import studio.livepeer.livepeer.Livepeer; + import studio.livepeer.livepeer.models.components.NewAssetPayload; + import studio.livepeer.livepeer.models.components.PlaybackPolicy; + import studio.livepeer.livepeer.models.components.TranscodeProfile; + import studio.livepeer.livepeer.models.components.TranscodeProfileEncoder; + import studio.livepeer.livepeer.models.components.TranscodeProfileProfile; + import studio.livepeer.livepeer.models.components.Type; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetTasksResponse; + import studio.livepeer.livepeer.models.operations.RequestUploadResponse; public class Application { @@ -1041,7 +999,33 @@ actions: .apiKey("") .build(); - GetTasksResponse res = sdk.task().getAll() + NewAssetPayload req = NewAssetPayload.builder() + .name("filename.mp4") + .staticMp4(true) + .playbackPolicy(PlaybackPolicy.builder() + .type(Type.WEBHOOK) + .webhookId("1bde4o2i6xycudoy") + .webhookContext(Map.ofEntries( + Map.entry("streamerId", "my-custom-id"))) + .refreshInterval(600d) + .build()) + .profiles(List.of( + TranscodeProfile.builder() + .bitrate(3000000L) + .width(1280L) + .name("720p") + .height(720L) + .quality(23L) + .fps(30L) + .fpsDen(1L) + .gop("2") + .profile(TranscodeProfileProfile.H264_BASELINE) + .encoder(TranscodeProfileEncoder.H264) + .build())) + .build(); + + RequestUploadResponse res = sdk.asset().create() + .request(req) .call(); if (res.data().isPresent()) { @@ -1057,19 +1041,19 @@ actions: } } - - target: $["paths"]["/multistream/target/{id}"]["patch"] + - target: $["paths"]["/room/{id}/user/{userId}"]["put"] update: x-codeSamples: - lang: java - label: updateMultistreamTarget + label: updateRoomUser source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.MultistreamTargetPatchPayload; + import studio.livepeer.livepeer.models.components.RoomUserUpdatePayload; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.UpdateMultistreamTargetResponse; + import studio.livepeer.livepeer.models.operations.UpdateRoomUserResponse; public class Application { @@ -1079,10 +1063,12 @@ actions: .apiKey("") .build(); - UpdateMultistreamTargetResponse res = sdk.multistream().update() + UpdateRoomUserResponse res = sdk.room().updateUser() .id("") - .multistreamTargetPatchPayload(MultistreamTargetPatchPayload.builder() - .url("rtmps://live.my-service.tv/channel/secretKey") + .userId("") + .roomUserUpdatePayload(RoomUserUpdatePayload.builder() + .canPublish(true) + .canPublishData(true) .build()) .call(); @@ -1097,18 +1083,18 @@ actions: } } - - target: $["paths"]["/multistream/target/{id}"]["get"] + - target: $["paths"]["/data/views/query/total/{playbackId}"]["get"] update: x-codeSamples: - lang: java - label: getMultistreamTarget + label: getPublicViewershipMetrics source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetMultistreamTargetResponse; + import studio.livepeer.livepeer.models.operations.GetPublicViewershipMetricsResponse; public class Application { @@ -1118,11 +1104,11 @@ actions: .apiKey("") .build(); - GetMultistreamTargetResponse res = sdk.multistream().get() - .id("") + GetPublicViewershipMetricsResponse res = sdk.metrics().getPublicViewership() + .playbackId("") .call(); - if (res.multistreamTarget().isPresent()) { + if (res.data().isPresent()) { // handle response } } catch (SDKError e) { @@ -1135,21 +1121,18 @@ actions: } } - - target: $["paths"]["/webhook/{id}"]["put"] + - target: $["paths"]["/stream/{id}/multistream/{targetId}"]["delete"] update: x-codeSamples: - lang: java - label: updateWebhook + label: removeMultistreamTarget source: |- package hello.world; import java.lang.Exception; - import java.util.List; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.Events; - import studio.livepeer.livepeer.models.components.WebhookInput; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.UpdateWebhookResponse; + import studio.livepeer.livepeer.models.operations.RemoveMultistreamTargetResponse; public class Application { @@ -1159,23 +1142,12 @@ actions: .apiKey("") .build(); - UpdateWebhookResponse res = sdk.webhook().update() + RemoveMultistreamTargetResponse res = sdk.stream().removeMultistreamTarget() .id("") - .webhook(WebhookInput.builder() - .name("test_webhook") - .url("https://my-service.com/webhook") - .projectId("aac12556-4d65-4d34-9fb6-d1f0985eb0a9") - .events(List.of( - Events.STREAM_STARTED, - Events.STREAM_IDLE)) - .sharedSecret("my-secret") - .streamId("de7818e7-610a-4057-8f6f-b785dc1e6f88") - .build()) + .targetId("") .call(); - if (res.webhook().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -1186,18 +1158,18 @@ actions: } } - - target: $["paths"]["/asset/{assetId}"]["delete"] + - target: $["paths"]["/webhook/{id}"]["delete"] update: x-codeSamples: - lang: java - label: deleteAsset + label: deleteWebhook source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.DeleteAssetResponse; + import studio.livepeer.livepeer.models.operations.DeleteWebhookResponse; public class Application { @@ -1207,11 +1179,13 @@ actions: .apiKey("") .build(); - DeleteAssetResponse res = sdk.asset().delete() - .assetId("") + DeleteWebhookResponse res = sdk.webhook().delete() + .id("") .call(); - // handle response + if (res.webhook().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -1222,18 +1196,18 @@ actions: } } - - target: $["paths"]["/room"]["post"] + - target: $["paths"]["/room/{id}/user/{userId}"]["delete"] update: x-codeSamples: - lang: java - label: createRoom + label: deleteRoomUser source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.CreateRoomResponse; + import studio.livepeer.livepeer.models.operations.DeleteRoomUserResponse; public class Application { @@ -1243,12 +1217,12 @@ actions: .apiKey("") .build(); - CreateRoomResponse res = sdk.room().create() + DeleteRoomUserResponse res = sdk.room().deleteUser() + .id("") + .userId("") .call(); - if (res.createRoomResponse().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -1259,19 +1233,20 @@ actions: } } - - target: $["paths"]["/data/views/query"]["get"] + - target: $["paths"]["/data/views/now"]["get"] update: x-codeSamples: - lang: java - label: getViewershipMetrics + label: getRealtimeViewershipNow source: |- package hello.world; import java.lang.Exception; + import java.util.List; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetViewershipMetricsRequest; - import studio.livepeer.livepeer.models.operations.GetViewershipMetricsResponse; + import studio.livepeer.livepeer.models.operations.BreakdownBy; + import studio.livepeer.livepeer.models.operations.GetRealtimeViewershipNowResponse; public class Application { @@ -1281,11 +1256,11 @@ actions: .apiKey("") .build(); - GetViewershipMetricsRequest req = GetViewershipMetricsRequest.builder() - .build(); - - GetViewershipMetricsResponse res = sdk.metrics().getViewership() - .request(req) + GetRealtimeViewershipNowResponse res = sdk.metrics().getRealtimeViewership() + .playbackId("") + .creatorId("") + .breakdownBy(List.of( + BreakdownBy.PLAYBACK_ID)) .call(); if (res.data().isPresent()) { @@ -1301,18 +1276,33 @@ actions: } } - - target: $["paths"]["/stream/{id}/terminate"]["delete"] + - target: $["paths"]["/transcode"]["post"] update: x-codeSamples: - lang: java - label: terminateStream + label: transcodeVideo source: |- package hello.world; import java.lang.Exception; + import java.util.List; import studio.livepeer.livepeer.Livepeer; + import studio.livepeer.livepeer.models.components.Fmp4; + import studio.livepeer.livepeer.models.components.Hls; + import studio.livepeer.livepeer.models.components.Input1; + import studio.livepeer.livepeer.models.components.Input; + import studio.livepeer.livepeer.models.components.Mp4; + import studio.livepeer.livepeer.models.components.Outputs; + import studio.livepeer.livepeer.models.components.Storage1; + import studio.livepeer.livepeer.models.components.StorageCredentials; + import studio.livepeer.livepeer.models.components.StorageType; + import studio.livepeer.livepeer.models.components.TranscodePayload; + import studio.livepeer.livepeer.models.components.TranscodePayloadStorage; + import studio.livepeer.livepeer.models.components.TranscodeProfile; + import studio.livepeer.livepeer.models.components.TranscodeProfileEncoder; + import studio.livepeer.livepeer.models.components.TranscodeProfileProfile; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.TerminateStreamResponse; + import studio.livepeer.livepeer.models.operations.TranscodeVideoResponse; public class Application { @@ -1322,50 +1312,52 @@ actions: .apiKey("") .build(); - TerminateStreamResponse res = sdk.stream().terminate() - .id("") - .call(); - - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - - } - } - - target: $["paths"]["/access-control/signing-key/{keyId}"]["patch"] - update: - x-codeSamples: - - lang: java - label: updateSigningKey - source: |- - package hello.world; - - import java.lang.Exception; - import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.UpdateSigningKeyRequestBody; - import studio.livepeer.livepeer.models.operations.UpdateSigningKeyResponse; - - public class Application { - - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("") + TranscodePayload req = TranscodePayload.builder() + .input(Input.of(Input1.builder() + .url("https://s3.amazonaws.com/bucket/file.mp4") + .build())) + .storage(TranscodePayloadStorage.of(Storage1.builder() + .type(StorageType.S3) + .endpoint("https://gateway.storjshare.io") + .bucket("outputbucket") + .credentials(StorageCredentials.builder() + .accessKeyId("AKIAIOSFODNN7EXAMPLE") + .secretAccessKey("wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY") + .build()) + .build())) + .outputs(Outputs.builder() + .hls(Hls.builder() + .path("/samplevideo/hls") + .build()) + .mp4(Mp4.builder() + .path("/samplevideo/mp4") + .build()) + .fmp4(Fmp4.builder() + .path("/samplevideo/fmp4") + .build()) + .build()) + .profiles(List.of( + TranscodeProfile.builder() + .bitrate(3000000L) + .width(1280L) + .name("720p") + .height(720L) + .quality(23L) + .fps(30L) + .fpsDen(1L) + .gop("2") + .profile(TranscodeProfileProfile.H264_BASELINE) + .encoder(TranscodeProfileEncoder.H264) + .build())) .build(); - UpdateSigningKeyResponse res = sdk.accessControl().update() - .keyId("") - .requestBody(UpdateSigningKeyRequestBody.builder() - .build()) + TranscodeVideoResponse res = sdk.transcode().create() + .request(req) .call(); - // handle response + if (res.task().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -1376,18 +1368,18 @@ actions: } } - - target: $["paths"]["/room/{id}"]["delete"] + - target: $["paths"]["/webhook/{id}/log"]["get"] update: x-codeSamples: - lang: java - label: deleteRoom + label: getWebhookLogs source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.DeleteRoomResponse; + import studio.livepeer.livepeer.models.operations.GetWebhookLogsResponse; public class Application { @@ -1397,11 +1389,13 @@ actions: .apiKey("") .build(); - DeleteRoomResponse res = sdk.room().delete() + GetWebhookLogsResponse res = sdk.webhook().getLogs() .id("") .call(); - // handle response + if (res.data().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -1412,11 +1406,11 @@ actions: } } - - target: $["paths"]["/asset/request-upload"]["post"] + - target: $["paths"]["/asset/upload/url"]["post"] update: x-codeSamples: - lang: java - label: requestUpload + label: uploadAsset source: |- package hello.world; @@ -1424,14 +1418,14 @@ actions: import java.util.List; import java.util.Map; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.NewAssetPayload; + import studio.livepeer.livepeer.models.components.NewAssetFromUrlPayload; import studio.livepeer.livepeer.models.components.PlaybackPolicy; import studio.livepeer.livepeer.models.components.TranscodeProfile; import studio.livepeer.livepeer.models.components.TranscodeProfileEncoder; import studio.livepeer.livepeer.models.components.TranscodeProfileProfile; import studio.livepeer.livepeer.models.components.Type; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.RequestUploadResponse; + import studio.livepeer.livepeer.models.operations.UploadAssetResponse; public class Application { @@ -1441,8 +1435,9 @@ actions: .apiKey("") .build(); - NewAssetPayload req = NewAssetPayload.builder() + NewAssetFromUrlPayload req = NewAssetFromUrlPayload.builder() .name("filename.mp4") + .url("https://s3.amazonaws.com/my-bucket/path/filename.mp4") .staticMp4(true) .playbackPolicy(PlaybackPolicy.builder() .type(Type.WEBHOOK) @@ -1466,11 +1461,11 @@ actions: .build())) .build(); - RequestUploadResponse res = sdk.asset().create() + UploadAssetResponse res = sdk.asset().createViaUrl() .request(req) .call(); - if (res.data().isPresent()) { + if (res.twoHundredApplicationJsonData().isPresent()) { // handle response } } catch (SDKError e) { @@ -1483,18 +1478,19 @@ actions: } } - - target: $["paths"]["/asset/{assetId}"]["get"] + - target: $["paths"]["/data/usage/query"]["get"] update: x-codeSamples: - lang: java - label: getAsset + label: getUsageMetrics source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetAssetResponse; + import studio.livepeer.livepeer.models.operations.GetUsageMetricsRequest; + import studio.livepeer.livepeer.models.operations.GetUsageMetricsResponse; public class Application { @@ -1504,11 +1500,14 @@ actions: .apiKey("") .build(); - GetAssetResponse res = sdk.asset().get() - .assetId("") + GetUsageMetricsRequest req = GetUsageMetricsRequest.builder() + .build(); + + GetUsageMetricsResponse res = sdk.metrics().getUsage() + .request(req) .call(); - if (res.asset().isPresent()) { + if (res.usageMetric().isPresent()) { // handle response } } catch (SDKError e) { @@ -1521,19 +1520,18 @@ actions: } } - - target: $["paths"]["/data/views/query/creator"]["get"] + - target: $["paths"]["/access-control/signing-key/{keyId}"]["delete"] update: x-codeSamples: - lang: java - label: getCreatorViewershipMetrics + label: deleteSigningKey source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetCreatorViewershipMetricsRequest; - import studio.livepeer.livepeer.models.operations.GetCreatorViewershipMetricsResponse; + import studio.livepeer.livepeer.models.operations.DeleteSigningKeyResponse; public class Application { @@ -1543,16 +1541,11 @@ actions: .apiKey("") .build(); - GetCreatorViewershipMetricsRequest req = GetCreatorViewershipMetricsRequest.builder() - .build(); - - GetCreatorViewershipMetricsResponse res = sdk.metrics().getCreatorViewership() - .request(req) + DeleteSigningKeyResponse res = sdk.accessControl().delete() + .keyId("") .call(); - if (res.data().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -1563,18 +1556,18 @@ actions: } } - - target: $["paths"]["/webhook/{id}"]["delete"] + - target: $["paths"]["/stream"]["get"] update: x-codeSamples: - lang: java - label: deleteWebhook + label: getStreams source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.DeleteWebhookResponse; + import studio.livepeer.livepeer.models.operations.GetStreamsResponse; public class Application { @@ -1584,11 +1577,11 @@ actions: .apiKey("") .build(); - DeleteWebhookResponse res = sdk.webhook().delete() - .id("") + GetStreamsResponse res = sdk.stream().getAll() + .streamsonly("") .call(); - if (res.webhook().isPresent()) { + if (res.data().isPresent()) { // handle response } } catch (SDKError e) { @@ -1601,18 +1594,18 @@ actions: } } - - target: $["paths"]["/session/{id}"]["get"] + - target: $["paths"]["/session"]["get"] update: x-codeSamples: - lang: java - label: getSession + label: getSessions source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetSessionResponse; + import studio.livepeer.livepeer.models.operations.GetSessionsResponse; public class Application { @@ -1622,11 +1615,10 @@ actions: .apiKey("") .build(); - GetSessionResponse res = sdk.session().get() - .id("") + GetSessionsResponse res = sdk.session().getAll() .call(); - if (res.session().isPresent()) { + if (res.data().isPresent()) { // handle response } } catch (SDKError e) { @@ -1738,22 +1730,18 @@ actions: } } - - target: $["paths"]["/asset/{assetId}"]["patch"] + - target: $["paths"]["/multistream/target"]["get"] update: x-codeSamples: - lang: java - label: updateAsset + label: getMultistreamTargets source: |- package hello.world; import java.lang.Exception; - import java.util.Map; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.AssetPatchPayload; - import studio.livepeer.livepeer.models.components.PlaybackPolicy; - import studio.livepeer.livepeer.models.components.Type; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.UpdateAssetResponse; + import studio.livepeer.livepeer.models.operations.GetMultistreamTargetsResponse; public class Application { @@ -1763,21 +1751,10 @@ actions: .apiKey("") .build(); - UpdateAssetResponse res = sdk.asset().update() - .assetId("") - .assetPatchPayload(AssetPatchPayload.builder() - .name("filename.mp4") - .playbackPolicy(PlaybackPolicy.builder() - .type(Type.WEBHOOK) - .webhookId("1bde4o2i6xycudoy") - .webhookContext(Map.ofEntries( - Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) - .build()) - .build()) + GetMultistreamTargetsResponse res = sdk.multistream().getAll() .call(); - if (res.asset().isPresent()) { + if (res.data().isPresent()) { // handle response } } catch (SDKError e) { @@ -1790,19 +1767,18 @@ actions: } } - - target: $["paths"]["/room/{id}/egress"]["post"] + - target: $["paths"]["/multistream/target/{id}"]["delete"] update: x-codeSamples: - lang: java - label: startRoomEgress + label: deleteMultistreamTarget source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.RoomEgressPayload; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.StartRoomEgressResponse; + import studio.livepeer.livepeer.models.operations.DeleteMultistreamTargetResponse; public class Application { @@ -1812,11 +1788,8 @@ actions: .apiKey("") .build(); - StartRoomEgressResponse res = sdk.room().startEgress() + DeleteMultistreamTargetResponse res = sdk.multistream().delete() .id("") - .roomEgressPayload(RoomEgressPayload.builder() - .streamId("aac12556-4d65-4d34-9fb6-d1f0985eb0a9") - .build()) .call(); // handle response @@ -1830,18 +1803,18 @@ actions: } } - - target: $["paths"]["/room/{id}/user/{userId}"]["get"] + - target: $["paths"]["/stream/{id}/terminate"]["delete"] update: x-codeSamples: - lang: java - label: getRoomUser + label: terminateStream source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetRoomUserResponse; + import studio.livepeer.livepeer.models.operations.TerminateStreamResponse; public class Application { @@ -1851,14 +1824,11 @@ actions: .apiKey("") .build(); - GetRoomUserResponse res = sdk.room().getUser() + TerminateStreamResponse res = sdk.stream().terminate() .id("") - .userId("") .call(); - if (res.getRoomUserResponse().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -1869,18 +1839,19 @@ actions: } } - - target: $["paths"]["/access-control/signing-key/{keyId}"]["get"] + - target: $["paths"]["/data/views/query/creator"]["get"] update: x-codeSamples: - lang: java - label: getSigningKey + label: getCreatorViewershipMetrics source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetSigningKeyResponse; + import studio.livepeer.livepeer.models.operations.GetCreatorViewershipMetricsRequest; + import studio.livepeer.livepeer.models.operations.GetCreatorViewershipMetricsResponse; public class Application { @@ -1890,11 +1861,14 @@ actions: .apiKey("") .build(); - GetSigningKeyResponse res = sdk.accessControl().get() - .keyId("") + GetCreatorViewershipMetricsRequest req = GetCreatorViewershipMetricsRequest.builder() + .build(); + + GetCreatorViewershipMetricsResponse res = sdk.metrics().getCreatorViewership() + .request(req) .call(); - if (res.signingKey().isPresent()) { + if (res.data().isPresent()) { // handle response } } catch (SDKError e) { @@ -1907,19 +1881,18 @@ actions: } } - - target: $["paths"]["/multistream/target"]["post"] + - target: $["paths"]["/asset/{assetId}"]["delete"] update: x-codeSamples: - lang: java - label: createMultistreamTarget + label: deleteAsset source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.MultistreamTargetInput; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.CreateMultistreamTargetResponse; + import studio.livepeer.livepeer.models.operations.DeleteAssetResponse; public class Application { @@ -1929,17 +1902,11 @@ actions: .apiKey("") .build(); - MultistreamTargetInput req = MultistreamTargetInput.builder() - .url("rtmps://live.my-service.tv/channel/secretKey") - .build(); - - CreateMultistreamTargetResponse res = sdk.multistream().create() - .request(req) + DeleteAssetResponse res = sdk.asset().delete() + .assetId("") .call(); - if (res.multistreamTarget().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -1950,18 +1917,19 @@ actions: } } - - target: $["paths"]["/webhook/{id}/log"]["get"] + - target: $["paths"]["/stream/{parentId}/sessions"]["get"] update: x-codeSamples: - lang: java - label: getWebhookLogs + label: getRecordedSessions source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetWebhookLogsResponse; + import studio.livepeer.livepeer.models.operations.GetRecordedSessionsResponse; + import studio.livepeer.livepeer.models.operations.Record; public class Application { @@ -1971,8 +1939,9 @@ actions: .apiKey("") .build(); - GetWebhookLogsResponse res = sdk.webhook().getLogs() - .id("") + GetRecordedSessionsResponse res = sdk.session().getRecorded() + .parentId("") + .record(Record.of(true)) .call(); if (res.data().isPresent()) { @@ -1988,18 +1957,19 @@ actions: } } - - target: $["paths"]["/access-control/signing-key"]["get"] + - target: $["paths"]["/room/{id}/egress"]["post"] update: x-codeSamples: - lang: java - label: getSigningKeys + label: startRoomEgress source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; + import studio.livepeer.livepeer.models.components.RoomEgressPayload; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetSigningKeysResponse; + import studio.livepeer.livepeer.models.operations.StartRoomEgressResponse; public class Application { @@ -2009,12 +1979,14 @@ actions: .apiKey("") .build(); - GetSigningKeysResponse res = sdk.accessControl().getAll() + StartRoomEgressResponse res = sdk.room().startEgress() + .id("") + .roomEgressPayload(RoomEgressPayload.builder() + .streamId("aac12556-4d65-4d34-9fb6-d1f0985eb0a9") + .build()) .call(); - if (res.data().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -2025,18 +1997,18 @@ actions: } } - - target: $["paths"]["/webhook/{id}"]["get"] + - target: $["paths"]["/stream/{id}/start-pull"]["post"] update: x-codeSamples: - lang: java - label: getWebhook + label: startPullStream source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetWebhookResponse; + import studio.livepeer.livepeer.models.operations.StartPullStreamResponse; public class Application { @@ -2046,13 +2018,11 @@ actions: .apiKey("") .build(); - GetWebhookResponse res = sdk.webhook().get() + StartPullStreamResponse res = sdk.stream().startPull() .id("") .call(); - if (res.webhook().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -2102,18 +2072,34 @@ actions: } } - - target: $["paths"]["/access-control/signing-key/{keyId}"]["delete"] + - target: $["paths"]["/stream"]["post"] update: x-codeSamples: - lang: java - label: deleteSigningKey + label: createStream source: |- package hello.world; import java.lang.Exception; + import java.util.List; + import java.util.Map; import studio.livepeer.livepeer.Livepeer; + import studio.livepeer.livepeer.models.components.FfmpegProfile; + import studio.livepeer.livepeer.models.components.Location; + import studio.livepeer.livepeer.models.components.Multistream; + import studio.livepeer.livepeer.models.components.NewStreamPayload; + import studio.livepeer.livepeer.models.components.NewStreamPayloadRecordingSpec; + import studio.livepeer.livepeer.models.components.PlaybackPolicy; + import studio.livepeer.livepeer.models.components.Profile; + import studio.livepeer.livepeer.models.components.Pull; + import studio.livepeer.livepeer.models.components.Target; + import studio.livepeer.livepeer.models.components.TargetSpec; + import studio.livepeer.livepeer.models.components.TranscodeProfile; + import studio.livepeer.livepeer.models.components.TranscodeProfileEncoder; + import studio.livepeer.livepeer.models.components.TranscodeProfileProfile; + import studio.livepeer.livepeer.models.components.Type; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.DeleteSigningKeyResponse; + import studio.livepeer.livepeer.models.operations.CreateStreamResponse; public class Application { @@ -2123,11 +2109,73 @@ actions: .apiKey("") .build(); - DeleteSigningKeyResponse res = sdk.accessControl().delete() - .keyId("") + NewStreamPayload req = NewStreamPayload.builder() + .name("test_stream") + .pull(Pull.builder() + .source("https://myservice.com/live/stream.flv") + .headers(Map.ofEntries( + Map.entry("Authorization", "Bearer 123"))) + .location(Location.builder() + .lat(39.739d) + .lon(-104.988d) + .build()) + .build()) + .playbackPolicy(PlaybackPolicy.builder() + .type(Type.WEBHOOK) + .webhookId("1bde4o2i6xycudoy") + .webhookContext(Map.ofEntries( + Map.entry("streamerId", "my-custom-id"))) + .refreshInterval(600d) + .build()) + .profiles(List.of( + FfmpegProfile.builder() + .width(1280L) + .name("720p") + .height(720L) + .bitrate(3000000L) + .fps(30L) + .fpsDen(1L) + .quality(23L) + .gop("2") + .profile(Profile.H264_BASELINE) + .build())) + .record(false) + .recordingSpec(NewStreamPayloadRecordingSpec.builder() + .profiles(List.of( + TranscodeProfile.builder() + .bitrate(3000000L) + .width(1280L) + .name("720p") + .height(720L) + .quality(23L) + .fps(30L) + .fpsDen(1L) + .gop("2") + .profile(TranscodeProfileProfile.H264_BASELINE) + .encoder(TranscodeProfileEncoder.H264) + .build())) + .build()) + .multistream(Multistream.builder() + .targets(List.of( + Target.builder() + .profile("720p0") + .videoOnly(false) + .id("PUSH123") + .spec(TargetSpec.builder() + .url("rtmps://live.my-service.tv/channel/secretKey") + .name("My target") + .build()) + .build())) + .build()) + .build(); + + CreateStreamResponse res = sdk.stream().create() + .request(req) .call(); - // handle response + if (res.stream().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -2138,18 +2186,22 @@ actions: } } - - target: $["paths"]["/task/{taskId}"]["get"] + - target: $["paths"]["/asset/{assetId}"]["patch"] update: x-codeSamples: - lang: java - label: getTask + label: updateAsset source: |- package hello.world; import java.lang.Exception; + import java.util.Map; import studio.livepeer.livepeer.Livepeer; + import studio.livepeer.livepeer.models.components.AssetPatchPayload; + import studio.livepeer.livepeer.models.components.PlaybackPolicy; + import studio.livepeer.livepeer.models.components.Type; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetTaskResponse; + import studio.livepeer.livepeer.models.operations.UpdateAssetResponse; public class Application { @@ -2159,11 +2211,21 @@ actions: .apiKey("") .build(); - GetTaskResponse res = sdk.task().get() - .taskId("") + UpdateAssetResponse res = sdk.asset().update() + .assetId("") + .assetPatchPayload(AssetPatchPayload.builder() + .name("filename.mp4") + .playbackPolicy(PlaybackPolicy.builder() + .type(Type.WEBHOOK) + .webhookId("1bde4o2i6xycudoy") + .webhookContext(Map.ofEntries( + Map.entry("streamerId", "my-custom-id"))) + .refreshInterval(600d) + .build()) + .build()) .call(); - if (res.task().isPresent()) { + if (res.asset().isPresent()) { // handle response } } catch (SDKError e) { @@ -2176,18 +2238,18 @@ actions: } } - - target: $["paths"]["/webhook"]["get"] + - target: $["paths"]["/session/{id}"]["get"] update: x-codeSamples: - lang: java - label: getWebhooks + label: getSession source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetWebhooksResponse; + import studio.livepeer.livepeer.models.operations.GetSessionResponse; public class Application { @@ -2197,10 +2259,11 @@ actions: .apiKey("") .build(); - GetWebhooksResponse res = sdk.webhook().getAll() + GetSessionResponse res = sdk.session().get() + .id("") .call(); - if (res.data().isPresent()) { + if (res.session().isPresent()) { // handle response } } catch (SDKError e) { @@ -2213,18 +2276,18 @@ actions: } } - - target: $["paths"]["/data/views/query/total/{playbackId}"]["get"] + - target: $["paths"]["/access-control/signing-key/{keyId}"]["get"] update: x-codeSamples: - lang: java - label: getPublicViewershipMetrics + label: getSigningKey source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetPublicViewershipMetricsResponse; + import studio.livepeer.livepeer.models.operations.GetSigningKeyResponse; public class Application { @@ -2234,11 +2297,11 @@ actions: .apiKey("") .build(); - GetPublicViewershipMetricsResponse res = sdk.metrics().getPublicViewership() - .playbackId("") + GetSigningKeyResponse res = sdk.accessControl().get() + .keyId("") .call(); - if (res.data().isPresent()) { + if (res.signingKey().isPresent()) { // handle response } } catch (SDKError e) { @@ -2251,18 +2314,18 @@ actions: } } - - target: $["paths"]["/access-control/signing-key"]["post"] + - target: $["paths"]["/stream/{id}"]["get"] update: x-codeSamples: - lang: java - label: createSigningKey + label: getStream source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.CreateSigningKeyResponse; + import studio.livepeer.livepeer.models.operations.GetStreamResponse; public class Application { @@ -2272,10 +2335,11 @@ actions: .apiKey("") .build(); - CreateSigningKeyResponse res = sdk.accessControl().create() + GetStreamResponse res = sdk.stream().get() + .id("") .call(); - if (res.signingKey().isPresent()) { + if (res.stream().isPresent()) { // handle response } } catch (SDKError e) { @@ -2288,18 +2352,18 @@ actions: } } - - target: $["paths"]["/stream/{id}/multistream/{targetId}"]["delete"] + - target: $["paths"]["/webhook/{id}/log/{logId}"]["get"] update: x-codeSamples: - lang: java - label: removeMultistreamTarget + label: getWebhookLog source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.RemoveMultistreamTargetResponse; + import studio.livepeer.livepeer.models.operations.GetWebhookLogResponse; public class Application { @@ -2309,12 +2373,14 @@ actions: .apiKey("") .build(); - RemoveMultistreamTargetResponse res = sdk.stream().removeMultistreamTarget() + GetWebhookLogResponse res = sdk.webhook().getLog() .id("") - .targetId("") + .logId("") .call(); - // handle response + if (res.webhookLog().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -2325,21 +2391,18 @@ actions: } } - - target: $["paths"]["/webhook"]["post"] + - target: $["paths"]["/asset/{assetId}"]["get"] update: x-codeSamples: - lang: java - label: createWebhook + label: getAsset source: |- package hello.world; import java.lang.Exception; - import java.util.List; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.Events; - import studio.livepeer.livepeer.models.components.WebhookInput; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.CreateWebhookResponse; + import studio.livepeer.livepeer.models.operations.GetAssetResponse; public class Application { @@ -2349,22 +2412,11 @@ actions: .apiKey("") .build(); - WebhookInput req = WebhookInput.builder() - .name("test_webhook") - .url("https://my-service.com/webhook") - .projectId("aac12556-4d65-4d34-9fb6-d1f0985eb0a9") - .events(List.of( - Events.STREAM_STARTED, - Events.STREAM_IDLE)) - .sharedSecret("my-secret") - .streamId("de7818e7-610a-4057-8f6f-b785dc1e6f88") - .build(); - - CreateWebhookResponse res = sdk.webhook().create() - .request(req) + GetAssetResponse res = sdk.asset().get() + .assetId("") .call(); - if (res.webhook().isPresent()) { + if (res.asset().isPresent()) { // handle response } } catch (SDKError e) { @@ -2377,33 +2429,19 @@ actions: } } - - target: $["paths"]["/transcode"]["post"] + - target: $["paths"]["/access-control/signing-key/{keyId}"]["patch"] update: x-codeSamples: - lang: java - label: transcodeVideo + label: updateSigningKey source: |- package hello.world; import java.lang.Exception; - import java.util.List; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.Fmp4; - import studio.livepeer.livepeer.models.components.Hls; - import studio.livepeer.livepeer.models.components.Input1; - import studio.livepeer.livepeer.models.components.Input; - import studio.livepeer.livepeer.models.components.Mp4; - import studio.livepeer.livepeer.models.components.Outputs; - import studio.livepeer.livepeer.models.components.Storage1; - import studio.livepeer.livepeer.models.components.StorageCredentials; - import studio.livepeer.livepeer.models.components.StorageType; - import studio.livepeer.livepeer.models.components.TranscodePayload; - import studio.livepeer.livepeer.models.components.TranscodePayloadStorage; - import studio.livepeer.livepeer.models.components.TranscodeProfile; - import studio.livepeer.livepeer.models.components.TranscodeProfileEncoder; - import studio.livepeer.livepeer.models.components.TranscodeProfileProfile; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.TranscodeVideoResponse; + import studio.livepeer.livepeer.models.operations.UpdateSigningKeyRequestBody; + import studio.livepeer.livepeer.models.operations.UpdateSigningKeyResponse; public class Application { @@ -2413,52 +2451,13 @@ actions: .apiKey("") .build(); - TranscodePayload req = TranscodePayload.builder() - .input(Input.of(Input1.builder() - .url("https://s3.amazonaws.com/bucket/file.mp4") - .build())) - .storage(TranscodePayloadStorage.of(Storage1.builder() - .type(StorageType.S3) - .endpoint("https://gateway.storjshare.io") - .bucket("outputbucket") - .credentials(StorageCredentials.builder() - .accessKeyId("AKIAIOSFODNN7EXAMPLE") - .secretAccessKey("wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY") - .build()) - .build())) - .outputs(Outputs.builder() - .hls(Hls.builder() - .path("/samplevideo/hls") - .build()) - .mp4(Mp4.builder() - .path("/samplevideo/mp4") - .build()) - .fmp4(Fmp4.builder() - .path("/samplevideo/fmp4") - .build()) - .build()) - .profiles(List.of( - TranscodeProfile.builder() - .bitrate(3000000L) - .width(1280L) - .name("720p") - .height(720L) - .quality(23L) - .fps(30L) - .fpsDen(1L) - .gop("2") - .profile(TranscodeProfileProfile.H264_BASELINE) - .encoder(TranscodeProfileEncoder.H264) - .build())) - .build(); - - TranscodeVideoResponse res = sdk.transcode().create() - .request(req) + UpdateSigningKeyResponse res = sdk.accessControl().update() + .keyId("") + .requestBody(UpdateSigningKeyRequestBody.builder() + .build()) .call(); - if (res.task().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -2469,18 +2468,18 @@ actions: } } - - target: $["paths"]["/stream/{id}/start-pull"]["post"] + - target: $["paths"]["/task"]["get"] update: x-codeSamples: - lang: java - label: startPullStream + label: getTasks source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.StartPullStreamResponse; + import studio.livepeer.livepeer.models.operations.GetTasksResponse; public class Application { @@ -2490,11 +2489,12 @@ actions: .apiKey("") .build(); - StartPullStreamResponse res = sdk.stream().startPull() - .id("") + GetTasksResponse res = sdk.task().getAll() .call(); - // handle response + if (res.data().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; diff --git a/docs/models/components/Encryption.md b/docs/models/components/Encryption.md deleted file mode 100644 index 1f7667c..0000000 --- a/docs/models/components/Encryption.md +++ /dev/null @@ -1,8 +0,0 @@ -# Encryption - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `encryptedKey` | *String* | :heavy_check_mark: | Encryption key used to encrypt the asset. Only writable in the upload asset endpoints and cannot be retrieved back. | \ No newline at end of file diff --git a/docs/models/components/MultistreamTargetInput.md b/docs/models/components/MultistreamTargetInput.md deleted file mode 100644 index 89c54f3..0000000 --- a/docs/models/components/MultistreamTargetInput.md +++ /dev/null @@ -1,10 +0,0 @@ -# MultistreamTargetInput - - -## Fields - -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `name` | *Optional* | :heavy_minus_sign: | N/A | | -| `url` | *String* | :heavy_check_mark: | Livepeer-compatible multistream target URL (RTMP(S) or SRT) | rtmps://live.my-service.tv/channel/secretKey | -| `disabled` | *Optional* | :heavy_minus_sign: | If true then this multistream target will not be used for pushing
even if it is configured in a stream object.
| | \ No newline at end of file diff --git a/docs/models/components/Target.md b/docs/models/components/Target.md deleted file mode 100644 index a28bb05..0000000 --- a/docs/models/components/Target.md +++ /dev/null @@ -1,11 +0,0 @@ -# Target - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `profile` | *String* | :heavy_check_mark: | Name of transcoding profile that should be sent. Use
"source" for pushing source stream data
| 720p0 | -| `videoOnly` | *Optional* | :heavy_minus_sign: | If true, the stream audio will be muted and only silent
video will be pushed to the target.
| false | -| `id` | *Optional* | :heavy_minus_sign: | ID of multistream target object where to push this stream | PUSH123 | -| `spec` | [Optional](../../models/components/TargetSpec.md) | :heavy_minus_sign: | Inline multistream target object. Will automatically
create the target resource to be used by the created
stream.
| | \ No newline at end of file diff --git a/docs/models/components/Type.md b/docs/models/components/Type.md index 1770153..fef7f91 100644 --- a/docs/models/components/Type.md +++ b/docs/models/components/Type.md @@ -5,6 +5,6 @@ | Name | Value | | --------- | --------- | -| `PUBLIC_` | public | +| `PUBLIC` | public | | `JWT` | jwt | | `WEBHOOK` | webhook | \ No newline at end of file diff --git a/docs/models/components/WebhookInput.md b/docs/models/components/WebhookInput.md deleted file mode 100644 index 01b1089..0000000 --- a/docs/models/components/WebhookInput.md +++ /dev/null @@ -1,13 +0,0 @@ -# WebhookInput - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `name` | *String* | :heavy_check_mark: | N/A | test_webhook | -| `projectId` | *Optional* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb6-d1f0985eb0a9 | -| `events` | List<[Events](../../models/components/Events.md)> | :heavy_minus_sign: | N/A | [
"stream.started",
"stream.idle"
] | -| `url` | *String* | :heavy_check_mark: | N/A | https://my-service.com/webhook | -| `sharedSecret` | *Optional* | :heavy_minus_sign: | shared secret used to sign the webhook payload | my-secret | -| `streamId` | *Optional* | :heavy_minus_sign: | streamId of the stream on which the webhook is applied | de7818e7-610a-4057-8f6f-b785dc1e6f88 | \ No newline at end of file diff --git a/docs/sdks/accesscontrol/README.md b/docs/sdks/accesscontrol/README.md index 21e88e8..12695c4 100644 --- a/docs/sdks/accesscontrol/README.md +++ b/docs/sdks/accesscontrol/README.md @@ -55,18 +55,17 @@ public class Application { } ``` - - - ### Response **[CreateSigningKeyResponse](../../models/operations/CreateSigningKeyResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## getAll Retrieves signing keys @@ -107,18 +106,17 @@ public class Application { } ``` - - - ### Response **[GetSigningKeysResponse](../../models/operations/GetSigningKeysResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## delete Delete Signing Key @@ -158,24 +156,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | --------------------- | --------------------- | --------------------- | --------------------- | | `keyId` | *String* | :heavy_check_mark: | ID of the signing key | - ### Response **[DeleteSigningKeyResponse](../../models/operations/DeleteSigningKeyResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## get Retrieves a signing key @@ -217,24 +214,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | --------------------- | --------------------- | --------------------- | --------------------- | | `keyId` | *String* | :heavy_check_mark: | ID of the signing key | - ### Response **[GetSigningKeyResponse](../../models/operations/GetSigningKeyResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## update Update a signing key @@ -277,8 +273,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -286,10 +280,10 @@ public class Application { | `keyId` | *String* | :heavy_check_mark: | ID of the signing key | | `requestBody` | [UpdateSigningKeyRequestBody](../../models/operations/UpdateSigningKeyRequestBody.md) | :heavy_check_mark: | N/A | - ### Response **[UpdateSigningKeyResponse](../../models/operations/UpdateSigningKeyResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/asset/README.md b/docs/sdks/asset/README.md index d283705..27da1d3 100644 --- a/docs/sdks/asset/README.md +++ b/docs/sdks/asset/README.md @@ -54,18 +54,17 @@ public class Application { } ``` - - - ### Response **[GetAssetsResponse](../../models/operations/GetAssetsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## create To upload an asset, your first need to request for a direct upload URL @@ -211,24 +210,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | | `request` | [NewAssetPayload](../../models/shared/NewAssetPayload.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[RequestUploadResponse](../../models/operations/RequestUploadResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## createViaUrl Upload asset via URL @@ -304,24 +302,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `request` | [NewAssetFromUrlPayload](../../models/shared/NewAssetFromUrlPayload.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[UploadAssetResponse](../../models/operations/UploadAssetResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## get Retrieves an asset @@ -363,24 +360,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `assetId` | *String* | :heavy_check_mark: | ID of the asset | - ### Response **[GetAssetResponse](../../models/operations/GetAssetResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## update Patch an asset @@ -436,8 +432,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -445,16 +439,17 @@ public class Application { | `assetId` | *String* | :heavy_check_mark: | ID of the asset | | `assetPatchPayload` | [AssetPatchPayload](../../models/components/AssetPatchPayload.md) | :heavy_check_mark: | N/A | - ### Response **[UpdateAssetResponse](../../models/operations/UpdateAssetResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## delete Delete an asset @@ -494,18 +489,16 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `assetId` | *String* | :heavy_check_mark: | ID of the asset | - ### Response **[DeleteAssetResponse](../../models/operations/DeleteAssetResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/livepeer/README.md b/docs/sdks/livepeer/README.md index 4f3e537..808685b 100644 --- a/docs/sdks/livepeer/README.md +++ b/docs/sdks/livepeer/README.md @@ -1,12 +1,7 @@ # Livepeer SDK - ## Overview Livepeer API Reference: Welcome to the Livepeer API reference docs. Here you will find all the endpoints exposed on the standard Livepeer API, learn how to use them and what they return. - - -### Available Operations - diff --git a/docs/sdks/metrics/README.md b/docs/sdks/metrics/README.md index f943505..16d672c 100644 --- a/docs/sdks/metrics/README.md +++ b/docs/sdks/metrics/README.md @@ -60,8 +60,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -70,16 +68,17 @@ public class Application { | `creatorId` | *Optional* | :heavy_minus_sign: | The creator ID to filter the query results | | `breakdownBy` | List<[BreakdownBy](../../models/operations/BreakdownBy.md)> | :heavy_minus_sign: | The list of fields to break down the query results. Specify this
query-string multiple times to break down by multiple fields.
| - ### Response **[GetRealtimeViewershipNowResponse](../../models/operations/GetRealtimeViewershipNowResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## getViewership Requires a private (non-CORS) API key to be used. @@ -126,24 +125,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `request` | [GetViewershipMetricsRequest](../../models/operations/GetViewershipMetricsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[GetViewershipMetricsResponse](../../models/operations/GetViewershipMetricsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## getCreatorViewership Requires a proof of ownership to be sent in the request, which for now is just the assetId or streamId parameters (1 of those must be in the query-string). @@ -190,24 +188,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | `request` | [GetCreatorViewershipMetricsRequest](../../models/operations/GetCreatorViewershipMetricsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[GetCreatorViewershipMetricsResponse](../../models/operations/GetCreatorViewershipMetricsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## getPublicViewership Allows querying for the public metrics for viewership about a video. @@ -252,24 +249,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | `playbackId` | *String* | :heavy_check_mark: | The playback ID to filter the query results. This can be a canonical
playback ID from Livepeer assets or streams, or dStorage identifiers
for assets
| - ### Response **[GetPublicViewershipMetricsResponse](../../models/operations/GetPublicViewershipMetricsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## getUsage Query usage metrics @@ -315,18 +311,16 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `request` | [GetUsageMetricsRequest](../../models/operations/GetUsageMetricsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[GetUsageMetricsResponse](../../models/operations/GetUsageMetricsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/multistream/README.md b/docs/sdks/multistream/README.md index d274a45..08093e2 100644 --- a/docs/sdks/multistream/README.md +++ b/docs/sdks/multistream/README.md @@ -53,18 +53,17 @@ public class Application { } ``` - - - ### Response **[GetMultistreamTargetsResponse](../../models/operations/GetMultistreamTargetsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## create Create a multistream target @@ -111,24 +110,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `request` | [MultistreamTargetInput](../../models/shared/MultistreamTargetInput.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[CreateMultistreamTargetResponse](../../models/operations/CreateMultistreamTargetResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## get Retrieve a multistream target @@ -170,24 +168,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | | `id` | *String* | :heavy_check_mark: | ID of the multistream target | - ### Response **[GetMultistreamTargetResponse](../../models/operations/GetMultistreamTargetResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## update Update Multistream Target @@ -231,8 +228,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -240,16 +235,17 @@ public class Application { | `id` | *String* | :heavy_check_mark: | ID of the multistream target | | `multistreamTargetPatchPayload` | [MultistreamTargetPatchPayload](../../models/components/MultistreamTargetPatchPayload.md) | :heavy_check_mark: | N/A | - ### Response **[UpdateMultistreamTargetResponse](../../models/operations/UpdateMultistreamTargetResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## delete Make sure to remove any references to the target on existing @@ -291,18 +287,16 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | | `id` | *String* | :heavy_check_mark: | ID of the multistream target | - ### Response **[DeleteMultistreamTargetResponse](../../models/operations/DeleteMultistreamTargetResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/playback/README.md b/docs/sdks/playback/README.md index 57750ed..f2477d3 100644 --- a/docs/sdks/playback/README.md +++ b/docs/sdks/playback/README.md @@ -53,18 +53,16 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | | `id` | *String* | :heavy_check_mark: | The playback ID from the asset or livestream, e.g. `eaw4nk06ts2d0mzb`. | - ### Response **[GetPlaybackInfoResponse](../../models/operations/GetPlaybackInfoResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/room/README.md b/docs/sdks/room/README.md index 9afea54..1580b9e 100644 --- a/docs/sdks/room/README.md +++ b/docs/sdks/room/README.md @@ -60,18 +60,17 @@ public class Application { } ``` - - - ### Response **[CreateRoomResponse](../../models/operations/CreateRoomResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## ~~get~~ Retrieve a room @@ -115,24 +114,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *String* | :heavy_check_mark: | N/A | - ### Response **[GetRoomResponse](../../models/operations/GetRoomResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## ~~delete~~ Delete a room @@ -174,24 +172,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *String* | :heavy_check_mark: | N/A | - ### Response **[DeleteRoomResponse](../../models/operations/DeleteRoomResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## ~~startEgress~~ Create a livestream for your room. @@ -239,8 +236,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -248,16 +243,17 @@ public class Application { | `id` | *String* | :heavy_check_mark: | N/A | | `roomEgressPayload` | [RoomEgressPayload](../../models/components/RoomEgressPayload.md) | :heavy_check_mark: | N/A | - ### Response **[StartRoomEgressResponse](../../models/operations/StartRoomEgressResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## ~~stopEgress~~ Stop room RTMP egress @@ -299,24 +295,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *String* | :heavy_check_mark: | N/A | - ### Response **[StopRoomEgressResponse](../../models/operations/StopRoomEgressResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## ~~createUser~~ Call this endpoint to add a user to a room, specifying a display name at a minimum. @@ -369,8 +364,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -378,16 +371,17 @@ public class Application { | `id` | *String* | :heavy_check_mark: | N/A | | `roomUserPayload` | [RoomUserPayload](../../models/components/RoomUserPayload.md) | :heavy_check_mark: | N/A | - ### Response **[CreateRoomUserResponse](../../models/operations/CreateRoomUserResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## ~~getUser~~ Get user details @@ -432,8 +426,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -441,16 +433,17 @@ public class Application { | `id` | *String* | :heavy_check_mark: | N/A | | `userId` | *String* | :heavy_check_mark: | N/A | - ### Response **[GetRoomUserResponse](../../models/operations/GetRoomUserResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## ~~updateUser~~ Update properties for a user. @@ -498,8 +491,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -508,16 +499,17 @@ public class Application { | `userId` | *String* | :heavy_check_mark: | N/A | | `roomUserUpdatePayload` | [RoomUserUpdatePayload](../../models/components/RoomUserUpdatePayload.md) | :heavy_check_mark: | N/A | - ### Response **[UpdateRoomUserResponse](../../models/operations/UpdateRoomUserResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## ~~deleteUser~~ Remove a user from the room @@ -560,8 +552,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -569,10 +559,10 @@ public class Application { | `id` | *String* | :heavy_check_mark: | N/A | | `userId` | *String* | :heavy_check_mark: | N/A | - ### Response **[DeleteRoomUserResponse](../../models/operations/DeleteRoomUserResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/session/README.md b/docs/sdks/session/README.md index 6b26986..b08c618 100644 --- a/docs/sdks/session/README.md +++ b/docs/sdks/session/README.md @@ -53,24 +53,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------------ | ------------------------ | ------------------------ | ------------------------ | | `id` | *String* | :heavy_check_mark: | ID of the parent session | - ### Response **[GetSessionClipsResponse](../../models/operations/GetSessionClipsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## getAll Retrieve sessions @@ -111,18 +110,17 @@ public class Application { } ``` - - - ### Response **[GetSessionsResponse](../../models/operations/GetSessionsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## get Retrieve a session @@ -164,24 +162,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *String* | :heavy_check_mark: | ID of the session | - ### Response **[GetSessionResponse](../../models/operations/GetSessionResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## getRecorded Retrieve Recorded Sessions @@ -225,8 +222,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | Example | @@ -234,10 +229,10 @@ public class Application { | `parentId` | *String* | :heavy_check_mark: | ID of the parent stream | | | `record` | [Optional](../../models/operations/Record.md) | :heavy_minus_sign: | Flag indicating if the response should only include recorded
sessions
| true | - ### Response **[GetRecordedSessionsResponse](../../models/operations/GetRecordedSessionsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/stream/README.md b/docs/sdks/stream/README.md index a77b5d5..bf313be 100644 --- a/docs/sdks/stream/README.md +++ b/docs/sdks/stream/README.md @@ -149,24 +149,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | | `request` | [NewStreamPayload](../../models/shared/NewStreamPayload.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[CreateStreamResponse](../../models/operations/CreateStreamResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## getAll Retrieve streams @@ -208,24 +207,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `streamsonly` | *Optional* | :heavy_minus_sign: | N/A | - ### Response **[GetStreamsResponse](../../models/operations/GetStreamsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## get Retrieve a stream @@ -267,24 +265,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *String* | :heavy_check_mark: | ID of the stream | - ### Response **[GetStreamResponse](../../models/operations/GetStreamResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## update Update a stream @@ -387,8 +384,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -396,16 +391,17 @@ public class Application { | `id` | *String* | :heavy_check_mark: | ID of the stream | | `streamPatchPayload` | [StreamPatchPayload](../../models/components/StreamPatchPayload.md) | :heavy_check_mark: | N/A | - ### Response **[UpdateStreamResponse](../../models/operations/UpdateStreamResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## delete This will also suspend any active stream sessions, so make sure to wait @@ -449,24 +445,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *String* | :heavy_check_mark: | ID of the stream | - ### Response **[DeleteStreamResponse](../../models/operations/DeleteStreamResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## terminate `DELETE /stream/{id}/terminate` can be used to terminate an ongoing @@ -514,24 +509,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *String* | :heavy_check_mark: | ID of the stream | - ### Response **[TerminateStreamResponse](../../models/operations/TerminateStreamResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## startPull `POST /stream/{id}/start-pull` can be used to start ingest for a stream @@ -578,24 +572,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *String* | :heavy_check_mark: | ID of the stream | - ### Response **[StartPullStreamResponse](../../models/operations/StartPullStreamResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## createClip Create a clip @@ -646,24 +639,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | | `request` | [ClipPayload](../../models/shared/ClipPayload.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[CreateClipResponse](../../models/operations/CreateClipResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## getClips Retrieve clips of a livestream @@ -705,24 +697,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | | `id` | *String* | :heavy_check_mark: | ID of the parent stream or playbackId of parent stream | - ### Response **[GetClipsResponse](../../models/operations/GetClipsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## addMultistreamTarget Add a multistream target @@ -773,8 +764,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -782,16 +771,17 @@ public class Application { | `id` | *String* | :heavy_check_mark: | ID of the parent stream | | `targetAddPayload` | [TargetAddPayload](../../models/components/TargetAddPayload.md) | :heavy_check_mark: | N/A | - ### Response **[AddMultistreamTargetResponse](../../models/operations/AddMultistreamTargetResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## removeMultistreamTarget Remove a multistream target @@ -832,8 +822,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -841,10 +829,10 @@ public class Application { | `id` | *String* | :heavy_check_mark: | ID of the parent stream | | `targetId` | *String* | :heavy_check_mark: | ID of the multistream target | - ### Response **[RemoveMultistreamTargetResponse](../../models/operations/RemoveMultistreamTargetResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/task/README.md b/docs/sdks/task/README.md index b028b6f..7264fbc 100644 --- a/docs/sdks/task/README.md +++ b/docs/sdks/task/README.md @@ -50,18 +50,17 @@ public class Application { } ``` - - - ### Response **[GetTasksResponse](../../models/operations/GetTasksResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## get Retrieve a Task @@ -103,18 +102,16 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `taskId` | *String* | :heavy_check_mark: | ID of the task | - ### Response **[GetTaskResponse](../../models/operations/GetTaskResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/transcode/README.md b/docs/sdks/transcode/README.md index 01934e7..fc6c5e1 100644 --- a/docs/sdks/transcode/README.md +++ b/docs/sdks/transcode/README.md @@ -225,18 +225,16 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | | `request` | [TranscodePayload](../../models/shared/TranscodePayload.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[TranscodeVideoResponse](../../models/operations/TranscodeVideoResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/docs/sdks/webhook/README.md b/docs/sdks/webhook/README.md index 7623e1b..f48748e 100644 --- a/docs/sdks/webhook/README.md +++ b/docs/sdks/webhook/README.md @@ -56,18 +56,17 @@ public class Application { } ``` - - - ### Response **[GetWebhooksResponse](../../models/operations/GetWebhooksResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## create To create a new webhook, you need to make an API call with the events you want to listen for and the URL that will be called when those events occur. @@ -124,24 +123,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | | `request` | [WebhookInput](../../models/shared/WebhookInput.md) | :heavy_check_mark: | The request object to use for the request. | - ### Response **[CreateWebhookResponse](../../models/operations/CreateWebhookResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## get Retrieve a webhook @@ -183,24 +181,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *String* | :heavy_check_mark: | N/A | - ### Response **[GetWebhookResponse](../../models/operations/GetWebhookResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## update Update a webhook @@ -255,8 +252,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -264,16 +259,17 @@ public class Application { | `id` | *String* | :heavy_check_mark: | N/A | | `webhook` | [WebhookInput](../../models/components/WebhookInput.md) | :heavy_check_mark: | N/A | - ### Response **[UpdateWebhookResponse](../../models/operations/UpdateWebhookResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## delete Delete a webhook @@ -315,24 +311,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *String* | :heavy_check_mark: | N/A | - ### Response **[DeleteWebhookResponse](../../models/operations/DeleteWebhookResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## getLogs Retrieve webhook logs @@ -374,24 +369,23 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *String* | :heavy_check_mark: | N/A | - ### Response **[GetWebhookLogsResponse](../../models/operations/GetWebhookLogsResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## getLog Retrieve a webhook log @@ -434,8 +428,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -443,16 +435,17 @@ public class Application { | `id` | *String* | :heavy_check_mark: | N/A | | `logId` | *String* | :heavy_check_mark: | N/A | - ### Response **[GetWebhookLogResponse](../../models/operations/GetWebhookLogResponse.md)** + ### Errors | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | \*\/* | + ## resendLog Use this API to resend the same webhook request. This is useful when @@ -498,8 +491,6 @@ public class Application { } ``` - - ### Parameters | Parameter | Type | Required | Description | @@ -507,10 +498,10 @@ public class Application { | `id` | *String* | :heavy_check_mark: | N/A | | `logId` | *String* | :heavy_check_mark: | N/A | - ### Response **[ResendWebhookResponse](../../models/operations/ResendWebhookResponse.md)** + ### Errors | Error Object | Status Code | Content Type | diff --git a/src/main/java/studio/livepeer/livepeer/SDKConfiguration.java b/src/main/java/studio/livepeer/livepeer/SDKConfiguration.java index ff21a6d..a9cb585 100644 --- a/src/main/java/studio/livepeer/livepeer/SDKConfiguration.java +++ b/src/main/java/studio/livepeer/livepeer/SDKConfiguration.java @@ -23,9 +23,9 @@ public Optional securitySource() { public int serverIdx = 0; public String language = "java"; public String openapiDocVersion = "1.0.0"; - public String sdkVersion = "0.4.0"; - public String genVersion = "2.396.0"; - public String userAgent = "speakeasy-sdk/java 0.4.0 2.396.0 1.0.0 studio.livepeer.livepeer"; + public String sdkVersion = "0.5.0"; + public String genVersion = "2.404.1"; + public String userAgent = "speakeasy-sdk/java 0.5.0 2.404.1 1.0.0 studio.livepeer.livepeer"; private Hooks _hooks = createHooks(); diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadataTemplate.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadataTemplate.java index dfb8f9d..114ea73 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadataTemplate.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadataTemplate.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetPhase.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetPhase.java index 6a52795..e408802 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetPhase.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetPhase.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetSource3Type.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetSource3Type.java index 46e95db..7da8d97 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetSource3Type.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetSource3Type.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetSourceType.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetSourceType.java index ff33a4a..9f8468f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetSourceType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetSourceType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetType.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetType.java index 030f928..4ca15df 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetVideoSpecType.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetVideoSpecType.java index 975e776..d677d5a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetVideoSpecType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetVideoSpecType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/CatalystPipelineStrategy.java b/src/main/java/studio/livepeer/livepeer/models/components/CatalystPipelineStrategy.java index 5c99c5d..c6e786a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/CatalystPipelineStrategy.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/CatalystPipelineStrategy.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/CreatorId.java b/src/main/java/studio/livepeer/livepeer/models/components/CreatorId.java index 210f53c..ed3b9d5 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/CreatorId.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/CreatorId.java @@ -76,7 +76,7 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(CreatorId.class, + super(CreatorId.class, false, TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/CreatorIdType.java b/src/main/java/studio/livepeer/livepeer/models/components/CreatorIdType.java index b8f5c4c..40496d7 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/CreatorIdType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/CreatorIdType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Encoder.java b/src/main/java/studio/livepeer/livepeer/models/components/Encoder.java index 8eba76c..b30a12f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Encoder.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Encoder.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Events.java b/src/main/java/studio/livepeer/livepeer/models/components/Events.java index e05df66..600ffe6 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Events.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Events.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams.java b/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams.java index 6e9c745..7c18109 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams.java @@ -85,9 +85,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(ExportTaskParams.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(ExportTaskParams.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Hrn.java b/src/main/java/studio/livepeer/livepeer/models/components/Hrn.java index b5164a0..e5bad45 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Hrn.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Hrn.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Input.java b/src/main/java/studio/livepeer/livepeer/models/components/Input.java index d041a61..6224967 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Input.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Input.java @@ -82,9 +82,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(Input.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(Input.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId.java b/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId.java index 72bc429..2187791 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId.java @@ -82,9 +82,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(InputCreatorId.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(InputCreatorId.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorIdType.java b/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorIdType.java index 25b405d..9ce8318 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorIdType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorIdType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/InputType.java b/src/main/java/studio/livepeer/livepeer/models/components/InputType.java index da0a8fd..08088cd 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/InputType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/InputType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Ipfs.java b/src/main/java/studio/livepeer/livepeer/models/components/Ipfs.java index 7107a71..26b8b20 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Ipfs.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Ipfs.java @@ -88,9 +88,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(Ipfs.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(Ipfs.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/IsMobile.java b/src/main/java/studio/livepeer/livepeer/models/components/IsMobile.java index 8814a3b..2a54d6f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/IsMobile.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/IsMobile.java @@ -85,9 +85,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(IsMobile.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(IsMobile.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/IsMobile1.java b/src/main/java/studio/livepeer/livepeer/models/components/IsMobile1.java index fc164a3..b7b31cd 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/IsMobile1.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/IsMobile1.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; /** diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Live.java b/src/main/java/studio/livepeer/livepeer/models/components/Live.java index 71b18e9..6d5fded 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Live.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Live.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; public enum Live { diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Name.java b/src/main/java/studio/livepeer/livepeer/models/components/Name.java index 778be94..07074bf 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Name.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Name.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs.java b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs.java index 25bd771..b9c58e1 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs.java @@ -88,9 +88,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(NewAssetPayloadIpfs.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(NewAssetPayloadIpfs.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/NftMetadataTemplate.java b/src/main/java/studio/livepeer/livepeer/models/components/NftMetadataTemplate.java index fed50ae..b3c3384 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NftMetadataTemplate.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NftMetadataTemplate.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/One.java b/src/main/java/studio/livepeer/livepeer/models/components/One.java index c2c7d50..dc7aa07 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/One.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/One.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; /** diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Phase.java b/src/main/java/studio/livepeer/livepeer/models/components/Phase.java index 3cc3ef7..4239f4e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Phase.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Phase.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Pinata.java b/src/main/java/studio/livepeer/livepeer/models/components/Pinata.java index 15cc2da..f8ade73 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Pinata.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Pinata.java @@ -87,9 +87,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(Pinata.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(Pinata.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoHrn.java b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoHrn.java index 12a5924..52e5dd0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoHrn.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoHrn.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaDvrPlaybackType.java b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaDvrPlaybackType.java index a3ee079..868fc30 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaDvrPlaybackType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaDvrPlaybackType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaType.java b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaType.java index 6f3ffe6..7f3285d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoType.java b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoType.java index 107d739..6f88669 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/PrimaryType.java b/src/main/java/studio/livepeer/livepeer/models/components/PrimaryType.java index 535e5b2..fb65a99 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PrimaryType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PrimaryType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Profile.java b/src/main/java/studio/livepeer/livepeer/models/components/Profile.java index 0efad04..c93e0f0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Profile.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Profile.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/RecordingStatus.java b/src/main/java/studio/livepeer/livepeer/models/components/RecordingStatus.java index d3f6102..c844ad5 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/RecordingStatus.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/RecordingStatus.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/SignatureType.java b/src/main/java/studio/livepeer/livepeer/models/components/SignatureType.java index e8779f7..98759a3 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/SignatureType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/SignatureType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Source.java b/src/main/java/studio/livepeer/livepeer/models/components/Source.java index 1faf4ea..56d9277 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Source.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Source.java @@ -88,10 +88,10 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(Source.class, + super(Source.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/SourceType.java b/src/main/java/studio/livepeer/livepeer/models/components/SourceType.java index 951a103..8dc5514 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/SourceType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/SourceType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/StorageType.java b/src/main/java/studio/livepeer/livepeer/models/components/StorageType.java index 588c079..ebd256e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StorageType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StorageType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/StreamIsMobile.java b/src/main/java/studio/livepeer/livepeer/models/components/StreamIsMobile.java index de0f2c0..492e4c0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StreamIsMobile.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StreamIsMobile.java @@ -85,9 +85,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(StreamIsMobile.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(StreamIsMobile.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/StreamUserTags.java b/src/main/java/studio/livepeer/livepeer/models/components/StreamUserTags.java index c8a4aea..e9cf7af 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StreamUserTags.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StreamUserTags.java @@ -89,10 +89,10 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(StreamUserTags.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + super(StreamUserTags.class, false, + TypeReferenceWithShape.of(new TypeReference>() {}, JsonShape.DEFAULT), TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskPhase.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskPhase.java index 240c422..4bcc4bd 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskPhase.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskPhase.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskType.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskType.java index 8f6385c..c00af61 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Three.java b/src/main/java/studio/livepeer/livepeer/models/components/Three.java index aeb5999..edbb17b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Three.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Three.java @@ -82,9 +82,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(Three.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(Three.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorage.java b/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorage.java index 8875851..b94a15b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorage.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorage.java @@ -82,7 +82,7 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(TranscodePayloadStorage.class, + super(TranscodePayloadStorage.class, false, TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageType.java b/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageType.java index cf2fe34..5ae3fe5 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageType.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileEncoder.java b/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileEncoder.java index 5efee7f..2188f79 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileEncoder.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileEncoder.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileProfile.java b/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileProfile.java index 6e65cf9..ac2ee4b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileProfile.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileProfile.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Type.java b/src/main/java/studio/livepeer/livepeer/models/components/Type.java index 7f765c9..caa57ce 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Type.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Type.java @@ -4,12 +4,11 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; public enum Type { - PUBLIC_("public"), + PUBLIC("public"), JWT("jwt"), WEBHOOK("webhook"); diff --git a/src/main/java/studio/livepeer/livepeer/models/components/UserTags.java b/src/main/java/studio/livepeer/livepeer/models/components/UserTags.java index b712270..b43039d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/UserTags.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/UserTags.java @@ -89,10 +89,10 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(UserTags.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + super(UserTags.class, false, + TypeReferenceWithShape.of(new TypeReference>() {}, JsonShape.DEFAULT), TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/UserTags3.java b/src/main/java/studio/livepeer/livepeer/models/components/UserTags3.java index e5539c2..3f9d341 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/UserTags3.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/UserTags3.java @@ -82,9 +82,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(UserTags3.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(UserTags3.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Version.java b/src/main/java/studio/livepeer/livepeer/models/components/Version.java index 206077c..c6239ef 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Version.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Version.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/BreakdownBy.java b/src/main/java/studio/livepeer/livepeer/models/operations/BreakdownBy.java index 35d5456..d26b8ff 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/BreakdownBy.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/BreakdownBy.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/From.java b/src/main/java/studio/livepeer/livepeer/models/operations/From.java index 2952fb1..ea9acba 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/From.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/From.java @@ -86,9 +86,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(From.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(From.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.java index 88057e1..a5a904d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamBreakdownBy.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamBreakdownBy.java index 4c3e43e..f4a377f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamBreakdownBy.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamBreakdownBy.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamTimeStep.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamTimeStep.java index 8ef2430..e85a72e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamTimeStep.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamTimeStep.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamBreakdownBy.java b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamBreakdownBy.java index dcaa45f..48d98e9 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamBreakdownBy.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamBreakdownBy.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamFrom.java b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamFrom.java index 913e07a..c5a9be5 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamFrom.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamFrom.java @@ -86,9 +86,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(QueryParamFrom.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(QueryParamFrom.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTimeStep.java b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTimeStep.java index 16d89fa..b254740 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTimeStep.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTimeStep.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTo.java b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTo.java index 9e32909..5d1bb18 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTo.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTo.java @@ -86,9 +86,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(QueryParamTo.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(QueryParamTo.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/Record.java b/src/main/java/studio/livepeer/livepeer/models/operations/Record.java index 89134c4..e1020e8 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/Record.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/Record.java @@ -87,9 +87,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(Record.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(Record.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/TimeStep.java b/src/main/java/studio/livepeer/livepeer/models/operations/TimeStep.java index cdb59f5..d762743 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/TimeStep.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/TimeStep.java @@ -4,7 +4,6 @@ package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/To.java b/src/main/java/studio/livepeer/livepeer/models/operations/To.java index 271ce44..7a25a67 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/To.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/To.java @@ -86,9 +86,9 @@ public int hashCode() { public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(To.class, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(To.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } diff --git a/src/main/java/studio/livepeer/livepeer/utils/OneOfDeserializer.java b/src/main/java/studio/livepeer/livepeer/utils/OneOfDeserializer.java index a1dcafb..9b6ab68 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/OneOfDeserializer.java +++ b/src/main/java/studio/livepeer/livepeer/utils/OneOfDeserializer.java @@ -37,31 +37,45 @@ public class OneOfDeserializer extends StdDeserializer { private final List typeReferences; // oneOf subschemas private final Class cls; + private final boolean strict; private final ObjectMapper mapper; - protected OneOfDeserializer(Class cls, TypeReferenceWithShape... typeReferences) { + /** + * Constructor. + * + * @param cls oneOf type + * @param strict if true then when multiple matches encountered an + * exception is thrown. If false then when multiple + * matches encountered the first match from the + * typeReferences array is used as deserialization result. + * @param typeReferences the types of the oneOf subschemas. When strict is false + * the first matching member of this array will be the + * type of the deserialization result. + */ + protected OneOfDeserializer(Class cls, boolean strict, TypeReferenceWithShape... typeReferences) { super(cls); this.typeReferences= Arrays.asList(typeReferences); this.cls = cls; + this.strict = strict; this.mapper = JSON.getMapper(); } @Override public T deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { - return deserializeOneOf(mapper, p, ctxt, typeReferences, cls); + return deserializeOneOf(mapper, p, ctxt, typeReferences, cls, strict); } private static T deserializeOneOf(ObjectMapper mapper, JsonParser p, DeserializationContext ctxt, - List typeReferences, Class cls) throws IOException { + List typeReferences, Class cls, boolean strict) throws IOException { TreeNode tree = p.getCodec().readTree(p); // TODO don't have to generate json because can use tree.traverse to get a // parser to read value, perf advantage and can stop plugging in ObjectMapper String json = mapper.writeValueAsString(tree); - return deserializeOneOf(mapper, json, typeReferences, cls, ctxt); + return deserializeOneOf(mapper, json, typeReferences, cls, ctxt, strict); } private static T deserializeOneOf(ObjectMapper mapper, String json, List typeReferences, Class cls, - DeserializationContext ctxt) throws JsonProcessingException { + DeserializationContext ctxt, boolean strict) throws JsonProcessingException { List> matches = new ArrayList<>(); for (TypeReferenceWithShape c : typeReferences) { // try to deserialize with each of the member classes @@ -84,8 +98,14 @@ private static T deserializeOneOf(ObjectMapper mapper, String json, List 1) { - throw JsonMappingException.from(ctxt, - "json matched more than one of the possible type references, matches are: " + typeNames(matches) + " - json=\n" + json); + if (strict) { + throw JsonMappingException.from(ctxt, + "json matched more than one of the possible type references, matches are: " + + typeNames(matches) + " - json=\n" + json); + } else { + // return first match + return matches.get(0).value; + } } else { throw JsonMappingException.from(ctxt, "json did not match any of the possible type references: " + typeReferenceNames(typeReferences) + ", json=\n" + json);