diff --git a/.gitattributes b/.gitattributes index 15532825..87cd6547 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8,5 +8,4 @@ *.bat text eol=crlf # This allows generated code to be indexed correctly -*.java linguist-generated=false - +*.java linguist-generated=false \ No newline at end of file diff --git a/.gitignore b/.gitignore index df0a9853..25d5bbb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +**/.speakeasy/temp/ +**/.speakeasy/logs/ +.speakeasy/reports # Ignore Gradle project-specific cache directory .gradle # Ignore Gradle build output directory diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0552d745..5847090c 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,745 +1,1284 @@ lockVersion: 2.0.0 id: b4f7f2df-6c4d-4150-a18f-8b74fe44eb22 management: - docChecksum: 59634240879b8bce1b699c21c7f4f276 + docChecksum: d5178fea7af23529e09cd3b74d1d23c1 docVersion: 1.0.0 - speakeasyVersion: 1.377.1 - generationVersion: 2.404.1 - releaseVersion: 0.5.0 - configChecksum: 3b33f25e938c6a67453f8e636f88064a + speakeasyVersion: 1.542.3 + generationVersion: 2.597.9 + releaseVersion: 0.6.0 + configChecksum: e94627d6d91fc995e1053de8f3d0b530 repoURL: https://github.com/livepeer/livepeer-java.git features: java: additionalDependencies: 0.1.0 + additionalProperties: 0.0.1 constsAndDefaults: 0.1.1 - core: 3.29.4 + core: 3.37.1 deprecations: 2.81.1 flattening: 2.81.1 - globalSecurity: 2.82.7 + globalSecurity: 2.82.8 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.0 globalServerURLs: 2.82.1 inputOutputModels: 2.83.0 nameOverrides: 2.81.3 nullables: 0.1.0 - sdkHooks: 0.1.0 - unions: 0.0.5 + sdkHooks: 1.0.0 + unions: 0.0.6 generatedFiles: - - src/main/java/studio/livepeer/livepeer/SecuritySource.java - - src/main/java/studio/livepeer/livepeer/SDKConfiguration.java - - src/main/java/studio/livepeer/livepeer/Stream.java - - src/main/java/studio/livepeer/livepeer/Multistream.java - - src/main/java/studio/livepeer/livepeer/Webhook.java - - src/main/java/studio/livepeer/livepeer/Asset.java - - src/main/java/studio/livepeer/livepeer/Session.java - - src/main/java/studio/livepeer/livepeer/Room.java - - src/main/java/studio/livepeer/livepeer/Metrics.java - - src/main/java/studio/livepeer/livepeer/AccessControl.java - - src/main/java/studio/livepeer/livepeer/Task.java - - src/main/java/studio/livepeer/livepeer/Transcode.java - - src/main/java/studio/livepeer/livepeer/Playback.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateClipRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetTasksRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequestBuilder.java - - src/main/java/studio/livepeer/livepeer/models/operations/SDKMethodInterfaces.java - - src/main/java/studio/livepeer/livepeer/Livepeer.java - .gitattributes + - USAGE.md - build.gradle - - gradle/wrapper/gradle-wrapper.jar - - gradle/wrapper/gradle-wrapper.properties - - gradlew - - gradlew.bat - - settings.gradle - - src/main/java/studio/livepeer/livepeer/utils/BackoffStrategy.java - - src/main/java/studio/livepeer/livepeer/utils/BigDecimalString.java - - src/main/java/studio/livepeer/livepeer/utils/BigIntegerString.java - - src/main/java/studio/livepeer/livepeer/utils/Deserializers.java - - src/main/java/studio/livepeer/livepeer/utils/EventStream.java - - src/main/java/studio/livepeer/livepeer/utils/EventStreamLineReader.java - - src/main/java/studio/livepeer/livepeer/utils/EventStreamMessage.java - - src/main/java/studio/livepeer/livepeer/utils/EventStreamReader.java - - src/main/java/studio/livepeer/livepeer/utils/FormMetadata.java - - src/main/java/studio/livepeer/livepeer/utils/HTTPClient.java - - src/main/java/studio/livepeer/livepeer/utils/HTTPRequest.java - - src/main/java/studio/livepeer/livepeer/utils/HeaderMetadata.java - - src/main/java/studio/livepeer/livepeer/utils/Helpers.java - - src/main/java/studio/livepeer/livepeer/utils/Hook.java - - src/main/java/studio/livepeer/livepeer/utils/Hooks.java - - src/main/java/studio/livepeer/livepeer/utils/JSON.java - - src/main/java/studio/livepeer/livepeer/utils/LazySingletonValue.java - - src/main/java/studio/livepeer/livepeer/utils/Metadata.java - - src/main/java/studio/livepeer/livepeer/utils/MultipartFormMetadata.java - - src/main/java/studio/livepeer/livepeer/utils/OneOfDeserializer.java - - src/main/java/studio/livepeer/livepeer/utils/Options.java - - src/main/java/studio/livepeer/livepeer/utils/PathParamsMetadata.java - - src/main/java/studio/livepeer/livepeer/utils/QueryParameters.java - - src/main/java/studio/livepeer/livepeer/utils/QueryParamsMetadata.java - - src/main/java/studio/livepeer/livepeer/utils/RequestBody.java - - src/main/java/studio/livepeer/livepeer/utils/RequestMetadata.java - - src/main/java/studio/livepeer/livepeer/utils/Response.java - - src/main/java/studio/livepeer/livepeer/utils/Retries.java - - src/main/java/studio/livepeer/livepeer/utils/RetryConfig.java - - src/main/java/studio/livepeer/livepeer/utils/Security.java - - src/main/java/studio/livepeer/livepeer/utils/SecurityMetadata.java - - src/main/java/studio/livepeer/livepeer/utils/SerializedBody.java - - src/main/java/studio/livepeer/livepeer/utils/SpeakeasyHTTPClient.java - - src/main/java/studio/livepeer/livepeer/utils/SpeakeasyMetadata.java - - src/main/java/studio/livepeer/livepeer/utils/TypedObject.java - - src/main/java/studio/livepeer/livepeer/utils/Types.java - - src/main/java/studio/livepeer/livepeer/utils/Utils.java - - src/main/java/studio/livepeer/livepeer/models/errors/AuthException.java - - src/main/java/studio/livepeer/livepeer/models/errors/SDKError.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateClipTask.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateClipData.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateClipResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetClipsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/Task.java - - src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadData.java - - src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetAssetTask.java - - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetDataOutput.java - - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetTask.java - - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetData.java - - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetAssetResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/Record.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/BreakdownBy.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/From.java - - src/main/java/studio/livepeer/livepeer/models/operations/To.java - - src/main/java/studio/livepeer/livepeer/models/operations/TimeStep.java - - src/main/java/studio/livepeer/livepeer/models/operations/QueryParamBreakdownBy.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/QueryParamFrom.java - - src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTo.java - - src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTimeStep.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsData.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamTimeStep.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamBreakdownBy.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBody.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetTasksResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetTaskResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoResponse.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequest.java - - src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoResponse.java - - src/main/java/studio/livepeer/livepeer/models/errors/Error.java - - src/main/java/studio/livepeer/livepeer/models/components/Three.java - - src/main/java/studio/livepeer/livepeer/models/components/StreamUserTags.java - - src/main/java/studio/livepeer/livepeer/models/components/IsMobile1.java - - src/main/java/studio/livepeer/livepeer/models/components/StreamIsMobile.java - - src/main/java/studio/livepeer/livepeer/models/components/StreamLocation.java - - src/main/java/studio/livepeer/livepeer/models/components/StreamPull.java - - src/main/java/studio/livepeer/livepeer/models/components/StreamRecordingSpec.java - - src/main/java/studio/livepeer/livepeer/models/components/StreamMultistream.java - - src/main/java/studio/livepeer/livepeer/models/components/Renditions.java - - src/main/java/studio/livepeer/livepeer/models/components/Stream.java - - src/main/java/studio/livepeer/livepeer/models/components/TargetOutput.java - - src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileProfile.java - - src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileEncoder.java - - src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfile.java - - src/main/java/studio/livepeer/livepeer/models/components/Profile.java - - src/main/java/studio/livepeer/livepeer/models/components/Encoder.java - - src/main/java/studio/livepeer/livepeer/models/components/FfmpegProfile.java - - src/main/java/studio/livepeer/livepeer/models/components/Type.java - - src/main/java/studio/livepeer/livepeer/models/components/PlaybackPolicy.java - - src/main/java/studio/livepeer/livepeer/models/components/CreatorIdType.java - - src/main/java/studio/livepeer/livepeer/models/components/CreatorId1.java - - src/main/java/studio/livepeer/livepeer/models/components/CreatorId.java - - src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayloadRecordingSpec.java - - src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayload.java - - src/main/java/studio/livepeer/livepeer/models/components/UserTags3.java - - src/main/java/studio/livepeer/livepeer/models/components/UserTags.java - - src/main/java/studio/livepeer/livepeer/models/components/Multistream.java - - src/main/java/studio/livepeer/livepeer/models/components/TargetSpec.java - - src/main/java/studio/livepeer/livepeer/models/components/Target.java - - src/main/java/studio/livepeer/livepeer/models/components/InputCreatorIdType.java - - src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId1.java - - src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId.java - - src/main/java/studio/livepeer/livepeer/models/components/One.java - - src/main/java/studio/livepeer/livepeer/models/components/IsMobile.java - - src/main/java/studio/livepeer/livepeer/models/components/Location.java - - src/main/java/studio/livepeer/livepeer/models/components/Pull.java - - src/main/java/studio/livepeer/livepeer/models/components/StreamPatchPayload.java - - src/main/java/studio/livepeer/livepeer/models/components/RecordingSpec.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetType.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetSource3Type.java - - src/main/java/studio/livepeer/livepeer/models/components/Source3.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetSourceType.java - - src/main/java/studio/livepeer/livepeer/models/components/Two.java - - src/main/java/studio/livepeer/livepeer/models/components/SourceType.java - - src/main/java/studio/livepeer/livepeer/models/components/Source1.java - - src/main/java/studio/livepeer/livepeer/models/components/Source.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadataTemplate.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadata.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetSpec.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetIpfs.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetStorage.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetPhase.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetStatus.java - - src/main/java/studio/livepeer/livepeer/models/components/Hash.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetVideoSpecType.java - - src/main/java/studio/livepeer/livepeer/models/components/Tracks.java - - src/main/java/studio/livepeer/livepeer/models/components/VideoSpec.java - - src/main/java/studio/livepeer/livepeer/models/components/Asset.java - - src/main/java/studio/livepeer/livepeer/models/components/Phase.java - - src/main/java/studio/livepeer/livepeer/models/components/Tasks.java - - src/main/java/studio/livepeer/livepeer/models/components/StorageStatus.java - - src/main/java/studio/livepeer/livepeer/models/components/IpfsFileInfo.java - - src/main/java/studio/livepeer/livepeer/models/components/EncryptionOutput.java - - src/main/java/studio/livepeer/livepeer/models/components/ClipPayload.java - - src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayloadSpec.java - - src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayload.java - - src/main/java/studio/livepeer/livepeer/models/components/MultistreamTarget.java - - src/main/java/studio/livepeer/livepeer/models/components/MultistreamTargetInput.java - - src/main/java/studio/livepeer/livepeer/models/components/MultistreamTargetPatchPayload.java - - src/main/java/studio/livepeer/livepeer/models/components/Events.java - - src/main/java/studio/livepeer/livepeer/models/components/LastFailure.java - - src/main/java/studio/livepeer/livepeer/models/components/Status.java - - src/main/java/studio/livepeer/livepeer/models/components/Webhook.java - - src/main/java/studio/livepeer/livepeer/models/components/WebhookInput.java - - src/main/java/studio/livepeer/livepeer/models/components/Request.java - - src/main/java/studio/livepeer/livepeer/models/components/Response.java - - src/main/java/studio/livepeer/livepeer/models/components/WebhookLog.java - - src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs1.java - - src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs.java - - src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadStorage.java - - src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadEncryption.java - - src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayload.java - - src/main/java/studio/livepeer/livepeer/models/components/NftMetadataTemplate.java - - src/main/java/studio/livepeer/livepeer/models/components/NftMetadata.java - - src/main/java/studio/livepeer/livepeer/models/components/Spec.java - - src/main/java/studio/livepeer/livepeer/models/components/NewAssetFromUrlPayload.java - - src/main/java/studio/livepeer/livepeer/models/components/Encryption.java - - src/main/java/studio/livepeer/livepeer/models/components/Ipfs1.java - - src/main/java/studio/livepeer/livepeer/models/components/Ipfs.java - - src/main/java/studio/livepeer/livepeer/models/components/Storage.java - - src/main/java/studio/livepeer/livepeer/models/components/AssetPatchPayload.java - - src/main/java/studio/livepeer/livepeer/models/components/RecordingStatus.java - - src/main/java/studio/livepeer/livepeer/models/components/Session.java - - src/main/java/studio/livepeer/livepeer/models/components/CreateRoomResponse.java - - src/main/java/studio/livepeer/livepeer/models/components/Participants.java - - src/main/java/studio/livepeer/livepeer/models/components/Room.java - - src/main/java/studio/livepeer/livepeer/models/components/RoomEgressPayload.java - - src/main/java/studio/livepeer/livepeer/models/components/RoomUserResponse.java - - src/main/java/studio/livepeer/livepeer/models/components/RoomUserPayload.java - - src/main/java/studio/livepeer/livepeer/models/components/GetRoomUserResponse.java - - src/main/java/studio/livepeer/livepeer/models/components/RoomUserUpdatePayload.java - - src/main/java/studio/livepeer/livepeer/models/components/RealtimeViewershipMetric.java - - src/main/java/studio/livepeer/livepeer/models/components/ViewershipMetric.java - - src/main/java/studio/livepeer/livepeer/models/components/UsageMetric.java - - src/main/java/studio/livepeer/livepeer/models/components/SigningKey.java - - src/main/java/studio/livepeer/livepeer/models/components/TaskType.java - - src/main/java/studio/livepeer/livepeer/models/components/Upload.java - - src/main/java/studio/livepeer/livepeer/models/components/Content.java - - src/main/java/studio/livepeer/livepeer/models/components/TaskExportData.java - - src/main/java/studio/livepeer/livepeer/models/components/TaskInput.java - - src/main/java/studio/livepeer/livepeer/models/components/TaskStorage.java - - src/main/java/studio/livepeer/livepeer/models/components/TaskHls.java - - src/main/java/studio/livepeer/livepeer/models/components/TaskMp4.java - - src/main/java/studio/livepeer/livepeer/models/components/TaskOutputs.java - - src/main/java/studio/livepeer/livepeer/models/components/TranscodeFile.java - - src/main/java/studio/livepeer/livepeer/models/components/ClipStrategy.java - - src/main/java/studio/livepeer/livepeer/models/components/CatalystPipelineStrategy.java - - src/main/java/studio/livepeer/livepeer/models/components/Clip.java - - src/main/java/studio/livepeer/livepeer/models/components/Params.java - - src/main/java/studio/livepeer/livepeer/models/components/TaskPhase.java - - src/main/java/studio/livepeer/livepeer/models/components/TaskStatus.java - - src/main/java/studio/livepeer/livepeer/models/components/TaskIpfs.java - - src/main/java/studio/livepeer/livepeer/models/components/Export.java - - src/main/java/studio/livepeer/livepeer/models/components/TaskOutputIpfs.java - - src/main/java/studio/livepeer/livepeer/models/components/ExportData.java - - src/main/java/studio/livepeer/livepeer/models/components/Output.java - - src/main/java/studio/livepeer/livepeer/models/components/Task.java - - src/main/java/studio/livepeer/livepeer/models/components/Pinata2.java - - src/main/java/studio/livepeer/livepeer/models/components/Pinata1.java - - src/main/java/studio/livepeer/livepeer/models/components/Pinata.java - - src/main/java/studio/livepeer/livepeer/models/components/IpfsExportParams.java - - src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams2.java - - src/main/java/studio/livepeer/livepeer/models/components/Custom.java - - src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams1.java - - src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams.java - - src/main/java/studio/livepeer/livepeer/models/components/InputType.java - - src/main/java/studio/livepeer/livepeer/models/components/Credentials.java - - src/main/java/studio/livepeer/livepeer/models/components/Input2.java - - src/main/java/studio/livepeer/livepeer/models/components/Input1.java - - src/main/java/studio/livepeer/livepeer/models/components/Input.java - - src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageType.java - - src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageCredentials.java - - src/main/java/studio/livepeer/livepeer/models/components/Storage2.java - - src/main/java/studio/livepeer/livepeer/models/components/StorageType.java - - src/main/java/studio/livepeer/livepeer/models/components/StorageCredentials.java - - src/main/java/studio/livepeer/livepeer/models/components/Storage1.java - - src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorage.java - - src/main/java/studio/livepeer/livepeer/models/components/Hls.java - - src/main/java/studio/livepeer/livepeer/models/components/Mp4.java - - src/main/java/studio/livepeer/livepeer/models/components/Fmp4.java - - src/main/java/studio/livepeer/livepeer/models/components/Outputs.java - - src/main/java/studio/livepeer/livepeer/models/components/TranscodePayload.java - - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoType.java - - src/main/java/studio/livepeer/livepeer/models/components/Live.java - - src/main/java/studio/livepeer/livepeer/models/components/Hrn.java - - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaType.java - - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoSource.java - - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoHrn.java - - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaDvrPlaybackType.java - - src/main/java/studio/livepeer/livepeer/models/components/DvrPlayback.java - - src/main/java/studio/livepeer/livepeer/models/components/Meta.java - - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfo.java - - src/main/java/studio/livepeer/livepeer/models/components/PrimaryType.java - - src/main/java/studio/livepeer/livepeer/models/components/Name.java - - src/main/java/studio/livepeer/livepeer/models/components/Version.java - - src/main/java/studio/livepeer/livepeer/models/components/Domain.java - - src/main/java/studio/livepeer/livepeer/models/components/Attestations.java - - src/main/java/studio/livepeer/livepeer/models/components/Message.java - - src/main/java/studio/livepeer/livepeer/models/components/SignatureType.java - - src/main/java/studio/livepeer/livepeer/models/components/AttestationIpfs.java - - src/main/java/studio/livepeer/livepeer/models/components/AttestationStorage.java - - src/main/java/studio/livepeer/livepeer/models/components/Attestation.java - - src/main/java/studio/livepeer/livepeer/models/components/Security.java - - docs/models/operations/CreateStreamResponse.md - - docs/models/operations/GetStreamsRequest.md - - docs/models/operations/GetStreamsResponse.md - - docs/models/operations/GetStreamRequest.md - - docs/models/operations/GetStreamResponse.md - - docs/models/operations/UpdateStreamRequest.md - - docs/models/operations/UpdateStreamResponse.md - - docs/models/operations/DeleteStreamRequest.md - - docs/models/operations/DeleteStreamResponse.md - - docs/models/operations/TerminateStreamRequest.md - - docs/models/operations/TerminateStreamResponse.md - - docs/models/operations/StartPullStreamRequest.md - - docs/models/operations/StartPullStreamResponse.md - - docs/models/operations/CreateClipTask.md - - docs/models/operations/CreateClipData.md - - docs/models/operations/CreateClipResponse.md - - docs/models/operations/GetClipsRequest.md - - docs/models/operations/GetClipsResponse.md - - docs/models/operations/AddMultistreamTargetRequest.md - - docs/models/operations/AddMultistreamTargetResponse.md - - docs/models/operations/RemoveMultistreamTargetRequest.md - - docs/models/operations/RemoveMultistreamTargetResponse.md - - docs/models/operations/GetMultistreamTargetsResponse.md - - docs/models/operations/CreateMultistreamTargetResponse.md - - docs/models/operations/GetMultistreamTargetRequest.md - - docs/models/operations/GetMultistreamTargetResponse.md - - docs/models/operations/UpdateMultistreamTargetRequest.md - - docs/models/operations/UpdateMultistreamTargetResponse.md - - docs/models/operations/DeleteMultistreamTargetRequest.md - - docs/models/operations/DeleteMultistreamTargetResponse.md - - docs/models/operations/GetWebhooksResponse.md - - docs/models/operations/CreateWebhookResponse.md - - docs/models/operations/GetWebhookRequest.md - - docs/models/operations/GetWebhookResponse.md - - docs/models/operations/UpdateWebhookRequest.md - - docs/models/operations/UpdateWebhookResponse.md - - docs/models/operations/DeleteWebhookRequest.md - - docs/models/operations/DeleteWebhookResponse.md - - docs/models/operations/GetWebhookLogsRequest.md - - docs/models/operations/GetWebhookLogsResponse.md - - docs/models/operations/GetWebhookLogRequest.md - - docs/models/operations/GetWebhookLogResponse.md - - docs/models/operations/ResendWebhookRequest.md - - docs/models/operations/ResendWebhookResponse.md - - docs/models/operations/GetAssetsResponse.md - - docs/models/operations/Task.md - - docs/models/operations/RequestUploadData.md - - docs/models/operations/RequestUploadResponse.md - - docs/models/operations/UploadAssetAssetTask.md - - docs/models/operations/UploadAssetDataOutput.md - - docs/models/operations/UploadAssetTask.md - - docs/models/operations/UploadAssetData.md - - docs/models/operations/UploadAssetResponse.md - - docs/models/operations/GetAssetRequest.md - - docs/models/operations/GetAssetResponse.md - - docs/models/operations/UpdateAssetRequest.md - - docs/models/operations/UpdateAssetResponse.md - - docs/models/operations/DeleteAssetRequest.md - - docs/models/operations/DeleteAssetResponse.md - - docs/models/operations/GetSessionClipsRequest.md - - docs/models/operations/GetSessionClipsResponse.md - - docs/models/operations/GetSessionsResponse.md - - docs/models/operations/GetSessionRequest.md - - docs/models/operations/GetSessionResponse.md - - docs/models/operations/Record.md - - docs/models/operations/GetRecordedSessionsRequest.md - - docs/models/operations/GetRecordedSessionsResponse.md - - docs/models/operations/CreateRoomResponse.md - - docs/models/operations/GetRoomRequest.md - - docs/models/operations/GetRoomResponse.md - - docs/models/operations/DeleteRoomRequest.md - - docs/models/operations/DeleteRoomResponse.md - - docs/models/operations/StartRoomEgressRequest.md - - docs/models/operations/StartRoomEgressResponse.md - - docs/models/operations/StopRoomEgressRequest.md - - docs/models/operations/StopRoomEgressResponse.md - - docs/models/operations/CreateRoomUserRequest.md - - docs/models/operations/CreateRoomUserResponse.md - - docs/models/operations/GetRoomUserRequest.md - - docs/models/operations/GetRoomUserResponse.md - - docs/models/operations/UpdateRoomUserRequest.md - - docs/models/operations/UpdateRoomUserResponse.md - - docs/models/operations/DeleteRoomUserRequest.md - - docs/models/operations/DeleteRoomUserResponse.md - - docs/models/operations/BreakdownBy.md - - docs/models/operations/GetRealtimeViewershipNowRequest.md - - docs/models/operations/GetRealtimeViewershipNowResponse.md - - docs/models/operations/From.md - - docs/models/operations/To.md - - docs/models/operations/TimeStep.md - - docs/models/operations/QueryParamBreakdownBy.md - - docs/models/operations/GetViewershipMetricsRequest.md - - docs/models/operations/GetViewershipMetricsResponse.md - - docs/models/operations/QueryParamFrom.md - - docs/models/operations/QueryParamTo.md - - docs/models/operations/QueryParamTimeStep.md - - docs/models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.md - - docs/models/operations/GetCreatorViewershipMetricsRequest.md - - docs/models/operations/GetCreatorViewershipMetricsResponse.md - - docs/models/operations/GetPublicViewershipMetricsRequest.md - - docs/models/operations/GetPublicViewershipMetricsData.md - - docs/models/operations/GetPublicViewershipMetricsResponse.md - - docs/models/operations/GetUsageMetricsQueryParamTimeStep.md - - docs/models/operations/GetUsageMetricsQueryParamBreakdownBy.md - - docs/models/operations/GetUsageMetricsRequest.md - - docs/models/operations/GetUsageMetricsResponse.md - - docs/models/operations/CreateSigningKeyResponse.md - - docs/models/operations/GetSigningKeysResponse.md - - docs/models/operations/DeleteSigningKeyRequest.md - - docs/models/operations/DeleteSigningKeyResponse.md - - docs/models/operations/GetSigningKeyRequest.md - - docs/models/operations/GetSigningKeyResponse.md - - docs/models/operations/UpdateSigningKeyRequestBody.md - - docs/models/operations/UpdateSigningKeyRequest.md - - docs/models/operations/UpdateSigningKeyResponse.md - - docs/models/operations/GetTasksResponse.md - - docs/models/operations/GetTaskRequest.md - - docs/models/operations/GetTaskResponse.md - - docs/models/operations/TranscodeVideoResponse.md - - docs/models/operations/GetPlaybackInfoRequest.md - - docs/models/operations/GetPlaybackInfoResponse.md - - docs/models/errors/Error.md - - docs/models/components/Three.md - - docs/models/components/StreamUserTags.md - - docs/models/components/IsMobile1.md - - docs/models/components/StreamIsMobile.md - - docs/models/components/StreamLocation.md - - docs/models/components/StreamPull.md - - docs/models/components/StreamRecordingSpec.md - - docs/models/components/StreamMultistream.md - - docs/models/components/Renditions.md - - docs/models/components/Stream.md - - docs/models/components/TargetOutput.md - - docs/models/components/TranscodeProfileProfile.md - - docs/models/components/TranscodeProfileEncoder.md - - docs/models/components/TranscodeProfile.md - - docs/models/components/Profile.md + - docs/models/components/Asset.md + - docs/models/components/AssetIpfs.md + - docs/models/components/AssetNftMetadata.md + - docs/models/components/AssetNftMetadataTemplate.md + - docs/models/components/AssetPatchPayload.md + - docs/models/components/AssetPhase.md + - docs/models/components/AssetSource3Type.md + - docs/models/components/AssetSourceType.md + - docs/models/components/AssetSpec.md + - docs/models/components/AssetStatus.md + - docs/models/components/AssetStorage.md + - docs/models/components/AssetType.md + - docs/models/components/AssetVideoSpecType.md + - docs/models/components/Attestation.md + - docs/models/components/AttestationIpfs.md + - docs/models/components/AttestationStorage.md + - docs/models/components/Attestations.md + - docs/models/components/CatalystPipelineStrategy.md + - docs/models/components/Clip.md + - docs/models/components/ClipPayload.md + - docs/models/components/ClipStrategy.md + - docs/models/components/Content.md + - docs/models/components/CreateRoomResponse.md + - docs/models/components/CreatorId.md + - docs/models/components/CreatorId1.md + - docs/models/components/CreatorIdType.md + - docs/models/components/Credentials.md + - docs/models/components/Custom.md + - docs/models/components/Domain.md + - docs/models/components/DvrPlayback.md - docs/models/components/Encoder.md + - docs/models/components/Encryption.md + - docs/models/components/EncryptionOutput.md + - docs/models/components/Error.md + - docs/models/components/Events.md + - docs/models/components/Export.md + - docs/models/components/ExportData.md + - docs/models/components/ExportTaskParams.md + - docs/models/components/ExportTaskParams1.md + - docs/models/components/ExportTaskParams2.md - docs/models/components/FfmpegProfile.md - - docs/models/components/Type.md - - docs/models/components/PlaybackPolicy.md - - docs/models/components/CreatorIdType.md - - docs/models/components/CreatorId1.md - - docs/models/components/CreatorId.md - - docs/models/components/NewStreamPayloadRecordingSpec.md - - docs/models/components/NewStreamPayload.md - - docs/models/components/UserTags3.md - - docs/models/components/UserTags.md - - docs/models/components/Multistream.md - - docs/models/components/TargetSpec.md - - docs/models/components/InputCreatorIdType.md - - docs/models/components/InputCreatorId1.md + - docs/models/components/Fmp4.md + - docs/models/components/GetRoomUserResponse.md + - docs/models/components/Hash.md + - docs/models/components/Hls.md + - docs/models/components/Hrn.md + - docs/models/components/Input.md + - docs/models/components/Input1.md + - docs/models/components/Input2.md - docs/models/components/InputCreatorId.md - - docs/models/components/One.md + - docs/models/components/InputCreatorId1.md + - docs/models/components/InputCreatorIdType.md + - docs/models/components/InputType.md + - docs/models/components/Ipfs.md + - docs/models/components/Ipfs1.md + - docs/models/components/IpfsExportParams.md + - docs/models/components/IpfsFileInfo.md - docs/models/components/IsMobile.md + - docs/models/components/IsMobile1.md + - docs/models/components/LastFailure.md + - docs/models/components/Live.md - docs/models/components/Location.md - - docs/models/components/Pull.md - - docs/models/components/StreamPatchPayload.md - - docs/models/components/RecordingSpec.md - - docs/models/components/AssetType.md - - docs/models/components/AssetSource3Type.md - - docs/models/components/Source3.md - - docs/models/components/AssetSourceType.md - - docs/models/components/Two.md - - docs/models/components/SourceType.md - - docs/models/components/Source1.md - - docs/models/components/Source.md - - docs/models/components/AssetNftMetadataTemplate.md - - docs/models/components/AssetNftMetadata.md - - docs/models/components/AssetSpec.md - - docs/models/components/AssetIpfs.md - - docs/models/components/AssetStorage.md - - docs/models/components/AssetPhase.md - - docs/models/components/AssetStatus.md - - docs/models/components/Hash.md - - docs/models/components/AssetVideoSpecType.md - - docs/models/components/Tracks.md - - docs/models/components/VideoSpec.md - - docs/models/components/Asset.md - - docs/models/components/Phase.md - - docs/models/components/Tasks.md - - docs/models/components/StorageStatus.md - - docs/models/components/IpfsFileInfo.md - - docs/models/components/EncryptionOutput.md - - docs/models/components/ClipPayload.md - - docs/models/components/TargetAddPayloadSpec.md - - docs/models/components/TargetAddPayload.md + - docs/models/components/Message.md + - docs/models/components/Meta.md + - docs/models/components/Mp4.md + - docs/models/components/Multistream.md - docs/models/components/MultistreamTarget.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/Request.md - - docs/models/components/Response.md - - docs/models/components/WebhookLog.md - - docs/models/components/NewAssetPayloadIpfs1.md + - docs/models/components/MultistreamTargetInput.md + - docs/models/components/Name.md + - docs/models/components/NewAssetFromUrlPayload.md + - docs/models/components/NewAssetPayload.md + - docs/models/components/NewAssetPayloadEncryption.md - docs/models/components/NewAssetPayloadIpfs.md + - docs/models/components/NewAssetPayloadIpfs1.md - docs/models/components/NewAssetPayloadStorage.md - - docs/models/components/NewAssetPayloadEncryption.md - - docs/models/components/NewAssetPayload.md - - docs/models/components/NftMetadataTemplate.md + - docs/models/components/NewStreamPayload.md + - docs/models/components/NewStreamPayloadRecordingSpec.md - docs/models/components/NftMetadata.md - - docs/models/components/Spec.md - - docs/models/components/NewAssetFromUrlPayload.md - - docs/models/components/Ipfs1.md - - docs/models/components/Ipfs.md - - docs/models/components/Storage.md - - docs/models/components/AssetPatchPayload.md - - docs/models/components/RecordingStatus.md - - docs/models/components/Session.md - - docs/models/components/CreateRoomResponse.md + - docs/models/components/NftMetadataTemplate.md + - docs/models/components/One.md + - docs/models/components/Output.md + - docs/models/components/Outputs.md + - docs/models/components/Params.md - docs/models/components/Participants.md + - docs/models/components/Phase.md + - docs/models/components/Pinata.md + - docs/models/components/Pinata1.md + - docs/models/components/Pinata2.md + - docs/models/components/PlaybackInfo.md + - docs/models/components/PlaybackInfoHrn.md + - docs/models/components/PlaybackInfoMetaDvrPlaybackType.md + - docs/models/components/PlaybackInfoMetaType.md + - docs/models/components/PlaybackInfoSource.md + - docs/models/components/PlaybackInfoType.md + - docs/models/components/PlaybackPolicy.md + - docs/models/components/PrimaryType.md + - docs/models/components/Profile.md + - docs/models/components/Pull.md + - docs/models/components/RealtimeViewershipMetric.md + - docs/models/components/RecordingSpec.md + - docs/models/components/RecordingStatus.md + - docs/models/components/Renditions.md + - docs/models/components/Request.md + - docs/models/components/Response.md - docs/models/components/Room.md - docs/models/components/RoomEgressPayload.md - - docs/models/components/RoomUserResponse.md - docs/models/components/RoomUserPayload.md - - docs/models/components/GetRoomUserResponse.md + - docs/models/components/RoomUserResponse.md - docs/models/components/RoomUserUpdatePayload.md - - docs/models/components/RealtimeViewershipMetric.md - - docs/models/components/ViewershipMetric.md - - docs/models/components/UsageMetric.md + - docs/models/components/Security.md + - docs/models/components/Session.md + - docs/models/components/SignatureType.md - docs/models/components/SigningKey.md - - docs/models/components/TaskType.md - - docs/models/components/Upload.md - - docs/models/components/Content.md + - docs/models/components/Source.md + - docs/models/components/Source1.md + - docs/models/components/Source3.md + - docs/models/components/SourceType.md + - docs/models/components/Spec.md + - docs/models/components/Status.md + - docs/models/components/Storage.md + - docs/models/components/Storage1.md + - docs/models/components/Storage2.md + - docs/models/components/StorageCredentials.md + - docs/models/components/StorageStatus.md + - docs/models/components/StorageType.md + - docs/models/components/Stream.md + - docs/models/components/StreamIsMobile.md + - docs/models/components/StreamLocation.md + - docs/models/components/StreamMultistream.md + - docs/models/components/StreamPatchPayload.md + - docs/models/components/StreamPull.md + - docs/models/components/StreamRecordingSpec.md + - docs/models/components/StreamUserTags.md + - docs/models/components/Target.md + - docs/models/components/TargetAddPayload.md + - docs/models/components/TargetAddPayloadSpec.md + - docs/models/components/TargetOutput.md + - docs/models/components/TargetSpec.md + - docs/models/components/Task.md - docs/models/components/TaskExportData.md - - docs/models/components/TaskInput.md - - docs/models/components/TaskStorage.md - docs/models/components/TaskHls.md + - docs/models/components/TaskInput.md + - docs/models/components/TaskIpfs.md - docs/models/components/TaskMp4.md + - docs/models/components/TaskOutputIpfs.md - docs/models/components/TaskOutputs.md - - docs/models/components/TranscodeFile.md - - docs/models/components/ClipStrategy.md - - docs/models/components/CatalystPipelineStrategy.md - - docs/models/components/Clip.md - - docs/models/components/Params.md - docs/models/components/TaskPhase.md - docs/models/components/TaskStatus.md - - docs/models/components/TaskIpfs.md - - docs/models/components/Export.md - - docs/models/components/TaskOutputIpfs.md - - docs/models/components/ExportData.md - - docs/models/components/Output.md - - docs/models/components/Task.md - - docs/models/components/Pinata2.md - - docs/models/components/Pinata1.md - - docs/models/components/Pinata.md - - docs/models/components/IpfsExportParams.md - - docs/models/components/ExportTaskParams2.md - - docs/models/components/Custom.md - - docs/models/components/ExportTaskParams1.md - - docs/models/components/ExportTaskParams.md - - docs/models/components/InputType.md - - docs/models/components/Credentials.md - - docs/models/components/Input2.md - - docs/models/components/Input1.md - - docs/models/components/Input.md - - docs/models/components/TranscodePayloadStorageType.md - - docs/models/components/TranscodePayloadStorageCredentials.md - - docs/models/components/Storage2.md - - docs/models/components/StorageType.md - - docs/models/components/StorageCredentials.md - - docs/models/components/Storage1.md - - docs/models/components/TranscodePayloadStorage.md - - docs/models/components/Hls.md - - docs/models/components/Mp4.md - - docs/models/components/Fmp4.md - - docs/models/components/Outputs.md + - docs/models/components/TaskStorage.md + - docs/models/components/TaskType.md + - docs/models/components/TaskUpload.md + - docs/models/components/Tasks.md + - docs/models/components/Three.md + - docs/models/components/Tracks.md + - docs/models/components/TranscodeFile.md - docs/models/components/TranscodePayload.md - - docs/models/components/PlaybackInfoType.md - - docs/models/components/Live.md - - docs/models/components/Hrn.md - - docs/models/components/PlaybackInfoMetaType.md - - docs/models/components/PlaybackInfoSource.md - - docs/models/components/PlaybackInfoHrn.md - - docs/models/components/PlaybackInfoMetaDvrPlaybackType.md - - docs/models/components/DvrPlayback.md - - docs/models/components/Meta.md - - docs/models/components/PlaybackInfo.md - - docs/models/components/PrimaryType.md - - docs/models/components/Name.md + - docs/models/components/TranscodePayloadStorage.md + - docs/models/components/TranscodePayloadStorageCredentials.md + - docs/models/components/TranscodePayloadStorageType.md + - docs/models/components/TranscodeProfile.md + - docs/models/components/TranscodeProfileEncoder.md + - docs/models/components/TranscodeProfileProfile.md + - docs/models/components/Two.md + - docs/models/components/Type.md + - docs/models/components/Upload.md + - docs/models/components/UsageMetric.md + - docs/models/components/UserTags.md + - docs/models/components/UserTags3.md - docs/models/components/Version.md - - docs/models/components/Domain.md - - docs/models/components/Attestations.md - - docs/models/components/Message.md - - docs/models/components/SignatureType.md - - docs/models/components/AttestationIpfs.md - - docs/models/components/AttestationStorage.md - - docs/models/components/Attestation.md - - docs/models/components/Security.md + - docs/models/components/VideoSpec.md + - docs/models/components/ViewershipMetric.md + - docs/models/components/Webhook.md + - docs/models/components/WebhookInput.md + - docs/models/components/WebhookLog.md + - docs/models/errors/Error.md + - docs/models/operations/AddMultistreamTargetRequest.md + - docs/models/operations/AddMultistreamTargetResponse.md + - docs/models/operations/BreakdownBy.md + - docs/models/operations/CreateClipData.md + - docs/models/operations/CreateClipResponse.md + - docs/models/operations/CreateClipTask.md + - docs/models/operations/CreateMultistreamTargetResponse.md + - docs/models/operations/CreateRoomResponse.md + - docs/models/operations/CreateRoomUserRequest.md + - docs/models/operations/CreateRoomUserResponse.md + - docs/models/operations/CreateSigningKeyResponse.md + - docs/models/operations/CreateStreamResponse.md + - docs/models/operations/CreateWebhookResponse.md + - docs/models/operations/DeleteAssetRequest.md + - docs/models/operations/DeleteAssetResponse.md + - docs/models/operations/DeleteMultistreamTargetRequest.md + - docs/models/operations/DeleteMultistreamTargetResponse.md + - docs/models/operations/DeleteRoomRequest.md + - docs/models/operations/DeleteRoomResponse.md + - docs/models/operations/DeleteRoomUserRequest.md + - docs/models/operations/DeleteRoomUserResponse.md + - docs/models/operations/DeleteSigningKeyRequest.md + - docs/models/operations/DeleteSigningKeyResponse.md + - docs/models/operations/DeleteStreamRequest.md + - docs/models/operations/DeleteStreamResponse.md + - docs/models/operations/DeleteWebhookRequest.md + - docs/models/operations/DeleteWebhookResponse.md + - docs/models/operations/From.md + - docs/models/operations/GetAssetRequest.md + - docs/models/operations/GetAssetResponse.md + - docs/models/operations/GetAssetsResponse.md + - docs/models/operations/GetClipsRequest.md + - docs/models/operations/GetClipsResponse.md + - docs/models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.md + - docs/models/operations/GetCreatorViewershipMetricsRequest.md + - docs/models/operations/GetCreatorViewershipMetricsResponse.md + - docs/models/operations/GetMultistreamTargetRequest.md + - docs/models/operations/GetMultistreamTargetResponse.md + - docs/models/operations/GetMultistreamTargetsResponse.md + - docs/models/operations/GetPlaybackInfoRequest.md + - docs/models/operations/GetPlaybackInfoResponse.md + - docs/models/operations/GetPublicViewershipMetricsData.md + - docs/models/operations/GetPublicViewershipMetricsRequest.md + - docs/models/operations/GetPublicViewershipMetricsResponse.md + - docs/models/operations/GetRealtimeViewershipNowRequest.md + - docs/models/operations/GetRealtimeViewershipNowResponse.md + - docs/models/operations/GetRecordedSessionsRequest.md + - docs/models/operations/GetRecordedSessionsResponse.md + - docs/models/operations/GetRoomRequest.md + - docs/models/operations/GetRoomResponse.md + - docs/models/operations/GetRoomUserRequest.md + - docs/models/operations/GetRoomUserResponse.md + - docs/models/operations/GetSessionClipsRequest.md + - docs/models/operations/GetSessionClipsResponse.md + - docs/models/operations/GetSessionRequest.md + - docs/models/operations/GetSessionResponse.md + - docs/models/operations/GetSessionsResponse.md + - docs/models/operations/GetSigningKeyRequest.md + - docs/models/operations/GetSigningKeyResponse.md + - docs/models/operations/GetSigningKeysResponse.md + - docs/models/operations/GetStreamRequest.md + - docs/models/operations/GetStreamResponse.md + - docs/models/operations/GetStreamsRequest.md + - docs/models/operations/GetStreamsResponse.md + - docs/models/operations/GetTaskRequest.md + - docs/models/operations/GetTaskResponse.md + - docs/models/operations/GetTasksResponse.md + - docs/models/operations/GetUsageMetricsQueryParamBreakdownBy.md + - docs/models/operations/GetUsageMetricsQueryParamTimeStep.md + - docs/models/operations/GetUsageMetricsRequest.md + - docs/models/operations/GetUsageMetricsResponse.md + - docs/models/operations/GetViewershipMetricsRequest.md + - docs/models/operations/GetViewershipMetricsResponse.md + - docs/models/operations/GetWebhookLogRequest.md + - docs/models/operations/GetWebhookLogResponse.md + - docs/models/operations/GetWebhookLogsRequest.md + - docs/models/operations/GetWebhookLogsResponse.md + - docs/models/operations/GetWebhookRequest.md + - docs/models/operations/GetWebhookResponse.md + - docs/models/operations/GetWebhooksResponse.md + - docs/models/operations/QueryParamBreakdownBy.md + - docs/models/operations/QueryParamFrom.md + - docs/models/operations/QueryParamTimeStep.md + - docs/models/operations/QueryParamTo.md + - docs/models/operations/Record.md + - docs/models/operations/RemoveMultistreamTargetRequest.md + - docs/models/operations/RemoveMultistreamTargetResponse.md + - docs/models/operations/RequestUploadData.md + - docs/models/operations/RequestUploadResponse.md + - docs/models/operations/ResendWebhookRequest.md + - docs/models/operations/ResendWebhookResponse.md + - docs/models/operations/StartPullStreamRequest.md + - docs/models/operations/StartPullStreamResponse.md + - docs/models/operations/StartRoomEgressRequest.md + - docs/models/operations/StartRoomEgressResponse.md + - docs/models/operations/StopRoomEgressRequest.md + - docs/models/operations/StopRoomEgressResponse.md + - docs/models/operations/Task.md + - docs/models/operations/TerminateStreamRequest.md + - docs/models/operations/TerminateStreamResponse.md + - docs/models/operations/TimeStep.md + - docs/models/operations/To.md + - docs/models/operations/TranscodeVideoResponse.md + - docs/models/operations/UpdateAssetRequest.md + - docs/models/operations/UpdateAssetResponse.md + - docs/models/operations/UpdateMultistreamTargetRequest.md + - docs/models/operations/UpdateMultistreamTargetResponse.md + - docs/models/operations/UpdateRoomUserRequest.md + - docs/models/operations/UpdateRoomUserResponse.md + - docs/models/operations/UpdateSigningKeyRequest.md + - docs/models/operations/UpdateSigningKeyRequestBody.md + - docs/models/operations/UpdateSigningKeyResponse.md + - docs/models/operations/UpdateStreamRequest.md + - docs/models/operations/UpdateStreamResponse.md + - docs/models/operations/UpdateWebhookRequest.md + - docs/models/operations/UpdateWebhookResponse.md + - docs/models/operations/UploadAssetAssetTask.md + - docs/models/operations/UploadAssetData.md + - docs/models/operations/UploadAssetDataOutput.md + - docs/models/operations/UploadAssetResponse.md + - docs/models/operations/UploadAssetTask.md + - docs/sdks/accesscontrol/README.md + - docs/sdks/asset/README.md - docs/sdks/livepeer/README.md - - docs/sdks/stream/README.md + - docs/sdks/metrics/README.md - docs/sdks/multistream/README.md - - docs/sdks/webhook/README.md - - docs/sdks/asset/README.md - - docs/sdks/session/README.md + - docs/sdks/playback/README.md - docs/sdks/room/README.md - - docs/sdks/metrics/README.md - - docs/sdks/accesscontrol/README.md + - docs/sdks/session/README.md + - docs/sdks/stream/README.md - docs/sdks/task/README.md - docs/sdks/transcode/README.md - - docs/sdks/playback/README.md - - USAGE.md - - CONTRIBUTING.md + - docs/sdks/webhook/README.md + - gradle.properties + - gradle/wrapper/gradle-wrapper.jar + - gradle/wrapper/gradle-wrapper.properties + - gradlew + - gradlew.bat + - settings.gradle + - src/main/java/studio/livepeer/livepeer/AccessControl.java + - src/main/java/studio/livepeer/livepeer/Asset.java + - src/main/java/studio/livepeer/livepeer/Livepeer.java + - src/main/java/studio/livepeer/livepeer/Metrics.java + - src/main/java/studio/livepeer/livepeer/Multistream.java + - src/main/java/studio/livepeer/livepeer/Playback.java + - src/main/java/studio/livepeer/livepeer/Room.java + - src/main/java/studio/livepeer/livepeer/SDKConfiguration.java + - src/main/java/studio/livepeer/livepeer/SecuritySource.java + - src/main/java/studio/livepeer/livepeer/Session.java + - src/main/java/studio/livepeer/livepeer/Stream.java + - src/main/java/studio/livepeer/livepeer/Task.java + - src/main/java/studio/livepeer/livepeer/Transcode.java + - src/main/java/studio/livepeer/livepeer/Webhook.java + - src/main/java/studio/livepeer/livepeer/models/components/Asset.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetIpfs.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadata.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadataTemplate.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetPatchPayload.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetPhase.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetSource3Type.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetSourceType.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetSpec.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetStatus.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetStorage.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetType.java + - src/main/java/studio/livepeer/livepeer/models/components/AssetVideoSpecType.java + - src/main/java/studio/livepeer/livepeer/models/components/Attestation.java + - src/main/java/studio/livepeer/livepeer/models/components/AttestationIpfs.java + - src/main/java/studio/livepeer/livepeer/models/components/AttestationStorage.java + - src/main/java/studio/livepeer/livepeer/models/components/Attestations.java + - src/main/java/studio/livepeer/livepeer/models/components/CatalystPipelineStrategy.java + - src/main/java/studio/livepeer/livepeer/models/components/Clip.java + - src/main/java/studio/livepeer/livepeer/models/components/ClipPayload.java + - src/main/java/studio/livepeer/livepeer/models/components/ClipStrategy.java + - src/main/java/studio/livepeer/livepeer/models/components/Content.java + - src/main/java/studio/livepeer/livepeer/models/components/CreateRoomResponse.java + - src/main/java/studio/livepeer/livepeer/models/components/CreatorId.java + - src/main/java/studio/livepeer/livepeer/models/components/CreatorId1.java + - src/main/java/studio/livepeer/livepeer/models/components/CreatorIdType.java + - src/main/java/studio/livepeer/livepeer/models/components/Credentials.java + - src/main/java/studio/livepeer/livepeer/models/components/Custom.java + - src/main/java/studio/livepeer/livepeer/models/components/Domain.java + - src/main/java/studio/livepeer/livepeer/models/components/DvrPlayback.java + - src/main/java/studio/livepeer/livepeer/models/components/Encoder.java + - src/main/java/studio/livepeer/livepeer/models/components/Encryption.java + - src/main/java/studio/livepeer/livepeer/models/components/EncryptionOutput.java + - src/main/java/studio/livepeer/livepeer/models/components/Error.java + - src/main/java/studio/livepeer/livepeer/models/components/Events.java + - src/main/java/studio/livepeer/livepeer/models/components/Export.java + - src/main/java/studio/livepeer/livepeer/models/components/ExportData.java + - src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams.java + - src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams1.java + - src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams2.java + - src/main/java/studio/livepeer/livepeer/models/components/FfmpegProfile.java + - src/main/java/studio/livepeer/livepeer/models/components/Fmp4.java + - src/main/java/studio/livepeer/livepeer/models/components/GetRoomUserResponse.java + - src/main/java/studio/livepeer/livepeer/models/components/Hash.java + - src/main/java/studio/livepeer/livepeer/models/components/Hls.java + - src/main/java/studio/livepeer/livepeer/models/components/Hrn.java + - src/main/java/studio/livepeer/livepeer/models/components/Input.java + - src/main/java/studio/livepeer/livepeer/models/components/Input1.java + - src/main/java/studio/livepeer/livepeer/models/components/Input2.java + - src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId.java + - src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId1.java + - src/main/java/studio/livepeer/livepeer/models/components/InputCreatorIdType.java + - src/main/java/studio/livepeer/livepeer/models/components/InputType.java + - src/main/java/studio/livepeer/livepeer/models/components/Ipfs.java + - src/main/java/studio/livepeer/livepeer/models/components/Ipfs1.java + - src/main/java/studio/livepeer/livepeer/models/components/IpfsExportParams.java + - src/main/java/studio/livepeer/livepeer/models/components/IpfsFileInfo.java + - src/main/java/studio/livepeer/livepeer/models/components/IsMobile.java + - src/main/java/studio/livepeer/livepeer/models/components/IsMobile1.java + - src/main/java/studio/livepeer/livepeer/models/components/LastFailure.java + - src/main/java/studio/livepeer/livepeer/models/components/Live.java + - src/main/java/studio/livepeer/livepeer/models/components/Location.java + - src/main/java/studio/livepeer/livepeer/models/components/Message.java + - src/main/java/studio/livepeer/livepeer/models/components/Meta.java + - src/main/java/studio/livepeer/livepeer/models/components/Mp4.java + - src/main/java/studio/livepeer/livepeer/models/components/Multistream.java + - src/main/java/studio/livepeer/livepeer/models/components/MultistreamTarget.java + - src/main/java/studio/livepeer/livepeer/models/components/MultistreamTargetInput.java + - src/main/java/studio/livepeer/livepeer/models/components/Name.java + - src/main/java/studio/livepeer/livepeer/models/components/NewAssetFromUrlPayload.java + - src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayload.java + - src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadEncryption.java + - src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs.java + - src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs1.java + - src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadStorage.java + - src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayload.java + - src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayloadRecordingSpec.java + - src/main/java/studio/livepeer/livepeer/models/components/NftMetadata.java + - src/main/java/studio/livepeer/livepeer/models/components/NftMetadataTemplate.java + - src/main/java/studio/livepeer/livepeer/models/components/One.java + - src/main/java/studio/livepeer/livepeer/models/components/Output.java + - src/main/java/studio/livepeer/livepeer/models/components/Outputs.java + - src/main/java/studio/livepeer/livepeer/models/components/Params.java + - src/main/java/studio/livepeer/livepeer/models/components/Participants.java + - src/main/java/studio/livepeer/livepeer/models/components/Phase.java + - src/main/java/studio/livepeer/livepeer/models/components/Pinata.java + - src/main/java/studio/livepeer/livepeer/models/components/Pinata1.java + - src/main/java/studio/livepeer/livepeer/models/components/Pinata2.java + - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfo.java + - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoHrn.java + - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaDvrPlaybackType.java + - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaType.java + - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoSource.java + - src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoType.java + - src/main/java/studio/livepeer/livepeer/models/components/PlaybackPolicy.java + - src/main/java/studio/livepeer/livepeer/models/components/PrimaryType.java + - src/main/java/studio/livepeer/livepeer/models/components/Profile.java + - src/main/java/studio/livepeer/livepeer/models/components/Pull.java + - src/main/java/studio/livepeer/livepeer/models/components/RealtimeViewershipMetric.java + - src/main/java/studio/livepeer/livepeer/models/components/RecordingSpec.java + - src/main/java/studio/livepeer/livepeer/models/components/RecordingStatus.java + - src/main/java/studio/livepeer/livepeer/models/components/Renditions.java + - src/main/java/studio/livepeer/livepeer/models/components/Request.java + - src/main/java/studio/livepeer/livepeer/models/components/Response.java + - src/main/java/studio/livepeer/livepeer/models/components/Room.java + - src/main/java/studio/livepeer/livepeer/models/components/RoomEgressPayload.java + - src/main/java/studio/livepeer/livepeer/models/components/RoomUserPayload.java + - src/main/java/studio/livepeer/livepeer/models/components/RoomUserResponse.java + - src/main/java/studio/livepeer/livepeer/models/components/RoomUserUpdatePayload.java + - src/main/java/studio/livepeer/livepeer/models/components/Security.java + - src/main/java/studio/livepeer/livepeer/models/components/Session.java + - src/main/java/studio/livepeer/livepeer/models/components/SignatureType.java + - src/main/java/studio/livepeer/livepeer/models/components/SigningKey.java + - src/main/java/studio/livepeer/livepeer/models/components/Source.java + - src/main/java/studio/livepeer/livepeer/models/components/Source1.java + - src/main/java/studio/livepeer/livepeer/models/components/Source3.java + - src/main/java/studio/livepeer/livepeer/models/components/SourceType.java + - src/main/java/studio/livepeer/livepeer/models/components/Spec.java + - src/main/java/studio/livepeer/livepeer/models/components/Status.java + - src/main/java/studio/livepeer/livepeer/models/components/Storage.java + - src/main/java/studio/livepeer/livepeer/models/components/Storage1.java + - src/main/java/studio/livepeer/livepeer/models/components/Storage2.java + - src/main/java/studio/livepeer/livepeer/models/components/StorageCredentials.java + - src/main/java/studio/livepeer/livepeer/models/components/StorageStatus.java + - src/main/java/studio/livepeer/livepeer/models/components/StorageType.java + - src/main/java/studio/livepeer/livepeer/models/components/Stream.java + - src/main/java/studio/livepeer/livepeer/models/components/StreamIsMobile.java + - src/main/java/studio/livepeer/livepeer/models/components/StreamLocation.java + - src/main/java/studio/livepeer/livepeer/models/components/StreamMultistream.java + - src/main/java/studio/livepeer/livepeer/models/components/StreamPatchPayload.java + - src/main/java/studio/livepeer/livepeer/models/components/StreamPull.java + - src/main/java/studio/livepeer/livepeer/models/components/StreamRecordingSpec.java + - src/main/java/studio/livepeer/livepeer/models/components/StreamUserTags.java + - src/main/java/studio/livepeer/livepeer/models/components/Target.java + - src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayload.java + - src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayloadSpec.java + - src/main/java/studio/livepeer/livepeer/models/components/TargetOutput.java + - src/main/java/studio/livepeer/livepeer/models/components/TargetSpec.java + - src/main/java/studio/livepeer/livepeer/models/components/Task.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskExportData.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskHls.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskInput.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskIpfs.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskMp4.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskOutputIpfs.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskOutputs.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskPhase.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskStatus.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskStorage.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskType.java + - src/main/java/studio/livepeer/livepeer/models/components/TaskUpload.java + - src/main/java/studio/livepeer/livepeer/models/components/Tasks.java + - src/main/java/studio/livepeer/livepeer/models/components/Three.java + - src/main/java/studio/livepeer/livepeer/models/components/Tracks.java + - src/main/java/studio/livepeer/livepeer/models/components/TranscodeFile.java + - src/main/java/studio/livepeer/livepeer/models/components/TranscodePayload.java + - src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorage.java + - src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageCredentials.java + - src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageType.java + - src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfile.java + - src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileEncoder.java + - src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileProfile.java + - src/main/java/studio/livepeer/livepeer/models/components/Two.java + - src/main/java/studio/livepeer/livepeer/models/components/Type.java + - src/main/java/studio/livepeer/livepeer/models/components/Upload.java + - src/main/java/studio/livepeer/livepeer/models/components/UsageMetric.java + - src/main/java/studio/livepeer/livepeer/models/components/UserTags.java + - src/main/java/studio/livepeer/livepeer/models/components/UserTags3.java + - src/main/java/studio/livepeer/livepeer/models/components/Version.java + - src/main/java/studio/livepeer/livepeer/models/components/VideoSpec.java + - src/main/java/studio/livepeer/livepeer/models/components/ViewershipMetric.java + - src/main/java/studio/livepeer/livepeer/models/components/Webhook.java + - src/main/java/studio/livepeer/livepeer/models/components/WebhookInput.java + - src/main/java/studio/livepeer/livepeer/models/components/WebhookLog.java + - src/main/java/studio/livepeer/livepeer/models/errors/AuthException.java + - src/main/java/studio/livepeer/livepeer/models/errors/Error.java + - src/main/java/studio/livepeer/livepeer/models/errors/SDKError.java + - src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/BreakdownBy.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateClipData.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateClipRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateClipResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateClipTask.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/From.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetAssetResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetClipsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsData.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetTaskResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetTasksRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetTasksResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamBreakdownBy.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamTimeStep.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/QueryParamBreakdownBy.java + - src/main/java/studio/livepeer/livepeer/models/operations/QueryParamFrom.java + - src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTimeStep.java + - src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTo.java + - src/main/java/studio/livepeer/livepeer/models/operations/Record.java + - src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadData.java + - src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/SDKMethodInterfaces.java + - src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/Task.java + - src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/TimeStep.java + - src/main/java/studio/livepeer/livepeer/models/operations/To.java + - src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBody.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequest.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetAssetTask.java + - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetData.java + - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetDataOutput.java + - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetRequestBuilder.java + - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetResponse.java + - src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetTask.java + - src/main/java/studio/livepeer/livepeer/utils/BackoffStrategy.java + - src/main/java/studio/livepeer/livepeer/utils/BigDecimalString.java + - src/main/java/studio/livepeer/livepeer/utils/BigIntegerString.java + - src/main/java/studio/livepeer/livepeer/utils/Constants.java + - src/main/java/studio/livepeer/livepeer/utils/Deserializers.java + - src/main/java/studio/livepeer/livepeer/utils/EventStream.java + - src/main/java/studio/livepeer/livepeer/utils/EventStreamLineReader.java + - src/main/java/studio/livepeer/livepeer/utils/EventStreamMessage.java + - src/main/java/studio/livepeer/livepeer/utils/EventStreamReader.java + - src/main/java/studio/livepeer/livepeer/utils/FormMetadata.java + - src/main/java/studio/livepeer/livepeer/utils/HTTPClient.java + - src/main/java/studio/livepeer/livepeer/utils/HTTPRequest.java + - src/main/java/studio/livepeer/livepeer/utils/HasSecurity.java + - src/main/java/studio/livepeer/livepeer/utils/HeaderMetadata.java + - src/main/java/studio/livepeer/livepeer/utils/Helpers.java + - src/main/java/studio/livepeer/livepeer/utils/Hook.java + - src/main/java/studio/livepeer/livepeer/utils/Hooks.java + - src/main/java/studio/livepeer/livepeer/utils/JSON.java + - src/main/java/studio/livepeer/livepeer/utils/LazySingletonValue.java + - src/main/java/studio/livepeer/livepeer/utils/Metadata.java + - src/main/java/studio/livepeer/livepeer/utils/Multipart.java + - src/main/java/studio/livepeer/livepeer/utils/MultipartFormMetadata.java + - src/main/java/studio/livepeer/livepeer/utils/NameValue.java + - src/main/java/studio/livepeer/livepeer/utils/OneOfDeserializer.java + - src/main/java/studio/livepeer/livepeer/utils/Options.java + - src/main/java/studio/livepeer/livepeer/utils/PathParamsMetadata.java + - src/main/java/studio/livepeer/livepeer/utils/QueryEncoding.java + - src/main/java/studio/livepeer/livepeer/utils/QueryParameter.java + - src/main/java/studio/livepeer/livepeer/utils/QueryParameters.java + - src/main/java/studio/livepeer/livepeer/utils/QueryParamsMetadata.java + - src/main/java/studio/livepeer/livepeer/utils/RecordingClient.java + - src/main/java/studio/livepeer/livepeer/utils/RequestBody.java + - src/main/java/studio/livepeer/livepeer/utils/RequestMetadata.java + - src/main/java/studio/livepeer/livepeer/utils/Response.java + - src/main/java/studio/livepeer/livepeer/utils/Retries.java + - src/main/java/studio/livepeer/livepeer/utils/RetryConfig.java + - src/main/java/studio/livepeer/livepeer/utils/Security.java + - src/main/java/studio/livepeer/livepeer/utils/SecurityMetadata.java + - src/main/java/studio/livepeer/livepeer/utils/SerializedBody.java + - src/main/java/studio/livepeer/livepeer/utils/SessionManager.java + - src/main/java/studio/livepeer/livepeer/utils/SpeakeasyHTTPClient.java + - src/main/java/studio/livepeer/livepeer/utils/SpeakeasyMetadata.java + - src/main/java/studio/livepeer/livepeer/utils/TypedObject.java + - src/main/java/studio/livepeer/livepeer/utils/Types.java + - src/main/java/studio/livepeer/livepeer/utils/Utf8UrlEncoder.java + - src/main/java/studio/livepeer/livepeer/utils/Utils.java +examples: + createStream: + speakeasy-default-create-stream: + requestBody: + application/json: {"name": "test_stream", "pull": {"source": "https://myservice.com/live/stream.flv", "headers": {"Authorization": "Bearer 123"}, "location": {"lat": 39.739, "lon": -104.988}}, "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}], "record": false, "recordingSpec": {"profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]}, "multistream": {"targets": [{"profile": "720p0", "videoOnly": false, "id": "PUSH123", "spec": {"name": "My target", "url": "rtmps://live.my-service.tv/channel/secretKey"}}]}} + responses: + "201": + application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_stream", "creatorId": {"type": "unverified", "value": "user123"}, "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "isActive": true, "createdByTokenName": "abc-123-xyz-456", "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "streamKey": "hgebdhhigq", "pull": {"source": "https://myservice.com/live/stream.flv", "headers": {"Authorization": "Bearer 123"}, "location": {"lat": 39.739, "lon": -104.988}}, "playbackId": "eaw4nk06ts2d0mzb", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}], "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "recordingSpec": {"profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]}, "multistream": {"targets": [{"profile": "720p0", "videoOnly": false, "id": "PUSH123"}]}, "lastTerminatedAt": 1713281212993} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getStreams: + speakeasy-default-get-streams: + responses: + "200": + application/json: [{"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_stream", "creatorId": {"type": "unverified", "value": "user123"}, "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "isActive": true, "createdByTokenName": "abc-123-xyz-456", "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "streamKey": "hgebdhhigq", "pull": {"source": "https://myservice.com/live/stream.flv", "headers": {"Authorization": "Bearer 123"}, "location": {"lat": 39.739, "lon": -104.988}}, "playbackId": "eaw4nk06ts2d0mzb", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}], "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "recordingSpec": {"profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]}, "multistream": {"targets": [{"profile": "720p0", "videoOnly": false, "id": "PUSH123"}]}, "lastTerminatedAt": 1713281212993}, {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_stream", "creatorId": {"type": "unverified", "value": "user123"}, "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "isActive": true, "createdByTokenName": "abc-123-xyz-456", "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "streamKey": "hgebdhhigq", "pull": {"source": "https://myservice.com/live/stream.flv", "headers": {"Authorization": "Bearer 123"}, "location": {"lat": 39.739, "lon": -104.988}}, "playbackId": "eaw4nk06ts2d0mzb", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}], "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "recordingSpec": {"profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]}, "multistream": {"targets": [{"profile": "720p0", "videoOnly": false, "id": "PUSH123"}]}, "lastTerminatedAt": 1713281212993}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getStream: + speakeasy-default-get-stream: + parameters: + path: + id: "<id>" + responses: + "200": + application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_stream", "creatorId": {"type": "unverified", "value": "user123"}, "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "isActive": true, "createdByTokenName": "abc-123-xyz-456", "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "streamKey": "hgebdhhigq", "pull": {"source": "https://myservice.com/live/stream.flv", "headers": {"Authorization": "Bearer 123"}, "location": {"lat": 39.739, "lon": -104.988}}, "playbackId": "eaw4nk06ts2d0mzb", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}], "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "recordingSpec": {"profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]}, "multistream": {"targets": [{"profile": "720p0", "videoOnly": false, "id": "PUSH123"}]}, "lastTerminatedAt": 1713281212993} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + updateStream: + speakeasy-default-update-stream: + parameters: + path: + id: "<id>" + requestBody: + application/json: {"record": false, "multistream": {"targets": [{"profile": "720p0", "videoOnly": false, "id": "PUSH123", "spec": {"name": "My target", "url": "rtmps://live.my-service.tv/channel/secretKey"}}]}, "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}], "recordingSpec": {"profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]}, "name": "test_stream"} + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + deleteStream: + speakeasy-default-delete-stream: + parameters: + path: + id: "<id>" + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + terminateStream: + speakeasy-default-terminate-stream: + parameters: + path: + id: "<id>" + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + startPullStream: + speakeasy-default-start-pull-stream: + parameters: + path: + id: "<id>" + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + createClip: + speakeasy-default-create-clip: + requestBody: + application/json: {"playbackId": "eaw4nk06ts2d0mzb", "startTime": 1587667174725, "endTime": 1587667174725, "name": "My Clip", "sessionId": "de7818e7-610a-4057-8f6f-b785dc1e6f88"} + responses: + "200": + application/json: {"asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "clip"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "failed", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getClips: + speakeasy-default-get-clips: + parameters: + path: + id: "<id>" + responses: + "200": + application/json: [{"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "clip"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "ready", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + addMultistreamTarget: + speakeasy-default-add-multistream-target: + parameters: + path: + id: "<id>" + requestBody: + application/json: {"profile": "720p0", "videoOnly": false, "id": "PUSH123", "spec": {"name": "My target", "url": "rtmps://live.my-service.tv/channel/secretKey"}} + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + removeMultistreamTarget: + speakeasy-default-remove-multistream-target: + parameters: + path: + id: "<id>" + targetId: "<id>" + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getMultistreamTargets: + speakeasy-default-get-multistream-targets: + responses: + "200": + application/json: [{"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "createdAt": 1587667174725}, {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "createdAt": 1587667174725}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + createMultistreamTarget: + speakeasy-default-create-multistream-target: + requestBody: + application/json: {"url": "rtmps://live.my-service.tv/channel/secretKey"} + responses: + "201": + application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "createdAt": 1587667174725} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getMultistreamTarget: + speakeasy-default-get-multistream-target: + parameters: + path: + id: "<id>" + responses: + "200": + application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "createdAt": 1587667174725} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + updateMultistreamTarget: + speakeasy-default-update-multistream-target: + parameters: + path: + id: "<id>" + requestBody: + application/json: {"url": "rtmps://live.my-service.tv/channel/secretKey"} + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + deleteMultistreamTarget: + speakeasy-default-delete-multistream-target: + parameters: + path: + id: "<id>" + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getWebhooks: + speakeasy-default-get-webhooks: + responses: + "200": + application/json: [{"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_webhook", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "events": ["stream.started", "stream.idle"], "url": "https://my-service.com/webhook", "streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "status": {"lastFailure": {"timestamp": 1587667174725, "error": "Error message", "response": "Response body", "statusCode": 500}, "lastTriggeredAt": 1587667174725}}, {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_webhook", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "events": ["stream.started", "stream.idle"], "url": "https://my-service.com/webhook", "streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "status": {"lastFailure": {"timestamp": 1587667174725, "error": "Error message", "response": "Response body", "statusCode": 500}, "lastTriggeredAt": 1587667174725}}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + createWebhook: + speakeasy-default-create-webhook: + requestBody: + application/json: {"name": "test_webhook", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "events": ["stream.started", "stream.idle"], "url": "https://my-service.com/webhook", "sharedSecret": "my-secret", "streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88"} + responses: + "200": + application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_webhook", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "events": ["stream.started", "stream.idle"], "url": "https://my-service.com/webhook", "streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "status": {"lastFailure": {"timestamp": 1587667174725, "error": "Error message", "response": "Response body", "statusCode": 500}, "lastTriggeredAt": 1587667174725}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getWebhook: + speakeasy-default-get-webhook: + parameters: + path: + id: "<id>" + responses: + "200": + application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_webhook", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "events": ["stream.started", "stream.idle"], "url": "https://my-service.com/webhook", "streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "status": {"lastFailure": {"timestamp": 1587667174725, "error": "Error message", "response": "Response body", "statusCode": 500}, "lastTriggeredAt": 1587667174725}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + updateWebhook: + speakeasy-default-update-webhook: + parameters: + path: + id: "<id>" + requestBody: + application/json: {"name": "test_webhook", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "events": ["stream.started", "stream.idle"], "url": "https://my-service.com/webhook", "sharedSecret": "my-secret", "streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88"} + responses: + "200": + application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_webhook", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "events": ["stream.started", "stream.idle"], "url": "https://my-service.com/webhook", "streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "status": {"lastFailure": {"timestamp": 1587667174725, "error": "Error message", "response": "Response body", "statusCode": 500}, "lastTriggeredAt": 1587667174725}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + deleteWebhook: + speakeasy-default-delete-webhook: + parameters: + path: + id: "<id>" + responses: + "200": + application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_webhook", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "events": ["stream.started", "stream.idle"], "url": "https://my-service.com/webhook", "streamId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "status": {"lastFailure": {"timestamp": 1587667174725, "error": "Error message", "response": "Response body", "statusCode": 500}, "lastTriggeredAt": 1587667174725}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getWebhookLogs: + speakeasy-default-get-webhook-logs: + parameters: + path: + id: "<id>" + responses: + "200": + application/json: [{"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "webhookId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "event": "stream.started", "createdAt": 1587667174725, "duration": 0.5, "success": true, "request": {"url": "https://my-service.com/webhook", "method": "POST", "headers": {"User-Agent": "livepeer.studio"}, "body": "{\"event\": \"stream.started\"}"}}, {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "webhookId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "event": "stream.started", "createdAt": 1587667174725, "duration": 0.5, "success": true, "request": {"url": "https://my-service.com/webhook", "method": "POST", "headers": {"User-Agent": "livepeer.studio"}, "body": "{\"event\": \"stream.started\"}"}}, {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "webhookId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "event": "stream.started", "createdAt": 1587667174725, "duration": 0.5, "success": true, "request": {"url": "https://my-service.com/webhook", "method": "POST", "headers": {"User-Agent": "livepeer.studio"}, "body": "{\"event\": \"stream.started\"}"}}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getWebhookLog: + speakeasy-default-get-webhook-log: + parameters: + path: + id: "<id>" + logId: "<id>" + responses: + "200": + application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "webhookId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "event": "stream.started", "createdAt": 1587667174725, "duration": 0.5, "success": true, "request": {"url": "https://my-service.com/webhook", "method": "POST", "headers": {"User-Agent": "livepeer.studio"}, "body": "{\"event\": \"stream.started\"}"}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + resendWebhook: + speakeasy-default-resend-webhook: + parameters: + path: + id: "<id>" + logId: "<id>" + responses: + "200": + application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "webhookId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "event": "stream.started", "createdAt": 1587667174725, "duration": 0.5, "success": true, "request": {"url": "https://my-service.com/webhook", "method": "POST", "headers": {"User-Agent": "livepeer.studio"}, "body": "{\"event\": \"stream.started\"}"}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getAssets: + speakeasy-default-get-assets: + responses: + "200": + application/json: [{"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "url", "url": "https://puzzled-adviser.info"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "uploading", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}, {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "url", "url": "https://yummy-concentration.info/"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "failed", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + requestUpload: + speakeasy-default-request-upload: + requestBody: + application/json: {"name": "filename.mp4", "staticMp4": true, "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]} + responses: + "200": + application/json: {"url": "https://origin.livepeer.com/api/asset/upload/direct?token=eyJhbGciOiJIUzI1NiJ9.eyJtc2ciOiJoZWxsbyBoYWNrZXIsIHRoZXJlJ3Mgbm90aGluZyBmb3IgeW91IGhlcmUg8J-YhiJ9.1YDjmXsqLcgNyMSzT4kXl_kIni46_EuGX_xfqmC7e0Q", "tusEndpoint": "https://origin.livepeer.com/api/asset/upload/tus?token=eyJhbGciOiJIUzI1NiJ9.eyJtc2ciOiJoZWxsbyBoYWNrZXIsIHRoZXJlJ3Mgbm90aGluZyBmb3IgeW91IGhlcmUg8J-YhiJ9.1YDjmXsqLcgNyMSzT4kXl_kIni46_EuGX_xfqmC7e0Q", "asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "recording", "sessionId": "<id>"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "uploading", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + uploadAsset: + speakeasy-default-upload-asset: + requestBody: + application/json: {"name": "filename.mp4", "staticMp4": true, "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4", "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]} + responses: + "200": + application/json: {"asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "url", "url": "https://creative-tenant.com/"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "ready", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} + "201": + application/json: {"asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "directUpload"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "deleted", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getAsset: + speakeasy-default-get-asset: + parameters: + path: + assetId: "<id>" + responses: + "200": + application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "clip"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "ready", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + updateAsset: + speakeasy-default-update-asset: + parameters: + path: + assetId: "<id>" + requestBody: + application/json: {"name": "filename.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}} + responses: + "200": + application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "clip"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "deleted", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + deleteAsset: + speakeasy-default-delete-asset: + parameters: + path: + assetId: "<id>" + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getSessionClips: + speakeasy-default-get-session-clips: + parameters: + path: + id: "<id>" + responses: + "200": + application/json: [{"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "clip"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "ready", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getSessions: + speakeasy-default-get-sessions: + responses: + "200": + application/json: [{"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_session", "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "playbackId": "eaw4nk06ts2d0mzb", "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}], "recordingSpec": {"profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]}}, {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_session", "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "playbackId": "eaw4nk06ts2d0mzb", "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}], "recordingSpec": {"profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]}}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getSession: + speakeasy-default-get-session: + parameters: + path: + id: "<id>" + responses: + "200": + application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_session", "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "playbackId": "eaw4nk06ts2d0mzb", "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}], "recordingSpec": {"profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getRecordedSessions: + speakeasy-default-get-recorded-sessions: + parameters: + path: + parentId: "<id>" + query: + record: true + responses: + "200": + application/json: [{"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_session", "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "playbackId": "eaw4nk06ts2d0mzb", "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}], "recordingSpec": {"profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]}}, {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_session", "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "playbackId": "eaw4nk06ts2d0mzb", "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "fps": 30, "fpsDen": 1, "quality": 23, "gop": "2", "profile": "H264Baseline"}], "recordingSpec": {"profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]}}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + createRoom: + speakeasy-default-create-room: + responses: + "200": + application/json: {"id": "d32ae9e6-c459-4931-9898-e86e2f5e7e16"} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getRoom: + speakeasy-default-get-room: + parameters: + path: + id: "<id>" + responses: + "200": + application/json: {"id": "d32ae9e6-c459-4931-9898-e86e2f5e7e16", "createdAt": 1587667174725, "updatedAt": 1587667174725, "participants": {"key": {}, "key1": {}}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + deleteRoom: + speakeasy-default-delete-room: + parameters: + path: + id: "<id>" + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + startRoomEgress: + speakeasy-default-start-room-egress: + parameters: + path: + id: "<id>" + requestBody: + application/json: {"streamId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9"} + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + stopRoomEgress: + speakeasy-default-stop-room-egress: + parameters: + path: + id: "<id>" + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + createRoomUser: + speakeasy-default-create-room-user: + parameters: + path: + id: "<id>" + requestBody: + application/json: {"name": "name", "canPublish": true, "canPublishData": true} + responses: + "201": + application/json: {"id": "d32ae9e6-c459-4931-9898-e86e2f5e7e16", "joinUrl": "https://meet.livepeer.chat", "token": "token"} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getRoomUser: + speakeasy-default-get-room-user: + parameters: + path: + id: "<id>" + userId: "<id>" + responses: + "200": + application/json: {"id": "d32ae9e6-c459-4931-9898-e86e2f5e7e16", "joinedAt": 1687517025261, "name": "name", "isPublisher": true} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + updateRoomUser: + speakeasy-default-update-room-user: + parameters: + path: + id: "<id>" + userId: "<id>" + requestBody: + application/json: {"canPublish": true, "canPublishData": true} + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + deleteRoomUser: + speakeasy-default-delete-room-user: + parameters: + path: + id: "<id>" + userId: "<id>" + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getRealtimeViewershipNow: + speakeasy-default-get-realtime-viewership-now: + responses: + "200": + application/json: [{"playbackId": "1bde4o2i6xycudoy", "device": "iPhone", "browser": "Safari", "country": "United States", "viewCount": 100, "errorRate": 0.1}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getViewershipMetrics: + speakeasy-default-get-viewership-metrics: + responses: + "200": + application/json: [{"playbackId": "1bde4o2i6xycudoy", "creatorId": "john@doe.com", "viewerId": "1bde4o2i6xycudoy", "dStorageUrl": "ipfs://QmZ4", "timestamp": 1587667174725, "device": "iPhone", "deviceType": "mobile", "cpu": "ARM", "os": "iOS", "browser": "Safari", "browserEngine": "WebKit", "continent": "North America", "country": "United States", "subdivision": "California", "timezone": "America/Los_Angeles", "geohash": "123", "viewCount": 100, "playtimeMins": 10, "ttffMs": 100, "rebufferRatio": 0.1, "errorRate": 0.1, "exitsBeforeStart": 0.5}, {"playbackId": "1bde4o2i6xycudoy", "creatorId": "john@doe.com", "viewerId": "1bde4o2i6xycudoy", "dStorageUrl": "ipfs://QmZ4", "timestamp": 1587667174725, "device": "iPhone", "deviceType": "mobile", "cpu": "ARM", "os": "iOS", "browser": "Safari", "browserEngine": "WebKit", "continent": "North America", "country": "United States", "subdivision": "California", "timezone": "America/Los_Angeles", "geohash": "123", "viewCount": 100, "playtimeMins": 10, "ttffMs": 100, "rebufferRatio": 0.1, "errorRate": 0.1, "exitsBeforeStart": 0.5}, {"playbackId": "1bde4o2i6xycudoy", "creatorId": "john@doe.com", "viewerId": "1bde4o2i6xycudoy", "dStorageUrl": "ipfs://QmZ4", "timestamp": 1587667174725, "device": "iPhone", "deviceType": "mobile", "cpu": "ARM", "os": "iOS", "browser": "Safari", "browserEngine": "WebKit", "continent": "North America", "country": "United States", "subdivision": "California", "timezone": "America/Los_Angeles", "geohash": "123", "viewCount": 100, "playtimeMins": 10, "ttffMs": 100, "rebufferRatio": 0.1, "errorRate": 0.1, "exitsBeforeStart": 0.5}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getCreatorViewershipMetrics: + speakeasy-default-get-creator-viewership-metrics: + responses: + "200": + application/json: [{"playbackId": "1bde4o2i6xycudoy", "creatorId": "john@doe.com", "viewerId": "1bde4o2i6xycudoy", "dStorageUrl": "ipfs://QmZ4", "timestamp": 1587667174725, "device": "iPhone", "deviceType": "mobile", "cpu": "ARM", "os": "iOS", "browser": "Safari", "browserEngine": "WebKit", "continent": "North America", "country": "United States", "subdivision": "California", "timezone": "America/Los_Angeles", "geohash": "123", "viewCount": 100, "playtimeMins": 10, "ttffMs": 100, "rebufferRatio": 0.1, "errorRate": 0.1, "exitsBeforeStart": 0.5}, {"playbackId": "1bde4o2i6xycudoy", "creatorId": "john@doe.com", "viewerId": "1bde4o2i6xycudoy", "dStorageUrl": "ipfs://QmZ4", "timestamp": 1587667174725, "device": "iPhone", "deviceType": "mobile", "cpu": "ARM", "os": "iOS", "browser": "Safari", "browserEngine": "WebKit", "continent": "North America", "country": "United States", "subdivision": "California", "timezone": "America/Los_Angeles", "geohash": "123", "viewCount": 100, "playtimeMins": 10, "ttffMs": 100, "rebufferRatio": 0.1, "errorRate": 0.1, "exitsBeforeStart": 0.5}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getPublicViewershipMetrics: + speakeasy-default-get-public-viewership-metrics: + parameters: + path: + playbackId: "<id>" + responses: + "200": + application/json: {"playbackId": "1bde4o2i6xycudoy", "dStorageUrl": "ipfs://QmZ4", "viewCount": 100, "playtimeMins": 10} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getUsageMetrics: + speakeasy-default-get-usage-metrics: + responses: + "200": + application/json: {"UserID": "1bde4o2i6xycudoy", "CreatorID": "john@doe.com", "DeliveryUsageMins": 100, "TotalUsageMins": 100, "StorageUsageMins": 100} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + createSigningKey: + speakeasy-default-create-signing-key: + responses: + "200": + application/json: {"id": "78df0075-b5f3-4683-a618-1086faca35dc", "name": "key1", "createdAt": 1587667174725, "lastSeen": 1587667174725, "publicKey": "<value>", "disabled": false, "projectId": "aac12556-4d65-4d34-9fb"} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getSigningKeys: + speakeasy-default-get-signing-keys: + responses: + "200": + application/json: [{"id": "78df0075-b5f3-4683-a618-1086faca35dc", "name": "key1", "createdAt": 1587667174725, "lastSeen": 1587667174725, "publicKey": "<value>", "disabled": false, "projectId": "aac12556-4d65-4d34-9fb"}, {"id": "78df0075-b5f3-4683-a618-1086faca35dc", "name": "key1", "createdAt": 1587667174725, "lastSeen": 1587667174725, "publicKey": "<value>", "disabled": false, "projectId": "aac12556-4d65-4d34-9fb"}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + deleteSigningKey: + speakeasy-default-delete-signing-key: + parameters: + path: + keyId: "<id>" + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getSigningKey: + speakeasy-default-get-signing-key: + parameters: + path: + keyId: "<id>" + responses: + "200": + application/json: {"id": "78df0075-b5f3-4683-a618-1086faca35dc", "name": "key1", "createdAt": 1587667174725, "lastSeen": 1587667174725, "publicKey": "<value>", "disabled": false, "projectId": "aac12556-4d65-4d34-9fb"} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + updateSigningKey: + speakeasy-default-update-signing-key: + parameters: + path: + keyId: "<id>" + requestBody: + application/json: {} + responses: + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getTasks: + speakeasy-default-get-tasks: + responses: + "200": + application/json: [{"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "upload", "createdAt": 1587667174725, "scheduledAt": 1587667174725, "inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "projectId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "requesterId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "params": {"upload": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4", "c2pa": true, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "targetSegmentSizeSecs": 6}, "export": {"ipfs": {"pinata": {"apiKey": "1234567890"}}}, "exportData": {"content": {}, "ipfs": {"pinata": {}}, "type": "text/plain", "id": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}, "transcode-file": {"input": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4"}, "storage": {"url": "s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket"}, "outputs": {"hls": {"path": "/samplevideo/hls"}, "mp4": {"path": "/samplevideo/mp4"}}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "targetSegmentSizeSecs": 10, "c2pa": false}, "clip": {"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4", "clipStrategy": {"startTime": 1587667174725, "endTime": 1587667174725, "playbackId": "eaw4nk06ts2d0mzb"}, "catalystPipelineStrategy": "catalyst_ffmpeg", "sessionId": "d32ae9e6-c459-4931-9898-e86e2f5e7e16", "inputId": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}, "status": {"phase": "pending", "updatedAt": 1587667174725, "progress": 0.5, "errorMessage": "Failed to upload file", "retries": 3}, "output": {"upload": {"assetSpec": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "recording", "sessionId": "<id>"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "deleting", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}}, "export": {"ipfs": {"videoFileCid": "Qmabc123xyz341", "videoFileUrl": "ipfs://Qmabc123xyz341", "videoFileGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341", "nftMetadataCid": "Qmabc123xyz341", "nftMetadataUrl": "ipfs://Qmabc123xyz341", "nftMetadataGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341"}}, "exportData": {"ipfs": {"cid": "Qmabc123xyz341"}}}}, {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "upload", "createdAt": 1587667174725, "scheduledAt": 1587667174725, "inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "projectId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "requesterId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "params": {"upload": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4", "c2pa": true, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "targetSegmentSizeSecs": 6}, "export": {"ipfs": {"pinata": {}}}, "exportData": {"content": {}, "ipfs": {"pinata": {}}, "type": "text/plain", "id": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}, "transcode-file": {"input": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4"}, "storage": {"url": "s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket"}, "outputs": {"hls": {"path": "/samplevideo/hls"}, "mp4": {"path": "/samplevideo/mp4"}}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "targetSegmentSizeSecs": 10, "c2pa": false}, "clip": {"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4", "clipStrategy": {"startTime": 1587667174725, "endTime": 1587667174725, "playbackId": "eaw4nk06ts2d0mzb"}, "catalystPipelineStrategy": "catalyst_ffmpeg", "sessionId": "d32ae9e6-c459-4931-9898-e86e2f5e7e16", "inputId": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}, "status": {"phase": "pending", "updatedAt": 1587667174725, "progress": 0.5, "errorMessage": "Failed to upload file", "retries": 3}, "output": {"upload": {"assetSpec": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "recording", "sessionId": "<id>"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "processing", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}}, "export": {"ipfs": {"videoFileCid": "Qmabc123xyz341", "videoFileUrl": "ipfs://Qmabc123xyz341", "videoFileGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341", "nftMetadataCid": "Qmabc123xyz341", "nftMetadataUrl": "ipfs://Qmabc123xyz341", "nftMetadataGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341"}}, "exportData": {"ipfs": {"cid": "Qmabc123xyz341"}}}}] + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getTask: + speakeasy-default-get-task: + parameters: + path: + taskId: "<id>" + responses: + "200": + application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "upload", "createdAt": 1587667174725, "scheduledAt": 1587667174725, "inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "projectId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "requesterId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "params": {"upload": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4", "c2pa": true, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "targetSegmentSizeSecs": 6}, "export": {"ipfs": {"pinata": {"apiKey": "1234567890"}}}, "exportData": {"content": {}, "ipfs": {"pinata": {"apiKey": "1234567890"}}, "type": "text/plain", "id": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}, "transcode-file": {"input": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4"}, "storage": {"url": "s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket"}, "outputs": {"hls": {"path": "/samplevideo/hls"}, "mp4": {"path": "/samplevideo/mp4"}}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "targetSegmentSizeSecs": 10, "c2pa": false}, "clip": {"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4", "clipStrategy": {"startTime": 1587667174725, "endTime": 1587667174725, "playbackId": "eaw4nk06ts2d0mzb"}, "catalystPipelineStrategy": "catalyst_ffmpeg", "sessionId": "d32ae9e6-c459-4931-9898-e86e2f5e7e16", "inputId": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}, "status": {"phase": "pending", "updatedAt": 1587667174725, "progress": 0.5, "errorMessage": "Failed to upload file", "retries": 3}, "output": {"upload": {"assetSpec": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "recording", "sessionId": "<id>"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "waiting", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}}, "export": {"ipfs": {"videoFileCid": "Qmabc123xyz341", "videoFileUrl": "ipfs://Qmabc123xyz341", "videoFileGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341", "nftMetadataCid": "Qmabc123xyz341", "nftMetadataUrl": "ipfs://Qmabc123xyz341", "nftMetadataGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341"}}, "exportData": {"ipfs": {"cid": "Qmabc123xyz341"}}}} + transcodeVideo: + speakeasy-default-transcode-video: + requestBody: + application/json: {"input": {"url": "https://s3.amazonaws.com/bucket/file.mp4"}, "storage": {"type": "web3.storage", "credentials": {"proof": "EaJlcm9vdHOAZ3ZlcnNpb24BmgIBcRIg2uxHpcPYSWNtifMKFkPC7IEDvFDCxCd3ADViv0coV7SnYXNYRO2hA0AnblHEW38s3lSlcwaDjPn"}}, "outputs": {"hls": {"path": "/samplevideo/hls"}, "mp4": {"path": "/samplevideo/mp4"}, "fmp4": {"path": "/samplevideo/fmp4"}}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}]} + responses: + "200": + application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "upload", "createdAt": 1587667174725, "scheduledAt": 1587667174725, "inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "projectId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "requesterId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "params": {"upload": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4", "c2pa": true, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "targetSegmentSizeSecs": 6}, "export": {"custom": {"url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LLMMB", "method": "POST"}}, "exportData": {"content": {}, "ipfs": {"pinata": {"apiKey": "1234567890"}}, "type": "text/plain", "id": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}, "transcode-file": {"input": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4"}, "storage": {"url": "s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket"}, "outputs": {"hls": {"path": "/samplevideo/hls"}, "mp4": {"path": "/samplevideo/mp4"}}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "targetSegmentSizeSecs": 10, "c2pa": false}, "clip": {"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4", "clipStrategy": {"startTime": 1587667174725, "endTime": 1587667174725, "playbackId": "eaw4nk06ts2d0mzb"}, "catalystPipelineStrategy": "catalyst_ffmpeg", "sessionId": "d32ae9e6-c459-4931-9898-e86e2f5e7e16", "inputId": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}, "status": {"phase": "pending", "updatedAt": 1587667174725, "progress": 0.5, "errorMessage": "Failed to upload file", "retries": 3}, "output": {"upload": {"assetSpec": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "url", "url": "https://brisk-seafood.net/"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [{"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}, {"width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, "quality": 23, "fps": 30, "fpsDen": 1, "gop": "2", "profile": "H264Baseline", "encoder": "H.264"}], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "deleting", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [{"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}, {"hash": "9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57", "algorithm": "sha256"}], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": [{"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}, {"type": "video", "codec": "aac", "startTime": 23.8238, "duration": 23.8238, "bitrate": 1000000, "width": 1920, "height": 1080, "pixelFormat": "yuv420p", "fps": 30, "channels": 2, "sampleRate": 44100, "bitDepth": 16}]}}}, "export": {"ipfs": {"videoFileCid": "Qmabc123xyz341", "videoFileUrl": "ipfs://Qmabc123xyz341", "videoFileGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341", "nftMetadataCid": "Qmabc123xyz341", "nftMetadataUrl": "ipfs://Qmabc123xyz341", "nftMetadataGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341"}}, "exportData": {"ipfs": {"cid": "Qmabc123xyz341"}}}} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + getPlaybackInfo: + speakeasy-default-get-playback-info: + parameters: + path: + id: "<id>" + responses: + "200": + application/json: {"type": "vod", "meta": {"live": 0, "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": [{"hrn": "MP4", "type": "html5/video/mp4", "url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4", "size": 494778, "width": 204, "height": 360, "bitrate": 449890}, {"hrn": "MP4", "type": "html5/video/mp4", "url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4", "size": 494778, "width": 204, "height": 360, "bitrate": 449890}], "dvrPlayback": [{"hrn": "HLS (TS)", "type": "html5/application/vnd.apple.mpegurl", "url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4"}, {"hrn": "HLS (TS)", "type": "html5/application/vnd.apple.mpegurl", "url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4"}], "attestation": {"id": "5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0", "primaryType": "VideoAttestation", "domain": {"name": "Verifiable Video", "version": "1"}, "message": {"video": "5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0", "attestations": [{"role": "creator", "address": "1311768467294899700"}, {"role": "creator", "address": "1311768467294899700"}], "signer": "1311768467294899700", "timestamp": 1587667174725}, "signature": "1311768467294899700", "createdAt": 1587667174725, "signatureType": "eip712", "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}}}} + "404": + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} + default: + application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} +examplesVersion: 1.0.1 +generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 4d8f487a..d72e46f1 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -7,12 +7,16 @@ generation: useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true + nameResolutionFeb2025: false parameterOrderingFeb2024: true requestResponseComponentNamesFeb2024: true + securityFeb2025: false + sharedErrorComponentsApr2025: false auth: oAuth2ClientCredentialsEnabled: true + oAuth2PasswordEnabled: false java: - version: 0.5.0 + version: 0.6.0 additionalDependencies: [] additionalPlugins: [] artifactID: livepeer @@ -20,6 +24,7 @@ java: companyEmail: info@mycompany.com companyName: My Company companyURL: www.mycompany.com + defaultErrorName: SDKError flattenGlobalSecurity: true githubURL: github.com/owner/repo groupID: studio.livepeer diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 647effc7..e996db7f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.377.1 +speakeasyVersion: 1.542.3 sources: Livepeer: sourceNamespace: livepeer @@ -8,24 +8,25 @@ sources: - latest livepeer-studio-api: sourceNamespace: livepeer-studio-api - sourceRevisionDigest: sha256:9333277669bf8fb46063579d611518570aff37c2bfb20e0a90fd3b0c030ca2ad - sourceBlobDigest: sha256:1705d75b1de89f7c2e60643ed2c2aaced22b577da6f2935b1c2e09d533bb7182 + sourceRevisionDigest: sha256:3a52d5f351da1511749650e156f0859f22ccdc4c17d0a507deb61e4c059a8652 + sourceBlobDigest: sha256:4488790737c35e02b007209a1c0f7c6828c03112914a4b4cd3c7a49256a80167 tags: - latest - - main + - speakeasy-sdk-regen-1731111021 + - 1.0.0 targets: livepeer-java: source: livepeer-studio-api sourceNamespace: livepeer-studio-api - sourceRevisionDigest: sha256:9333277669bf8fb46063579d611518570aff37c2bfb20e0a90fd3b0c030ca2ad - sourceBlobDigest: sha256:1705d75b1de89f7c2e60643ed2c2aaced22b577da6f2935b1c2e09d533bb7182 - outLocation: /github/workspace/repo + sourceRevisionDigest: sha256:3a52d5f351da1511749650e156f0859f22ccdc4c17d0a507deb61e4c059a8652 + sourceBlobDigest: sha256:4488790737c35e02b007209a1c0f7c6828c03112914a4b4cd3c7a49256a80167 + codeSamplesNamespace: livepeer-studio-api-java-code-samples + codeSamplesRevisionDigest: sha256:7048a0331a6a88ec766775041cb4329d47496578e4e0ce4d0bcd33fd1cf5979c my-first-target: source: Livepeer sourceNamespace: livepeer sourceRevisionDigest: sha256:a27b08eda9895afa45560e8255cc722036759a56c7c16bf09d002f2f5a4e2dea sourceBlobDigest: sha256:856a4f7c8547bd06b13cb376f3b89f51fe7f6578c4fa6284a1877fc99cc46766 - outLocation: /Users/chase/git/livepeer/livepeer-java workflow: workflowVersion: 1.0.0 speakeasyVersion: latest @@ -33,6 +34,7 @@ workflow: livepeer-studio-api: inputs: - location: https://raw.githubusercontent.com/livepeer/studio/master/packages/api/src/schema/api-schema.yaml + - location: https://raw.githubusercontent.com/livepeer/studio/master/packages/api/src/schema/ai-api-schema.yaml registry: location: registry.speakeasyapi.dev/livepeer/livepeer-studio/livepeer-studio-api targets: @@ -41,3 +43,5 @@ workflow: source: livepeer-studio-api codeSamples: output: codeSamples.yaml + registry: + location: registry.speakeasyapi.dev/livepeer/livepeer-studio/livepeer-studio-api-java-code-samples diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index dabdf101..368b07f6 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -13,3 +13,5 @@ targets: source: livepeer-studio-api codeSamples: output: codeSamples.yaml + registry: + location: registry.speakeasyapi.dev/livepeer/livepeer-studio/livepeer-studio-api-java-code-samples diff --git a/README.md b/README.md index cb7a2f09..b58704a1 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,31 @@ applications written in Java. For full documentation and examples, please visit [docs.livepeer.org](https://docs.livepeer.org/sdks/javascript/). +<!-- Start Summary [summary] --> +## Summary + +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. +<!-- End Summary [summary] --> + +<!-- Start Table of Contents [toc] --> +## Table of Contents +<!-- $toc-max-depth=2 --> +* [Livepeer Java SDK](#livepeer-java-sdk) + * [Documentation](#documentation) + * [SDK Installation](#sdk-installation) + * [SDK Example Usage](#sdk-example-usage) + * [Available Resources and Operations](#available-resources-and-operations) + * [Error Handling](#error-handling) + * [Server Selection](#server-selection) + * [Authentication](#authentication) +* [Development](#development) + * [Maturity](#maturity) + * [Contributions](#contributions) + +<!-- End Table of Contents [toc] --> + <!-- Start SDK Installation [installation] --> ## SDK Installation @@ -18,7 +43,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'studio.livepeer:livepeer:0.5.0' +implementation 'studio.livepeer:livepeer:0.6.0' ``` Maven: @@ -26,7 +51,7 @@ Maven: <dependency> <groupId>studio.livepeer</groupId> <artifactId>livepeer</artifactId> - <version>0.5.0</version> + <version>0.6.0</version> </dependency> ``` @@ -43,6 +68,29 @@ On Windows: ```bash gradlew.bat publishToMavenLocal -Pskip.signing ``` + +### Logging +A logging framework/facade has not yet been adopted but is under consideration. + +For request and response logging (especially json bodies) use: +```java +SpeakeasyHTTPClient.setDebugLogging(true); // experimental API only (may change without warning) +``` +Example output: +``` +Sending request: http://localhost:35123/bearer#global GET +Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]} +Received response: (GET http://localhost:35123/bearer#global) 200 +Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]} +Response body: +{ + "authenticated": true, + "token": "global" +} +``` +WARNING: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. <i>Authorization</i> headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`. + +Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies. <!-- End SDK Installation [installation] --> <!-- Start SDK Example Usage [usage] --> @@ -57,40 +105,26 @@ 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.components.*; import studio.livepeer.livepeer.models.operations.CreateStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - NewStreamPayload req = NewStreamPayload.builder() + 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) + .lat(39.739) + .lon(-104.988) .build()) .build()) .playbackPolicy(PlaybackPolicy.builder() @@ -98,9 +132,20 @@ public class Application { .webhookId("1bde4o2i6xycudoy") .webhookContext(Map.ofEntries( Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) + .refreshInterval(600) .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(), FfmpegProfile.builder() .width(1280L) .name("720p") @@ -115,6 +160,18 @@ public class Application { .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(), TranscodeProfile.builder() .bitrate(3000000L) .width(1280L) @@ -132,7 +189,6 @@ public class Application { .targets(List.of( Target.builder() .profile("720p0") - .videoOnly(false) .id("PUSH123") .spec(TargetSpec.builder() .url("rtmps://live.my-service.tv/channel/secretKey") @@ -142,21 +198,13 @@ public class Application { .build()) .build(); - CreateStreamResponse res = sdk.stream().create() + CreateStreamResponse res = sdk.stream().create() .request(req) .call(); - if (res.stream().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.stream().isPresent()) { + // handle response } - } } ``` @@ -165,38 +213,16 @@ public class Application { <!-- Start Available Resources and Operations [operations] --> ## Available Resources and Operations -### [stream()](docs/sdks/stream/README.md) - -* [create](docs/sdks/stream/README.md#create) - Create a stream -* [getAll](docs/sdks/stream/README.md#getall) - Retrieve streams -* [get](docs/sdks/stream/README.md#get) - Retrieve a stream -* [update](docs/sdks/stream/README.md#update) - Update a stream -* [delete](docs/sdks/stream/README.md#delete) - Delete a stream -* [terminate](docs/sdks/stream/README.md#terminate) - Terminates a live stream -* [startPull](docs/sdks/stream/README.md#startpull) - Start ingest for a pull stream -* [createClip](docs/sdks/stream/README.md#createclip) - Create a clip -* [getClips](docs/sdks/stream/README.md#getclips) - Retrieve clips of a livestream -* [addMultistreamTarget](docs/sdks/stream/README.md#addmultistreamtarget) - Add a multistream target -* [removeMultistreamTarget](docs/sdks/stream/README.md#removemultistreamtarget) - Remove a multistream target - -### [multistream()](docs/sdks/multistream/README.md) - -* [getAll](docs/sdks/multistream/README.md#getall) - Retrieve Multistream Targets -* [create](docs/sdks/multistream/README.md#create) - Create a multistream target -* [get](docs/sdks/multistream/README.md#get) - Retrieve a multistream target -* [update](docs/sdks/multistream/README.md#update) - Update Multistream Target -* [delete](docs/sdks/multistream/README.md#delete) - Delete a multistream target +<details open> +<summary>Available methods</summary> -### [webhook()](docs/sdks/webhook/README.md) +### [accessControl()](docs/sdks/accesscontrol/README.md) -* [getAll](docs/sdks/webhook/README.md#getall) - Retrieve a Webhook -* [create](docs/sdks/webhook/README.md#create) - Create a webhook -* [get](docs/sdks/webhook/README.md#get) - Retrieve a webhook -* [update](docs/sdks/webhook/README.md#update) - Update a webhook -* [delete](docs/sdks/webhook/README.md#delete) - Delete a webhook -* [getLogs](docs/sdks/webhook/README.md#getlogs) - Retrieve webhook logs -* [getLog](docs/sdks/webhook/README.md#getlog) - Retrieve a webhook log -* [resendLog](docs/sdks/webhook/README.md#resendlog) - Resend a webhook +* [create](docs/sdks/accesscontrol/README.md#create) - Create a signing key +* [getAll](docs/sdks/accesscontrol/README.md#getall) - Retrieves signing keys +* [delete](docs/sdks/accesscontrol/README.md#delete) - Delete Signing Key +* [get](docs/sdks/accesscontrol/README.md#get) - Retrieves a signing key +* [update](docs/sdks/accesscontrol/README.md#update) - Update a signing key ### [asset()](docs/sdks/asset/README.md) @@ -207,14 +233,28 @@ public class Application { * [update](docs/sdks/asset/README.md#update) - Patch an asset * [delete](docs/sdks/asset/README.md#delete) - Delete an asset -### [session()](docs/sdks/session/README.md) -* [getClips](docs/sdks/session/README.md#getclips) - Retrieve clips of a session -* [getAll](docs/sdks/session/README.md#getall) - Retrieve sessions -* [get](docs/sdks/session/README.md#get) - Retrieve a session -* [getRecorded](docs/sdks/session/README.md#getrecorded) - Retrieve Recorded Sessions +### [metrics()](docs/sdks/metrics/README.md) + +* [getRealtimeViewership](docs/sdks/metrics/README.md#getrealtimeviewership) - Query realtime viewership +* [getViewership](docs/sdks/metrics/README.md#getviewership) - Query viewership metrics +* [getCreatorViewership](docs/sdks/metrics/README.md#getcreatorviewership) - Query creator viewership metrics +* [getPublicViewership](docs/sdks/metrics/README.md#getpublicviewership) - Query public total views metrics +* [getUsage](docs/sdks/metrics/README.md#getusage) - Query usage metrics + +### [multistream()](docs/sdks/multistream/README.md) + +* [getAll](docs/sdks/multistream/README.md#getall) - Retrieve Multistream Targets +* [create](docs/sdks/multistream/README.md#create) - Create a multistream target +* [get](docs/sdks/multistream/README.md#get) - Retrieve a multistream target +* [update](docs/sdks/multistream/README.md#update) - Update Multistream Target +* [delete](docs/sdks/multistream/README.md#delete) - Delete a multistream target + +### [playback()](docs/sdks/playback/README.md) + +* [get](docs/sdks/playback/README.md#get) - Retrieve Playback Info -### [room()](docs/sdks/room/README.md) +### [~~room()~~](docs/sdks/room/README.md) * [~~create~~](docs/sdks/room/README.md#create) - Create a room :warning: **Deprecated** * [~~get~~](docs/sdks/room/README.md#get) - Retrieve a room :warning: **Deprecated** @@ -226,21 +266,26 @@ public class Application { * [~~updateUser~~](docs/sdks/room/README.md#updateuser) - Update a room user :warning: **Deprecated** * [~~deleteUser~~](docs/sdks/room/README.md#deleteuser) - Remove a user from the room :warning: **Deprecated** -### [metrics()](docs/sdks/metrics/README.md) +### [session()](docs/sdks/session/README.md) -* [getRealtimeViewership](docs/sdks/metrics/README.md#getrealtimeviewership) - Query realtime viewership -* [getViewership](docs/sdks/metrics/README.md#getviewership) - Query viewership metrics -* [getCreatorViewership](docs/sdks/metrics/README.md#getcreatorviewership) - Query creator viewership metrics -* [getPublicViewership](docs/sdks/metrics/README.md#getpublicviewership) - Query public total views metrics -* [getUsage](docs/sdks/metrics/README.md#getusage) - Query usage metrics +* [getClips](docs/sdks/session/README.md#getclips) - Retrieve clips of a session +* [getAll](docs/sdks/session/README.md#getall) - Retrieve sessions +* [get](docs/sdks/session/README.md#get) - Retrieve a session +* [getRecorded](docs/sdks/session/README.md#getrecorded) - Retrieve Recorded Sessions -### [accessControl()](docs/sdks/accesscontrol/README.md) +### [stream()](docs/sdks/stream/README.md) -* [create](docs/sdks/accesscontrol/README.md#create) - Create a signing key -* [getAll](docs/sdks/accesscontrol/README.md#getall) - Retrieves signing keys -* [delete](docs/sdks/accesscontrol/README.md#delete) - Delete Signing Key -* [get](docs/sdks/accesscontrol/README.md#get) - Retrieves a signing key -* [update](docs/sdks/accesscontrol/README.md#update) - Update a signing key +* [create](docs/sdks/stream/README.md#create) - Create a stream +* [getAll](docs/sdks/stream/README.md#getall) - Retrieve streams +* [get](docs/sdks/stream/README.md#get) - Retrieve a stream +* [update](docs/sdks/stream/README.md#update) - Update a stream +* [delete](docs/sdks/stream/README.md#delete) - Delete a stream +* [terminate](docs/sdks/stream/README.md#terminate) - Terminates a live stream +* [startPull](docs/sdks/stream/README.md#startpull) - Start ingest for a pull stream +* [createClip](docs/sdks/stream/README.md#createclip) - Create a clip +* [getClips](docs/sdks/stream/README.md#getclips) - Retrieve clips of a livestream +* [addMultistreamTarget](docs/sdks/stream/README.md#addmultistreamtarget) - Add a multistream target +* [removeMultistreamTarget](docs/sdks/stream/README.md#removemultistreamtarget) - Remove a multistream target ### [task()](docs/sdks/task/README.md) @@ -251,20 +296,31 @@ public class Application { * [create](docs/sdks/transcode/README.md#create) - Transcode a video -### [playback()](docs/sdks/playback/README.md) +### [webhook()](docs/sdks/webhook/README.md) -* [get](docs/sdks/playback/README.md#get) - Retrieve Playback Info +* [getAll](docs/sdks/webhook/README.md#getall) - Retrieve a Webhook +* [create](docs/sdks/webhook/README.md#create) - Create a webhook +* [get](docs/sdks/webhook/README.md#get) - Retrieve a webhook +* [update](docs/sdks/webhook/README.md#update) - Update a webhook +* [delete](docs/sdks/webhook/README.md#delete) - Delete a webhook +* [getLogs](docs/sdks/webhook/README.md#getlogs) - Retrieve webhook logs +* [getLog](docs/sdks/webhook/README.md#getlog) - Retrieve a webhook log +* [resendLog](docs/sdks/webhook/README.md#resendlog) - Resend a webhook + +</details> <!-- End Available Resources and Operations [operations] --> <!-- Start Error Handling [errors] --> ## Error Handling -Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Exception type. +Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception. + +By default, an API error will throw a `models/errors/SDKError` exception. When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `get` method throws the following exceptions: -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/Error | 404 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Type | Status Code | Content Type | +| ---------------------- | ----------- | ---------------- | +| models/errors/Error | 404 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ### Example @@ -273,35 +329,24 @@ package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; -import studio.livepeer.livepeer.models.errors.SDKError; +import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.models.operations.GetPlaybackInfoResponse; public class Application { - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + public static void main(String[] args) throws Error, Exception { + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetPlaybackInfoResponse res = sdk.playback().get() - .id("<value>") + GetPlaybackInfoResponse res = sdk.playback().get() + .id("<id>") .call(); - 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; - } catch (Exception e) { - // handle exception - throw e; + if (res.playbackInfo().isPresent()) { + // handle response } - } } ``` @@ -310,16 +355,9 @@ public class Application { <!-- Start Server Selection [server] --> ## Server Selection -### Select Server by Index - -You can override the default server globally by passing a server index to the `serverIndex` builder method when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: - -| # | Server | Variables | -| - | ------ | --------- | -| 0 | `https://livepeer.studio/api` | None | - -#### Example +### Override Server URL Per-Client +The default server can be overridden globally using the `.serverURL(String serverUrl)` builder method when initializing the SDK client instance. For example: ```java package hello.world; @@ -327,41 +365,27 @@ 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.components.*; import studio.livepeer.livepeer.models.operations.CreateStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .serverIndex(0) + + Livepeer sdk = Livepeer.builder() + .serverURL("https://livepeer.studio/api") .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - NewStreamPayload req = NewStreamPayload.builder() + 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) + .lat(39.739) + .lon(-104.988) .build()) .build()) .playbackPolicy(PlaybackPolicy.builder() @@ -369,9 +393,20 @@ public class Application { .webhookId("1bde4o2i6xycudoy") .webhookContext(Map.ofEntries( Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) + .refreshInterval(600) .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(), FfmpegProfile.builder() .width(1280L) .name("720p") @@ -397,111 +432,7 @@ public class Application { .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(); - - if (res.stream().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - - } -} -``` - - -### Override Server URL Per-Client - -The default server can also be overridden globally by passing a URL to the `serverURL` builder method when initializing the SDK client instance. For example: -```java -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; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .serverURL("https://livepeer.studio/api") - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .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( + .build(), TranscodeProfile.builder() .bitrate(3000000L) .width(1280L) @@ -519,7 +450,6 @@ public class Application { .targets(List.of( Target.builder() .profile("720p0") - .videoOnly(false) .id("PUSH123") .spec(TargetSpec.builder() .url("rtmps://live.my-service.tv/channel/secretKey") @@ -529,21 +459,13 @@ public class Application { .build()) .build(); - CreateStreamResponse res = sdk.stream().create() + CreateStreamResponse res = sdk.stream().create() .request(req) .call(); - if (res.stream().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.stream().isPresent()) { + // handle response } - } } ``` @@ -556,9 +478,9 @@ public class Application { This SDK supports the following security scheme globally: -| Name | Type | Scheme | -| ----------- | ----------- | ----------- | -| `apiKey` | http | HTTP Bearer | +| Name | Type | Scheme | +| -------- | ---- | ----------- | +| `apiKey` | http | HTTP Bearer | To authenticate with the API the `apiKey` parameter must be set when initializing the SDK client instance. For example: ```java @@ -568,40 +490,26 @@ 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.components.*; import studio.livepeer.livepeer.models.operations.CreateStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - NewStreamPayload req = NewStreamPayload.builder() + 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) + .lat(39.739) + .lon(-104.988) .build()) .build()) .playbackPolicy(PlaybackPolicy.builder() @@ -609,9 +517,20 @@ public class Application { .webhookId("1bde4o2i6xycudoy") .webhookContext(Map.ofEntries( Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) + .refreshInterval(600) .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(), FfmpegProfile.builder() .width(1280L) .name("720p") @@ -626,6 +545,18 @@ public class Application { .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(), TranscodeProfile.builder() .bitrate(3000000L) .width(1280L) @@ -643,7 +574,6 @@ public class Application { .targets(List.of( Target.builder() .profile("720p0") - .videoOnly(false) .id("PUSH123") .spec(TargetSpec.builder() .url("rtmps://live.my-service.tv/channel/secretKey") @@ -653,21 +583,13 @@ public class Application { .build()) .build(); - CreateStreamResponse res = sdk.stream().create() + CreateStreamResponse res = sdk.stream().create() .request(req) .call(); - if (res.stream().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.stream().isPresent()) { + // handle response } - } } ``` diff --git a/RELEASES.md b/RELEASES.md index b1002f15..14d36c24 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -46,4 +46,12 @@ 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 +- [java v0.5.0] . + +## 2025-05-06 00:11:55 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.542.3 (2.597.9) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.6.0] . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 76779275..8e151d76 100644 --- a/USAGE.md +++ b/USAGE.md @@ -6,40 +6,26 @@ 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.components.*; import studio.livepeer.livepeer.models.operations.CreateStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - NewStreamPayload req = NewStreamPayload.builder() + 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) + .lat(39.739) + .lon(-104.988) .build()) .build()) .playbackPolicy(PlaybackPolicy.builder() @@ -47,9 +33,20 @@ public class Application { .webhookId("1bde4o2i6xycudoy") .webhookContext(Map.ofEntries( Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) + .refreshInterval(600) .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(), FfmpegProfile.builder() .width(1280L) .name("720p") @@ -64,6 +61,18 @@ public class Application { .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(), TranscodeProfile.builder() .bitrate(3000000L) .width(1280L) @@ -81,7 +90,6 @@ public class Application { .targets(List.of( Target.builder() .profile("720p0") - .videoOnly(false) .id("PUSH123") .spec(TargetSpec.builder() .url("rtmps://live.my-service.tv/channel/secretKey") @@ -91,21 +99,13 @@ public class Application { .build()) .build(); - CreateStreamResponse res = sdk.stream().create() + CreateStreamResponse res = sdk.stream().create() .request(req) .call(); - if (res.stream().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.stream().isPresent()) { + // handle response } - } } ``` diff --git a/build.gradle b/build.gradle index 630190a3..dc5f1938 100644 --- a/build.gradle +++ b/build.gradle @@ -38,6 +38,9 @@ model { } } +version = "${version}" +group = "${groupId}" + jar { dependsOn(":generatePomFileForMavenPublication") @@ -60,15 +63,12 @@ tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') } -group = "studio.livepeer" -version = "0.5.0" - sourcesJar { - archiveBaseName = "livepeer" + archiveBaseName = "${artifactId}" } javadocJar { - archiveBaseName = "livepeer" + archiveBaseName = "${artifactId}" } @@ -76,9 +76,11 @@ publishing { publications { maven(MavenPublication) { - groupId = 'studio.livepeer' - artifactId = 'livepeer' - version = '0.5.0' + // note that properties can't yet be used below! + // https://github.com/gradle/gradle/issues/18619 + groupId = "studio.livepeer" + artifactId = "livepeer" + version = "0.6.0" from components.java @@ -121,16 +123,15 @@ if (!project.hasProperty('skip.signing')) { } } -dependencies { - 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' - implementation 'commons-io:commons-io:2.15.1' -} +dependencies { + api 'com.fasterxml.jackson.core:jackson-annotations:2.18.2' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.2' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2' + api('org.openapitools:jackson-databind-nullable:0.2.6') {exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'} + implementation 'commons-io:commons-io:2.18.0' +} apply from: 'build-extras.gradle' diff --git a/codeSamples.yaml b/codeSamples.yaml index cde5191e..378d555c 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,208 +3,146 @@ info: title: CodeSamples overlay for java target version: 0.0.0 actions: - - target: $["paths"]["/access-control/signing-key"]["post"] + - target: $["paths"]["/access-control/signing-key"]["get"] update: x-codeSamples: - lang: java - label: createSigningKey + 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.CreateSigningKeyResponse; + import studio.livepeer.livepeer.models.operations.GetSigningKeysResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - CreateSigningKeyResponse res = sdk.accessControl().create() + GetSigningKeysResponse res = sdk.accessControl().getAll() .call(); - if (res.signingKey().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } - - target: $["paths"]["/playback/{id}"]["get"] + - target: $["paths"]["/access-control/signing-key"]["post"] update: x-codeSamples: - lang: java - label: getPlaybackInfo + 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.GetPlaybackInfoResponse; + import studio.livepeer.livepeer.models.operations.CreateSigningKeyResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetPlaybackInfoResponse res = sdk.playback().get() - .id("<value>") + CreateSigningKeyResponse res = sdk.accessControl().create() .call(); - 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; - } catch (Exception e) { - // handle exception - throw e; + if (res.signingKey().isPresent()) { + // handle response } - } } - - target: $["paths"]["/stream/{id}"]["delete"] + - target: $["paths"]["/access-control/signing-key/{keyId}"]["delete"] update: x-codeSamples: - lang: java - label: deleteStream + 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.DeleteStreamResponse; + import studio.livepeer.livepeer.models.operations.DeleteSigningKeyResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteStreamResponse res = sdk.stream().delete() - .id("<value>") + DeleteSigningKeyResponse res = sdk.accessControl().delete() + .keyId("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } - - target: $["paths"]["/multistream/target/{id}"]["get"] + - target: $["paths"]["/access-control/signing-key/{keyId}"]["get"] update: x-codeSamples: - lang: java - label: getMultistreamTarget + 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.GetMultistreamTargetResponse; + import studio.livepeer.livepeer.models.operations.GetSigningKeyResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetMultistreamTargetResponse res = sdk.multistream().get() - .id("<value>") + GetSigningKeyResponse res = sdk.accessControl().get() + .keyId("<id>") .call(); - if (res.multistreamTarget().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.signingKey().isPresent()) { + // handle response } - } } - - target: $["paths"]["/webhook"]["post"] + - target: $["paths"]["/access-control/signing-key/{keyId}"]["patch"] update: x-codeSamples: - lang: java - label: createWebhook + 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.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.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("<YOUR_BEARER_TOKEN_HERE>") - .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(); + Livepeer sdk = Livepeer.builder() + .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .build(); - CreateWebhookResponse res = sdk.webhook().create() - .request(req) + UpdateSigningKeyResponse res = sdk.accessControl().update() + .keyId("<id>") + .requestBody(UpdateSigningKeyRequestBody.builder() + .build()) .call(); - if (res.webhook().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } - target: $["paths"]["/asset"]["get"] @@ -217,1418 +155,915 @@ actions: import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.GetAssetsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetAssetsResponse res = sdk.asset().getAll() + GetAssetsResponse res = sdk.asset().getAll() .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } - - target: $["paths"]["/session/{id}/clips"]["get"] + - target: $["paths"]["/asset/request-upload"]["post"] update: x-codeSamples: - lang: java - label: getSessionClips + 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.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetSessionClipsResponse; + import studio.livepeer.livepeer.models.components.*; + import studio.livepeer.livepeer.models.operations.RequestUploadResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .build(); + + 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(600) + .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(), + 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(); - GetSessionClipsResponse res = sdk.session().getClips() - .id("<value>") + RequestUploadResponse res = sdk.asset().create() + .request(req) .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } - - target: $["paths"]["/stream/{id}/clips"]["get"] + - target: $["paths"]["/asset/upload/url"]["post"] update: x-codeSamples: - lang: java - label: getClips + label: uploadAsset 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.errors.SDKError; - import studio.livepeer.livepeer.models.operations.GetClipsResponse; + import studio.livepeer.livepeer.models.components.*; + import studio.livepeer.livepeer.models.operations.UploadAssetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .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(600) + .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(), + 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(); - GetClipsResponse res = sdk.stream().getClips() - .id("<value>") + UploadAssetResponse res = sdk.asset().createViaUrl() + .request(req) .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.twoHundredApplicationJsonData().isPresent()) { + // handle response } - } } - - target: $["paths"]["/task/{taskId}"]["get"] + - target: $["paths"]["/asset/{assetId}"]["delete"] update: x-codeSamples: - lang: java - label: getTask + label: deleteAsset 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.GetTaskResponse; + import studio.livepeer.livepeer.models.operations.DeleteAssetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetTaskResponse res = sdk.task().get() - .taskId("<value>") + DeleteAssetResponse res = sdk.asset().delete() + .assetId("<id>") .call(); - if (res.task().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } - - target: $["paths"]["/clip"]["post"] + - target: $["paths"]["/asset/{assetId}"]["get"] update: x-codeSamples: - lang: java - label: createClip + label: getAsset 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.GetAssetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); - ClipPayload req = ClipPayload.builder() - .playbackId("eaw4nk06ts2d0mzb") - .startTime(1587667174725d) - .endTime(1587667174725d) - .name("My Clip") - .sessionId("de7818e7-610a-4057-8f6f-b785dc1e6f88") - .build(); + Livepeer sdk = Livepeer.builder() + .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .build(); - CreateClipResponse res = sdk.stream().createClip() - .request(req) + GetAssetResponse res = sdk.asset().get() + .assetId("<id>") .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.asset().isPresent()) { + // handle response } - } } - - target: $["paths"]["/webhook/{id}"]["put"] + - target: $["paths"]["/asset/{assetId}"]["patch"] update: x-codeSamples: - lang: java - label: updateWebhook + label: updateAsset 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.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.components.*; + import studio.livepeer.livepeer.models.operations.UpdateAssetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateWebhookResponse res = sdk.webhook().update() - .id("<value>") - .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") + UpdateAssetResponse res = sdk.asset().update() + .assetId("<id>") + .assetPatchPayload(AssetPatchPayload.builder() + .name("filename.mp4") + .playbackPolicy(PlaybackPolicy.builder() + .type(Type.WEBHOOK) + .webhookId("1bde4o2i6xycudoy") + .webhookContext(Map.ofEntries( + Map.entry("streamerId", "my-custom-id"))) + .refreshInterval(600) + .build()) .build()) .call(); - if (res.webhook().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.asset().isPresent()) { + // handle response } - } } - - target: $["paths"]["/room/{id}/egress"]["delete"] + - target: $["paths"]["/clip"]["post"] update: x-codeSamples: - lang: java - label: stopRoomEgress + label: createClip 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.components.ClipPayload; + import studio.livepeer.livepeer.models.operations.CreateClipResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .build(); + + ClipPayload req = ClipPayload.builder() + .playbackId("eaw4nk06ts2d0mzb") + .startTime(1587667174725) + .endTime(1587667174725) + .name("My Clip") + .sessionId("de7818e7-610a-4057-8f6f-b785dc1e6f88") .build(); - StopRoomEgressResponse res = sdk.room().stopEgress() - .id("<value>") + CreateClipResponse res = sdk.stream().createClip() + .request(req) .call(); + if (res.data().isPresent()) { // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; } - } } - - target: $["paths"]["/data/views/query"]["get"] + - target: $["paths"]["/data/usage/query"]["get"] update: x-codeSamples: - lang: java - label: getViewershipMetrics + 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.GetViewershipMetricsRequest; - import studio.livepeer.livepeer.models.operations.GetViewershipMetricsResponse; + import studio.livepeer.livepeer.models.operations.GetUsageMetricsRequest; + import studio.livepeer.livepeer.models.operations.GetUsageMetricsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetViewershipMetricsRequest req = GetViewershipMetricsRequest.builder() + GetUsageMetricsRequest req = GetUsageMetricsRequest.builder() .build(); - GetViewershipMetricsResponse res = sdk.metrics().getViewership() + GetUsageMetricsResponse res = sdk.metrics().getUsage() .request(req) .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.usageMetric().isPresent()) { + // handle response } - } } - - target: $["paths"]["/access-control/signing-key"]["get"] + - target: $["paths"]["/data/views/now"]["get"] update: x-codeSamples: - lang: java - label: getSigningKeys + label: getRealtimeViewershipNow 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.GetSigningKeysResponse; + import studio.livepeer.livepeer.models.operations.GetRealtimeViewershipNowResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetSigningKeysResponse res = sdk.accessControl().getAll() + GetRealtimeViewershipNowResponse res = sdk.metrics().getRealtimeViewership() .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } - - target: $["paths"]["/stream/{id}/create-multistream-target"]["post"] + - target: $["paths"]["/data/views/query"]["get"] update: x-codeSamples: - lang: java - label: addMultistreamTarget + label: getViewershipMetrics source: |- package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; - import studio.livepeer.livepeer.models.components.TargetAddPayload; - import studio.livepeer.livepeer.models.components.TargetAddPayloadSpec; - import studio.livepeer.livepeer.models.errors.SDKError; - import studio.livepeer.livepeer.models.operations.AddMultistreamTargetResponse; + import studio.livepeer.livepeer.models.operations.GetViewershipMetricsRequest; + import studio.livepeer.livepeer.models.operations.GetViewershipMetricsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .build(); + + GetViewershipMetricsRequest req = GetViewershipMetricsRequest.builder() .build(); - AddMultistreamTargetResponse res = sdk.stream().addMultistreamTarget() - .id("<value>") - .targetAddPayload(TargetAddPayload.builder() - .profile("720p0") - .videoOnly(false) - .id("PUSH123") - .spec(TargetAddPayloadSpec.builder() - .url("rtmps://live.my-service.tv/channel/secretKey") - .name("My target") - .build()) - .build()) + GetViewershipMetricsResponse res = sdk.metrics().getViewership() + .request(req) .call(); + if (res.data().isPresent()) { // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; } - } } - - target: $["paths"]["/room"]["post"] + - target: $["paths"]["/data/views/query/creator"]["get"] update: x-codeSamples: - lang: java - label: createRoom + 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.CreateRoomResponse; + import studio.livepeer.livepeer.models.operations.GetCreatorViewershipMetricsRequest; + import studio.livepeer.livepeer.models.operations.GetCreatorViewershipMetricsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .build(); + + GetCreatorViewershipMetricsRequest req = GetCreatorViewershipMetricsRequest.builder() .build(); - CreateRoomResponse res = sdk.room().create() + GetCreatorViewershipMetricsResponse res = sdk.metrics().getCreatorViewership() + .request(req) .call(); - if (res.createRoomResponse().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } - - target: $["paths"]["/room/{id}"]["get"] + - target: $["paths"]["/data/views/query/total/{playbackId}"]["get"] update: x-codeSamples: - lang: java - label: getRoom + 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.GetRoomResponse; + import studio.livepeer.livepeer.models.operations.GetPublicViewershipMetricsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetRoomResponse res = sdk.room().get() - .id("<value>") + GetPublicViewershipMetricsResponse res = sdk.metrics().getPublicViewership() + .playbackId("<id>") .call(); - if (res.room().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } - - target: $["paths"]["/room/{id}"]["delete"] + - target: $["paths"]["/multistream/target"]["get"] update: x-codeSamples: - lang: java - label: deleteRoom + label: getMultistreamTargets 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.GetMultistreamTargetsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteRoomResponse res = sdk.room().delete() - .id("<value>") + GetMultistreamTargetsResponse res = sdk.multistream().getAll() .call(); + if (res.data().isPresent()) { // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; } - } } - - target: $["paths"]["/room/{id}/user/{userId}"]["get"] + - target: $["paths"]["/multistream/target"]["post"] update: x-codeSamples: - lang: java - label: getRoomUser + label: createMultistreamTarget 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.components.MultistreamTargetInput; + import studio.livepeer.livepeer.models.operations.CreateMultistreamTargetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .build(); + + MultistreamTargetInput req = MultistreamTargetInput.builder() + .url("rtmps://live.my-service.tv/channel/secretKey") .build(); - GetRoomUserResponse res = sdk.room().getUser() - .id("<value>") - .userId("<value>") + CreateMultistreamTargetResponse res = sdk.multistream().create() + .request(req) .call(); - if (res.getRoomUserResponse().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.multistreamTarget().isPresent()) { + // handle response } - } } - - target: $["paths"]["/webhook"]["get"] + - target: $["paths"]["/multistream/target/{id}"]["delete"] update: x-codeSamples: - lang: java - label: getWebhooks + label: deleteMultistreamTarget 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.DeleteMultistreamTargetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetWebhooksResponse res = sdk.webhook().getAll() + DeleteMultistreamTargetResponse res = sdk.multistream().delete() + .id("<id>") .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } - - target: $["paths"]["/webhook/{id}"]["get"] + - target: $["paths"]["/multistream/target/{id}"]["get"] update: x-codeSamples: - lang: java - label: getWebhook + 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.GetWebhookResponse; + import studio.livepeer.livepeer.models.operations.GetMultistreamTargetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetWebhookResponse res = sdk.webhook().get() - .id("<value>") + GetMultistreamTargetResponse res = sdk.multistream().get() + .id("<id>") .call(); - if (res.webhook().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.multistreamTarget().isPresent()) { + // handle response } - } } - - target: $["paths"]["/room/{id}/user"]["post"] + - target: $["paths"]["/multistream/target/{id}"]["patch"] update: x-codeSamples: - lang: java - label: createRoomUser + label: updateMultistreamTarget 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.components.MultistreamTargetInput; + import studio.livepeer.livepeer.models.operations.UpdateMultistreamTargetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - CreateRoomUserResponse res = sdk.room().createUser() - .id("<value>") - .roomUserPayload(RoomUserPayload.builder() - .name("name") - .canPublish(true) - .canPublishData(true) + UpdateMultistreamTargetResponse res = sdk.multistream().update() + .id("<id>") + .multistreamTarget(MultistreamTargetInput.builder() + .url("rtmps://live.my-service.tv/channel/secretKey") .build()) .call(); - if (res.roomUserResponse().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } - - target: $["paths"]["/multistream/target"]["post"] + - target: $["paths"]["/playback/{id}"]["get"] update: x-codeSamples: - lang: java - label: createMultistreamTarget + label: getPlaybackInfo 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.errors.Error; + import studio.livepeer.livepeer.models.operations.GetPlaybackInfoResponse; public class Application { - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + public static void main(String[] args) throws Error, Exception { - MultistreamTargetInput req = MultistreamTargetInput.builder() - .url("rtmps://live.my-service.tv/channel/secretKey") - .build(); + Livepeer sdk = Livepeer.builder() + .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .build(); - CreateMultistreamTargetResponse res = sdk.multistream().create() - .request(req) + GetPlaybackInfoResponse res = sdk.playback().get() + .id("<id>") .call(); - if (res.multistreamTarget().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.playbackInfo().isPresent()) { + // handle response } - } } - - target: $["paths"]["/multistream/target/{id}"]["patch"] + - target: $["paths"]["/session"]["get"] update: x-codeSamples: - lang: java - label: updateMultistreamTarget + label: getSessions 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.UpdateMultistreamTargetResponse; + import studio.livepeer.livepeer.models.operations.GetSessionsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateMultistreamTargetResponse res = sdk.multistream().update() - .id("<value>") - .multistreamTargetPatchPayload(MultistreamTargetPatchPayload.builder() - .url("rtmps://live.my-service.tv/channel/secretKey") - .build()) + GetSessionsResponse res = sdk.session().getAll() .call(); + if (res.data().isPresent()) { // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; } - } } - - target: $["paths"]["/asset/request-upload"]["post"] + - target: $["paths"]["/session/{id}"]["get"] update: x-codeSamples: - lang: java - label: requestUpload + label: getSession 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.RequestUploadResponse; + import studio.livepeer.livepeer.models.operations.GetSessionResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); - 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(); + Livepeer sdk = Livepeer.builder() + .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .build(); - RequestUploadResponse res = sdk.asset().create() - .request(req) + GetSessionResponse res = sdk.session().get() + .id("<id>") .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.session().isPresent()) { + // handle response } - } } - - target: $["paths"]["/room/{id}/user/{userId}"]["put"] + - target: $["paths"]["/session/{id}/clips"]["get"] update: x-codeSamples: - lang: java - label: updateRoomUser + label: getSessionClips 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.GetSessionClipsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateRoomUserResponse res = sdk.room().updateUser() - .id("<value>") - .userId("<value>") - .roomUserUpdatePayload(RoomUserUpdatePayload.builder() - .canPublish(true) - .canPublishData(true) - .build()) + GetSessionClipsResponse res = sdk.session().getClips() + .id("<id>") .call(); + if (res.data().isPresent()) { // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; } - } } - - target: $["paths"]["/data/views/query/total/{playbackId}"]["get"] + - target: $["paths"]["/stream"]["get"] update: x-codeSamples: - lang: java - label: getPublicViewershipMetrics + 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.GetPublicViewershipMetricsResponse; + import studio.livepeer.livepeer.models.operations.GetStreamsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetPublicViewershipMetricsResponse res = sdk.metrics().getPublicViewership() - .playbackId("<value>") + GetStreamsResponse res = sdk.stream().getAll() .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } - - target: $["paths"]["/stream/{id}/multistream/{targetId}"]["delete"] + - target: $["paths"]["/stream"]["post"] update: x-codeSamples: - lang: java - label: removeMultistreamTarget + 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.errors.SDKError; - import studio.livepeer.livepeer.models.operations.RemoveMultistreamTargetResponse; + import studio.livepeer.livepeer.models.components.*; + import studio.livepeer.livepeer.models.operations.CreateStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .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.739) + .lon(-104.988) + .build()) + .build()) + .playbackPolicy(PlaybackPolicy.builder() + .type(Type.WEBHOOK) + .webhookId("1bde4o2i6xycudoy") + .webhookContext(Map.ofEntries( + Map.entry("streamerId", "my-custom-id"))) + .refreshInterval(600) + .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(), + 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(), + 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") + .id("PUSH123") + .spec(TargetSpec.builder() + .url("rtmps://live.my-service.tv/channel/secretKey") + .name("My target") + .build()) + .build())) + .build()) .build(); - RemoveMultistreamTargetResponse res = sdk.stream().removeMultistreamTarget() - .id("<value>") - .targetId("<value>") + CreateStreamResponse res = sdk.stream().create() + .request(req) .call(); + if (res.stream().isPresent()) { // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; } - } } - - target: $["paths"]["/webhook/{id}"]["delete"] + - target: $["paths"]["/stream/{id}"]["delete"] update: x-codeSamples: - lang: java - label: deleteWebhook + 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.DeleteWebhookResponse; + import studio.livepeer.livepeer.models.operations.DeleteStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteWebhookResponse res = sdk.webhook().delete() - .id("<value>") + DeleteStreamResponse res = sdk.stream().delete() + .id("<id>") .call(); - if (res.webhook().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } - - target: $["paths"]["/room/{id}/user/{userId}"]["delete"] - update: - x-codeSamples: - - lang: java - 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.DeleteRoomUserResponse; - - public class Application { - - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); - - DeleteRoomUserResponse res = sdk.room().deleteUser() - .id("<value>") - .userId("<value>") - .call(); - - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - - } - } - - target: $["paths"]["/data/views/now"]["get"] - update: - x-codeSamples: - - lang: java - 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.BreakdownBy; - import studio.livepeer.livepeer.models.operations.GetRealtimeViewershipNowResponse; - - public class Application { - - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); - - GetRealtimeViewershipNowResponse res = sdk.metrics().getRealtimeViewership() - .playbackId("<value>") - .creatorId("<value>") - .breakdownBy(List.of( - BreakdownBy.PLAYBACK_ID)) - .call(); - - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - - } - } - - target: $["paths"]["/transcode"]["post"] - update: - x-codeSamples: - - lang: java - 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.TranscodeVideoResponse; - - public class Application { - - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .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) - .call(); - - if (res.task().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - - } - } - - target: $["paths"]["/webhook/{id}/log"]["get"] - update: - x-codeSamples: - - lang: java - 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.GetWebhookLogsResponse; - - public class Application { - - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); - - GetWebhookLogsResponse res = sdk.webhook().getLogs() - .id("<value>") - .call(); - - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - - } - } - - target: $["paths"]["/asset/upload/url"]["post"] - update: - x-codeSamples: - - lang: java - label: uploadAsset - 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.errors.SDKError; - import studio.livepeer.livepeer.models.operations.UploadAssetResponse; - - public class Application { - - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .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) - .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()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - - } - } - - target: $["paths"]["/data/usage/query"]["get"] + - target: $["paths"]["/stream/{id}"]["get"] update: x-codeSamples: - lang: java - label: getUsageMetrics + 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.GetUsageMetricsRequest; - import studio.livepeer.livepeer.models.operations.GetUsageMetricsResponse; + import studio.livepeer.livepeer.models.operations.GetStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); - - GetUsageMetricsRequest req = GetUsageMetricsRequest.builder() - .build(); - - GetUsageMetricsResponse res = sdk.metrics().getUsage() - .request(req) - .call(); - - if (res.usageMetric().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } - } - - target: $["paths"]["/access-control/signing-key/{keyId}"]["delete"] - update: - x-codeSamples: - - lang: java - 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.DeleteSigningKeyResponse; - - public class Application { - - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteSigningKeyResponse res = sdk.accessControl().delete() - .keyId("<value>") + GetStreamResponse res = sdk.stream().get() + .id("<id>") .call(); + if (res.stream().isPresent()) { // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; } - - } - } - - target: $["paths"]["/stream"]["get"] - update: - x-codeSamples: - - lang: java - 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.GetStreamsResponse; - - public class Application { - - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); - - GetStreamsResponse res = sdk.stream().getAll() - .streamsonly("<value>") - .call(); - - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - - } - } - - target: $["paths"]["/session"]["get"] - update: - x-codeSamples: - - lang: java - 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.GetSessionsResponse; - - public class Application { - - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); - - GetSessionsResponse res = sdk.session().getAll() - .call(); - - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } } - target: $["paths"]["/stream/{id}"]["patch"] @@ -1643,38 +1078,25 @@ actions: 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.Multistream; - import studio.livepeer.livepeer.models.components.PlaybackPolicy; - import studio.livepeer.livepeer.models.components.Profile; - import studio.livepeer.livepeer.models.components.RecordingSpec; - import studio.livepeer.livepeer.models.components.StreamPatchPayload; - 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.components.*; import studio.livepeer.livepeer.models.operations.UpdateStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateStreamResponse res = sdk.stream().update() - .id("<value>") + UpdateStreamResponse res = sdk.stream().update() + .id("<id>") .streamPatchPayload(StreamPatchPayload.builder() .record(false) .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") @@ -1687,9 +1109,31 @@ actions: .webhookId("1bde4o2i6xycudoy") .webhookContext(Map.ofEntries( Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) + .refreshInterval(600) .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(), + FfmpegProfile.builder() + .width(1280L) + .name("720p") + .height(720L) + .bitrate(3000000L) + .fps(30L) + .fpsDen(1L) + .quality(23L) + .gop("2") + .profile(Profile.H264_BASELINE) + .build(), FfmpegProfile.builder() .width(1280L) .name("720p") @@ -1703,6 +1147,18 @@ actions: .build())) .recordingSpec(RecordingSpec.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(), TranscodeProfile.builder() .bitrate(3000000L) .width(1280L) @@ -1716,792 +1172,585 @@ actions: .encoder(TranscodeProfileEncoder.H264) .build())) .build()) + .name("test_stream") .build()) .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } - - target: $["paths"]["/multistream/target"]["get"] + - target: $["paths"]["/stream/{id}/clips"]["get"] update: x-codeSamples: - lang: java - label: getMultistreamTargets + 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.GetMultistreamTargetsResponse; + import studio.livepeer.livepeer.models.operations.GetClipsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); - GetMultistreamTargetsResponse res = sdk.multistream().getAll() - .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}"]["delete"] - update: - x-codeSamples: - - lang: java - label: deleteMultistreamTarget - 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; - - public class Application { - - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteMultistreamTargetResponse res = sdk.multistream().delete() - .id("<value>") + GetClipsResponse res = sdk.stream().getClips() + .id("<id>") .call(); + if (res.data().isPresent()) { // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; } - } } - - target: $["paths"]["/stream/{id}/terminate"]["delete"] + - target: $["paths"]["/stream/{id}/create-multistream-target"]["post"] update: x-codeSamples: - lang: java - label: terminateStream + label: addMultistreamTarget 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.TerminateStreamResponse; + import studio.livepeer.livepeer.models.components.TargetAddPayload; + import studio.livepeer.livepeer.models.components.TargetAddPayloadSpec; + import studio.livepeer.livepeer.models.operations.AddMultistreamTargetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); - TerminateStreamResponse res = sdk.stream().terminate() - .id("<value>") - .call(); + Livepeer sdk = Livepeer.builder() + .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .build(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } + AddMultistreamTargetResponse res = sdk.stream().addMultistreamTarget() + .id("<id>") + .targetAddPayload(TargetAddPayload.builder() + .profile("720p0") + .id("PUSH123") + .spec(TargetAddPayloadSpec.builder() + .url("rtmps://live.my-service.tv/channel/secretKey") + .name("My target") + .build()) + .build()) + .call(); + // handle response } } - - target: $["paths"]["/data/views/query/creator"]["get"] + - target: $["paths"]["/stream/{id}/multistream/{targetId}"]["delete"] update: x-codeSamples: - lang: java - label: getCreatorViewershipMetrics + label: removeMultistreamTarget 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.RemoveMultistreamTargetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() - .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); - GetCreatorViewershipMetricsRequest req = GetCreatorViewershipMetricsRequest.builder() - .build(); + Livepeer sdk = Livepeer.builder() + .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .build(); - GetCreatorViewershipMetricsResponse res = sdk.metrics().getCreatorViewership() - .request(req) + RemoveMultistreamTargetResponse res = sdk.stream().removeMultistreamTarget() + .id("<id>") + .targetId("<id>") .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } - - target: $["paths"]["/asset/{assetId}"]["delete"] + - target: $["paths"]["/stream/{id}/start-pull"]["post"] update: x-codeSamples: - lang: java - label: deleteAsset + 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.DeleteAssetResponse; + import studio.livepeer.livepeer.models.operations.StartPullStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteAssetResponse res = sdk.asset().delete() - .assetId("<value>") + StartPullStreamResponse res = sdk.stream().startPull() + .id("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } - - target: $["paths"]["/stream/{parentId}/sessions"]["get"] + - target: $["paths"]["/stream/{id}/terminate"]["delete"] update: x-codeSamples: - lang: java - label: getRecordedSessions + 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.GetRecordedSessionsResponse; - import studio.livepeer.livepeer.models.operations.Record; + import studio.livepeer.livepeer.models.operations.TerminateStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetRecordedSessionsResponse res = sdk.session().getRecorded() - .parentId("<value>") - .record(Record.of(true)) + TerminateStreamResponse res = sdk.stream().terminate() + .id("<id>") .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } - - target: $["paths"]["/room/{id}/egress"]["post"] + - target: $["paths"]["/stream/{parentId}/sessions"]["get"] update: x-codeSamples: - lang: java - label: startRoomEgress + label: getRecordedSessions 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.GetRecordedSessionsResponse; + import studio.livepeer.livepeer.models.operations.Record; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - StartRoomEgressResponse res = sdk.room().startEgress() - .id("<value>") - .roomEgressPayload(RoomEgressPayload.builder() - .streamId("aac12556-4d65-4d34-9fb6-d1f0985eb0a9") - .build()) + GetRecordedSessionsResponse res = sdk.session().getRecorded() + .parentId("<id>") + .record(Record.of(true)) .call(); + if (res.data().isPresent()) { // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; } - } } - - 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 { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - StartPullStreamResponse res = sdk.stream().startPull() - .id("<value>") + GetTasksResponse res = sdk.task().getAll() .call(); + if (res.data().isPresent()) { // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; } - } } - - target: $["paths"]["/webhook/{id}/log/{logId}/resend"]["post"] + - target: $["paths"]["/task/{taskId}"]["get"] update: x-codeSamples: - lang: java - label: resendWebhook + label: getTask 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.ResendWebhookResponse; + import studio.livepeer.livepeer.models.operations.GetTaskResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - ResendWebhookResponse res = sdk.webhook().resendLog() - .id("<value>") - .logId("<value>") + GetTaskResponse res = sdk.task().get() + .taskId("<id>") .call(); - if (res.webhookLog().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.task().isPresent()) { + // handle response } - } } - - target: $["paths"]["/stream"]["post"] + - target: $["paths"]["/transcode"]["post"] update: x-codeSamples: - lang: java - label: createStream + label: transcodeVideo 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.components.*; + import studio.livepeer.livepeer.models.operations.TranscodeVideoResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .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) + TranscodePayload req = TranscodePayload.builder() + .input(Input.of(Input1.builder() + .url("https://s3.amazonaws.com/bucket/file.mp4") + .build())) + .storage(TranscodePayloadStorage.of(Storage2.builder() + .type(TranscodePayloadStorageType.WEB3_STORAGE) + .credentials(TranscodePayloadStorageCredentials.builder() + .proof("EaJlcm9vdHOAZ3ZlcnNpb24BmgIBcRIg2uxHpcPYSWNtifMKFkPC7IEDvFDCxCd3ADViv0coV7SnYXNYRO2hA0AnblHEW38s3lSlcwaDjPn") + .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()) - .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() + TranscodeProfile.builder() + .bitrate(3000000L) .width(1280L) .name("720p") .height(720L) - .bitrate(3000000L) + .quality(23L) .fps(30L) .fpsDen(1L) + .gop("2") + .profile(TranscodeProfileProfile.H264_BASELINE) + .encoder(TranscodeProfileEncoder.H264) + .build(), + TranscodeProfile.builder() + .bitrate(3000000L) + .width(1280L) + .name("720p") + .height(720L) .quality(23L) + .fps(30L) + .fpsDen(1L) .gop("2") - .profile(Profile.H264_BASELINE) + .profile(TranscodeProfileProfile.H264_BASELINE) + .encoder(TranscodeProfileEncoder.H264) .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() + TranscodeVideoResponse res = sdk.transcode().create() .request(req) .call(); - if (res.stream().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.task().isPresent()) { + // handle response } - } } - - target: $["paths"]["/asset/{assetId}"]["patch"] + - target: $["paths"]["/webhook"]["get"] update: x-codeSamples: - lang: java - label: updateAsset + label: getWebhooks 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.GetWebhooksResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateAssetResponse res = sdk.asset().update() - .assetId("<value>") - .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()) + GetWebhooksResponse res = sdk.webhook().getAll() .call(); - if (res.asset().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } - - target: $["paths"]["/session/{id}"]["get"] + - target: $["paths"]["/webhook"]["post"] update: x-codeSamples: - lang: java - label: getSession + label: createWebhook 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.GetSessionResponse; + import studio.livepeer.livepeer.models.components.Events; + import studio.livepeer.livepeer.models.components.WebhookInput; + import studio.livepeer.livepeer.models.operations.CreateWebhookResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") + .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(); - GetSessionResponse res = sdk.session().get() - .id("<value>") + CreateWebhookResponse res = sdk.webhook().create() + .request(req) .call(); - if (res.session().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.webhook().isPresent()) { + // handle response } - } } - - target: $["paths"]["/access-control/signing-key/{keyId}"]["get"] + - target: $["paths"]["/webhook/{id}"]["delete"] update: x-codeSamples: - lang: java - label: getSigningKey + 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.GetSigningKeyResponse; + import studio.livepeer.livepeer.models.operations.DeleteWebhookResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetSigningKeyResponse res = sdk.accessControl().get() - .keyId("<value>") + DeleteWebhookResponse res = sdk.webhook().delete() + .id("<id>") .call(); - if (res.signingKey().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.webhook().isPresent()) { + // handle response } - } } - - target: $["paths"]["/stream/{id}"]["get"] + - target: $["paths"]["/webhook/{id}"]["get"] update: x-codeSamples: - lang: java - label: getStream + 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.GetStreamResponse; + import studio.livepeer.livepeer.models.operations.GetWebhookResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetStreamResponse res = sdk.stream().get() - .id("<value>") + GetWebhookResponse res = sdk.webhook().get() + .id("<id>") .call(); - if (res.stream().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.webhook().isPresent()) { + // handle response } - } } - - target: $["paths"]["/webhook/{id}/log/{logId}"]["get"] + - target: $["paths"]["/webhook/{id}"]["put"] update: x-codeSamples: - lang: java - label: getWebhookLog + label: updateWebhook 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.GetWebhookLogResponse; + import studio.livepeer.livepeer.models.components.Events; + import studio.livepeer.livepeer.models.components.WebhookInput; + import studio.livepeer.livepeer.models.operations.UpdateWebhookResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetWebhookLogResponse res = sdk.webhook().getLog() - .id("<value>") - .logId("<value>") + UpdateWebhookResponse res = sdk.webhook().update() + .id("<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.webhookLog().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.webhook().isPresent()) { + // handle response } - } } - - target: $["paths"]["/asset/{assetId}"]["get"] + - target: $["paths"]["/webhook/{id}/log"]["get"] update: x-codeSamples: - lang: java - label: getAsset + 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.GetAssetResponse; + import studio.livepeer.livepeer.models.operations.GetWebhookLogsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetAssetResponse res = sdk.asset().get() - .assetId("<value>") + GetWebhookLogsResponse res = sdk.webhook().getLogs() + .id("<id>") .call(); - if (res.asset().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } - - target: $["paths"]["/access-control/signing-key/{keyId}"]["patch"] + - target: $["paths"]["/webhook/{id}/log/{logId}"]["get"] update: x-codeSamples: - lang: java - label: updateSigningKey + 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.UpdateSigningKeyRequestBody; - import studio.livepeer.livepeer.models.operations.UpdateSigningKeyResponse; + import studio.livepeer.livepeer.models.operations.GetWebhookLogResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateSigningKeyResponse res = sdk.accessControl().update() - .keyId("<value>") - .requestBody(UpdateSigningKeyRequestBody.builder() - .build()) + GetWebhookLogResponse res = sdk.webhook().getLog() + .id("<id>") + .logId("<id>") .call(); + if (res.webhookLog().isPresent()) { // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; } - } } - - target: $["paths"]["/task"]["get"] + - target: $["paths"]["/webhook/{id}/log/{logId}/resend"]["post"] update: x-codeSamples: - lang: java - label: getTasks + label: resendWebhook 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.GetTasksResponse; + import studio.livepeer.livepeer.models.operations.ResendWebhookResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetTasksResponse res = sdk.task().getAll() + ResendWebhookResponse res = sdk.webhook().resendLog() + .id("<id>") + .logId("<id>") .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.webhookLog().isPresent()) { + // handle response } - } } diff --git a/docs/models/components/Asset.md b/docs/models/components/Asset.md index 0a086934..51c510e9 100644 --- a/docs/models/components/Asset.md +++ b/docs/models/components/Asset.md @@ -6,21 +6,21 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *String* | :heavy_check_mark: | N/A | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | -| `type` | [Optional<AssetType>](../../models/components/AssetType.md) | :heavy_minus_sign: | Type of the asset. | video | -| `playbackId` | *Optional<String>* | :heavy_minus_sign: | The playback ID to use with the Playback Info endpoint to retrieve playback URLs. | eaw4nk06ts2d0mzb | -| ~~`userId`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | 66E2161C-7670-4D05-B71D-DA2D6979556F | -| `playbackUrl` | *Optional<String>* | :heavy_minus_sign: | URL for HLS playback. **It is recommended to not use this URL**, and instead use playback IDs with the Playback Info endpoint to retrieve the playback URLs - this URL format is subject to change (e.g. https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8). | https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8 | -| `downloadUrl` | *Optional<String>* | :heavy_minus_sign: | The URL to directly download the asset, e.g. `https://livepeercdn.com/asset/eawrrk06ts2d0mzb/video`. It is not recommended to use this for playback. | https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video | -| `playbackPolicy` | [JsonNullable<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | +| `type` | [Optional\<AssetType>](../../models/components/AssetType.md) | :heavy_minus_sign: | Type of the asset. | video | +| `playbackId` | *Optional\<String>* | :heavy_minus_sign: | The playback ID to use with the Playback Info endpoint to retrieve playback URLs. | eaw4nk06ts2d0mzb | +| ~~`userId`~~ | *Optional\<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | 66E2161C-7670-4D05-B71D-DA2D6979556F | +| `playbackUrl` | *Optional\<String>* | :heavy_minus_sign: | URL for HLS playback. **It is recommended to not use this URL**, and instead use playback IDs with the Playback Info endpoint to retrieve the playback URLs - this URL format is subject to change (e.g. https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8). | https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8 | +| `downloadUrl` | *Optional\<String>* | :heavy_minus_sign: | The URL to directly download the asset, e.g. `https://livepeercdn.com/asset/eawrrk06ts2d0mzb/video`. It is not recommended to use this for playback. | https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4 | +| `playbackPolicy` | [JsonNullable\<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | | `source` | [Source](../../models/components/Source.md) | :heavy_check_mark: | N/A | | -| `creatorId` | [Optional<CreatorId>](../../models/components/CreatorId.md) | :heavy_minus_sign: | N/A | | -| `profiles` | List<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | Requested profiles for the asset to be transcoded into. Configured<br/>on the upload APIs payload or through the `stream.recordingSpec`<br/>field for recordings. If not specified, default profiles are derived<br/>based on the source input. If this is a recording, the source will<br/>not be present in this list but will be available for playback.<br/> | | -| `storage` | [Optional<AssetStorage>](../../models/components/AssetStorage.md) | :heavy_minus_sign: | N/A | | -| `status` | [Optional<AssetStatus>](../../models/components/AssetStatus.md) | :heavy_minus_sign: | Status of the asset | | +| `creatorId` | [Optional\<CreatorId>](../../models/components/CreatorId.md) | :heavy_minus_sign: | N/A | | +| `profiles` | List\<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | Requested profiles for the asset to be transcoded into. Configured<br/>on the upload APIs payload or through the `stream.recordingSpec`<br/>field for recordings. If not specified, default profiles are derived<br/>based on the source input. If this is a recording, the source will<br/>not be present in this list but will be available for playback.<br/> | | +| `storage` | [Optional\<AssetStorage>](../../models/components/AssetStorage.md) | :heavy_minus_sign: | N/A | | +| `status` | [Optional\<AssetStatus>](../../models/components/AssetStatus.md) | :heavy_minus_sign: | Status of the asset | | | `name` | *String* | :heavy_check_mark: | The name of the asset. This is not necessarily the filename - it can be a custom name or title.<br/> | filename.mp4 | -| `projectId` | *Optional<String>* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb6-d1f0985eb0a9 | -| `createdAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which asset was created | 1587667174725 | -| `createdByTokenName` | *Optional<String>* | :heavy_minus_sign: | Name of the token used to create this object | | -| `size` | *Optional<Double>* | :heavy_minus_sign: | Size of the asset in bytes | 84934509 | -| `hash` | List<[Hash](../../models/components/Hash.md)> | :heavy_minus_sign: | Hash of the asset | | -| `videoSpec` | [Optional<VideoSpec>](../../models/components/VideoSpec.md) | :heavy_minus_sign: | Video metadata | | \ No newline at end of file +| `projectId` | *Optional\<String>* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb6-d1f0985eb0a9 | +| `createdAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which asset was created | 1587667174725 | +| `createdByTokenName` | *Optional\<String>* | :heavy_minus_sign: | Name of the token used to create this object | | +| `size` | *Optional\<Double>* | :heavy_minus_sign: | Size of the asset in bytes | 84934509 | +| `hash` | List\<[Hash](../../models/components/Hash.md)> | :heavy_minus_sign: | Hash of the asset | | +| `videoSpec` | [Optional\<VideoSpec>](../../models/components/VideoSpec.md) | :heavy_minus_sign: | Video metadata | | \ No newline at end of file diff --git a/docs/models/components/AssetIpfs.md b/docs/models/components/AssetIpfs.md index fa75d658..1a0fc336 100644 --- a/docs/models/components/AssetIpfs.md +++ b/docs/models/components/AssetIpfs.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `spec` | [Optional<AssetSpec>](../../models/components/AssetSpec.md) | :heavy_minus_sign: | N/A | | -| `dollarRef` | *Optional<Object>* | :heavy_minus_sign: | N/A | | -| `nftMetadata` | [Optional<IpfsFileInfo>](../../models/components/IpfsFileInfo.md) | :heavy_minus_sign: | N/A | | -| `updatedAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which IPFS export task was<br/>updated<br/> | 1587667174725 | \ No newline at end of file +| `spec` | [Optional\<AssetSpec>](../../models/components/AssetSpec.md) | :heavy_minus_sign: | N/A | | +| `dollarRef` | *Optional\<Object>* | :heavy_minus_sign: | N/A | | +| `nftMetadata` | [Optional\<IpfsFileInfo>](../../models/components/IpfsFileInfo.md) | :heavy_minus_sign: | N/A | | +| `updatedAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which IPFS export task was<br/>updated<br/> | 1587667174725 | \ No newline at end of file diff --git a/docs/models/components/AssetPatchPayload.md b/docs/models/components/AssetPatchPayload.md index b133cb49..93cc78f4 100644 --- a/docs/models/components/AssetPatchPayload.md +++ b/docs/models/components/AssetPatchPayload.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `name` | *Optional<String>* | :heavy_minus_sign: | The name of the asset. This is not necessarily the filename - it can be a custom name or title.<br/> | filename.mp4 | -| `creatorId` | [Optional<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | -| `playbackPolicy` | [JsonNullable<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | -| `storage` | [Optional<Storage>](../../models/components/Storage.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `name` | *Optional\<String>* | :heavy_minus_sign: | The name of the asset. This is not necessarily the filename - it can be a custom name or title.<br/> | filename.mp4 | +| `creatorId` | [Optional\<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | +| `playbackPolicy` | [JsonNullable\<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | +| `storage` | [Optional\<Storage>](../../models/components/Storage.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/AssetSpec.md b/docs/models/components/AssetSpec.md index 6ac93986..1397e67d 100644 --- a/docs/models/components/AssetSpec.md +++ b/docs/models/components/AssetSpec.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `nftMetadataTemplate` | [Optional<AssetNftMetadataTemplate>](../../models/components/AssetNftMetadataTemplate.md) | :heavy_minus_sign: | Name of the NFT metadata template to export. 'player'<br/>will embed the Livepeer Player on the NFT while 'file'<br/>will reference only the immutable MP4 files.<br/> | -| `nftMetadata` | [Optional<AssetNftMetadata>](../../models/components/AssetNftMetadata.md) | :heavy_minus_sign: | Additional data to add to the NFT metadata exported to<br/>IPFS. Will be deep merged with the default metadata<br/>exported.<br/> | \ No newline at end of file +| `nftMetadataTemplate` | [Optional\<AssetNftMetadataTemplate>](../../models/components/AssetNftMetadataTemplate.md) | :heavy_minus_sign: | Name of the NFT metadata template to export. 'player'<br/>will embed the Livepeer Player on the NFT while 'file'<br/>will reference only the immutable MP4 files.<br/> | +| `nftMetadata` | [Optional\<AssetNftMetadata>](../../models/components/AssetNftMetadata.md) | :heavy_minus_sign: | Additional data to add to the NFT metadata exported to<br/>IPFS. Will be deep merged with the default metadata<br/>exported.<br/> | \ No newline at end of file diff --git a/docs/models/components/AssetStatus.md b/docs/models/components/AssetStatus.md index 1e44dcfe..b6c0d7ac 100644 --- a/docs/models/components/AssetStatus.md +++ b/docs/models/components/AssetStatus.md @@ -9,5 +9,5 @@ Status of the asset | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | | `phase` | [AssetPhase](../../models/components/AssetPhase.md) | :heavy_check_mark: | Phase of the asset | | | `updatedAt` | *double* | :heavy_check_mark: | Timestamp (in milliseconds) at which the asset was last updated | 1587667174725 | -| `progress` | *Optional<Double>* | :heavy_minus_sign: | Current progress of the task creating this asset. | | -| `errorMessage` | *Optional<String>* | :heavy_minus_sign: | Error message if the asset creation failed. | | \ No newline at end of file +| `progress` | *Optional\<Double>* | :heavy_minus_sign: | Current progress of the task creating this asset. | | +| `errorMessage` | *Optional\<String>* | :heavy_minus_sign: | Error message if the asset creation failed. | | \ No newline at end of file diff --git a/docs/models/components/AssetStorage.md b/docs/models/components/AssetStorage.md index c9803493..f10b30c6 100644 --- a/docs/models/components/AssetStorage.md +++ b/docs/models/components/AssetStorage.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `ipfs` | [Optional<AssetIpfs>](../../models/components/AssetIpfs.md) | :heavy_minus_sign: | N/A | -| `status` | [Optional<StorageStatus>](../../models/components/StorageStatus.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `ipfs` | [Optional\<AssetIpfs>](../../models/components/AssetIpfs.md) | :heavy_minus_sign: | N/A | +| `status` | [Optional\<StorageStatus>](../../models/components/StorageStatus.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/Attestation.md b/docs/models/components/Attestation.md index d78ee963..683f0f98 100644 --- a/docs/models/components/Attestation.md +++ b/docs/models/components/Attestation.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *Optional<String>* | :heavy_minus_sign: | N/A | 5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0 | -| `primaryType` | [PrimaryType](../../models/components/PrimaryType.md) | :heavy_check_mark: | Video Metadata EIP-712 primaryType | VideoAttestation | -| `domain` | [Domain](../../models/components/Domain.md) | :heavy_check_mark: | Video Metadata EIP-712 domain | | -| `message` | [Message](../../models/components/Message.md) | :heavy_check_mark: | Video Metadata EIP-712 message content | | -| `signature` | *String* | :heavy_check_mark: | Video Metadata EIP-712 message signature | 1311768467294899700 | -| `createdAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the object was created | 1587667174725 | -| `signatureType` | [Optional<SignatureType>](../../models/components/SignatureType.md) | :heavy_minus_sign: | N/A | eip712 | -| `storage` | [Optional<AttestationStorage>](../../models/components/AttestationStorage.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `id` | *Optional\<String>* | :heavy_minus_sign: | N/A | 5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0 | +| `primaryType` | [PrimaryType](../../models/components/PrimaryType.md) | :heavy_check_mark: | Video Metadata EIP-712 primaryType | VideoAttestation | +| `domain` | [Domain](../../models/components/Domain.md) | :heavy_check_mark: | Video Metadata EIP-712 domain | | +| `message` | [Message](../../models/components/Message.md) | :heavy_check_mark: | Video Metadata EIP-712 message content | | +| `signature` | *String* | :heavy_check_mark: | Video Metadata EIP-712 message signature | 1311768467294899700 | +| `createdAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the object was created | 1587667174725 | +| `signatureType` | [Optional\<SignatureType>](../../models/components/SignatureType.md) | :heavy_minus_sign: | N/A | eip712 | +| `storage` | [Optional\<AttestationStorage>](../../models/components/AttestationStorage.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/AttestationIpfs.md b/docs/models/components/AttestationIpfs.md index 37b92141..c4514878 100644 --- a/docs/models/components/AttestationIpfs.md +++ b/docs/models/components/AttestationIpfs.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `dollarRef` | *Optional<Object>* | :heavy_minus_sign: | N/A | | -| `updatedAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which IPFS export task was updated<br/> | 1587667174725 | \ No newline at end of file +| `dollarRef` | *Optional\<Object>* | :heavy_minus_sign: | N/A | | +| `updatedAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which IPFS export task was updated<br/> | 1587667174725 | \ No newline at end of file diff --git a/docs/models/components/AttestationStorage.md b/docs/models/components/AttestationStorage.md index ba5b9da3..764c4b1f 100644 --- a/docs/models/components/AttestationStorage.md +++ b/docs/models/components/AttestationStorage.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `ipfs` | [Optional<AttestationIpfs>](../../models/components/AttestationIpfs.md) | :heavy_minus_sign: | N/A | -| `status` | [Optional<StorageStatus>](../../models/components/StorageStatus.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `ipfs` | [Optional\<AttestationIpfs>](../../models/components/AttestationIpfs.md) | :heavy_minus_sign: | N/A | +| `status` | [Optional\<StorageStatus>](../../models/components/StorageStatus.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/Clip.md b/docs/models/components/Clip.md index 5001d81e..f158df4e 100644 --- a/docs/models/components/Clip.md +++ b/docs/models/components/Clip.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `url` | *Optional<String>* | :heavy_minus_sign: | URL of the asset to "clip" | https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4 | -| `clipStrategy` | [Optional<ClipStrategy>](../../models/components/ClipStrategy.md) | :heavy_minus_sign: | Strategy to use for clipping the asset. If not specified, the default strategy that Catalyst is configured for will be used. This field only available for admin users, and is only used for E2E testing. | | -| `catalystPipelineStrategy` | [Optional<CatalystPipelineStrategy>](../../models/components/CatalystPipelineStrategy.md) | :heavy_minus_sign: | Force to use a specific strategy in the Catalyst pipeline. If not specified, the default strategy that Catalyst is configured for will be used. This field only available for admin users, and is only used for E2E testing. | catalyst_ffmpeg | -| `sessionId` | *Optional<String>* | :heavy_minus_sign: | ID of the session | d32ae9e6-c459-4931-9898-e86e2f5e7e16 | -| `inputId` | *Optional<String>* | :heavy_minus_sign: | ID of the input asset or stream | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | \ No newline at end of file +| `url` | *Optional\<String>* | :heavy_minus_sign: | URL of the asset to "clip" | https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4 | +| `clipStrategy` | [Optional\<ClipStrategy>](../../models/components/ClipStrategy.md) | :heavy_minus_sign: | Strategy to use for clipping the asset. If not specified, the default strategy that Catalyst is configured for will be used. This field only available for admin users, and is only used for E2E testing. | | +| `catalystPipelineStrategy` | [Optional\<CatalystPipelineStrategy>](../../models/components/CatalystPipelineStrategy.md) | :heavy_minus_sign: | Force to use a specific strategy in the Catalyst pipeline. If not specified, the default strategy that Catalyst is configured for will be used. This field only available for admin users, and is only used for E2E testing. | catalyst_ffmpeg | +| `sessionId` | *Optional\<String>* | :heavy_minus_sign: | ID of the session | d32ae9e6-c459-4931-9898-e86e2f5e7e16 | +| `inputId` | *Optional\<String>* | :heavy_minus_sign: | ID of the input asset or stream | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | \ No newline at end of file diff --git a/docs/models/components/ClipPayload.md b/docs/models/components/ClipPayload.md index a6c9c9b9..9139fde4 100644 --- a/docs/models/components/ClipPayload.md +++ b/docs/models/components/ClipPayload.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `playbackId` | *String* | :heavy_check_mark: | The playback ID of the stream or stream recording to clip. Asset playback IDs are not supported yet. | eaw4nk06ts2d0mzb | | `startTime` | *double* | :heavy_check_mark: | The start timestamp of the clip in Unix milliseconds. _See the ClipTrigger in the UI Kit for an example of how this is calculated (for HLS, it uses `Program Date-Time` tags, and for WebRTC, it uses the latency from server to client at stream startup)._ | 1587667174725 | -| `endTime` | *Optional<Double>* | :heavy_minus_sign: | The end timestamp of the clip in Unix milliseconds. _See the ClipTrigger in the UI Kit for an example of how this is calculated (for HLS, it uses `Program Date-Time` tags, and for WebRTC, it uses the latency from server to client at stream startup)._ | 1587667174725 | -| `name` | *Optional<String>* | :heavy_minus_sign: | The optional friendly name of the clip to create. | My Clip | -| `sessionId` | *Optional<String>* | :heavy_minus_sign: | The optional session ID of the stream to clip. This can be used to clip _recordings_ - if it is not specified, it will clip the ongoing livestream. | de7818e7-610a-4057-8f6f-b785dc1e6f88 | \ No newline at end of file +| `endTime` | *Optional\<Double>* | :heavy_minus_sign: | The end timestamp of the clip in Unix milliseconds. _See the ClipTrigger in the UI Kit for an example of how this is calculated (for HLS, it uses `Program Date-Time` tags, and for WebRTC, it uses the latency from server to client at stream startup)._ | 1587667174725 | +| `name` | *Optional\<String>* | :heavy_minus_sign: | The optional friendly name of the clip to create. | My Clip | +| `sessionId` | *Optional\<String>* | :heavy_minus_sign: | The optional session ID of the stream to clip. This can be used to clip _recordings_ - if it is not specified, it will clip the ongoing livestream. | de7818e7-610a-4057-8f6f-b785dc1e6f88 | \ No newline at end of file diff --git a/docs/models/components/ClipStrategy.md b/docs/models/components/ClipStrategy.md index 51ee330a..0aa2ad0d 100644 --- a/docs/models/components/ClipStrategy.md +++ b/docs/models/components/ClipStrategy.md @@ -7,6 +7,6 @@ Strategy to use for clipping the asset. If not specified, the default strategy t | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `startTime` | *Optional<Double>* | :heavy_minus_sign: | The start timestamp of the clip in Unix milliseconds. _See the ClipTrigger in the UI Kit for an example of how this is calculated (for HLS, it uses `Program Date-Time` tags, and for WebRTC, it uses the latency from server to client at stream startup)._ | 1587667174725 | -| `endTime` | *Optional<Double>* | :heavy_minus_sign: | The end timestamp of the clip in Unix milliseconds. _See the ClipTrigger in the UI Kit for an example of how this is calculated (for HLS, it uses `Program Date-Time` tags, and for WebRTC, it uses the latency from server to client at stream startup)._ | 1587667174725 | -| `playbackId` | *Optional<String>* | :heavy_minus_sign: | The playback ID of the stream or stream recording to clip. Asset playback IDs are not supported yet. | eaw4nk06ts2d0mzb | \ No newline at end of file +| `startTime` | *Optional\<Double>* | :heavy_minus_sign: | The start timestamp of the clip in Unix milliseconds. _See the ClipTrigger in the UI Kit for an example of how this is calculated (for HLS, it uses `Program Date-Time` tags, and for WebRTC, it uses the latency from server to client at stream startup)._ | 1587667174725 | +| `endTime` | *Optional\<Double>* | :heavy_minus_sign: | The end timestamp of the clip in Unix milliseconds. _See the ClipTrigger in the UI Kit for an example of how this is calculated (for HLS, it uses `Program Date-Time` tags, and for WebRTC, it uses the latency from server to client at stream startup)._ | 1587667174725 | +| `playbackId` | *Optional\<String>* | :heavy_minus_sign: | The playback ID of the stream or stream recording to clip. Asset playback IDs are not supported yet. | eaw4nk06ts2d0mzb | \ No newline at end of file diff --git a/docs/models/components/CreateRoomResponse.md b/docs/models/components/CreateRoomResponse.md index d1044269..8245d72f 100644 --- a/docs/models/components/CreateRoomResponse.md +++ b/docs/models/components/CreateRoomResponse.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `id` | *Optional<String>* | :heavy_minus_sign: | The ID of the room | d32ae9e6-c459-4931-9898-e86e2f5e7e16 | \ No newline at end of file +| `id` | *Optional\<String>* | :heavy_minus_sign: | The ID of the room | d32ae9e6-c459-4931-9898-e86e2f5e7e16 | \ No newline at end of file diff --git a/docs/models/components/Custom.md b/docs/models/components/Custom.md index 2620fca6..0101c60f 100644 --- a/docs/models/components/Custom.md +++ b/docs/models/components/Custom.md @@ -8,5 +8,5 @@ custom URL parameters for the export task | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `url` | *String* | :heavy_check_mark: | URL where to export the asset | https://s3.amazonaws.com/my-bucket/path/filename.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LLMMB | -| `method` | *Optional<String>* | :heavy_minus_sign: | Method to use on the export request | POST | -| `headers` | Map<String, *String*> | :heavy_minus_sign: | Headers to add to the export request | | \ No newline at end of file +| `method` | *Optional\<String>* | :heavy_minus_sign: | Method to use on the export request | POST | +| `headers` | Map\<String, *String*> | :heavy_minus_sign: | Headers to add to the export request | | \ No newline at end of file diff --git a/docs/models/components/DvrPlayback.md b/docs/models/components/DvrPlayback.md index 646cf7a8..98e0edbb 100644 --- a/docs/models/components/DvrPlayback.md +++ b/docs/models/components/DvrPlayback.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `hrn` | [Optional<PlaybackInfoHrn>](../../models/components/PlaybackInfoHrn.md) | :heavy_minus_sign: | N/A | MP4 | -| `type` | [Optional<PlaybackInfoMetaDvrPlaybackType>](../../models/components/PlaybackInfoMetaDvrPlaybackType.md) | :heavy_minus_sign: | N/A | html5/video/mp4 | -| `url` | *Optional<String>* | :heavy_minus_sign: | N/A | https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4 | -| `error` | *Optional<String>* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `hrn` | [Optional\<PlaybackInfoHrn>](../../models/components/PlaybackInfoHrn.md) | :heavy_minus_sign: | N/A | MP4 | +| `type` | [Optional\<PlaybackInfoMetaDvrPlaybackType>](../../models/components/PlaybackInfoMetaDvrPlaybackType.md) | :heavy_minus_sign: | N/A | html5/video/mp4 | +| `url` | *Optional\<String>* | :heavy_minus_sign: | N/A | https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4 | +| `error` | *Optional\<String>* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/Encryption.md b/docs/models/components/Encryption.md new file mode 100644 index 00000000..1f7667cd --- /dev/null +++ b/docs/models/components/Encryption.md @@ -0,0 +1,8 @@ +# 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/Error.md b/docs/models/components/Error.md new file mode 100644 index 00000000..a2ba4c3d --- /dev/null +++ b/docs/models/components/Error.md @@ -0,0 +1,8 @@ +# Error + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `errors` | List\<*String*> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/Export.md b/docs/models/components/Export.md index 10f17f8b..6a53263f 100644 --- a/docs/models/components/Export.md +++ b/docs/models/components/Export.md @@ -5,6 +5,6 @@ Output of the export task ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `ipfs` | [Optional<TaskIpfs>](../../models/components/TaskIpfs.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `ipfs` | [Optional\<TaskIpfs>](../../models/components/TaskIpfs.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/ExportData.md b/docs/models/components/ExportData.md index 281f40d5..5f52bc79 100644 --- a/docs/models/components/ExportData.md +++ b/docs/models/components/ExportData.md @@ -5,6 +5,6 @@ Output of the export data task ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `ipfs` | [Optional<TaskOutputIpfs>](../../models/components/TaskOutputIpfs.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `ipfs` | [Optional\<TaskOutputIpfs>](../../models/components/TaskOutputIpfs.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/FfmpegProfile.md b/docs/models/components/FfmpegProfile.md index 8df3ef18..31d4bc30 100644 --- a/docs/models/components/FfmpegProfile.md +++ b/docs/models/components/FfmpegProfile.md @@ -12,8 +12,8 @@ Transcode profile | `height` | *long* | :heavy_check_mark: | N/A | 720 | | `bitrate` | *long* | :heavy_check_mark: | N/A | 3000000 | | `fps` | *long* | :heavy_check_mark: | N/A | 30 | -| `fpsDen` | *Optional<Long>* | :heavy_minus_sign: | N/A | 1 | -| `quality` | *Optional<Long>* | :heavy_minus_sign: | Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it.<br/> | 23 | -| `gop` | *Optional<String>* | :heavy_minus_sign: | N/A | 2 | -| `profile` | [Optional<Profile>](../../models/components/Profile.md) | :heavy_minus_sign: | N/A | H264Baseline | -| `encoder` | [Optional<Encoder>](../../models/components/Encoder.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `fpsDen` | *Optional\<Long>* | :heavy_minus_sign: | N/A | 1 | +| `quality` | *Optional\<Long>* | :heavy_minus_sign: | Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it.<br/> | 23 | +| `gop` | *Optional\<String>* | :heavy_minus_sign: | N/A | 2 | +| `profile` | [Optional\<Profile>](../../models/components/Profile.md) | :heavy_minus_sign: | N/A | H264Baseline | +| `encoder` | [Optional\<Encoder>](../../models/components/Encoder.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/GetRoomUserResponse.md b/docs/models/components/GetRoomUserResponse.md index 94ea838d..51664db5 100644 --- a/docs/models/components/GetRoomUserResponse.md +++ b/docs/models/components/GetRoomUserResponse.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `id` | *Optional<String>* | :heavy_minus_sign: | The ID of the user | d32ae9e6-c459-4931-9898-e86e2f5e7e16 | -| `joinedAt` | *Optional<Long>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the user joined | 1687517025261 | -| `name` | *Optional<String>* | :heavy_minus_sign: | The display name of the user | name | -| `isPublisher` | *Optional<Boolean>* | :heavy_minus_sign: | Whether a user is allowed to publish audio/video tracks | true | -| `metadata` | *Optional<String>* | :heavy_minus_sign: | User defined payload to store for the participant | | \ No newline at end of file +| `id` | *Optional\<String>* | :heavy_minus_sign: | The ID of the user | d32ae9e6-c459-4931-9898-e86e2f5e7e16 | +| `joinedAt` | *Optional\<Long>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the user joined | 1687517025261 | +| `name` | *Optional\<String>* | :heavy_minus_sign: | The display name of the user | name | +| `isPublisher` | *Optional\<Boolean>* | :heavy_minus_sign: | Whether a user is allowed to publish audio/video tracks | true | +| `metadata` | *Optional\<String>* | :heavy_minus_sign: | User defined payload to store for the participant | | \ No newline at end of file diff --git a/docs/models/components/Hash.md b/docs/models/components/Hash.md index 17f177c5..991f86cc 100644 --- a/docs/models/components/Hash.md +++ b/docs/models/components/Hash.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `hash` | *Optional<String>* | :heavy_minus_sign: | Hash of the asset | 9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57 | -| `algorithm` | *Optional<String>* | :heavy_minus_sign: | Hash algorithm used to compute the hash | sha256 | \ No newline at end of file +| `hash` | *Optional\<String>* | :heavy_minus_sign: | Hash of the asset | 9b560b28b85378a5004117539196ab24e21bbd75b0e9eb1a8bc7c5fd80dc5b57 | +| `algorithm` | *Optional\<String>* | :heavy_minus_sign: | Hash algorithm used to compute the hash | sha256 | \ No newline at end of file diff --git a/docs/models/components/Ipfs1.md b/docs/models/components/Ipfs1.md index e400eb81..049f69ed 100644 --- a/docs/models/components/Ipfs1.md +++ b/docs/models/components/Ipfs1.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `spec` | [JsonNullable<Spec>](../../models/components/Spec.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `spec` | [JsonNullable\<Spec>](../../models/components/Spec.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/IpfsExportParams.md b/docs/models/components/IpfsExportParams.md index 07775b83..8e10c904 100644 --- a/docs/models/components/IpfsExportParams.md +++ b/docs/models/components/IpfsExportParams.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `dollarRef` | *Optional<Object>* | :heavy_minus_sign: | N/A | -| `pinata` | [Optional<Pinata>](../../models/components/Pinata.md) | :heavy_minus_sign: | Custom credentials for the Piñata service. Must have either<br/>a JWT or an API key and an API secret.<br/> | \ No newline at end of file +| `dollarRef` | *Optional\<Object>* | :heavy_minus_sign: | N/A | +| `pinata` | [Optional\<Pinata>](../../models/components/Pinata.md) | :heavy_minus_sign: | Custom credentials for the Piñata service. Must have either<br/>a JWT or an API key and an API secret.<br/> | \ No newline at end of file diff --git a/docs/models/components/IpfsFileInfo.md b/docs/models/components/IpfsFileInfo.md index 58a46384..75ce3d9f 100644 --- a/docs/models/components/IpfsFileInfo.md +++ b/docs/models/components/IpfsFileInfo.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | | `cid` | *String* | :heavy_check_mark: | CID of the file on IPFS | -| `url` | *Optional<String>* | :heavy_minus_sign: | URL with IPFS scheme for the file | -| `gatewayUrl` | *Optional<String>* | :heavy_minus_sign: | URL to access file via HTTP through an IPFS gateway | \ No newline at end of file +| `url` | *Optional\<String>* | :heavy_minus_sign: | URL with IPFS scheme for the file | +| `gatewayUrl` | *Optional\<String>* | :heavy_minus_sign: | URL to access file via HTTP through an IPFS gateway | \ No newline at end of file diff --git a/docs/models/components/LastFailure.md b/docs/models/components/LastFailure.md index 125cfbd8..4d540638 100644 --- a/docs/models/components/LastFailure.md +++ b/docs/models/components/LastFailure.md @@ -7,7 +7,7 @@ failure timestamp and error message with status code | Field | Type | Required | Description | Example | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `timestamp` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the webhook last failed | 1587667174725 | -| `error` | *Optional<String>* | :heavy_minus_sign: | Webhook failure error message | Error message | -| `response` | *Optional<String>* | :heavy_minus_sign: | Webhook failure response | Response body | -| `statusCode` | *Optional<Double>* | :heavy_minus_sign: | Webhook failure status code | 500 | \ No newline at end of file +| `timestamp` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the webhook last failed | 1587667174725 | +| `error` | *Optional\<String>* | :heavy_minus_sign: | Webhook failure error message | Error message | +| `response` | *Optional\<String>* | :heavy_minus_sign: | Webhook failure response | Response body | +| `statusCode` | *Optional\<Double>* | :heavy_minus_sign: | Webhook failure status code | 500 | \ No newline at end of file diff --git a/docs/models/components/Message.md b/docs/models/components/Message.md index c6207fd7..98362a78 100644 --- a/docs/models/components/Message.md +++ b/docs/models/components/Message.md @@ -5,9 +5,9 @@ Video Metadata EIP-712 message content ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `video` | *String* | :heavy_check_mark: | N/A | 5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0 | -| `attestations` | List<[Attestations](../../models/components/Attestations.md)> | :heavy_check_mark: | N/A | | -| `signer` | *String* | :heavy_check_mark: | N/A | 1311768467294899700 | -| `timestamp` | *double* | :heavy_check_mark: | N/A | 1587667174725 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `video` | *String* | :heavy_check_mark: | N/A | 5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0 | +| `attestations` | List\<[Attestations](../../models/components/Attestations.md)> | :heavy_check_mark: | N/A | | +| `signer` | *String* | :heavy_check_mark: | N/A | 1311768467294899700 | +| `timestamp` | *double* | :heavy_check_mark: | N/A | 1587667174725 | \ No newline at end of file diff --git a/docs/models/components/Meta.md b/docs/models/components/Meta.md index 1555f4bf..b3796440 100644 --- a/docs/models/components/Meta.md +++ b/docs/models/components/Meta.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `live` | [Optional<Live>](../../models/components/Live.md) | :heavy_minus_sign: | N/A | 0 | -| `playbackPolicy` | [JsonNullable<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | -| `source` | List<[PlaybackInfoSource](../../models/components/PlaybackInfoSource.md)> | :heavy_check_mark: | N/A | | -| `dvrPlayback` | List<[DvrPlayback](../../models/components/DvrPlayback.md)> | :heavy_minus_sign: | N/A | | -| `attestation` | [Optional<Attestation>](../../models/components/Attestation.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `live` | [Optional\<Live>](../../models/components/Live.md) | :heavy_minus_sign: | N/A | 0 | +| `playbackPolicy` | [JsonNullable\<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | +| `source` | List\<[PlaybackInfoSource](../../models/components/PlaybackInfoSource.md)> | :heavy_check_mark: | N/A | | +| `dvrPlayback` | List\<[DvrPlayback](../../models/components/DvrPlayback.md)> | :heavy_minus_sign: | N/A | | +| `attestation` | [Optional\<Attestation>](../../models/components/Attestation.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/Multistream.md b/docs/models/components/Multistream.md index d221a15c..15b70136 100644 --- a/docs/models/components/Multistream.md +++ b/docs/models/components/Multistream.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `targets` | List<[Target](../../models/components/Target.md)> | :heavy_minus_sign: | References to targets where this stream will be simultaneously<br/>streamed to<br/> | [<br/>{<br/>"id": "PUSH123",<br/>"profile": "720p"<br/>}<br/>] | \ No newline at end of file +| `targets` | List\<[Target](../../models/components/Target.md)> | :heavy_minus_sign: | References to targets where this stream will be simultaneously<br/>streamed to<br/> | [<br/>{<br/>"id": "PUSH123",<br/>"profile": "720p"<br/>}<br/>] | \ No newline at end of file diff --git a/docs/models/components/MultistreamTarget.md b/docs/models/components/MultistreamTarget.md index db6d018c..8a2c6c23 100644 --- a/docs/models/components/MultistreamTarget.md +++ b/docs/models/components/MultistreamTarget.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional<String>* | :heavy_minus_sign: | N/A | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | -| `name` | *Optional<String>* | :heavy_minus_sign: | N/A | | -| ~~`userId`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | 66E2161C-7670-4D05-B71D-DA2D6979556F | -| `disabled` | *Optional<Boolean>* | :heavy_minus_sign: | If true then this multistream target will not be used for pushing<br/>even if it is configured in a stream object.<br/> | | -| `createdAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which multistream target object was<br/>created<br/> | 1587667174725 | \ No newline at end of file +| `id` | *Optional\<String>* | :heavy_minus_sign: | N/A | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | +| `name` | *Optional\<String>* | :heavy_minus_sign: | N/A | | +| ~~`userId`~~ | *Optional\<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | 66E2161C-7670-4D05-B71D-DA2D6979556F | +| `disabled` | *Optional\<Boolean>* | :heavy_minus_sign: | If true then this multistream target will not be used for pushing<br/>even if it is configured in a stream object.<br/> | | +| `createdAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which multistream target object was<br/>created<br/> | 1587667174725 | \ No newline at end of file diff --git a/docs/models/components/MultistreamTargetPatchPayload.md b/docs/models/components/MultistreamTargetInput.md similarity index 90% rename from docs/models/components/MultistreamTargetPatchPayload.md rename to docs/models/components/MultistreamTargetInput.md index b88be5c9..b34eca02 100644 --- a/docs/models/components/MultistreamTargetPatchPayload.md +++ b/docs/models/components/MultistreamTargetInput.md @@ -1,10 +1,10 @@ -# MultistreamTargetPatchPayload +# MultistreamTargetInput ## Fields | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `name` | *Optional<String>* | :heavy_minus_sign: | N/A | | +| `name` | *Optional\<String>* | :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<Boolean>* | :heavy_minus_sign: | If true then this multistream target will not be used for pushing<br/>even if it is configured in a stream object.<br/> | | \ No newline at end of file +| `disabled` | *Optional\<Boolean>* | :heavy_minus_sign: | If true then this multistream target will not be used for pushing<br/>even if it is configured in a stream object.<br/> | | \ No newline at end of file diff --git a/docs/models/components/NewAssetFromUrlPayload.md b/docs/models/components/NewAssetFromUrlPayload.md index 319a022f..30156358 100644 --- a/docs/models/components/NewAssetFromUrlPayload.md +++ b/docs/models/components/NewAssetFromUrlPayload.md @@ -6,12 +6,12 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *String* | :heavy_check_mark: | The name of the asset. This is not necessarily the filename - it can be a custom name or title.<br/> | filename.mp4 | -| `staticMp4` | *Optional<Boolean>* | :heavy_minus_sign: | Whether to generate MP4s for the asset. | true | -| `playbackPolicy` | [JsonNullable<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | -| `creatorId` | [Optional<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | -| `storage` | [Optional<Storage>](../../models/components/Storage.md) | :heavy_minus_sign: | N/A | | +| `staticMp4` | *Optional\<Boolean>* | :heavy_minus_sign: | Whether to generate MP4s for the asset. | true | +| `playbackPolicy` | [JsonNullable\<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | +| `creatorId` | [Optional\<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | +| `storage` | [Optional\<Storage>](../../models/components/Storage.md) | :heavy_minus_sign: | N/A | | | `url` | *String* | :heavy_check_mark: | URL where the asset contents can be retrieved, e.g. `https://s3.amazonaws.com/my-bucket/path/filename.mp4`.<br/>For an IPFS source, this should be similar to: `ipfs://{CID}`. For an Arweave<br/>source: `ar://{CID}`.<br/> | https://s3.amazonaws.com/my-bucket/path/filename.mp4 | -| `encryption` | [Optional<Encryption>](../../models/components/Encryption.md) | :heavy_minus_sign: | N/A | | -| `c2pa` | *Optional<Boolean>* | :heavy_minus_sign: | Decides if the output video should include C2PA signature | | -| `profiles` | List<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | | -| `targetSegmentSizeSecs` | *Optional<Double>* | :heavy_minus_sign: | How many seconds the duration of each output segment should be | | \ No newline at end of file +| `encryption` | [Optional\<Encryption>](../../models/components/Encryption.md) | :heavy_minus_sign: | N/A | | +| `c2pa` | *Optional\<Boolean>* | :heavy_minus_sign: | Decides if the output video should include C2PA signature | | +| `profiles` | List\<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | | +| `targetSegmentSizeSecs` | *Optional\<Double>* | :heavy_minus_sign: | How many seconds the duration of each output segment should be | | \ No newline at end of file diff --git a/docs/models/components/NewAssetPayload.md b/docs/models/components/NewAssetPayload.md index e55a41a2..20eef0ab 100644 --- a/docs/models/components/NewAssetPayload.md +++ b/docs/models/components/NewAssetPayload.md @@ -6,11 +6,11 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `name` | *String* | :heavy_check_mark: | The name of the asset. This is not necessarily the filename - it can be a custom name or title.<br/> | filename.mp4 | -| `staticMp4` | *Optional<Boolean>* | :heavy_minus_sign: | Whether to generate MP4s for the asset. | true | -| `playbackPolicy` | [JsonNullable<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | -| `creatorId` | [Optional<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | -| `storage` | [Optional<NewAssetPayloadStorage>](../../models/components/NewAssetPayloadStorage.md) | :heavy_minus_sign: | N/A | | -| `encryption` | [Optional<NewAssetPayloadEncryption>](../../models/components/NewAssetPayloadEncryption.md) | :heavy_minus_sign: | N/A | | -| `c2pa` | *Optional<Boolean>* | :heavy_minus_sign: | Decides if the output video should include C2PA signature | | -| `profiles` | List<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | | -| `targetSegmentSizeSecs` | *Optional<Double>* | :heavy_minus_sign: | How many seconds the duration of each output segment should be | | \ No newline at end of file +| `staticMp4` | *Optional\<Boolean>* | :heavy_minus_sign: | Whether to generate MP4s for the asset. | true | +| `playbackPolicy` | [JsonNullable\<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | +| `creatorId` | [Optional\<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | +| `storage` | [Optional\<NewAssetPayloadStorage>](../../models/components/NewAssetPayloadStorage.md) | :heavy_minus_sign: | N/A | | +| `encryption` | [Optional\<NewAssetPayloadEncryption>](../../models/components/NewAssetPayloadEncryption.md) | :heavy_minus_sign: | N/A | | +| `c2pa` | *Optional\<Boolean>* | :heavy_minus_sign: | Decides if the output video should include C2PA signature | | +| `profiles` | List\<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | | +| `targetSegmentSizeSecs` | *Optional\<Double>* | :heavy_minus_sign: | How many seconds the duration of each output segment should be | | \ No newline at end of file diff --git a/docs/models/components/NewAssetPayloadIpfs1.md b/docs/models/components/NewAssetPayloadIpfs1.md index 5b7fd537..225de3ab 100644 --- a/docs/models/components/NewAssetPayloadIpfs1.md +++ b/docs/models/components/NewAssetPayloadIpfs1.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `spec` | [JsonNullable<Spec>](../../models/components/Spec.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `spec` | [JsonNullable\<Spec>](../../models/components/Spec.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/NewAssetPayloadStorage.md b/docs/models/components/NewAssetPayloadStorage.md index bb469fcb..8c1ccf44 100644 --- a/docs/models/components/NewAssetPayloadStorage.md +++ b/docs/models/components/NewAssetPayloadStorage.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ipfs` | [JsonNullable<NewAssetPayloadIpfs>](../../models/components/NewAssetPayloadIpfs.md) | :heavy_minus_sign: | Set to true to make default export to IPFS. To customize the<br/>pinned files, specify an object with a spec field. False or null<br/>means to unpin from IPFS, but it's unsupported right now.<br/> | \ No newline at end of file +| `ipfs` | [JsonNullable\<NewAssetPayloadIpfs>](../../models/components/NewAssetPayloadIpfs.md) | :heavy_minus_sign: | Set to true to make default export to IPFS. To customize the<br/>pinned files, specify an object with a spec field. False or null<br/>means to unpin from IPFS, but it's unsupported right now.<br/> | \ No newline at end of file diff --git a/docs/models/components/NewStreamPayload.md b/docs/models/components/NewStreamPayload.md index 52833af2..0beea4d3 100644 --- a/docs/models/components/NewStreamPayload.md +++ b/docs/models/components/NewStreamPayload.md @@ -6,11 +6,11 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *String* | :heavy_check_mark: | N/A | test_stream | -| `pull` | [Optional<Pull>](../../models/components/Pull.md) | :heavy_minus_sign: | Configuration for a stream that should be actively pulled from an<br/>external source, rather than pushed to Livepeer. If specified, the<br/>stream will not have a streamKey. | | -| `creatorId` | [Optional<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | -| `playbackPolicy` | [JsonNullable<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | -| `profiles` | List<[FfmpegProfile](../../models/components/FfmpegProfile.md)> | :heavy_minus_sign: | N/A | | -| `record` | *Optional<Boolean>* | :heavy_minus_sign: | Should this stream be recorded? Uses default settings. For more<br/>customization, create and configure an object store.<br/> | false | -| `recordingSpec` | [Optional<NewStreamPayloadRecordingSpec>](../../models/components/NewStreamPayloadRecordingSpec.md) | :heavy_minus_sign: | N/A | | -| `multistream` | [Optional<Multistream>](../../models/components/Multistream.md) | :heavy_minus_sign: | N/A | | -| `userTags` | Map<String, [UserTags](../../models/components/UserTags.md)> | :heavy_minus_sign: | User input tags associated with the stream | | \ No newline at end of file +| `pull` | [Optional\<Pull>](../../models/components/Pull.md) | :heavy_minus_sign: | Configuration for a stream that should be actively pulled from an<br/>external source, rather than pushed to Livepeer. If specified, the<br/>stream will not have a streamKey. | | +| `creatorId` | [Optional\<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | +| `playbackPolicy` | [JsonNullable\<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | +| `profiles` | List\<[FfmpegProfile](../../models/components/FfmpegProfile.md)> | :heavy_minus_sign: | N/A | | +| `record` | *Optional\<Boolean>* | :heavy_minus_sign: | Should this stream be recorded? Uses default settings. For more<br/>customization, create and configure an object store.<br/> | false | +| `recordingSpec` | [Optional\<NewStreamPayloadRecordingSpec>](../../models/components/NewStreamPayloadRecordingSpec.md) | :heavy_minus_sign: | N/A | | +| `multistream` | [Optional\<Multistream>](../../models/components/Multistream.md) | :heavy_minus_sign: | N/A | | +| `userTags` | Map\<String, [UserTags](../../models/components/UserTags.md)> | :heavy_minus_sign: | User input tags associated with the stream | | \ No newline at end of file diff --git a/docs/models/components/NewStreamPayloadRecordingSpec.md b/docs/models/components/NewStreamPayloadRecordingSpec.md index 0234fb07..b04200f2 100644 --- a/docs/models/components/NewStreamPayloadRecordingSpec.md +++ b/docs/models/components/NewStreamPayloadRecordingSpec.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `profiles` | List<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `profiles` | List\<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/Output.md b/docs/models/components/Output.md index 3aa3cd59..10803cb7 100644 --- a/docs/models/components/Output.md +++ b/docs/models/components/Output.md @@ -5,8 +5,8 @@ Output of the task ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | -| `upload` | Map<String, *Object*> | :heavy_minus_sign: | Output of the upload task | -| `export` | [Optional<Export>](../../models/components/Export.md) | :heavy_minus_sign: | Output of the export task | -| `exportData` | [Optional<ExportData>](../../models/components/ExportData.md) | :heavy_minus_sign: | Output of the export data task | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `upload` | [Optional\<TaskUpload>](../../models/components/TaskUpload.md) | :heavy_minus_sign: | Output of the upload task | +| `export` | [Optional\<Export>](../../models/components/Export.md) | :heavy_minus_sign: | Output of the export task | +| `exportData` | [Optional\<ExportData>](../../models/components/ExportData.md) | :heavy_minus_sign: | Output of the export data task | \ No newline at end of file diff --git a/docs/models/components/Outputs.md b/docs/models/components/Outputs.md index 21f8824f..e58d6e5c 100644 --- a/docs/models/components/Outputs.md +++ b/docs/models/components/Outputs.md @@ -5,8 +5,8 @@ Output formats ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `hls` | [Optional<Hls>](../../models/components/Hls.md) | :heavy_minus_sign: | HLS output format | -| `mp4` | [Optional<Mp4>](../../models/components/Mp4.md) | :heavy_minus_sign: | MP4 output format | -| `fmp4` | [Optional<Fmp4>](../../models/components/Fmp4.md) | :heavy_minus_sign: | FMP4 output format | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `hls` | [Optional\<Hls>](../../models/components/Hls.md) | :heavy_minus_sign: | HLS output format | +| `mp4` | [Optional\<Mp4>](../../models/components/Mp4.md) | :heavy_minus_sign: | MP4 output format | +| `fmp4` | [Optional\<Fmp4>](../../models/components/Fmp4.md) | :heavy_minus_sign: | FMP4 output format | \ No newline at end of file diff --git a/docs/models/components/Params.md b/docs/models/components/Params.md index f84e148b..082b32d2 100644 --- a/docs/models/components/Params.md +++ b/docs/models/components/Params.md @@ -5,10 +5,10 @@ Parameters of the task ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `upload` | [Optional<Upload>](../../models/components/Upload.md) | :heavy_minus_sign: | Parameters for the upload task | -| `export` | [Optional<ExportTaskParams>](../../models/components/ExportTaskParams.md) | :heavy_minus_sign: | Parameters for the export task | -| `exportData` | [Optional<TaskExportData>](../../models/components/TaskExportData.md) | :heavy_minus_sign: | Parameters for the export-data task | -| `transcodeFile` | [Optional<TranscodeFile>](../../models/components/TranscodeFile.md) | :heavy_minus_sign: | Parameters for the transcode-file task | -| `clip` | [Optional<Clip>](../../models/components/Clip.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `upload` | [Optional\<Upload>](../../models/components/Upload.md) | :heavy_minus_sign: | Parameters for the upload task | +| `export` | [Optional\<ExportTaskParams>](../../models/components/ExportTaskParams.md) | :heavy_minus_sign: | Parameters for the export task | +| `exportData` | [Optional\<TaskExportData>](../../models/components/TaskExportData.md) | :heavy_minus_sign: | Parameters for the export-data task | +| `transcodeFile` | [Optional\<TranscodeFile>](../../models/components/TranscodeFile.md) | :heavy_minus_sign: | Parameters for the transcode-file task | +| `clip` | [Optional\<Clip>](../../models/components/Clip.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/Participants.md b/docs/models/components/Participants.md index 47e19685..4da6126d 100644 --- a/docs/models/components/Participants.md +++ b/docs/models/components/Participants.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | -| `identity` | *Optional<String>* | :heavy_minus_sign: | participant ID | -| `name` | *Optional<String>* | :heavy_minus_sign: | user defined participant name | -| `joinedAt` | *Optional<Long>* | :heavy_minus_sign: | the time the participant joined | -| `leftAt` | *Optional<Long>* | :heavy_minus_sign: | the time the participant left | \ No newline at end of file +| `identity` | *Optional\<String>* | :heavy_minus_sign: | participant ID | +| `name` | *Optional\<String>* | :heavy_minus_sign: | user defined participant name | +| `joinedAt` | *Optional\<Long>* | :heavy_minus_sign: | the time the participant joined | +| `leftAt` | *Optional\<Long>* | :heavy_minus_sign: | the time the participant left | \ No newline at end of file diff --git a/docs/models/components/PlaybackInfoSource.md b/docs/models/components/PlaybackInfoSource.md index 7c50d75e..aef94d1d 100644 --- a/docs/models/components/PlaybackInfoSource.md +++ b/docs/models/components/PlaybackInfoSource.md @@ -8,7 +8,7 @@ | `hrn` | [Hrn](../../models/components/Hrn.md) | :heavy_check_mark: | Human Readable Name | MP4 | | `type` | [PlaybackInfoMetaType](../../models/components/PlaybackInfoMetaType.md) | :heavy_check_mark: | N/A | html5/video/mp4 | | `url` | *String* | :heavy_check_mark: | N/A | https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4 | -| `size` | *Optional<Double>* | :heavy_minus_sign: | N/A | 494778 | -| `width` | *Optional<Double>* | :heavy_minus_sign: | N/A | 204 | -| `height` | *Optional<Double>* | :heavy_minus_sign: | N/A | 360 | -| `bitrate` | *Optional<Double>* | :heavy_minus_sign: | N/A | 449890 | \ No newline at end of file +| `size` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 494778 | +| `width` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 204 | +| `height` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 360 | +| `bitrate` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 449890 | \ No newline at end of file diff --git a/docs/models/components/PlaybackPolicy.md b/docs/models/components/PlaybackPolicy.md index 6a1998b5..1c6f9345 100644 --- a/docs/models/components/PlaybackPolicy.md +++ b/docs/models/components/PlaybackPolicy.md @@ -8,7 +8,7 @@ Whether the playback policy for an asset or stream is public or signed | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | `type` | [Type](../../models/components/Type.md) | :heavy_check_mark: | N/A | webhook | -| `webhookId` | *Optional<String>* | :heavy_minus_sign: | ID of the webhook to use for playback policy | 1bde4o2i6xycudoy | -| `webhookContext` | Map<String, *Object*> | :heavy_minus_sign: | User-defined webhook context | {<br/>"streamerId": "my-custom-id"<br/>} | -| `refreshInterval` | *Optional<Double>* | :heavy_minus_sign: | Interval (in seconds) at which the playback policy should be<br/>refreshed (default 600 seconds)<br/> | 600 | -| `allowedOrigins` | List<*String*> | :heavy_minus_sign: | List of allowed origins for CORS playback (<scheme>://<hostname>:<port>, <scheme>://<hostname>) | | \ No newline at end of file +| `webhookId` | *Optional\<String>* | :heavy_minus_sign: | ID of the webhook to use for playback policy | 1bde4o2i6xycudoy | +| `webhookContext` | Map\<String, *Object*> | :heavy_minus_sign: | User-defined webhook context | {<br/>"streamerId": "my-custom-id"<br/>} | +| `refreshInterval` | *Optional\<Double>* | :heavy_minus_sign: | Interval (in seconds) at which the playback policy should be<br/>refreshed (default 600 seconds)<br/> | 600 | +| `allowedOrigins` | List\<*String*> | :heavy_minus_sign: | List of allowed origins for CORS playback (<scheme>://<hostname>:<port>, <scheme>://<hostname>) | | \ No newline at end of file diff --git a/docs/models/components/Pull.md b/docs/models/components/Pull.md index 3e451c1a..c24fd948 100644 --- a/docs/models/components/Pull.md +++ b/docs/models/components/Pull.md @@ -10,6 +10,6 @@ stream will not have a streamKey. | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | `source` | *String* | :heavy_check_mark: | URL from which to pull from. | https://myservice.com/live/stream.flv | -| `headers` | Map<String, *String*> | :heavy_minus_sign: | Headers to be sent with the request to the pull source. | {<br/>"Authorization": "Bearer 123"<br/>} | -| `isMobile` | [Optional<IsMobile>](../../models/components/IsMobile.md) | :heavy_minus_sign: | Indicates whether the stream will be pulled from a mobile source. | | -| `location` | [Optional<Location>](../../models/components/Location.md) | :heavy_minus_sign: | Approximate location of the pull source. The location is used to<br/>determine the closest Livepeer region to pull the stream from. | | \ No newline at end of file +| `headers` | Map\<String, *String*> | :heavy_minus_sign: | Headers to be sent with the request to the pull source. | {<br/>"Authorization": "Bearer 123"<br/>} | +| `isMobile` | [Optional\<IsMobile>](../../models/components/IsMobile.md) | :heavy_minus_sign: | Indicates whether the stream will be pulled from a mobile source. | | +| `location` | [Optional\<Location>](../../models/components/Location.md) | :heavy_minus_sign: | Approximate location of the pull source. The location is used to<br/>determine the closest Livepeer region to pull the stream from. | | \ No newline at end of file diff --git a/docs/models/components/RealtimeViewershipMetric.md b/docs/models/components/RealtimeViewershipMetric.md index 24a8dab9..63b530e1 100644 --- a/docs/models/components/RealtimeViewershipMetric.md +++ b/docs/models/components/RealtimeViewershipMetric.md @@ -8,9 +8,9 @@ An individual metric about realtime viewership of a stream/asset. | Field | Type | Required | Description | Example | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `playbackId` | *Optional<String>* | :heavy_minus_sign: | The playback ID associated with the metric. | 1bde4o2i6xycudoy | -| `device` | *Optional<String>* | :heavy_minus_sign: | The device used by the viewer. | iPhone | -| `browser` | *Optional<String>* | :heavy_minus_sign: | The browser used by the viewer. | Safari | -| `country` | *Optional<String>* | :heavy_minus_sign: | The country where the viewer is located. | United States | +| `playbackId` | *Optional\<String>* | :heavy_minus_sign: | The playback ID associated with the metric. | 1bde4o2i6xycudoy | +| `device` | *Optional\<String>* | :heavy_minus_sign: | The device used by the viewer. | iPhone | +| `browser` | *Optional\<String>* | :heavy_minus_sign: | The browser used by the viewer. | Safari | +| `country` | *Optional\<String>* | :heavy_minus_sign: | The country where the viewer is located. | United States | | `viewCount` | *long* | :heavy_check_mark: | The number of views for the stream/asset. | 100 | | `errorRate` | *double* | :heavy_check_mark: | The error rate for the stream/asset. | 0.1 | \ No newline at end of file diff --git a/docs/models/components/RecordingSpec.md b/docs/models/components/RecordingSpec.md index 9f227684..0dab35d2 100644 --- a/docs/models/components/RecordingSpec.md +++ b/docs/models/components/RecordingSpec.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `profiles` | List<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `profiles` | List\<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/RecordingStatus.md b/docs/models/components/RecordingStatus.md index 42350181..5fccebcb 100644 --- a/docs/models/components/RecordingStatus.md +++ b/docs/models/components/RecordingStatus.md @@ -10,4 +10,5 @@ The status of the recording process of this stream session. | `WAITING` | waiting | | `READY` | ready | | `FAILED` | failed | +| `DELETED` | deleted | | `NONE` | none | \ No newline at end of file diff --git a/docs/models/components/Request.md b/docs/models/components/Request.md index e9d424cd..9b971e1f 100644 --- a/docs/models/components/Request.md +++ b/docs/models/components/Request.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `url` | *Optional<String>* | :heavy_minus_sign: | URL used for the request | https://my-service.com/webhook | -| `method` | *Optional<String>* | :heavy_minus_sign: | HTTP request method | POST | -| `headers` | Map<String, *String*> | :heavy_minus_sign: | HTTP request headers | {<br/>"User-Agent": "livepeer.studio"<br/>} | -| `body` | *Optional<String>* | :heavy_minus_sign: | request body | {"event": "stream.started"} | \ No newline at end of file +| `url` | *Optional\<String>* | :heavy_minus_sign: | URL used for the request | https://my-service.com/webhook | +| `method` | *Optional\<String>* | :heavy_minus_sign: | HTTP request method | POST | +| `headers` | Map\<String, *String*> | :heavy_minus_sign: | HTTP request headers | {<br/>"User-Agent": "livepeer.studio"<br/>} | +| `body` | *Optional\<String>* | :heavy_minus_sign: | request body | {"event": "stream.started"} | \ No newline at end of file diff --git a/docs/models/components/Response.md b/docs/models/components/Response.md index 8518b42f..53048eca 100644 --- a/docs/models/components/Response.md +++ b/docs/models/components/Response.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | -------------------- | -------------------- | -------------------- | -------------------- | -| `body` | *Optional<String>* | :heavy_minus_sign: | response body | -| `status` | *Optional<Double>* | :heavy_minus_sign: | HTTP status code | -| `statusText` | *Optional<String>* | :heavy_minus_sign: | response status text | \ No newline at end of file +| `body` | *Optional\<String>* | :heavy_minus_sign: | response body | +| `status` | *Optional\<Double>* | :heavy_minus_sign: | HTTP status code | +| `statusText` | *Optional\<String>* | :heavy_minus_sign: | response status text | \ No newline at end of file diff --git a/docs/models/components/Room.md b/docs/models/components/Room.md index 2ad18d01..9ef481c1 100644 --- a/docs/models/components/Room.md +++ b/docs/models/components/Room.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | room ID | d32ae9e6-c459-4931-9898-e86e2f5e7e16 | -| `createdAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the room was created | 1587667174725 | -| `updatedAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which room was updated | 1587667174725 | -| `egressId` | *Optional<String>* | :heavy_minus_sign: | internal ID for egress output | | -| `participants` | Map<String, [Participants](../../models/components/Participants.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | room ID | d32ae9e6-c459-4931-9898-e86e2f5e7e16 | +| `createdAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the room was created | 1587667174725 | +| `updatedAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which room was updated | 1587667174725 | +| `egressId` | *Optional\<String>* | :heavy_minus_sign: | internal ID for egress output | | +| `participants` | Map\<String, [Participants](../../models/components/Participants.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/components/RoomUserPayload.md b/docs/models/components/RoomUserPayload.md index 8cf2978f..8a01860c 100644 --- a/docs/models/components/RoomUserPayload.md +++ b/docs/models/components/RoomUserPayload.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | | `name` | *String* | :heavy_check_mark: | Display name | name | -| `canPublish` | *Optional<Boolean>* | :heavy_minus_sign: | Whether a user is allowed to publish audio/video tracks | true | -| `canPublishData` | *Optional<Boolean>* | :heavy_minus_sign: | Whether a user is allowed to publish data messages to the room | true | -| `metadata` | *Optional<String>* | :heavy_minus_sign: | User defined payload to store for the participant | | \ No newline at end of file +| `canPublish` | *Optional\<Boolean>* | :heavy_minus_sign: | Whether a user is allowed to publish audio/video tracks | true | +| `canPublishData` | *Optional\<Boolean>* | :heavy_minus_sign: | Whether a user is allowed to publish data messages to the room | true | +| `metadata` | *Optional\<String>* | :heavy_minus_sign: | User defined payload to store for the participant | | \ No newline at end of file diff --git a/docs/models/components/RoomUserResponse.md b/docs/models/components/RoomUserResponse.md index 3b0d4bae..80c2e022 100644 --- a/docs/models/components/RoomUserResponse.md +++ b/docs/models/components/RoomUserResponse.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional<String>* | :heavy_minus_sign: | The ID of the user | d32ae9e6-c459-4931-9898-e86e2f5e7e16 | -| `joinUrl` | *Optional<String>* | :heavy_minus_sign: | Joining URL - use this for Livepeer's default meeting app (see the multiparticipant streaming guide for more info). | https://meet.livepeer.chat | -| `token` | *Optional<String>* | :heavy_minus_sign: | Joining JWT - this can be used if you have a custom meeting app (see the multiparticipant streaming guide for more info). | token | \ No newline at end of file +| `id` | *Optional\<String>* | :heavy_minus_sign: | The ID of the user | d32ae9e6-c459-4931-9898-e86e2f5e7e16 | +| `joinUrl` | *Optional\<String>* | :heavy_minus_sign: | Joining URL - use this for Livepeer's default meeting app (see the multiparticipant streaming guide for more info). | https://meet.livepeer.chat | +| `token` | *Optional\<String>* | :heavy_minus_sign: | Joining JWT - this can be used if you have a custom meeting app (see the multiparticipant streaming guide for more info). | token | \ No newline at end of file diff --git a/docs/models/components/RoomUserUpdatePayload.md b/docs/models/components/RoomUserUpdatePayload.md index fd9d8820..e1f8d562 100644 --- a/docs/models/components/RoomUserUpdatePayload.md +++ b/docs/models/components/RoomUserUpdatePayload.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `canPublish` | *Optional<Boolean>* | :heavy_minus_sign: | Whether a user is allowed to publish audio/video tracks (i.e. their microphone and webcam) | true | -| `canPublishData` | *Optional<Boolean>* | :heavy_minus_sign: | Whether a user is allowed to publish data messages to the room | true | -| `metadata` | *Optional<String>* | :heavy_minus_sign: | User defined payload to store for the participant | | \ No newline at end of file +| `canPublish` | *Optional\<Boolean>* | :heavy_minus_sign: | Whether a user is allowed to publish audio/video tracks (i.e. their microphone and webcam) | true | +| `canPublishData` | *Optional\<Boolean>* | :heavy_minus_sign: | Whether a user is allowed to publish data messages to the room | true | +| `metadata` | *Optional\<String>* | :heavy_minus_sign: | User defined payload to store for the participant | | \ No newline at end of file diff --git a/docs/models/components/Session.md b/docs/models/components/Session.md index b76ea3ae..0802331d 100644 --- a/docs/models/components/Session.md +++ b/docs/models/components/Session.md @@ -5,28 +5,28 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional<String>* | :heavy_minus_sign: | N/A | de7818e7-610a-4057-8f6f-b785dc1e6f88 | -| ~~`kind`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | stream | -| ~~`userId`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | 66E2161C-7670-4D05-B71D-DA2D6979556F | +| `id` | *Optional\<String>* | :heavy_minus_sign: | N/A | de7818e7-610a-4057-8f6f-b785dc1e6f88 | +| ~~`kind`~~ | *Optional\<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | stream | +| ~~`userId`~~ | *Optional\<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | 66E2161C-7670-4D05-B71D-DA2D6979556F | | `name` | *String* | :heavy_check_mark: | N/A | test_session | -| `lastSeen` | *Optional<Double>* | :heavy_minus_sign: | N/A | 1587667174725 | -| `sourceSegments` | *Optional<Double>* | :heavy_minus_sign: | N/A | 1 | -| `transcodedSegments` | *Optional<Double>* | :heavy_minus_sign: | N/A | 2 | -| `sourceSegmentsDuration` | *Optional<Double>* | :heavy_minus_sign: | Duration of all the source segments, sec | 1 | -| `transcodedSegmentsDuration` | *Optional<Double>* | :heavy_minus_sign: | Duration of all the transcoded segments, sec | 2 | -| `sourceBytes` | *Optional<Double>* | :heavy_minus_sign: | N/A | 1 | -| `transcodedBytes` | *Optional<Double>* | :heavy_minus_sign: | N/A | 2 | -| `ingestRate` | *Optional<Double>* | :heavy_minus_sign: | Rate at which sourceBytes increases (bytes/second) | 1 | -| `outgoingRate` | *Optional<Double>* | :heavy_minus_sign: | Rate at which transcodedBytes increases (bytes/second) | 2 | -| `isHealthy` | *JsonNullable<Boolean>* | :heavy_minus_sign: | Indicates whether the stream is healthy or not. | | -| `issues` | List<*String*> | :heavy_minus_sign: | A string array of human-readable errors describing issues affecting the stream, if any. | | -| `createdAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which stream object was created | 1587667174725 | -| `parentId` | *Optional<String>* | :heavy_minus_sign: | Points to parent stream object | de7818e7-610a-4057-8f6f-b785dc1e6f88 | -| `projectId` | *Optional<String>* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb6-d1f0985eb0a9 | -| `record` | *Optional<Boolean>* | :heavy_minus_sign: | Whether the stream should be recorded. Uses default settings. For more customization, create and configure an object store.<br/> | false | -| `recordingStatus` | [Optional<RecordingStatus>](../../models/components/RecordingStatus.md) | :heavy_minus_sign: | The status of the recording process of this stream session. | | -| `recordingUrl` | *Optional<String>* | :heavy_minus_sign: | URL for accessing the recording of this stream session. | | -| `mp4Url` | *Optional<String>* | :heavy_minus_sign: | The URL for the stream session recording packaged in an MP4. | | -| `playbackId` | *Optional<String>* | :heavy_minus_sign: | The playback ID to use with the Playback Info endpoint to retrieve playback URLs. | eaw4nk06ts2d0mzb | -| `profiles` | List<[FfmpegProfile](../../models/components/FfmpegProfile.md)> | :heavy_minus_sign: | Profiles to transcode the stream into. If not specified, a default<br/>set of profiles will be used with 240p, 360p, 480p and 720p<br/>resolutions. Keep in mind that the source rendition is always kept.<br/> | | -| `recordingSpec` | [Optional<RecordingSpec>](../../models/components/RecordingSpec.md) | :heavy_minus_sign: | Configuration for recording the stream. This can only be set if<br/>`record` is true.<br/> | | \ No newline at end of file +| `lastSeen` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 1587667174725 | +| `sourceSegments` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 1 | +| `transcodedSegments` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 2 | +| `sourceSegmentsDuration` | *Optional\<Double>* | :heavy_minus_sign: | Duration of all the source segments, sec | 1 | +| `transcodedSegmentsDuration` | *Optional\<Double>* | :heavy_minus_sign: | Duration of all the transcoded segments, sec | 2 | +| `sourceBytes` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 1 | +| `transcodedBytes` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 2 | +| `ingestRate` | *Optional\<Double>* | :heavy_minus_sign: | Rate at which sourceBytes increases (bytes/second) | 1 | +| `outgoingRate` | *Optional\<Double>* | :heavy_minus_sign: | Rate at which transcodedBytes increases (bytes/second) | 2 | +| `isHealthy` | *JsonNullable\<Boolean>* | :heavy_minus_sign: | Indicates whether the stream is healthy or not. | | +| `issues` | List\<*String*> | :heavy_minus_sign: | A string array of human-readable errors describing issues affecting the stream, if any. | | +| `createdAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which stream object was created | 1587667174725 | +| `parentId` | *Optional\<String>* | :heavy_minus_sign: | Points to parent stream object | de7818e7-610a-4057-8f6f-b785dc1e6f88 | +| `projectId` | *Optional\<String>* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb6-d1f0985eb0a9 | +| `record` | *Optional\<Boolean>* | :heavy_minus_sign: | Whether the stream should be recorded. Uses default settings. For more customization, create and configure an object store.<br/> | false | +| `recordingStatus` | [Optional\<RecordingStatus>](../../models/components/RecordingStatus.md) | :heavy_minus_sign: | The status of the recording process of this stream session. | | +| `recordingUrl` | *Optional\<String>* | :heavy_minus_sign: | URL for accessing the recording of this stream session. | | +| `mp4Url` | *Optional\<String>* | :heavy_minus_sign: | The URL for the stream session recording packaged in an MP4. | | +| `playbackId` | *Optional\<String>* | :heavy_minus_sign: | The playback ID to use with the Playback Info endpoint to retrieve playback URLs. | eaw4nk06ts2d0mzb | +| `profiles` | List\<[FfmpegProfile](../../models/components/FfmpegProfile.md)> | :heavy_minus_sign: | Profiles to transcode the stream into. If not specified, a default<br/>set of profiles will be used with 240p, 360p, 480p and 720p<br/>resolutions. Keep in mind that the source rendition is always kept.<br/> | | +| `recordingSpec` | [Optional\<RecordingSpec>](../../models/components/RecordingSpec.md) | :heavy_minus_sign: | Configuration for recording the stream. This can only be set if<br/>`record` is true.<br/> | | \ No newline at end of file diff --git a/docs/models/components/SigningKey.md b/docs/models/components/SigningKey.md index 979fd579..26669ab8 100644 --- a/docs/models/components/SigningKey.md +++ b/docs/models/components/SigningKey.md @@ -5,11 +5,11 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional<String>* | :heavy_minus_sign: | N/A | 78df0075-b5f3-4683-a618-1086faca35dc | -| `name` | *Optional<String>* | :heavy_minus_sign: | Name of the signing key | key1 | -| ~~`userId`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | 78df0075-b5f3-4683-a618-1086faca35dc | -| `createdAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the signing-key was created | 1587667174725 | -| `lastSeen` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the signing-key was last used | 1587667174725 | +| `id` | *Optional\<String>* | :heavy_minus_sign: | N/A | 78df0075-b5f3-4683-a618-1086faca35dc | +| `name` | *Optional\<String>* | :heavy_minus_sign: | Name of the signing key | key1 | +| ~~`userId`~~ | *Optional\<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | 78df0075-b5f3-4683-a618-1086faca35dc | +| `createdAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the signing-key was created | 1587667174725 | +| `lastSeen` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the signing-key was last used | 1587667174725 | | `publicKey` | *String* | :heavy_check_mark: | N/A | | -| `disabled` | *Optional<Boolean>* | :heavy_minus_sign: | Disable the signing key to allow rotation safely | false | -| `projectId` | *Optional<String>* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb | \ No newline at end of file +| `disabled` | *Optional\<Boolean>* | :heavy_minus_sign: | Disable the signing key to allow rotation safely | false | +| `projectId` | *Optional\<String>* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb | \ No newline at end of file diff --git a/docs/models/components/Source1.md b/docs/models/components/Source1.md index 4c86cb4f..30159a51 100644 --- a/docs/models/components/Source1.md +++ b/docs/models/components/Source1.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `type` | [SourceType](../../models/components/SourceType.md) | :heavy_check_mark: | N/A | -| `url` | *String* | :heavy_check_mark: | URL from which the asset was uploaded. | -| `gatewayUrl` | *Optional<String>* | :heavy_minus_sign: | Gateway URL from asset if parsed from provided URL on upload. | -| `encryption` | [Optional<EncryptionOutput>](../../models/components/EncryptionOutput.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `type` | [SourceType](../../models/components/SourceType.md) | :heavy_check_mark: | N/A | +| `url` | *String* | :heavy_check_mark: | URL from which the asset was uploaded. | +| `gatewayUrl` | *Optional\<String>* | :heavy_minus_sign: | Gateway URL from asset if parsed from provided URL on upload. | +| `encryption` | [Optional\<EncryptionOutput>](../../models/components/EncryptionOutput.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/Source3.md b/docs/models/components/Source3.md index 01a054c7..63a5ec53 100644 --- a/docs/models/components/Source3.md +++ b/docs/models/components/Source3.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `type` | [AssetSource3Type](../../models/components/AssetSource3Type.md) | :heavy_check_mark: | N/A | -| `encryption` | [Optional<EncryptionOutput>](../../models/components/EncryptionOutput.md) | :heavy_minus_sign: | N/A | -| `sourceId` | *Optional<String>* | :heavy_minus_sign: | ID of the asset or stream from which this asset was created. | -| `sessionId` | *Optional<String>* | :heavy_minus_sign: | ID of the session from which this asset was created. | -| `playbackId` | *Optional<String>* | :heavy_minus_sign: | Playback ID of the asset or stream from which this asset was created. | -| `requesterId` | *Optional<String>* | :heavy_minus_sign: | ID of the requester from which this asset was created. | -| `assetId` | *Optional<String>* | :heavy_minus_sign: | ID of the asset from which this asset was created. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `type` | [AssetSource3Type](../../models/components/AssetSource3Type.md) | :heavy_check_mark: | N/A | +| `encryption` | [Optional\<EncryptionOutput>](../../models/components/EncryptionOutput.md) | :heavy_minus_sign: | N/A | +| `sourceId` | *Optional\<String>* | :heavy_minus_sign: | ID of the asset or stream from which this asset was created. | +| `sessionId` | *Optional\<String>* | :heavy_minus_sign: | ID of the session from which this asset was created. | +| `playbackId` | *Optional\<String>* | :heavy_minus_sign: | Playback ID of the asset or stream from which this asset was created. | +| `requesterId` | *Optional\<String>* | :heavy_minus_sign: | ID of the requester from which this asset was created. | +| `assetId` | *Optional\<String>* | :heavy_minus_sign: | ID of the asset from which this asset was created. | \ No newline at end of file diff --git a/docs/models/components/Spec.md b/docs/models/components/Spec.md index 9dd3a5d4..038dc5b9 100644 --- a/docs/models/components/Spec.md +++ b/docs/models/components/Spec.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `nftMetadataTemplate` | [Optional<NftMetadataTemplate>](../../models/components/NftMetadataTemplate.md) | :heavy_minus_sign: | Name of the NFT metadata template to export. 'player'<br/>will embed the Livepeer Player on the NFT while 'file'<br/>will reference only the immutable MP4 files.<br/> | -| `nftMetadata` | [Optional<NftMetadata>](../../models/components/NftMetadata.md) | :heavy_minus_sign: | Additional data to add to the NFT metadata exported to<br/>IPFS. Will be deep merged with the default metadata<br/>exported.<br/> | \ No newline at end of file +| `nftMetadataTemplate` | [Optional\<NftMetadataTemplate>](../../models/components/NftMetadataTemplate.md) | :heavy_minus_sign: | Name of the NFT metadata template to export. 'player'<br/>will embed the Livepeer Player on the NFT while 'file'<br/>will reference only the immutable MP4 files.<br/> | +| `nftMetadata` | [Optional\<NftMetadata>](../../models/components/NftMetadata.md) | :heavy_minus_sign: | Additional data to add to the NFT metadata exported to<br/>IPFS. Will be deep merged with the default metadata<br/>exported.<br/> | \ No newline at end of file diff --git a/docs/models/components/Status.md b/docs/models/components/Status.md index 757be8b3..799c553e 100644 --- a/docs/models/components/Status.md +++ b/docs/models/components/Status.md @@ -7,5 +7,5 @@ status of webhook | Field | Type | Required | Description | Example | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `lastFailure` | [Optional<LastFailure>](../../models/components/LastFailure.md) | :heavy_minus_sign: | failure timestamp and error message with status code | | -| `lastTriggeredAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the webhook last was<br/>triggered<br/> | 1587667174725 | \ No newline at end of file +| `lastFailure` | [Optional\<LastFailure>](../../models/components/LastFailure.md) | :heavy_minus_sign: | failure timestamp and error message with status code | | +| `lastTriggeredAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the webhook last was<br/>triggered<br/> | 1587667174725 | \ No newline at end of file diff --git a/docs/models/components/Storage.md b/docs/models/components/Storage.md index b6393357..ce53a989 100644 --- a/docs/models/components/Storage.md +++ b/docs/models/components/Storage.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ipfs` | [JsonNullable<Ipfs>](../../models/components/Ipfs.md) | :heavy_minus_sign: | Set to true to make default export to IPFS. To customize the<br/>pinned files, specify an object with a spec field. False or null<br/>means to unpin from IPFS, but it's unsupported right now.<br/> | \ No newline at end of file +| `ipfs` | [JsonNullable\<Ipfs>](../../models/components/Ipfs.md) | :heavy_minus_sign: | Set to true to make default export to IPFS. To customize the<br/>pinned files, specify an object with a spec field. False or null<br/>means to unpin from IPFS, but it's unsupported right now.<br/> | \ No newline at end of file diff --git a/docs/models/components/StorageStatus.md b/docs/models/components/StorageStatus.md index 79af3e13..604d808a 100644 --- a/docs/models/components/StorageStatus.md +++ b/docs/models/components/StorageStatus.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | | `phase` | [Phase](../../models/components/Phase.md) | :heavy_check_mark: | Phase of the asset storage | ready | -| `progress` | *Optional<Double>* | :heavy_minus_sign: | Current progress of the task updating the storage. | 0.5 | -| `errorMessage` | *Optional<String>* | :heavy_minus_sign: | Error message if the last storage changed failed. | Failed to update storage | +| `progress` | *Optional\<Double>* | :heavy_minus_sign: | Current progress of the task updating the storage. | 0.5 | +| `errorMessage` | *Optional\<String>* | :heavy_minus_sign: | Error message if the last storage changed failed. | Failed to update storage | | `tasks` | [Tasks](../../models/components/Tasks.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/components/Stream.md b/docs/models/components/Stream.md index 551ba2a8..02f554a7 100644 --- a/docs/models/components/Stream.md +++ b/docs/models/components/Stream.md @@ -5,36 +5,36 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional<String>* | :heavy_minus_sign: | N/A | de7818e7-610a-4057-8f6f-b785dc1e6f88 | +| `id` | *Optional\<String>* | :heavy_minus_sign: | N/A | de7818e7-610a-4057-8f6f-b785dc1e6f88 | | `name` | *String* | :heavy_check_mark: | N/A | test_stream | -| ~~`kind`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | stream | -| `creatorId` | [Optional<CreatorId>](../../models/components/CreatorId.md) | :heavy_minus_sign: | N/A | | -| `userTags` | Map<String, [StreamUserTags](../../models/components/StreamUserTags.md)> | :heavy_minus_sign: | User input tags associated with the stream | | -| `lastSeen` | *Optional<Double>* | :heavy_minus_sign: | N/A | 1587667174725 | -| `sourceSegments` | *Optional<Double>* | :heavy_minus_sign: | N/A | 1 | -| `transcodedSegments` | *Optional<Double>* | :heavy_minus_sign: | N/A | 2 | -| `sourceSegmentsDuration` | *Optional<Double>* | :heavy_minus_sign: | Duration of all the source segments, sec | 1 | -| `transcodedSegmentsDuration` | *Optional<Double>* | :heavy_minus_sign: | Duration of all the transcoded segments, sec | 2 | -| `sourceBytes` | *Optional<Double>* | :heavy_minus_sign: | N/A | 1 | -| `transcodedBytes` | *Optional<Double>* | :heavy_minus_sign: | N/A | 2 | -| `ingestRate` | *Optional<Double>* | :heavy_minus_sign: | Rate at which sourceBytes increases (bytes/second) | 1 | -| `outgoingRate` | *Optional<Double>* | :heavy_minus_sign: | Rate at which transcodedBytes increases (bytes/second) | 2 | -| `isActive` | *Optional<Boolean>* | :heavy_minus_sign: | If currently active | true | -| `isHealthy` | *JsonNullable<Boolean>* | :heavy_minus_sign: | Indicates whether the stream is healthy or not. | | -| `issues` | List<*String*> | :heavy_minus_sign: | A string array of human-readable errors describing issues affecting the stream, if any. | | -| `createdByTokenName` | *Optional<String>* | :heavy_minus_sign: | Name of the token used to create this object | abc-123-xyz-456 | -| `createdAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which stream object was created | 1587667174725 | -| `parentId` | *Optional<String>* | :heavy_minus_sign: | Points to parent stream object | de7818e7-610a-4057-8f6f-b785dc1e6f88 | -| `streamKey` | *Optional<String>* | :heavy_minus_sign: | Used to form RTMP ingest URL | hgebdhhigq | -| `pull` | [Optional<StreamPull>](../../models/components/StreamPull.md) | :heavy_minus_sign: | Configuration for a stream that should be actively pulled from an<br/>external source, rather than pushed to Livepeer. If specified, the<br/>stream will not have a streamKey. | | -| `playbackId` | *Optional<String>* | :heavy_minus_sign: | The playback ID to use with the Playback Info endpoint to retrieve playback URLs. | eaw4nk06ts2d0mzb | -| `playbackPolicy` | [JsonNullable<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | -| `profiles` | List<[FfmpegProfile](../../models/components/FfmpegProfile.md)> | :heavy_minus_sign: | Profiles to transcode the stream into. If not specified, a default<br/>set of profiles will be used with 240p, 360p, 480p and 720p<br/>resolutions. Keep in mind that the source rendition is always kept.<br/> | | -| `projectId` | *Optional<String>* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb6-d1f0985eb0a9 | -| `record` | *Optional<Boolean>* | :heavy_minus_sign: | Should this stream be recorded? Uses default settings. For more<br/>customization, create and configure an object store.<br/> | false | -| `recordingSpec` | [Optional<StreamRecordingSpec>](../../models/components/StreamRecordingSpec.md) | :heavy_minus_sign: | Configuration for recording the stream. This can only be set if<br/>`record` is true.<br/> | | -| `multistream` | [Optional<StreamMultistream>](../../models/components/StreamMultistream.md) | :heavy_minus_sign: | N/A | | -| `suspended` | *Optional<Boolean>* | :heavy_minus_sign: | If currently suspended | | -| `lastTerminatedAt` | *JsonNullable<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) when the stream was last terminated | 1713281212993 | -| ~~`userId`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | we7818e7-610a-4057-8f6f-b785dc1e6f88 | -| `renditions` | [Optional<Renditions>](../../models/components/Renditions.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| ~~`kind`~~ | *Optional\<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | stream | +| `creatorId` | [Optional\<CreatorId>](../../models/components/CreatorId.md) | :heavy_minus_sign: | N/A | | +| `userTags` | Map\<String, [StreamUserTags](../../models/components/StreamUserTags.md)> | :heavy_minus_sign: | User input tags associated with the stream | | +| `lastSeen` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 1587667174725 | +| `sourceSegments` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 1 | +| `transcodedSegments` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 2 | +| `sourceSegmentsDuration` | *Optional\<Double>* | :heavy_minus_sign: | Duration of all the source segments, sec | 1 | +| `transcodedSegmentsDuration` | *Optional\<Double>* | :heavy_minus_sign: | Duration of all the transcoded segments, sec | 2 | +| `sourceBytes` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 1 | +| `transcodedBytes` | *Optional\<Double>* | :heavy_minus_sign: | N/A | 2 | +| `ingestRate` | *Optional\<Double>* | :heavy_minus_sign: | Rate at which sourceBytes increases (bytes/second) | 1 | +| `outgoingRate` | *Optional\<Double>* | :heavy_minus_sign: | Rate at which transcodedBytes increases (bytes/second) | 2 | +| `isActive` | *Optional\<Boolean>* | :heavy_minus_sign: | If currently active | true | +| `isHealthy` | *JsonNullable\<Boolean>* | :heavy_minus_sign: | Indicates whether the stream is healthy or not. | | +| `issues` | List\<*String*> | :heavy_minus_sign: | A string array of human-readable errors describing issues affecting the stream, if any. | | +| `createdByTokenName` | *Optional\<String>* | :heavy_minus_sign: | Name of the token used to create this object | abc-123-xyz-456 | +| `createdAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which stream object was created | 1587667174725 | +| `parentId` | *Optional\<String>* | :heavy_minus_sign: | Points to parent stream object | de7818e7-610a-4057-8f6f-b785dc1e6f88 | +| `streamKey` | *Optional\<String>* | :heavy_minus_sign: | Used to form RTMP ingest URL | hgebdhhigq | +| `pull` | [Optional\<StreamPull>](../../models/components/StreamPull.md) | :heavy_minus_sign: | Configuration for a stream that should be actively pulled from an<br/>external source, rather than pushed to Livepeer. If specified, the<br/>stream will not have a streamKey. | | +| `playbackId` | *Optional\<String>* | :heavy_minus_sign: | The playback ID to use with the Playback Info endpoint to retrieve playback URLs. | eaw4nk06ts2d0mzb | +| `playbackPolicy` | [JsonNullable\<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | +| `profiles` | List\<[FfmpegProfile](../../models/components/FfmpegProfile.md)> | :heavy_minus_sign: | Profiles to transcode the stream into. If not specified, a default<br/>set of profiles will be used with 240p, 360p, 480p and 720p<br/>resolutions. Keep in mind that the source rendition is always kept.<br/> | | +| `projectId` | *Optional\<String>* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb6-d1f0985eb0a9 | +| `record` | *Optional\<Boolean>* | :heavy_minus_sign: | Should this stream be recorded? Uses default settings. For more<br/>customization, create and configure an object store.<br/> | false | +| `recordingSpec` | [Optional\<StreamRecordingSpec>](../../models/components/StreamRecordingSpec.md) | :heavy_minus_sign: | Configuration for recording the stream. This can only be set if<br/>`record` is true.<br/> | | +| `multistream` | [Optional\<StreamMultistream>](../../models/components/StreamMultistream.md) | :heavy_minus_sign: | N/A | | +| `suspended` | *Optional\<Boolean>* | :heavy_minus_sign: | If currently suspended | | +| `lastTerminatedAt` | *JsonNullable\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) when the stream was last terminated | 1713281212993 | +| ~~`userId`~~ | *Optional\<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | we7818e7-610a-4057-8f6f-b785dc1e6f88 | +| `renditions` | [Optional\<Renditions>](../../models/components/Renditions.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/StreamMultistream.md b/docs/models/components/StreamMultistream.md index 2297063a..c50af01b 100644 --- a/docs/models/components/StreamMultistream.md +++ b/docs/models/components/StreamMultistream.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `targets` | List<[TargetOutput](../../models/components/TargetOutput.md)> | :heavy_minus_sign: | References to targets where this stream will be simultaneously<br/>streamed to<br/> | [<br/>{<br/>"id": "PUSH123",<br/>"profile": "720p"<br/>}<br/>] | \ No newline at end of file +| `targets` | List\<[TargetOutput](../../models/components/TargetOutput.md)> | :heavy_minus_sign: | References to targets where this stream will be simultaneously<br/>streamed to<br/> | [<br/>{<br/>"id": "PUSH123",<br/>"profile": "720p"<br/>}<br/>] | \ No newline at end of file diff --git a/docs/models/components/StreamPatchPayload.md b/docs/models/components/StreamPatchPayload.md index cad701a5..48663853 100644 --- a/docs/models/components/StreamPatchPayload.md +++ b/docs/models/components/StreamPatchPayload.md @@ -5,11 +5,12 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `creatorId` | [Optional<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | -| `record` | *Optional<Boolean>* | :heavy_minus_sign: | Should this stream be recorded? Uses default settings. For more<br/>customization, create and configure an object store.<br/> | false | -| `suspended` | *Optional<Boolean>* | :heavy_minus_sign: | If currently suspended | | -| `multistream` | [Optional<Multistream>](../../models/components/Multistream.md) | :heavy_minus_sign: | N/A | | -| `playbackPolicy` | [JsonNullable<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | -| `profiles` | List<[FfmpegProfile](../../models/components/FfmpegProfile.md)> | :heavy_minus_sign: | N/A | | -| `recordingSpec` | [Optional<RecordingSpec>](../../models/components/RecordingSpec.md) | :heavy_minus_sign: | N/A | | -| `userTags` | Map<String, [UserTags](../../models/components/UserTags.md)> | :heavy_minus_sign: | User input tags associated with the stream | | \ No newline at end of file +| `creatorId` | [Optional\<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | +| `record` | *Optional\<Boolean>* | :heavy_minus_sign: | Should this stream be recorded? Uses default settings. For more<br/>customization, create and configure an object store.<br/> | false | +| `suspended` | *Optional\<Boolean>* | :heavy_minus_sign: | If currently suspended | | +| `multistream` | [Optional\<Multistream>](../../models/components/Multistream.md) | :heavy_minus_sign: | N/A | | +| `playbackPolicy` | [JsonNullable\<PlaybackPolicy>](../../models/components/PlaybackPolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | +| `profiles` | List\<[FfmpegProfile](../../models/components/FfmpegProfile.md)> | :heavy_minus_sign: | N/A | | +| `recordingSpec` | [Optional\<RecordingSpec>](../../models/components/RecordingSpec.md) | :heavy_minus_sign: | N/A | | +| `userTags` | Map\<String, [UserTags](../../models/components/UserTags.md)> | :heavy_minus_sign: | User input tags associated with the stream | | +| `name` | *Optional\<String>* | :heavy_minus_sign: | N/A | test_stream | \ No newline at end of file diff --git a/docs/models/components/StreamPull.md b/docs/models/components/StreamPull.md index 9952d192..3bd2c222 100644 --- a/docs/models/components/StreamPull.md +++ b/docs/models/components/StreamPull.md @@ -10,6 +10,6 @@ stream will not have a streamKey. | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | `source` | *String* | :heavy_check_mark: | URL from which to pull from. | https://myservice.com/live/stream.flv | -| `headers` | Map<String, *String*> | :heavy_minus_sign: | Headers to be sent with the request to the pull source. | {<br/>"Authorization": "Bearer 123"<br/>} | -| `isMobile` | [Optional<StreamIsMobile>](../../models/components/StreamIsMobile.md) | :heavy_minus_sign: | Indicates whether the stream will be pulled from a mobile source. | | -| `location` | [Optional<StreamLocation>](../../models/components/StreamLocation.md) | :heavy_minus_sign: | Approximate location of the pull source. The location is used to<br/>determine the closest Livepeer region to pull the stream from. | | \ No newline at end of file +| `headers` | Map\<String, *String*> | :heavy_minus_sign: | Headers to be sent with the request to the pull source. | {<br/>"Authorization": "Bearer 123"<br/>} | +| `isMobile` | [Optional\<StreamIsMobile>](../../models/components/StreamIsMobile.md) | :heavy_minus_sign: | Indicates whether the stream will be pulled from a mobile source. | | +| `location` | [Optional\<StreamLocation>](../../models/components/StreamLocation.md) | :heavy_minus_sign: | Approximate location of the pull source. The location is used to<br/>determine the closest Livepeer region to pull the stream from. | | \ No newline at end of file diff --git a/docs/models/components/StreamRecordingSpec.md b/docs/models/components/StreamRecordingSpec.md index e5a93a3c..3e20c3fb 100644 --- a/docs/models/components/StreamRecordingSpec.md +++ b/docs/models/components/StreamRecordingSpec.md @@ -9,4 +9,4 @@ Configuration for recording the stream. This can only be set if | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `profiles` | List<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | Profiles to process the recording of this stream into. If not<br/>specified, default profiles will be derived based on the stream<br/>input. Keep in mind that the source rendition is always kept.<br/> | \ No newline at end of file +| `profiles` | List\<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | Profiles to process the recording of this stream into. If not<br/>specified, default profiles will be derived based on the stream<br/>input. Keep in mind that the source rendition is always kept.<br/> | \ No newline at end of file diff --git a/docs/models/components/Target.md b/docs/models/components/Target.md new file mode 100644 index 00000000..56bbcdb2 --- /dev/null +++ b/docs/models/components/Target.md @@ -0,0 +1,11 @@ +# Target + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `profile` | *String* | :heavy_check_mark: | Name of transcoding profile that should be sent. Use<br/>"source" for pushing source stream data<br/> | 720p0 | +| `videoOnly` | *Optional\<Boolean>* | :heavy_minus_sign: | If true, the stream audio will be muted and only silent<br/>video will be pushed to the target.<br/> | false | +| `id` | *Optional\<String>* | :heavy_minus_sign: | ID of multistream target object where to push this stream | PUSH123 | +| `spec` | [Optional\<TargetSpec>](../../models/components/TargetSpec.md) | :heavy_minus_sign: | Inline multistream target object. Will automatically<br/>create the target resource to be used by the created<br/>stream.<br/> | | \ No newline at end of file diff --git a/docs/models/components/TargetAddPayload.md b/docs/models/components/TargetAddPayload.md index 9ff315ed..34f436f9 100644 --- a/docs/models/components/TargetAddPayload.md +++ b/docs/models/components/TargetAddPayload.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | `profile` | *String* | :heavy_check_mark: | Name of transcoding profile that should be sent. Use<br/>"source" for pushing source stream data<br/> | 720p0 | -| `videoOnly` | *Optional<Boolean>* | :heavy_minus_sign: | If true, the stream audio will be muted and only silent<br/>video will be pushed to the target.<br/> | false | -| `id` | *Optional<String>* | :heavy_minus_sign: | ID of multistream target object where to push this stream | PUSH123 | -| `spec` | [Optional<TargetAddPayloadSpec>](../../models/components/TargetAddPayloadSpec.md) | :heavy_minus_sign: | Inline multistream target object. Will automatically<br/>create the target resource to be used by the created<br/>stream.<br/> | | \ No newline at end of file +| `videoOnly` | *Optional\<Boolean>* | :heavy_minus_sign: | If true, the stream audio will be muted and only silent<br/>video will be pushed to the target.<br/> | false | +| `id` | *Optional\<String>* | :heavy_minus_sign: | ID of multistream target object where to push this stream | PUSH123 | +| `spec` | [Optional\<TargetAddPayloadSpec>](../../models/components/TargetAddPayloadSpec.md) | :heavy_minus_sign: | Inline multistream target object. Will automatically<br/>create the target resource to be used by the created<br/>stream.<br/> | | \ No newline at end of file diff --git a/docs/models/components/TargetAddPayloadSpec.md b/docs/models/components/TargetAddPayloadSpec.md index f1dc43f8..88384414 100644 --- a/docs/models/components/TargetAddPayloadSpec.md +++ b/docs/models/components/TargetAddPayloadSpec.md @@ -10,5 +10,5 @@ stream. | Field | Type | Required | Description | Example | | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `name` | *Optional<String>* | :heavy_minus_sign: | N/A | My target | +| `name` | *Optional\<String>* | :heavy_minus_sign: | N/A | My target | | `url` | *String* | :heavy_check_mark: | Livepeer-compatible multistream target URL (RTMP(S) or SRT) | rtmps://live.my-service.tv/channel/secretKey | \ No newline at end of file diff --git a/docs/models/components/TargetOutput.md b/docs/models/components/TargetOutput.md index 8e1d0f3b..c9039923 100644 --- a/docs/models/components/TargetOutput.md +++ b/docs/models/components/TargetOutput.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | | `profile` | *String* | :heavy_check_mark: | Name of transcoding profile that should be sent. Use<br/>"source" for pushing source stream data<br/> | 720p0 | -| `videoOnly` | *Optional<Boolean>* | :heavy_minus_sign: | If true, the stream audio will be muted and only silent<br/>video will be pushed to the target.<br/> | false | -| `id` | *Optional<String>* | :heavy_minus_sign: | ID of multistream target object where to push this stream | PUSH123 | \ No newline at end of file +| `videoOnly` | *Optional\<Boolean>* | :heavy_minus_sign: | If true, the stream audio will be muted and only silent<br/>video will be pushed to the target.<br/> | false | +| `id` | *Optional\<String>* | :heavy_minus_sign: | ID of multistream target object where to push this stream | PUSH123 | \ No newline at end of file diff --git a/docs/models/components/TargetSpec.md b/docs/models/components/TargetSpec.md index db1cc7cc..08318455 100644 --- a/docs/models/components/TargetSpec.md +++ b/docs/models/components/TargetSpec.md @@ -10,5 +10,5 @@ stream. | Field | Type | Required | Description | Example | | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `name` | *Optional<String>* | :heavy_minus_sign: | N/A | My target | +| `name` | *Optional\<String>* | :heavy_minus_sign: | N/A | My target | | `url` | *String* | :heavy_check_mark: | Livepeer-compatible multistream target URL (RTMP(S) or SRT) | rtmps://live.my-service.tv/channel/secretKey | \ No newline at end of file diff --git a/docs/models/components/Task.md b/docs/models/components/Task.md index 31a03635..0d04c663 100644 --- a/docs/models/components/Task.md +++ b/docs/models/components/Task.md @@ -5,13 +5,14 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional<String>* | :heavy_minus_sign: | Task ID | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | -| `type` | [Optional<TaskType>](../../models/components/TaskType.md) | :heavy_minus_sign: | Type of the task | upload | -| `createdAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which task was created | 1587667174725 | -| `scheduledAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the task was scheduled for<br/>execution (e.g. after file upload finished).<br/> | 1587667174725 | -| `inputAssetId` | *Optional<String>* | :heavy_minus_sign: | ID of the input asset | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | -| `outputAssetId` | *Optional<String>* | :heavy_minus_sign: | ID of the output asset | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | -| `requesterId` | *Optional<String>* | :heavy_minus_sign: | ID of the requester hash(IP + SALT + PlaybackId) | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | -| `params` | [Optional<Params>](../../models/components/Params.md) | :heavy_minus_sign: | Parameters of the task | | -| `status` | [Optional<TaskStatus>](../../models/components/TaskStatus.md) | :heavy_minus_sign: | Status of the task | | -| `output` | [Optional<Output>](../../models/components/Output.md) | :heavy_minus_sign: | Output of the task | | \ No newline at end of file +| `id` | *Optional\<String>* | :heavy_minus_sign: | Task ID | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | +| `type` | [Optional\<TaskType>](../../models/components/TaskType.md) | :heavy_minus_sign: | Type of the task | upload | +| `createdAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which task was created | 1587667174725 | +| `scheduledAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which the task was scheduled for<br/>execution (e.g. after file upload finished).<br/> | 1587667174725 | +| `inputAssetId` | *Optional\<String>* | :heavy_minus_sign: | ID of the input asset | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | +| `outputAssetId` | *Optional\<String>* | :heavy_minus_sign: | ID of the output asset | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | +| `projectId` | *Optional\<String>* | :heavy_minus_sign: | ID of the project | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | +| `requesterId` | *Optional\<String>* | :heavy_minus_sign: | ID of the requester hash(IP + SALT + PlaybackId) | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | +| `params` | [Optional\<Params>](../../models/components/Params.md) | :heavy_minus_sign: | Parameters of the task | | +| `status` | [Optional\<TaskStatus>](../../models/components/TaskStatus.md) | :heavy_minus_sign: | Status of the task | | +| `output` | [Optional\<Output>](../../models/components/Output.md) | :heavy_minus_sign: | Output of the task | | \ No newline at end of file diff --git a/docs/models/components/TaskExportData.md b/docs/models/components/TaskExportData.md index 10eca19e..c64b9dc6 100644 --- a/docs/models/components/TaskExportData.md +++ b/docs/models/components/TaskExportData.md @@ -5,9 +5,9 @@ Parameters for the export-data task ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `content` | [Content](../../models/components/Content.md) | :heavy_check_mark: | File content to store into IPFS | {<br/>"data": "Hello, World!"<br/>} | -| `ipfs` | [Optional<IpfsExportParams>](../../models/components/IpfsExportParams.md) | :heavy_minus_sign: | N/A | | -| `type` | *Optional<String>* | :heavy_minus_sign: | Optional type of content | text/plain | -| `id` | *Optional<String>* | :heavy_minus_sign: | Optional ID of the content | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `content` | [Content](../../models/components/Content.md) | :heavy_check_mark: | File content to store into IPFS | {<br/>"data": "Hello, World!"<br/>} | +| `ipfs` | [Optional\<IpfsExportParams>](../../models/components/IpfsExportParams.md) | :heavy_minus_sign: | N/A | | +| `type` | *Optional\<String>* | :heavy_minus_sign: | Optional type of content | text/plain | +| `id` | *Optional\<String>* | :heavy_minus_sign: | Optional ID of the content | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | \ No newline at end of file diff --git a/docs/models/components/TaskHls.md b/docs/models/components/TaskHls.md index b212d1bc..c1bc8e00 100644 --- a/docs/models/components/TaskHls.md +++ b/docs/models/components/TaskHls.md @@ -7,4 +7,4 @@ HLS output format | Field | Type | Required | Description | Example | | ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `path` | *Optional<String>* | :heavy_minus_sign: | Path for the HLS output | /samplevideo/hls | \ No newline at end of file +| `path` | *Optional\<String>* | :heavy_minus_sign: | Path for the HLS output | /samplevideo/hls | \ No newline at end of file diff --git a/docs/models/components/TaskInput.md b/docs/models/components/TaskInput.md index ebf47981..7736bba2 100644 --- a/docs/models/components/TaskInput.md +++ b/docs/models/components/TaskInput.md @@ -7,4 +7,4 @@ Input video file to transcode | Field | Type | Required | Description | Example | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `url` | *Optional<String>* | :heavy_minus_sign: | URL of a video to transcode, accepts object-store format<br/>"s3+https"<br/> | https://cdn.livepeer.com/ABC123/filename.mp4 | \ No newline at end of file +| `url` | *Optional\<String>* | :heavy_minus_sign: | URL of a video to transcode, accepts object-store format<br/>"s3+https"<br/> | https://cdn.livepeer.com/ABC123/filename.mp4 | \ No newline at end of file diff --git a/docs/models/components/TaskIpfs.md b/docs/models/components/TaskIpfs.md index c0b6888e..4413f89c 100644 --- a/docs/models/components/TaskIpfs.md +++ b/docs/models/components/TaskIpfs.md @@ -6,8 +6,8 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | | `videoFileCid` | *String* | :heavy_check_mark: | IPFS CID of the exported video file | Qmabc123xyz341 | -| `videoFileUrl` | *Optional<String>* | :heavy_minus_sign: | URL for the file with the IPFS protocol | ipfs://Qmabc123xyz341 | -| `videoFileGatewayUrl` | *Optional<String>* | :heavy_minus_sign: | URL to access file via HTTP through an IPFS gateway | https://gateway.ipfs.io/ipfs/Qmabc123xyz341 | -| `nftMetadataCid` | *Optional<String>* | :heavy_minus_sign: | IPFS CID of the default metadata exported for the video | Qmabc123xyz341 | -| `nftMetadataUrl` | *Optional<String>* | :heavy_minus_sign: | URL for the metadata file with the IPFS protocol | ipfs://Qmabc123xyz341 | -| `nftMetadataGatewayUrl` | *Optional<String>* | :heavy_minus_sign: | URL to access metadata file via HTTP through an IPFS<br/>gateway<br/> | https://gateway.ipfs.io/ipfs/Qmabc123xyz341 | \ No newline at end of file +| `videoFileUrl` | *Optional\<String>* | :heavy_minus_sign: | URL for the file with the IPFS protocol | ipfs://Qmabc123xyz341 | +| `videoFileGatewayUrl` | *Optional\<String>* | :heavy_minus_sign: | URL to access file via HTTP through an IPFS gateway | https://gateway.ipfs.io/ipfs/Qmabc123xyz341 | +| `nftMetadataCid` | *Optional\<String>* | :heavy_minus_sign: | IPFS CID of the default metadata exported for the video | Qmabc123xyz341 | +| `nftMetadataUrl` | *Optional\<String>* | :heavy_minus_sign: | URL for the metadata file with the IPFS protocol | ipfs://Qmabc123xyz341 | +| `nftMetadataGatewayUrl` | *Optional\<String>* | :heavy_minus_sign: | URL to access metadata file via HTTP through an IPFS<br/>gateway<br/> | https://gateway.ipfs.io/ipfs/Qmabc123xyz341 | \ No newline at end of file diff --git a/docs/models/components/TaskMp4.md b/docs/models/components/TaskMp4.md index 33ffa160..c71e250c 100644 --- a/docs/models/components/TaskMp4.md +++ b/docs/models/components/TaskMp4.md @@ -7,4 +7,4 @@ MP4 output format | Field | Type | Required | Description | Example | | ----------------------- | ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `path` | *Optional<String>* | :heavy_minus_sign: | Path for the MP4 output | /samplevideo/mp4 | \ No newline at end of file +| `path` | *Optional\<String>* | :heavy_minus_sign: | Path for the MP4 output | /samplevideo/mp4 | \ No newline at end of file diff --git a/docs/models/components/TaskOutputs.md b/docs/models/components/TaskOutputs.md index d18f177c..7c97b8a4 100644 --- a/docs/models/components/TaskOutputs.md +++ b/docs/models/components/TaskOutputs.md @@ -5,7 +5,7 @@ Output formats ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `hls` | [Optional<TaskHls>](../../models/components/TaskHls.md) | :heavy_minus_sign: | HLS output format | -| `mp4` | [Optional<TaskMp4>](../../models/components/TaskMp4.md) | :heavy_minus_sign: | MP4 output format | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `hls` | [Optional\<TaskHls>](../../models/components/TaskHls.md) | :heavy_minus_sign: | HLS output format | +| `mp4` | [Optional\<TaskMp4>](../../models/components/TaskMp4.md) | :heavy_minus_sign: | MP4 output format | \ No newline at end of file diff --git a/docs/models/components/TaskStatus.md b/docs/models/components/TaskStatus.md index 4993beba..f60a5e5a 100644 --- a/docs/models/components/TaskStatus.md +++ b/docs/models/components/TaskStatus.md @@ -9,6 +9,6 @@ Status of the task | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | | `phase` | [TaskPhase](../../models/components/TaskPhase.md) | :heavy_check_mark: | Phase of the task | pending | | `updatedAt` | *double* | :heavy_check_mark: | Timestamp (in milliseconds) at which task was updated | 1587667174725 | -| `progress` | *Optional<Double>* | :heavy_minus_sign: | Current progress of the task in a 0-1 ratio | 0.5 | -| `errorMessage` | *Optional<String>* | :heavy_minus_sign: | Error message if the task failed | Failed to upload file | -| `retries` | *Optional<Double>* | :heavy_minus_sign: | Number of retries done on the task | 3 | \ No newline at end of file +| `progress` | *Optional\<Double>* | :heavy_minus_sign: | Current progress of the task in a 0-1 ratio | 0.5 | +| `errorMessage` | *Optional\<String>* | :heavy_minus_sign: | Error message if the task failed | Failed to upload file | +| `retries` | *Optional\<Double>* | :heavy_minus_sign: | Number of retries done on the task | 3 | \ No newline at end of file diff --git a/docs/models/components/TaskStorage.md b/docs/models/components/TaskStorage.md index 236ea08e..2f8dc64b 100644 --- a/docs/models/components/TaskStorage.md +++ b/docs/models/components/TaskStorage.md @@ -7,4 +7,4 @@ Storage for the output files | Field | Type | Required | Description | Example | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `url` | *Optional<String>* | :heavy_minus_sign: | URL of the output storage, accepts object-store format<br/>"s3+https"<br/> | s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket | \ No newline at end of file +| `url` | *Optional\<String>* | :heavy_minus_sign: | URL of the output storage, accepts object-store format<br/>"s3+https"<br/> | s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket | \ No newline at end of file diff --git a/docs/models/components/TaskUpload.md b/docs/models/components/TaskUpload.md new file mode 100644 index 00000000..eb35075e --- /dev/null +++ b/docs/models/components/TaskUpload.md @@ -0,0 +1,11 @@ +# TaskUpload + +Output of the upload task + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `assetSpec` | [Optional\<Asset>](../../models/components/Asset.md) | :heavy_minus_sign: | N/A | +| `additionalProperties` | Map\<String, *Object*> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/Tasks.md b/docs/models/components/Tasks.md index 2109aa9a..18b57236 100644 --- a/docs/models/components/Tasks.md +++ b/docs/models/components/Tasks.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `pending` | *Optional<String>* | :heavy_minus_sign: | ID of any currently running task that is exporting this<br/>asset to IPFS.<br/> | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | -| `last` | *Optional<String>* | :heavy_minus_sign: | ID of the last task to run successfully, that created<br/>the currently saved data.<br/> | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | -| `failed` | *Optional<String>* | :heavy_minus_sign: | ID of the last task to fail execution. | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | \ No newline at end of file +| `pending` | *Optional\<String>* | :heavy_minus_sign: | ID of any currently running task that is exporting this<br/>asset to IPFS.<br/> | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | +| `last` | *Optional\<String>* | :heavy_minus_sign: | ID of the last task to run successfully, that created<br/>the currently saved data.<br/> | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | +| `failed` | *Optional\<String>* | :heavy_minus_sign: | ID of the last task to fail execution. | 09F8B46C-61A0-4254-9875-F71F4C605BC7 | \ No newline at end of file diff --git a/docs/models/components/Tracks.md b/docs/models/components/Tracks.md index 6b6c0f56..cf8828b4 100644 --- a/docs/models/components/Tracks.md +++ b/docs/models/components/Tracks.md @@ -7,13 +7,13 @@ | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `type` | [AssetVideoSpecType](../../models/components/AssetVideoSpecType.md) | :heavy_check_mark: | type of track | video | | `codec` | *String* | :heavy_check_mark: | Codec of the track | aac | -| `startTime` | *Optional<Double>* | :heavy_minus_sign: | Start time of the track in seconds | 23.8238 | -| `duration` | *Optional<Double>* | :heavy_minus_sign: | Duration of the track in seconds | 23.8238 | -| `bitrate` | *Optional<Double>* | :heavy_minus_sign: | Bitrate of the track in bits per second | 1000000 | -| `width` | *Optional<Double>* | :heavy_minus_sign: | Width of the track - only for video tracks | 1920 | -| `height` | *Optional<Double>* | :heavy_minus_sign: | Height of the track - only for video tracks | 1080 | -| `pixelFormat` | *Optional<String>* | :heavy_minus_sign: | Pixel format of the track - only for video tracks | yuv420p | -| `fps` | *Optional<Double>* | :heavy_minus_sign: | Frame rate of the track - only for video tracks | 30 | -| `channels` | *Optional<Double>* | :heavy_minus_sign: | Amount of audio channels in the track | 2 | -| `sampleRate` | *Optional<Double>* | :heavy_minus_sign: | Sample rate of the track in samples per second - only for<br/>audio tracks<br/> | 44100 | -| `bitDepth` | *Optional<Double>* | :heavy_minus_sign: | Bit depth of the track - only for audio tracks | 16 | \ No newline at end of file +| `startTime` | *Optional\<Double>* | :heavy_minus_sign: | Start time of the track in seconds | 23.8238 | +| `duration` | *Optional\<Double>* | :heavy_minus_sign: | Duration of the track in seconds | 23.8238 | +| `bitrate` | *Optional\<Double>* | :heavy_minus_sign: | Bitrate of the track in bits per second | 1000000 | +| `width` | *Optional\<Double>* | :heavy_minus_sign: | Width of the track - only for video tracks | 1920 | +| `height` | *Optional\<Double>* | :heavy_minus_sign: | Height of the track - only for video tracks | 1080 | +| `pixelFormat` | *Optional\<String>* | :heavy_minus_sign: | Pixel format of the track - only for video tracks | yuv420p | +| `fps` | *Optional\<Double>* | :heavy_minus_sign: | Frame rate of the track - only for video tracks | 30 | +| `channels` | *Optional\<Double>* | :heavy_minus_sign: | Amount of audio channels in the track | 2 | +| `sampleRate` | *Optional\<Double>* | :heavy_minus_sign: | Sample rate of the track in samples per second - only for<br/>audio tracks<br/> | 44100 | +| `bitDepth` | *Optional\<Double>* | :heavy_minus_sign: | Bit depth of the track - only for audio tracks | 16 | \ No newline at end of file diff --git a/docs/models/components/TranscodeFile.md b/docs/models/components/TranscodeFile.md index 64a07928..9e7c8f65 100644 --- a/docs/models/components/TranscodeFile.md +++ b/docs/models/components/TranscodeFile.md @@ -5,12 +5,12 @@ Parameters for the transcode-file task ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `input` | [Optional<TaskInput>](../../models/components/TaskInput.md) | :heavy_minus_sign: | Input video file to transcode | | -| `storage` | [Optional<TaskStorage>](../../models/components/TaskStorage.md) | :heavy_minus_sign: | Storage for the output files | | -| `outputs` | [Optional<TaskOutputs>](../../models/components/TaskOutputs.md) | :heavy_minus_sign: | Output formats | | -| `profiles` | List<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | | -| `targetSegmentSizeSecs` | *Optional<Double>* | :heavy_minus_sign: | How many seconds the duration of each output segment should<br/>be<br/> | 10 | -| `creatorId` | [Optional<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | -| `c2pa` | *Optional<Boolean>* | :heavy_minus_sign: | Decides if the output video should include C2PA signature | false | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `input` | [Optional\<TaskInput>](../../models/components/TaskInput.md) | :heavy_minus_sign: | Input video file to transcode | | +| `storage` | [Optional\<TaskStorage>](../../models/components/TaskStorage.md) | :heavy_minus_sign: | Storage for the output files | | +| `outputs` | [Optional\<TaskOutputs>](../../models/components/TaskOutputs.md) | :heavy_minus_sign: | Output formats | | +| `profiles` | List\<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | | +| `targetSegmentSizeSecs` | *Optional\<Double>* | :heavy_minus_sign: | How many seconds the duration of each output segment should<br/>be<br/> | 10 | +| `creatorId` | [Optional\<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | | +| `c2pa` | *Optional\<Boolean>* | :heavy_minus_sign: | Decides if the output video should include C2PA signature | false | \ No newline at end of file diff --git a/docs/models/components/TranscodePayload.md b/docs/models/components/TranscodePayload.md index 3618ac8d..9f2d6855 100644 --- a/docs/models/components/TranscodePayload.md +++ b/docs/models/components/TranscodePayload.md @@ -8,7 +8,7 @@ | `input` | [Input](../../models/components/Input.md) | :heavy_check_mark: | N/A | | `storage` | [TranscodePayloadStorage](../../models/components/TranscodePayloadStorage.md) | :heavy_check_mark: | N/A | | `outputs` | [Outputs](../../models/components/Outputs.md) | :heavy_check_mark: | Output formats | -| `profiles` | List<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | -| `targetSegmentSizeSecs` | *Optional<Double>* | :heavy_minus_sign: | How many seconds the duration of each output segment should be | -| `creatorId` | [Optional<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | -| `c2pa` | *Optional<Boolean>* | :heavy_minus_sign: | Decides if the output video should include C2PA signature | \ No newline at end of file +| `profiles` | List\<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | +| `targetSegmentSizeSecs` | *Optional\<Double>* | :heavy_minus_sign: | How many seconds the duration of each output segment should be | +| `creatorId` | [Optional\<InputCreatorId>](../../models/components/InputCreatorId.md) | :heavy_minus_sign: | N/A | +| `c2pa` | *Optional\<Boolean>* | :heavy_minus_sign: | Decides if the output video should include C2PA signature | \ No newline at end of file diff --git a/docs/models/components/TranscodeProfile.md b/docs/models/components/TranscodeProfile.md index bff35f64..71a416ab 100644 --- a/docs/models/components/TranscodeProfile.md +++ b/docs/models/components/TranscodeProfile.md @@ -7,13 +7,13 @@ Transcode API profile | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `width` | *Optional<Long>* | :heavy_minus_sign: | N/A | 1280 | -| `name` | *Optional<String>* | :heavy_minus_sign: | N/A | 720p | -| `height` | *Optional<Long>* | :heavy_minus_sign: | N/A | 720 | +| `width` | *Optional\<Long>* | :heavy_minus_sign: | N/A | 1280 | +| `name` | *Optional\<String>* | :heavy_minus_sign: | N/A | 720p | +| `height` | *Optional\<Long>* | :heavy_minus_sign: | N/A | 720 | | `bitrate` | *long* | :heavy_check_mark: | N/A | 3000000 | -| `quality` | *Optional<Long>* | :heavy_minus_sign: | Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it.<br/> | 23 | -| `fps` | *Optional<Long>* | :heavy_minus_sign: | N/A | 30 | -| `fpsDen` | *Optional<Long>* | :heavy_minus_sign: | N/A | 1 | -| `gop` | *Optional<String>* | :heavy_minus_sign: | N/A | 2 | -| `profile` | [Optional<TranscodeProfileProfile>](../../models/components/TranscodeProfileProfile.md) | :heavy_minus_sign: | N/A | H264Baseline | -| `encoder` | [Optional<TranscodeProfileEncoder>](../../models/components/TranscodeProfileEncoder.md) | :heavy_minus_sign: | N/A | H.264 | \ No newline at end of file +| `quality` | *Optional\<Long>* | :heavy_minus_sign: | Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it.<br/> | 23 | +| `fps` | *Optional\<Long>* | :heavy_minus_sign: | N/A | 30 | +| `fpsDen` | *Optional\<Long>* | :heavy_minus_sign: | N/A | 1 | +| `gop` | *Optional\<String>* | :heavy_minus_sign: | N/A | 2 | +| `profile` | [Optional\<TranscodeProfileProfile>](../../models/components/TranscodeProfileProfile.md) | :heavy_minus_sign: | N/A | H264Baseline | +| `encoder` | [Optional\<TranscodeProfileEncoder>](../../models/components/TranscodeProfileEncoder.md) | :heavy_minus_sign: | N/A | H.264 | \ No newline at end of file diff --git a/docs/models/components/Upload.md b/docs/models/components/Upload.md index c63ad6d7..2391bd52 100644 --- a/docs/models/components/Upload.md +++ b/docs/models/components/Upload.md @@ -5,10 +5,10 @@ Parameters for the upload task ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `url` | *Optional<String>* | :heavy_minus_sign: | URL of the asset to "upload" | https://cdn.livepeer.com/ABC123/filename.mp4 | -| `encryption` | [Optional<EncryptionOutput>](../../models/components/EncryptionOutput.md) | :heavy_minus_sign: | N/A | | -| `c2pa` | *Optional<Boolean>* | :heavy_minus_sign: | Decides if the output video should include C2PA signature | true | -| `profiles` | List<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | | -| `targetSegmentSizeSecs` | *Optional<Double>* | :heavy_minus_sign: | How many seconds the duration of each output segment should be | 6 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `url` | *Optional\<String>* | :heavy_minus_sign: | URL of the asset to "upload" | https://cdn.livepeer.com/ABC123/filename.mp4 | +| `encryption` | [Optional\<EncryptionOutput>](../../models/components/EncryptionOutput.md) | :heavy_minus_sign: | N/A | | +| `c2pa` | *Optional\<Boolean>* | :heavy_minus_sign: | Decides if the output video should include C2PA signature | true | +| `profiles` | List\<[TranscodeProfile](../../models/components/TranscodeProfile.md)> | :heavy_minus_sign: | N/A | | +| `targetSegmentSizeSecs` | *Optional\<Double>* | :heavy_minus_sign: | How many seconds the duration of each output segment should be | 6 | \ No newline at end of file diff --git a/docs/models/components/UsageMetric.md b/docs/models/components/UsageMetric.md index ceec6784..9b6b5d5a 100644 --- a/docs/models/components/UsageMetric.md +++ b/docs/models/components/UsageMetric.md @@ -8,8 +8,8 @@ An individual metric about usage of a user. | Field | Type | Required | Description | Example | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `userID` | *Optional<String>* | :heavy_minus_sign: | The user ID associated with the metric | 1bde4o2i6xycudoy | -| `creatorID` | *Optional<String>* | :heavy_minus_sign: | The creator ID associated with the metric | john@doe.com | -| `deliveryUsageMins` | *Optional<Double>* | :heavy_minus_sign: | Total minutes of delivery usage. | 100 | -| `totalUsageMins` | *Optional<Double>* | :heavy_minus_sign: | Total transcoded minutes. | 100 | -| `storageUsageMins` | *Optional<Double>* | :heavy_minus_sign: | Total minutes of storage usage. | 100 | \ No newline at end of file +| `userID` | *Optional\<String>* | :heavy_minus_sign: | The user ID associated with the metric | 1bde4o2i6xycudoy | +| `creatorID` | *Optional\<String>* | :heavy_minus_sign: | The creator ID associated with the metric | john@doe.com | +| `deliveryUsageMins` | *Optional\<Double>* | :heavy_minus_sign: | Total minutes of delivery usage. | 100 | +| `totalUsageMins` | *Optional\<Double>* | :heavy_minus_sign: | Total transcoded minutes. | 100 | +| `storageUsageMins` | *Optional\<Double>* | :heavy_minus_sign: | Total minutes of storage usage. | 100 | \ No newline at end of file diff --git a/docs/models/components/VideoSpec.md b/docs/models/components/VideoSpec.md index e5ce1e9b..808f4050 100644 --- a/docs/models/components/VideoSpec.md +++ b/docs/models/components/VideoSpec.md @@ -7,7 +7,7 @@ Video metadata | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | *Optional<String>* | :heavy_minus_sign: | Format of the asset | mp4 | -| `duration` | *Optional<Double>* | :heavy_minus_sign: | Duration of the asset in seconds (float) | 23.8328 | -| `bitrate` | *Optional<Double>* | :heavy_minus_sign: | Bitrate of the video in bits per second | 1000000 | -| `tracks` | List<[Tracks](../../models/components/Tracks.md)> | :heavy_minus_sign: | List of tracks associated with the asset when the format<br/>contemplates them (e.g. mp4)<br/> | | \ No newline at end of file +| `format` | *Optional\<String>* | :heavy_minus_sign: | Format of the asset | mp4 | +| `duration` | *Optional\<Double>* | :heavy_minus_sign: | Duration of the asset in seconds (float) | 23.8328 | +| `bitrate` | *Optional\<Double>* | :heavy_minus_sign: | Bitrate of the video in bits per second | 1000000 | +| `tracks` | List\<[Tracks](../../models/components/Tracks.md)> | :heavy_minus_sign: | List of tracks associated with the asset when the format<br/>contemplates them (e.g. mp4)<br/> | | \ No newline at end of file diff --git a/docs/models/components/ViewershipMetric.md b/docs/models/components/ViewershipMetric.md index 8719a5cc..4783ee32 100644 --- a/docs/models/components/ViewershipMetric.md +++ b/docs/models/components/ViewershipMetric.md @@ -9,25 +9,25 @@ An individual metric about viewership of a stream/asset. Necessarily, at least | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `playbackId` | *Optional<String>* | :heavy_minus_sign: | The playback ID associated with the metric. | 1bde4o2i6xycudoy | -| `creatorId` | *Optional<String>* | :heavy_minus_sign: | The ID of the creator associated with the metric. | john@doe.com | -| `viewerId` | *Optional<String>* | :heavy_minus_sign: | The ID of the viewer associated with the metric. | 1bde4o2i6xycudoy | -| `dStorageUrl` | *Optional<String>* | :heavy_minus_sign: | The URL of the distributed storage used for the asset | ipfs://QmZ4 | -| `timestamp` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) when the metric was recorded. If the<br/>query contains a time step, this timestamp will point to the<br/>beginning of the time step period.<br/> | 1587667174725 | -| `device` | *Optional<String>* | :heavy_minus_sign: | The device used by the viewer. | iPhone | -| `deviceType` | *Optional<String>* | :heavy_minus_sign: | The type of the device used by the viewer. | mobile | -| `cpu` | *Optional<String>* | :heavy_minus_sign: | The CPU used by the viewer's device. | ARM | -| `os` | *Optional<String>* | :heavy_minus_sign: | The operating system used by the viewer. | iOS | -| `browser` | *Optional<String>* | :heavy_minus_sign: | The browser used by the viewer. | Safari | -| `browserEngine` | *Optional<String>* | :heavy_minus_sign: | The browser engine used by the viewer's browser. | WebKit | -| `continent` | *Optional<String>* | :heavy_minus_sign: | The continent where the viewer is located. | North America | -| `country` | *Optional<String>* | :heavy_minus_sign: | The country where the viewer is located. | United States | -| `subdivision` | *Optional<String>* | :heavy_minus_sign: | The subdivision (e.g., state or province) where the viewer is<br/>located.<br/> | California | -| `timezone` | *Optional<String>* | :heavy_minus_sign: | The timezone where the viewer is located. | America/Los_Angeles | -| `geohash` | *Optional<String>* | :heavy_minus_sign: | Geographic encoding of the viewers location. Accurate to 3 digits. | 123 | +| `playbackId` | *Optional\<String>* | :heavy_minus_sign: | The playback ID associated with the metric. | 1bde4o2i6xycudoy | +| `creatorId` | *Optional\<String>* | :heavy_minus_sign: | The ID of the creator associated with the metric. | john@doe.com | +| `viewerId` | *Optional\<String>* | :heavy_minus_sign: | The ID of the viewer associated with the metric. | 1bde4o2i6xycudoy | +| `dStorageUrl` | *Optional\<String>* | :heavy_minus_sign: | The URL of the distributed storage used for the asset | ipfs://QmZ4 | +| `timestamp` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) when the metric was recorded. If the<br/>query contains a time step, this timestamp will point to the<br/>beginning of the time step period.<br/> | 1587667174725 | +| `device` | *Optional\<String>* | :heavy_minus_sign: | The device used by the viewer. | iPhone | +| `deviceType` | *Optional\<String>* | :heavy_minus_sign: | The type of the device used by the viewer. | mobile | +| `cpu` | *Optional\<String>* | :heavy_minus_sign: | The CPU used by the viewer's device. | ARM | +| `os` | *Optional\<String>* | :heavy_minus_sign: | The operating system used by the viewer. | iOS | +| `browser` | *Optional\<String>* | :heavy_minus_sign: | The browser used by the viewer. | Safari | +| `browserEngine` | *Optional\<String>* | :heavy_minus_sign: | The browser engine used by the viewer's browser. | WebKit | +| `continent` | *Optional\<String>* | :heavy_minus_sign: | The continent where the viewer is located. | North America | +| `country` | *Optional\<String>* | :heavy_minus_sign: | The country where the viewer is located. | United States | +| `subdivision` | *Optional\<String>* | :heavy_minus_sign: | The subdivision (e.g., state or province) where the viewer is<br/>located.<br/> | California | +| `timezone` | *Optional\<String>* | :heavy_minus_sign: | The timezone where the viewer is located. | America/Los_Angeles | +| `geohash` | *Optional\<String>* | :heavy_minus_sign: | Geographic encoding of the viewers location. Accurate to 3 digits. | 123 | | `viewCount` | *long* | :heavy_check_mark: | The number of views for the stream/asset. | 100 | | `playtimeMins` | *double* | :heavy_check_mark: | The total playtime in minutes for the stream/asset. | 10 | -| `ttffMs` | *Optional<Double>* | :heavy_minus_sign: | The time-to-first-frame (TTFF) in milliseconds. | 100 | -| `rebufferRatio` | *Optional<Double>* | :heavy_minus_sign: | The rebuffering ratio for the asset. | 0.1 | -| `errorRate` | *Optional<Double>* | :heavy_minus_sign: | The error rate for the stream/asset. | 0.1 | -| `exitsBeforeStart` | *Optional<Double>* | :heavy_minus_sign: | The percentage of sessions that existed before the asset started<br/>playing.<br/> | 0.5 | \ No newline at end of file +| `ttffMs` | *Optional\<Double>* | :heavy_minus_sign: | The time-to-first-frame (TTFF) in milliseconds. | 100 | +| `rebufferRatio` | *Optional\<Double>* | :heavy_minus_sign: | The rebuffering ratio for the asset. | 0.1 | +| `errorRate` | *Optional\<Double>* | :heavy_minus_sign: | The error rate for the stream/asset. | 0.1 | +| `exitsBeforeStart` | *Optional\<Double>* | :heavy_minus_sign: | The percentage of sessions that existed before the asset started<br/>playing.<br/> | 0.5 | \ No newline at end of file diff --git a/docs/models/components/Webhook.md b/docs/models/components/Webhook.md index f51664eb..830bf568 100644 --- a/docs/models/components/Webhook.md +++ b/docs/models/components/Webhook.md @@ -5,13 +5,13 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional<String>* | :heavy_minus_sign: | N/A | de7818e7-610a-4057-8f6f-b785dc1e6f88 | +| `id` | *Optional\<String>* | :heavy_minus_sign: | N/A | de7818e7-610a-4057-8f6f-b785dc1e6f88 | | `name` | *String* | :heavy_check_mark: | N/A | test_webhook | -| ~~`kind`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | webhook | -| ~~`userId`~~ | *Optional<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | -| `projectId` | *Optional<String>* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb6-d1f0985eb0a9 | -| `createdAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which stream object was created | 1587667174725 | -| `events` | List<[Events](../../models/components/Events.md)> | :heavy_minus_sign: | N/A | [<br/>"stream.started",<br/>"stream.idle"<br/>] | +| ~~`kind`~~ | *Optional\<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | webhook | +| ~~`userId`~~ | *Optional\<String>* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | +| `projectId` | *Optional\<String>* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb6-d1f0985eb0a9 | +| `createdAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which stream object was created | 1587667174725 | +| `events` | List\<[Events](../../models/components/Events.md)> | :heavy_minus_sign: | N/A | [<br/>"stream.started",<br/>"stream.idle"<br/>] | | `url` | *String* | :heavy_check_mark: | N/A | https://my-service.com/webhook | -| `streamId` | *Optional<String>* | :heavy_minus_sign: | streamId of the stream on which the webhook is applied | de7818e7-610a-4057-8f6f-b785dc1e6f88 | -| `status` | [Optional<Status>](../../models/components/Status.md) | :heavy_minus_sign: | status of webhook | | \ No newline at end of file +| `streamId` | *Optional\<String>* | :heavy_minus_sign: | streamId of the stream on which the webhook is applied | de7818e7-610a-4057-8f6f-b785dc1e6f88 | +| `status` | [Optional\<Status>](../../models/components/Status.md) | :heavy_minus_sign: | status of webhook | | \ No newline at end of file diff --git a/docs/models/components/WebhookInput.md b/docs/models/components/WebhookInput.md new file mode 100644 index 00000000..3c953457 --- /dev/null +++ b/docs/models/components/WebhookInput.md @@ -0,0 +1,13 @@ +# WebhookInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `name` | *String* | :heavy_check_mark: | N/A | test_webhook | +| `projectId` | *Optional\<String>* | :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 | [<br/>"stream.started",<br/>"stream.idle"<br/>] | +| `url` | *String* | :heavy_check_mark: | N/A | https://my-service.com/webhook | +| `sharedSecret` | *Optional\<String>* | :heavy_minus_sign: | shared secret used to sign the webhook payload | my-secret | +| `streamId` | *Optional\<String>* | :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/models/components/WebhookLog.md b/docs/models/components/WebhookLog.md index 354a8891..922a6b99 100644 --- a/docs/models/components/WebhookLog.md +++ b/docs/models/components/WebhookLog.md @@ -7,9 +7,9 @@ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | | `id` | *String* | :heavy_check_mark: | N/A | de7818e7-610a-4057-8f6f-b785dc1e6f88 | | `webhookId` | *String* | :heavy_check_mark: | ID of the webhook this request was made for | de7818e7-610a-4057-8f6f-b785dc1e6f88 | -| `event` | *Optional<String>* | :heavy_minus_sign: | The event type that triggered the webhook request | stream.started | -| `createdAt` | *Optional<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which webhook request object was<br/>created<br/> | 1587667174725 | -| `duration` | *Optional<Double>* | :heavy_minus_sign: | The time taken (in seconds) to make the webhook request | 0.5 | -| `success` | *Optional<Boolean>* | :heavy_minus_sign: | Whether the webhook request was successful | true | -| `request` | [Optional<Request>](../../models/components/Request.md) | :heavy_minus_sign: | N/A | | -| `response` | [Optional<Response>](../../models/components/Response.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `event` | *Optional\<String>* | :heavy_minus_sign: | The event type that triggered the webhook request | stream.started | +| `createdAt` | *Optional\<Double>* | :heavy_minus_sign: | Timestamp (in milliseconds) at which webhook request object was<br/>created<br/> | 1587667174725 | +| `duration` | *Optional\<Double>* | :heavy_minus_sign: | The time taken (in seconds) to make the webhook request | 0.5 | +| `success` | *Optional\<Boolean>* | :heavy_minus_sign: | Whether the webhook request was successful | true | +| `request` | [Optional\<Request>](../../models/components/Request.md) | :heavy_minus_sign: | N/A | | +| `response` | [Optional\<Response>](../../models/components/Response.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/errors/Error.md b/docs/models/errors/Error.md index 25b31cc3..a2ba4c3d 100644 --- a/docs/models/errors/Error.md +++ b/docs/models/errors/Error.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `errors` | List<*String*> | :heavy_minus_sign: | N/A | \ No newline at end of file +| `errors` | List\<*String*> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/AddMultistreamTargetResponse.md b/docs/models/operations/AddMultistreamTargetResponse.md index 3da82469..6271b4e6 100644 --- a/docs/models/operations/AddMultistreamTargetResponse.md +++ b/docs/models/operations/AddMultistreamTargetResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/CreateClipResponse.md b/docs/models/operations/CreateClipResponse.md index c6406603..2cffcd46 100644 --- a/docs/models/operations/CreateClipResponse.md +++ b/docs/models/operations/CreateClipResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | [Optional<CreateClipData>](../../models/operations/CreateClipData.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | [Optional\<CreateClipData>](../../models/operations/CreateClipData.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/CreateClipTask.md b/docs/models/operations/CreateClipTask.md index dc493a05..5d710cdb 100644 --- a/docs/models/operations/CreateClipTask.md +++ b/docs/models/operations/CreateClipTask.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `id` | *Optional<String>* | :heavy_minus_sign: | N/A | 34d7618e-fd42-4798-acf5-19504616a11e | \ No newline at end of file +| `id` | *Optional\<String>* | :heavy_minus_sign: | N/A | 34d7618e-fd42-4798-acf5-19504616a11e | \ No newline at end of file diff --git a/docs/models/operations/CreateMultistreamTargetResponse.md b/docs/models/operations/CreateMultistreamTargetResponse.md index 28ec03ba..15b9fff5 100644 --- a/docs/models/operations/CreateMultistreamTargetResponse.md +++ b/docs/models/operations/CreateMultistreamTargetResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `multistreamTarget` | [Optional<MultistreamTarget>](../../models/components/MultistreamTarget.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `multistreamTarget` | [Optional\<MultistreamTarget>](../../models/components/MultistreamTarget.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/CreateRoomResponse.md b/docs/models/operations/CreateRoomResponse.md index df87089d..6c5aa021 100644 --- a/docs/models/operations/CreateRoomResponse.md +++ b/docs/models/operations/CreateRoomResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `createRoomResponse` | [Optional<CreateRoomResponse>](../../models/components/CreateRoomResponse.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `createRoomResponse` | [Optional\<CreateRoomResponse>](../../models/components/CreateRoomResponse.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/CreateRoomUserResponse.md b/docs/models/operations/CreateRoomUserResponse.md index 1d41549a..25f535ab 100644 --- a/docs/models/operations/CreateRoomUserResponse.md +++ b/docs/models/operations/CreateRoomUserResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `roomUserResponse` | [Optional<RoomUserResponse>](../../models/components/RoomUserResponse.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `roomUserResponse` | [Optional\<RoomUserResponse>](../../models/components/RoomUserResponse.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/CreateSigningKeyResponse.md b/docs/models/operations/CreateSigningKeyResponse.md index 327fde06..50511d2d 100644 --- a/docs/models/operations/CreateSigningKeyResponse.md +++ b/docs/models/operations/CreateSigningKeyResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `signingKey` | [Optional<SigningKey>](../../models/components/SigningKey.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `signingKey` | [Optional\<SigningKey>](../../models/components/SigningKey.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/CreateStreamResponse.md b/docs/models/operations/CreateStreamResponse.md index 2d8e055d..afff8fd8 100644 --- a/docs/models/operations/CreateStreamResponse.md +++ b/docs/models/operations/CreateStreamResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `stream` | [Optional<Stream>](../../models/components/Stream.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `stream` | [Optional\<Stream>](../../models/components/Stream.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/CreateWebhookResponse.md b/docs/models/operations/CreateWebhookResponse.md index 83db0cd6..6bbfefe9 100644 --- a/docs/models/operations/CreateWebhookResponse.md +++ b/docs/models/operations/CreateWebhookResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `webhook` | [Optional<Webhook>](../../models/components/Webhook.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `webhook` | [Optional\<Webhook>](../../models/components/Webhook.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/DeleteAssetResponse.md b/docs/models/operations/DeleteAssetResponse.md index 9faa3878..dd306535 100644 --- a/docs/models/operations/DeleteAssetResponse.md +++ b/docs/models/operations/DeleteAssetResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/DeleteMultistreamTargetResponse.md b/docs/models/operations/DeleteMultistreamTargetResponse.md index 97a72d44..34ac1e81 100644 --- a/docs/models/operations/DeleteMultistreamTargetResponse.md +++ b/docs/models/operations/DeleteMultistreamTargetResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/DeleteRoomResponse.md b/docs/models/operations/DeleteRoomResponse.md index f86b8a70..2df4cb4e 100644 --- a/docs/models/operations/DeleteRoomResponse.md +++ b/docs/models/operations/DeleteRoomResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/DeleteRoomUserResponse.md b/docs/models/operations/DeleteRoomUserResponse.md index 390d080e..f3c5c311 100644 --- a/docs/models/operations/DeleteRoomUserResponse.md +++ b/docs/models/operations/DeleteRoomUserResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/DeleteSigningKeyResponse.md b/docs/models/operations/DeleteSigningKeyResponse.md index 9253c43b..d6c9d6aa 100644 --- a/docs/models/operations/DeleteSigningKeyResponse.md +++ b/docs/models/operations/DeleteSigningKeyResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/DeleteStreamResponse.md b/docs/models/operations/DeleteStreamResponse.md index 6e84149f..132fd902 100644 --- a/docs/models/operations/DeleteStreamResponse.md +++ b/docs/models/operations/DeleteStreamResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/DeleteWebhookResponse.md b/docs/models/operations/DeleteWebhookResponse.md index 43325530..00c9caa0 100644 --- a/docs/models/operations/DeleteWebhookResponse.md +++ b/docs/models/operations/DeleteWebhookResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `webhook` | [Optional<Webhook>](../../models/components/Webhook.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `webhook` | [Optional\<Webhook>](../../models/components/Webhook.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetAssetResponse.md b/docs/models/operations/GetAssetResponse.md index bab0167d..b2715712 100644 --- a/docs/models/operations/GetAssetResponse.md +++ b/docs/models/operations/GetAssetResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `asset` | [Optional<Asset>](../../models/components/Asset.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `asset` | [Optional\<Asset>](../../models/components/Asset.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetAssetsResponse.md b/docs/models/operations/GetAssetsResponse.md index a3e6551f..385aff06 100644 --- a/docs/models/operations/GetAssetsResponse.md +++ b/docs/models/operations/GetAssetsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[Asset](../../models/components/Asset.md)> | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[Asset](../../models/components/Asset.md)> | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetClipsResponse.md b/docs/models/operations/GetClipsResponse.md index 56d4ce27..4131afa1 100644 --- a/docs/models/operations/GetClipsResponse.md +++ b/docs/models/operations/GetClipsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[Asset](../../models/components/Asset.md)> | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[Asset](../../models/components/Asset.md)> | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetCreatorViewershipMetricsRequest.md b/docs/models/operations/GetCreatorViewershipMetricsRequest.md index d1489629..6ce86463 100644 --- a/docs/models/operations/GetCreatorViewershipMetricsRequest.md +++ b/docs/models/operations/GetCreatorViewershipMetricsRequest.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| `from` | [Optional<QueryParamFrom>](../../models/operations/QueryParamFrom.md) | :heavy_minus_sign: | Start timestamp for the query range (inclusive) | -| `to` | [Optional<QueryParamTo>](../../models/operations/QueryParamTo.md) | :heavy_minus_sign: | End timestamp for the query range (exclusive) | -| `timeStep` | [Optional<QueryParamTimeStep>](../../models/operations/QueryParamTimeStep.md) | :heavy_minus_sign: | The time step to aggregate viewership metrics by | -| `assetId` | *Optional<String>* | :heavy_minus_sign: | The asset ID to filter metrics for | -| `streamId` | *Optional<String>* | :heavy_minus_sign: | The stream ID to filter metrics for | -| `creatorId` | *Optional<String>* | :heavy_minus_sign: | The creator ID to filter the query results | -| `breakdownBy` | List<[GetCreatorViewershipMetricsQueryParamBreakdownBy](../../models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.md)> | :heavy_minus_sign: | The list of fields to break down the query results. Specify this<br/>query-string multiple times to break down by multiple fields.<br/> | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `from` | [Optional\<QueryParamFrom>](../../models/operations/QueryParamFrom.md) | :heavy_minus_sign: | Start timestamp for the query range (inclusive) | +| `to` | [Optional\<QueryParamTo>](../../models/operations/QueryParamTo.md) | :heavy_minus_sign: | End timestamp for the query range (exclusive) | +| `timeStep` | [Optional\<QueryParamTimeStep>](../../models/operations/QueryParamTimeStep.md) | :heavy_minus_sign: | The time step to aggregate viewership metrics by | +| `assetId` | *Optional\<String>* | :heavy_minus_sign: | The asset ID to filter metrics for | +| `streamId` | *Optional\<String>* | :heavy_minus_sign: | The stream ID to filter metrics for | +| `creatorId` | *Optional\<String>* | :heavy_minus_sign: | The creator ID to filter the query results | +| `breakdownBy` | List\<[GetCreatorViewershipMetricsQueryParamBreakdownBy](../../models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.md)> | :heavy_minus_sign: | The list of fields to break down the query results. Specify this<br/>query-string multiple times to break down by multiple fields.<br/> | \ No newline at end of file diff --git a/docs/models/operations/GetCreatorViewershipMetricsResponse.md b/docs/models/operations/GetCreatorViewershipMetricsResponse.md index df05bb2d..3dbbde7e 100644 --- a/docs/models/operations/GetCreatorViewershipMetricsResponse.md +++ b/docs/models/operations/GetCreatorViewershipMetricsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[ViewershipMetric](../../models/components/ViewershipMetric.md)> | :heavy_minus_sign: | A list of Metric objects | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[ViewershipMetric](../../models/components/ViewershipMetric.md)> | :heavy_minus_sign: | A list of Metric objects | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetMultistreamTargetResponse.md b/docs/models/operations/GetMultistreamTargetResponse.md index 51e416c0..23dd0f21 100644 --- a/docs/models/operations/GetMultistreamTargetResponse.md +++ b/docs/models/operations/GetMultistreamTargetResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `multistreamTarget` | [Optional<MultistreamTarget>](../../models/components/MultistreamTarget.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `multistreamTarget` | [Optional\<MultistreamTarget>](../../models/components/MultistreamTarget.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetMultistreamTargetsResponse.md b/docs/models/operations/GetMultistreamTargetsResponse.md index ff5c4b82..6cb3fc33 100644 --- a/docs/models/operations/GetMultistreamTargetsResponse.md +++ b/docs/models/operations/GetMultistreamTargetsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[MultistreamTarget](../../models/components/MultistreamTarget.md)> | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[MultistreamTarget](../../models/components/MultistreamTarget.md)> | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetPlaybackInfoResponse.md b/docs/models/operations/GetPlaybackInfoResponse.md index 9b55fe80..27b7b90a 100644 --- a/docs/models/operations/GetPlaybackInfoResponse.md +++ b/docs/models/operations/GetPlaybackInfoResponse.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `playbackInfo` | [Optional<PlaybackInfo>](../../models/components/PlaybackInfo.md) | :heavy_minus_sign: | Successful response | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `playbackInfo` | [Optional\<PlaybackInfo>](../../models/components/PlaybackInfo.md) | :heavy_minus_sign: | Successful response | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Playback not found | \ No newline at end of file diff --git a/docs/models/operations/GetPublicViewershipMetricsData.md b/docs/models/operations/GetPublicViewershipMetricsData.md index f231c25a..9b9522c8 100644 --- a/docs/models/operations/GetPublicViewershipMetricsData.md +++ b/docs/models/operations/GetPublicViewershipMetricsData.md @@ -9,7 +9,7 @@ asset. Either playbackId or dStorageUrl will be set. | Field | Type | Required | Description | Example | | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `playbackId` | *Optional<String>* | :heavy_minus_sign: | The playback ID associated with the metric. | 1bde4o2i6xycudoy | -| `dStorageUrl` | *Optional<String>* | :heavy_minus_sign: | The URL of the distributed storage used for the asset | ipfs://QmZ4 | -| `viewCount` | *Optional<Long>* | :heavy_minus_sign: | The number of views for the stream/asset. | 100 | -| `playtimeMins` | *Optional<Double>* | :heavy_minus_sign: | The total playtime in minutes for the stream/asset. | 10 | \ No newline at end of file +| `playbackId` | *Optional\<String>* | :heavy_minus_sign: | The playback ID associated with the metric. | 1bde4o2i6xycudoy | +| `dStorageUrl` | *Optional\<String>* | :heavy_minus_sign: | The URL of the distributed storage used for the asset | ipfs://QmZ4 | +| `viewCount` | *Optional\<Long>* | :heavy_minus_sign: | The number of views for the stream/asset. | 100 | +| `playtimeMins` | *Optional\<Double>* | :heavy_minus_sign: | The total playtime in minutes for the stream/asset. | 10 | \ No newline at end of file diff --git a/docs/models/operations/GetPublicViewershipMetricsResponse.md b/docs/models/operations/GetPublicViewershipMetricsResponse.md index 3872ebb3..a86285f9 100644 --- a/docs/models/operations/GetPublicViewershipMetricsResponse.md +++ b/docs/models/operations/GetPublicViewershipMetricsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | [Optional<GetPublicViewershipMetricsData>](../../models/operations/GetPublicViewershipMetricsData.md) | :heavy_minus_sign: | A single Metric object with the viewCount and playtimeMins metrics. | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | [Optional\<GetPublicViewershipMetricsData>](../../models/operations/GetPublicViewershipMetricsData.md) | :heavy_minus_sign: | A single Metric object with the viewCount and playtimeMins metrics. | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetRealtimeViewershipNowRequest.md b/docs/models/operations/GetRealtimeViewershipNowRequest.md index 4d9ba217..95046882 100644 --- a/docs/models/operations/GetRealtimeViewershipNowRequest.md +++ b/docs/models/operations/GetRealtimeViewershipNowRequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `playbackId` | *Optional<String>* | :heavy_minus_sign: | The playback ID to filter the query results. This can be a canonical<br/>playback ID from Livepeer assets or streams, or dStorage identifiers<br/>for assets<br/> | -| `creatorId` | *Optional<String>* | :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<br/>query-string multiple times to break down by multiple fields.<br/> | \ No newline at end of file +| `playbackId` | *Optional\<String>* | :heavy_minus_sign: | The playback ID to filter the query results. This can be a canonical<br/>playback ID from Livepeer assets or streams, or dStorage identifiers<br/>for assets<br/> | +| `creatorId` | *Optional\<String>* | :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<br/>query-string multiple times to break down by multiple fields.<br/> | \ No newline at end of file diff --git a/docs/models/operations/GetRealtimeViewershipNowResponse.md b/docs/models/operations/GetRealtimeViewershipNowResponse.md index 8e89968c..8d2e5951 100644 --- a/docs/models/operations/GetRealtimeViewershipNowResponse.md +++ b/docs/models/operations/GetRealtimeViewershipNowResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[RealtimeViewershipMetric](../../models/components/RealtimeViewershipMetric.md)> | :heavy_minus_sign: | A list of Metric objects | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[RealtimeViewershipMetric](../../models/components/RealtimeViewershipMetric.md)> | :heavy_minus_sign: | A list of Metric objects | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetRecordedSessionsRequest.md b/docs/models/operations/GetRecordedSessionsRequest.md index e7b927ed..a8efe115 100644 --- a/docs/models/operations/GetRecordedSessionsRequest.md +++ b/docs/models/operations/GetRecordedSessionsRequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | | `parentId` | *String* | :heavy_check_mark: | ID of the parent stream | | -| `record` | [Optional<Record>](../../models/operations/Record.md) | :heavy_minus_sign: | Flag indicating if the response should only include recorded<br/>sessions<br/> | true | \ No newline at end of file +| `record` | [Optional\<Record>](../../models/operations/Record.md) | :heavy_minus_sign: | Flag indicating if the response should only include recorded<br/>sessions<br/> | true | \ No newline at end of file diff --git a/docs/models/operations/GetRecordedSessionsResponse.md b/docs/models/operations/GetRecordedSessionsResponse.md index cce07520..961d8a35 100644 --- a/docs/models/operations/GetRecordedSessionsResponse.md +++ b/docs/models/operations/GetRecordedSessionsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[Session](../../models/components/Session.md)> | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[Session](../../models/components/Session.md)> | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetRoomResponse.md b/docs/models/operations/GetRoomResponse.md index c0d88115..ac84f9ba 100644 --- a/docs/models/operations/GetRoomResponse.md +++ b/docs/models/operations/GetRoomResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `room` | [Optional<Room>](../../models/components/Room.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `room` | [Optional\<Room>](../../models/components/Room.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetRoomUserResponse.md b/docs/models/operations/GetRoomUserResponse.md index 86e160e6..cb7096f9 100644 --- a/docs/models/operations/GetRoomUserResponse.md +++ b/docs/models/operations/GetRoomUserResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `getRoomUserResponse` | [Optional<GetRoomUserResponse>](../../models/components/GetRoomUserResponse.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `getRoomUserResponse` | [Optional\<GetRoomUserResponse>](../../models/components/GetRoomUserResponse.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetSessionClipsResponse.md b/docs/models/operations/GetSessionClipsResponse.md index 954e521c..970294b1 100644 --- a/docs/models/operations/GetSessionClipsResponse.md +++ b/docs/models/operations/GetSessionClipsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[Asset](../../models/components/Asset.md)> | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[Asset](../../models/components/Asset.md)> | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetSessionResponse.md b/docs/models/operations/GetSessionResponse.md index 2a1833ef..f5aa092a 100644 --- a/docs/models/operations/GetSessionResponse.md +++ b/docs/models/operations/GetSessionResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `session` | [Optional<Session>](../../models/components/Session.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `session` | [Optional\<Session>](../../models/components/Session.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetSessionsResponse.md b/docs/models/operations/GetSessionsResponse.md index 2bce61e7..6250bf18 100644 --- a/docs/models/operations/GetSessionsResponse.md +++ b/docs/models/operations/GetSessionsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[Session](../../models/components/Session.md)> | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[Session](../../models/components/Session.md)> | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetSigningKeyResponse.md b/docs/models/operations/GetSigningKeyResponse.md index efc8ecca..357613f0 100644 --- a/docs/models/operations/GetSigningKeyResponse.md +++ b/docs/models/operations/GetSigningKeyResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `signingKey` | [Optional<SigningKey>](../../models/components/SigningKey.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `signingKey` | [Optional\<SigningKey>](../../models/components/SigningKey.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetSigningKeysResponse.md b/docs/models/operations/GetSigningKeysResponse.md index e65fd8eb..c435326c 100644 --- a/docs/models/operations/GetSigningKeysResponse.md +++ b/docs/models/operations/GetSigningKeysResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[SigningKey](../../models/components/SigningKey.md)> | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[SigningKey](../../models/components/SigningKey.md)> | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetStreamResponse.md b/docs/models/operations/GetStreamResponse.md index ae521bc5..4851cf5f 100644 --- a/docs/models/operations/GetStreamResponse.md +++ b/docs/models/operations/GetStreamResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `stream` | [Optional<Stream>](../../models/components/Stream.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `stream` | [Optional\<Stream>](../../models/components/Stream.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetStreamsRequest.md b/docs/models/operations/GetStreamsRequest.md index bbd99d7d..1718ff6a 100644 --- a/docs/models/operations/GetStreamsRequest.md +++ b/docs/models/operations/GetStreamsRequest.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `streamsonly` | *Optional<String>* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `streamsonly` | *Optional\<String>* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetStreamsResponse.md b/docs/models/operations/GetStreamsResponse.md index 1ea00102..277b1e85 100644 --- a/docs/models/operations/GetStreamsResponse.md +++ b/docs/models/operations/GetStreamsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[Stream](../../models/components/Stream.md)> | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[Stream](../../models/components/Stream.md)> | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetTaskResponse.md b/docs/models/operations/GetTaskResponse.md index 3a27830b..3b0a095e 100644 --- a/docs/models/operations/GetTaskResponse.md +++ b/docs/models/operations/GetTaskResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `task` | [Optional<Task>](../../models/components/Task.md) | :heavy_minus_sign: | Success | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `task` | [Optional\<Task>](../../models/components/Task.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/GetTasksResponse.md b/docs/models/operations/GetTasksResponse.md index 72f6c33d..64ea7ff0 100644 --- a/docs/models/operations/GetTasksResponse.md +++ b/docs/models/operations/GetTasksResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[Task](../../models/components/Task.md)> | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[Task](../../models/components/Task.md)> | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetUsageMetricsRequest.md b/docs/models/operations/GetUsageMetricsRequest.md index 5ca81b34..47a999bd 100644 --- a/docs/models/operations/GetUsageMetricsRequest.md +++ b/docs/models/operations/GetUsageMetricsRequest.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `from` | *Optional<Long>* | :heavy_minus_sign: | Start millis timestamp for the query range (inclusive)<br/> | -| `to` | *Optional<Long>* | :heavy_minus_sign: | End millis timestamp for the query range (exclusive)<br/> | -| `timeStep` | [Optional<GetUsageMetricsQueryParamTimeStep>](../../models/operations/GetUsageMetricsQueryParamTimeStep.md) | :heavy_minus_sign: | The time step to aggregate viewership metrics by<br/> | -| `creatorId` | *Optional<String>* | :heavy_minus_sign: | The creator ID to filter the query results<br/> | -| `breakdownBy` | List<[GetUsageMetricsQueryParamBreakdownBy](../../models/operations/GetUsageMetricsQueryParamBreakdownBy.md)> | :heavy_minus_sign: | The list of fields to break down the query results. Currently the<br/>only supported breakdown is by `creatorId`.<br/> | \ No newline at end of file +| `from` | *Optional\<Long>* | :heavy_minus_sign: | Start millis timestamp for the query range (inclusive)<br/> | +| `to` | *Optional\<Long>* | :heavy_minus_sign: | End millis timestamp for the query range (exclusive)<br/> | +| `timeStep` | [Optional\<GetUsageMetricsQueryParamTimeStep>](../../models/operations/GetUsageMetricsQueryParamTimeStep.md) | :heavy_minus_sign: | The time step to aggregate viewership metrics by<br/> | +| `creatorId` | *Optional\<String>* | :heavy_minus_sign: | The creator ID to filter the query results<br/> | +| `breakdownBy` | List\<[GetUsageMetricsQueryParamBreakdownBy](../../models/operations/GetUsageMetricsQueryParamBreakdownBy.md)> | :heavy_minus_sign: | The list of fields to break down the query results. Currently the<br/>only supported breakdown is by `creatorId`.<br/> | \ No newline at end of file diff --git a/docs/models/operations/GetUsageMetricsResponse.md b/docs/models/operations/GetUsageMetricsResponse.md index b31e631e..137c1611 100644 --- a/docs/models/operations/GetUsageMetricsResponse.md +++ b/docs/models/operations/GetUsageMetricsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `usageMetric` | [Optional<UsageMetric>](../../models/components/UsageMetric.md) | :heavy_minus_sign: | A Usage Metric object | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `usageMetric` | [Optional\<UsageMetric>](../../models/components/UsageMetric.md) | :heavy_minus_sign: | A Usage Metric object | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetViewershipMetricsRequest.md b/docs/models/operations/GetViewershipMetricsRequest.md index efda874a..d57b4bbd 100644 --- a/docs/models/operations/GetViewershipMetricsRequest.md +++ b/docs/models/operations/GetViewershipMetricsRequest.md @@ -5,11 +5,11 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `playbackId` | *Optional<String>* | :heavy_minus_sign: | The playback ID to filter the query results. This can be a canonical<br/>playback ID from Livepeer assets or streams, or dStorage identifiers<br/>for assets<br/> | -| `from` | [Optional<From>](../../models/operations/From.md) | :heavy_minus_sign: | Start timestamp for the query range (inclusive) | -| `to` | [Optional<To>](../../models/operations/To.md) | :heavy_minus_sign: | End timestamp for the query range (exclusive) | -| `timeStep` | [Optional<TimeStep>](../../models/operations/TimeStep.md) | :heavy_minus_sign: | The time step to aggregate viewership metrics by | -| `assetId` | *Optional<String>* | :heavy_minus_sign: | The asset ID to filter metrics for | -| `streamId` | *Optional<String>* | :heavy_minus_sign: | The stream ID to filter metrics for | -| `creatorId` | *Optional<String>* | :heavy_minus_sign: | The creator ID to filter the query results | -| `breakdownBy` | List<[QueryParamBreakdownBy](../../models/operations/QueryParamBreakdownBy.md)> | :heavy_minus_sign: | The list of fields to break down the query results. Specify this<br/>query-string multiple times to break down by multiple fields.<br/> | \ No newline at end of file +| `playbackId` | *Optional\<String>* | :heavy_minus_sign: | The playback ID to filter the query results. This can be a canonical<br/>playback ID from Livepeer assets or streams, or dStorage identifiers<br/>for assets<br/> | +| `from` | [Optional\<From>](../../models/operations/From.md) | :heavy_minus_sign: | Start timestamp for the query range (inclusive) | +| `to` | [Optional\<To>](../../models/operations/To.md) | :heavy_minus_sign: | End timestamp for the query range (exclusive) | +| `timeStep` | [Optional\<TimeStep>](../../models/operations/TimeStep.md) | :heavy_minus_sign: | The time step to aggregate viewership metrics by | +| `assetId` | *Optional\<String>* | :heavy_minus_sign: | The asset ID to filter metrics for | +| `streamId` | *Optional\<String>* | :heavy_minus_sign: | The stream ID to filter metrics for | +| `creatorId` | *Optional\<String>* | :heavy_minus_sign: | The creator ID to filter the query results | +| `breakdownBy` | List\<[QueryParamBreakdownBy](../../models/operations/QueryParamBreakdownBy.md)> | :heavy_minus_sign: | The list of fields to break down the query results. Specify this<br/>query-string multiple times to break down by multiple fields.<br/> | \ No newline at end of file diff --git a/docs/models/operations/GetViewershipMetricsResponse.md b/docs/models/operations/GetViewershipMetricsResponse.md index 762ae90a..5dd31358 100644 --- a/docs/models/operations/GetViewershipMetricsResponse.md +++ b/docs/models/operations/GetViewershipMetricsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[ViewershipMetric](../../models/components/ViewershipMetric.md)> | :heavy_minus_sign: | A list of Metric objects | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[ViewershipMetric](../../models/components/ViewershipMetric.md)> | :heavy_minus_sign: | A list of Metric objects | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetWebhookLogResponse.md b/docs/models/operations/GetWebhookLogResponse.md index fd44c3ef..856145c4 100644 --- a/docs/models/operations/GetWebhookLogResponse.md +++ b/docs/models/operations/GetWebhookLogResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `webhookLog` | [Optional<WebhookLog>](../../models/components/WebhookLog.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `webhookLog` | [Optional\<WebhookLog>](../../models/components/WebhookLog.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetWebhookLogsResponse.md b/docs/models/operations/GetWebhookLogsResponse.md index e958c3f2..8f6af4aa 100644 --- a/docs/models/operations/GetWebhookLogsResponse.md +++ b/docs/models/operations/GetWebhookLogsResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[WebhookLog](../../models/components/WebhookLog.md)> | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[WebhookLog](../../models/components/WebhookLog.md)> | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetWebhookResponse.md b/docs/models/operations/GetWebhookResponse.md index 2f893e0f..723ab1ee 100644 --- a/docs/models/operations/GetWebhookResponse.md +++ b/docs/models/operations/GetWebhookResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `webhook` | [Optional<Webhook>](../../models/components/Webhook.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `webhook` | [Optional\<Webhook>](../../models/components/Webhook.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/GetWebhooksResponse.md b/docs/models/operations/GetWebhooksResponse.md index 2968f74c..c2c9d769 100644 --- a/docs/models/operations/GetWebhooksResponse.md +++ b/docs/models/operations/GetWebhooksResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | List<[Webhook](../../models/components/Webhook.md)> | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | List\<[Webhook](../../models/components/Webhook.md)> | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/RemoveMultistreamTargetResponse.md b/docs/models/operations/RemoveMultistreamTargetResponse.md index d1420839..6753ac29 100644 --- a/docs/models/operations/RemoveMultistreamTargetResponse.md +++ b/docs/models/operations/RemoveMultistreamTargetResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/RequestUploadResponse.md b/docs/models/operations/RequestUploadResponse.md index 9ccb4332..64c4e799 100644 --- a/docs/models/operations/RequestUploadResponse.md +++ b/docs/models/operations/RequestUploadResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `data` | [Optional<RequestUploadData>](../../models/operations/RequestUploadData.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `data` | [Optional\<RequestUploadData>](../../models/operations/RequestUploadData.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/ResendWebhookResponse.md b/docs/models/operations/ResendWebhookResponse.md index 9c5d1b65..44087dad 100644 --- a/docs/models/operations/ResendWebhookResponse.md +++ b/docs/models/operations/ResendWebhookResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `webhookLog` | [Optional<WebhookLog>](../../models/components/WebhookLog.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `webhookLog` | [Optional\<WebhookLog>](../../models/components/WebhookLog.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/StartPullStreamResponse.md b/docs/models/operations/StartPullStreamResponse.md index 23f62ea7..4ad8aea7 100644 --- a/docs/models/operations/StartPullStreamResponse.md +++ b/docs/models/operations/StartPullStreamResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/StartRoomEgressResponse.md b/docs/models/operations/StartRoomEgressResponse.md index 102814e6..45cb8dd7 100644 --- a/docs/models/operations/StartRoomEgressResponse.md +++ b/docs/models/operations/StartRoomEgressResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/StopRoomEgressResponse.md b/docs/models/operations/StopRoomEgressResponse.md index efe3aab1..62502594 100644 --- a/docs/models/operations/StopRoomEgressResponse.md +++ b/docs/models/operations/StopRoomEgressResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/TerminateStreamResponse.md b/docs/models/operations/TerminateStreamResponse.md index 42550cc0..2da59c14 100644 --- a/docs/models/operations/TerminateStreamResponse.md +++ b/docs/models/operations/TerminateStreamResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/TranscodeVideoResponse.md b/docs/models/operations/TranscodeVideoResponse.md index 24ccb137..71cdfcf0 100644 --- a/docs/models/operations/TranscodeVideoResponse.md +++ b/docs/models/operations/TranscodeVideoResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `task` | [Optional<Task>](../../models/components/Task.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `task` | [Optional\<Task>](../../models/components/Task.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/UpdateAssetResponse.md b/docs/models/operations/UpdateAssetResponse.md index dcbc33f3..7a21b624 100644 --- a/docs/models/operations/UpdateAssetResponse.md +++ b/docs/models/operations/UpdateAssetResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `asset` | [Optional<Asset>](../../models/components/Asset.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `asset` | [Optional\<Asset>](../../models/components/Asset.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/UpdateMultistreamTargetRequest.md b/docs/models/operations/UpdateMultistreamTargetRequest.md index 4d985df0..4c0ee5ff 100644 --- a/docs/models/operations/UpdateMultistreamTargetRequest.md +++ b/docs/models/operations/UpdateMultistreamTargetRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | ID of the multistream target | -| `multistreamTargetPatchPayload` | [MultistreamTargetPatchPayload](../../models/components/MultistreamTargetPatchPayload.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | ID of the multistream target | +| `multistreamTarget` | [MultistreamTargetInput](../../models/components/MultistreamTargetInput.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/UpdateMultistreamTargetResponse.md b/docs/models/operations/UpdateMultistreamTargetResponse.md index e344005b..a33bab1f 100644 --- a/docs/models/operations/UpdateMultistreamTargetResponse.md +++ b/docs/models/operations/UpdateMultistreamTargetResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/UpdateRoomUserResponse.md b/docs/models/operations/UpdateRoomUserResponse.md index d54cb655..6dc0f720 100644 --- a/docs/models/operations/UpdateRoomUserResponse.md +++ b/docs/models/operations/UpdateRoomUserResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/UpdateSigningKeyRequestBody.md b/docs/models/operations/UpdateSigningKeyRequestBody.md index f183b8d4..9732af37 100644 --- a/docs/models/operations/UpdateSigningKeyRequestBody.md +++ b/docs/models/operations/UpdateSigningKeyRequestBody.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------- | ------------------- | ------------------- | ------------------- | -| `disabled` | *Optional<Boolean>* | :heavy_minus_sign: | N/A | -| `name` | *Optional<String>* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `disabled` | *Optional\<Boolean>* | :heavy_minus_sign: | N/A | +| `name` | *Optional\<String>* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/UpdateSigningKeyResponse.md b/docs/models/operations/UpdateSigningKeyResponse.md index 815fe3a6..192ce97c 100644 --- a/docs/models/operations/UpdateSigningKeyResponse.md +++ b/docs/models/operations/UpdateSigningKeyResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/UpdateStreamResponse.md b/docs/models/operations/UpdateStreamResponse.md index fad32518..854dd276 100644 --- a/docs/models/operations/UpdateStreamResponse.md +++ b/docs/models/operations/UpdateStreamResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/UpdateWebhookResponse.md b/docs/models/operations/UpdateWebhookResponse.md index 49637c2c..3aef67f9 100644 --- a/docs/models/operations/UpdateWebhookResponse.md +++ b/docs/models/operations/UpdateWebhookResponse.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `webhook` | [Optional<Webhook>](../../models/components/Webhook.md) | :heavy_minus_sign: | Success | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `webhook` | [Optional\<Webhook>](../../models/components/Webhook.md) | :heavy_minus_sign: | Success | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/UploadAssetResponse.md b/docs/models/operations/UploadAssetResponse.md index a0dad73a..d24648ff 100644 --- a/docs/models/operations/UploadAssetResponse.md +++ b/docs/models/operations/UploadAssetResponse.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `twoHundredApplicationJsonData` | [Optional<UploadAssetData>](../../models/operations/UploadAssetData.md) | :heavy_minus_sign: | Upload in progress | -| `twoHundredAndOneApplicationJsonData` | [Optional<UploadAssetDataOutput>](../../models/operations/UploadAssetDataOutput.md) | :heavy_minus_sign: | Upload started | -| `error` | *Optional<Error>* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\<InputStream>](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `twoHundredApplicationJsonData` | [Optional\<UploadAssetData>](../../models/operations/UploadAssetData.md) | :heavy_minus_sign: | Upload in progress | +| `twoHundredAndOneApplicationJsonData` | [Optional\<UploadAssetDataOutput>](../../models/operations/UploadAssetDataOutput.md) | :heavy_minus_sign: | Upload started | +| `error` | [Optional\<Error>](../../models/components/Error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/sdks/accesscontrol/README.md b/docs/sdks/accesscontrol/README.md index 12695c43..ff3ed2f5 100644 --- a/docs/sdks/accesscontrol/README.md +++ b/docs/sdks/accesscontrol/README.md @@ -26,31 +26,22 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - CreateSigningKeyResponse res = sdk.accessControl().create() + CreateSigningKeyResponse res = sdk.accessControl().create() .call(); - if (res.signingKey().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.signingKey().isPresent()) { + // handle response } - } } ``` @@ -61,10 +52,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getAll @@ -77,31 +67,22 @@ 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.GetSigningKeysResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetSigningKeysResponse res = sdk.accessControl().getAll() + GetSigningKeysResponse res = sdk.accessControl().getAll() .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -112,10 +93,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## delete @@ -128,30 +108,21 @@ 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.DeleteSigningKeyResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteSigningKeyResponse res = sdk.accessControl().delete() - .keyId("<value>") + DeleteSigningKeyResponse res = sdk.accessControl().delete() + .keyId("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -168,10 +139,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## get @@ -184,32 +154,23 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetSigningKeyResponse res = sdk.accessControl().get() - .keyId("<value>") + GetSigningKeyResponse res = sdk.accessControl().get() + .keyId("<id>") .call(); - if (res.signingKey().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.signingKey().isPresent()) { + // handle response } - } } ``` @@ -226,10 +187,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## update @@ -242,33 +202,24 @@ 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() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateSigningKeyResponse res = sdk.accessControl().update() - .keyId("<value>") + UpdateSigningKeyResponse res = sdk.accessControl().update() + .keyId("<id>") .requestBody(UpdateSigningKeyRequestBody.builder() .build()) .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -286,6 +237,6 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/asset/README.md b/docs/sdks/asset/README.md index 27da1d3c..999fe4c6 100644 --- a/docs/sdks/asset/README.md +++ b/docs/sdks/asset/README.md @@ -25,31 +25,22 @@ 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.GetAssetsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetAssetsResponse res = sdk.asset().getAll() + GetAssetsResponse res = sdk.asset().getAll() .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -60,10 +51,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## create @@ -149,24 +139,18 @@ 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.components.*; import studio.livepeer.livepeer.models.operations.RequestUploadResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - NewAssetPayload req = NewAssetPayload.builder() + NewAssetPayload req = NewAssetPayload.builder() .name("filename.mp4") .staticMp4(true) .playbackPolicy(PlaybackPolicy.builder() @@ -174,9 +158,21 @@ public class Application { .webhookId("1bde4o2i6xycudoy") .webhookContext(Map.ofEntries( Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) + .refreshInterval(600) .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(), TranscodeProfile.builder() .bitrate(3000000L) .width(1280L) @@ -191,21 +187,13 @@ public class Application { .build())) .build(); - RequestUploadResponse res = sdk.asset().create() + RequestUploadResponse res = sdk.asset().create() .request(req) .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -222,10 +210,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## createViaUrl @@ -240,24 +227,18 @@ 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.errors.SDKError; +import studio.livepeer.livepeer.models.components.*; import studio.livepeer.livepeer.models.operations.UploadAssetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - NewAssetFromUrlPayload req = NewAssetFromUrlPayload.builder() + NewAssetFromUrlPayload req = NewAssetFromUrlPayload.builder() .name("filename.mp4") .url("https://s3.amazonaws.com/my-bucket/path/filename.mp4") .staticMp4(true) @@ -266,9 +247,21 @@ public class Application { .webhookId("1bde4o2i6xycudoy") .webhookContext(Map.ofEntries( Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) + .refreshInterval(600) .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(), TranscodeProfile.builder() .bitrate(3000000L) .width(1280L) @@ -283,21 +276,13 @@ public class Application { .build())) .build(); - UploadAssetResponse res = sdk.asset().createViaUrl() + UploadAssetResponse res = sdk.asset().createViaUrl() .request(req) .call(); - if (res.twoHundredApplicationJsonData().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.twoHundredApplicationJsonData().isPresent()) { + // handle response } - } } ``` @@ -314,10 +299,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## get @@ -330,32 +314,23 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetAssetResponse res = sdk.asset().get() - .assetId("<value>") + GetAssetResponse res = sdk.asset().get() + .assetId("<id>") .call(); - if (res.asset().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.asset().isPresent()) { + // handle response } - } } ``` @@ -372,10 +347,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## update @@ -389,22 +363,19 @@ 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.components.*; import studio.livepeer.livepeer.models.operations.UpdateAssetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateAssetResponse res = sdk.asset().update() - .assetId("<value>") + UpdateAssetResponse res = sdk.asset().update() + .assetId("<id>") .assetPatchPayload(AssetPatchPayload.builder() .name("filename.mp4") .playbackPolicy(PlaybackPolicy.builder() @@ -412,22 +383,14 @@ public class Application { .webhookId("1bde4o2i6xycudoy") .webhookContext(Map.ofEntries( Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) + .refreshInterval(600) .build()) .build()) .call(); - if (res.asset().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.asset().isPresent()) { + // handle response } - } } ``` @@ -445,10 +408,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## delete @@ -461,30 +423,21 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteAssetResponse res = sdk.asset().delete() - .assetId("<value>") + DeleteAssetResponse res = sdk.asset().delete() + .assetId("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -501,6 +454,6 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/livepeer/README.md b/docs/sdks/livepeer/README.md index 808685bd..912df69a 100644 --- a/docs/sdks/livepeer/README.md +++ b/docs/sdks/livepeer/README.md @@ -5,3 +5,6 @@ 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 16d672c3..ed9258b0 100644 --- a/docs/sdks/metrics/README.md +++ b/docs/sdks/metrics/README.md @@ -24,38 +24,23 @@ Requires a private (non-CORS) API key to be used. 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetRealtimeViewershipNowResponse res = sdk.metrics().getRealtimeViewership() - .playbackId("<value>") - .creatorId("<value>") - .breakdownBy(List.of( - BreakdownBy.PLAYBACK_ID)) + GetRealtimeViewershipNowResponse res = sdk.metrics().getRealtimeViewership() .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -64,9 +49,9 @@ public class Application { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| `playbackId` | *Optional<String>* | :heavy_minus_sign: | The playback ID to filter the query results. This can be a canonical<br/>playback ID from Livepeer assets or streams, or dStorage identifiers<br/>for assets<br/> | -| `creatorId` | *Optional<String>* | :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<br/>query-string multiple times to break down by multiple fields.<br/> | +| `playbackId` | *Optional\<String>* | :heavy_minus_sign: | The playback ID to filter the query results. This can be a canonical<br/>playback ID from Livepeer assets or streams, or dStorage identifiers<br/>for assets<br/> | +| `creatorId` | *Optional\<String>* | :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<br/>query-string multiple times to break down by multiple fields.<br/> | ### Response @@ -74,10 +59,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getViewership @@ -91,36 +75,27 @@ 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.GetViewershipMetricsRequest; import studio.livepeer.livepeer.models.operations.GetViewershipMetricsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetViewershipMetricsRequest req = GetViewershipMetricsRequest.builder() + GetViewershipMetricsRequest req = GetViewershipMetricsRequest.builder() .build(); - GetViewershipMetricsResponse res = sdk.metrics().getViewership() + GetViewershipMetricsResponse res = sdk.metrics().getViewership() .request(req) .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -137,10 +112,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getCreatorViewership @@ -154,36 +128,27 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetCreatorViewershipMetricsRequest req = GetCreatorViewershipMetricsRequest.builder() + GetCreatorViewershipMetricsRequest req = GetCreatorViewershipMetricsRequest.builder() .build(); - GetCreatorViewershipMetricsResponse res = sdk.metrics().getCreatorViewership() + GetCreatorViewershipMetricsResponse res = sdk.metrics().getCreatorViewership() .request(req) .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -200,10 +165,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getPublicViewership @@ -219,32 +183,23 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetPublicViewershipMetricsResponse res = sdk.metrics().getPublicViewership() - .playbackId("<value>") + GetPublicViewershipMetricsResponse res = sdk.metrics().getPublicViewership() + .playbackId("<id>") .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -261,10 +216,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getUsage @@ -277,36 +231,27 @@ 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.GetUsageMetricsRequest; import studio.livepeer.livepeer.models.operations.GetUsageMetricsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetUsageMetricsRequest req = GetUsageMetricsRequest.builder() + GetUsageMetricsRequest req = GetUsageMetricsRequest.builder() .build(); - GetUsageMetricsResponse res = sdk.metrics().getUsage() + GetUsageMetricsResponse res = sdk.metrics().getUsage() .request(req) .call(); - if (res.usageMetric().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.usageMetric().isPresent()) { + // handle response } - } } ``` @@ -323,6 +268,6 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/multistream/README.md b/docs/sdks/multistream/README.md index 08093e2c..6e3803f7 100644 --- a/docs/sdks/multistream/README.md +++ b/docs/sdks/multistream/README.md @@ -24,31 +24,22 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetMultistreamTargetsResponse res = sdk.multistream().getAll() + GetMultistreamTargetsResponse res = sdk.multistream().getAll() .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -59,10 +50,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## create @@ -76,36 +66,27 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - MultistreamTargetInput req = MultistreamTargetInput.builder() + MultistreamTargetInput req = MultistreamTargetInput.builder() .url("rtmps://live.my-service.tv/channel/secretKey") .build(); - CreateMultistreamTargetResponse res = sdk.multistream().create() + CreateMultistreamTargetResponse res = sdk.multistream().create() .request(req) .call(); - if (res.multistreamTarget().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.multistreamTarget().isPresent()) { + // handle response } - } } ``` @@ -122,10 +103,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## get @@ -138,32 +118,23 @@ 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() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetMultistreamTargetResponse res = sdk.multistream().get() - .id("<value>") + GetMultistreamTargetResponse res = sdk.multistream().get() + .id("<id>") .call(); - if (res.multistreamTarget().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.multistreamTarget().isPresent()) { + // handle response } - } } ``` @@ -180,10 +151,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## update @@ -196,44 +166,35 @@ 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.components.MultistreamTargetInput; import studio.livepeer.livepeer.models.operations.UpdateMultistreamTargetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateMultistreamTargetResponse res = sdk.multistream().update() - .id("<value>") - .multistreamTargetPatchPayload(MultistreamTargetPatchPayload.builder() + UpdateMultistreamTargetResponse res = sdk.multistream().update() + .id("<id>") + .multistreamTarget(MultistreamTargetInput.builder() .url("rtmps://live.my-service.tv/channel/secretKey") .build()) .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | ID of the multistream target | -| `multistreamTargetPatchPayload` | [MultistreamTargetPatchPayload](../../models/components/MultistreamTargetPatchPayload.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | ID of the multistream target | +| `multistreamTarget` | [MultistreamTargetInput](../../models/components/MultistreamTargetInput.md) | :heavy_check_mark: | N/A | ### Response @@ -241,10 +202,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## delete @@ -259,30 +219,21 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteMultistreamTargetResponse res = sdk.multistream().delete() - .id("<value>") + DeleteMultistreamTargetResponse res = sdk.multistream().delete() + .id("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -299,6 +250,6 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/playback/README.md b/docs/sdks/playback/README.md index f2477d38..90d4f32c 100644 --- a/docs/sdks/playback/README.md +++ b/docs/sdks/playback/README.md @@ -20,35 +20,24 @@ package hello.world; import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; -import studio.livepeer.livepeer.models.errors.SDKError; +import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.models.operations.GetPlaybackInfoResponse; public class Application { - public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + public static void main(String[] args) throws Error, Exception { + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetPlaybackInfoResponse res = sdk.playback().get() - .id("<value>") + GetPlaybackInfoResponse res = sdk.playback().get() + .id("<id>") .call(); - 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; - } catch (Exception e) { - // handle exception - throw e; + if (res.playbackInfo().isPresent()) { + // handle response } - } } ``` @@ -65,7 +54,7 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/Error | 404 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/room/README.md b/docs/sdks/room/README.md index 1580b9e1..10878a62 100644 --- a/docs/sdks/room/README.md +++ b/docs/sdks/room/README.md @@ -31,31 +31,22 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - CreateRoomResponse res = sdk.room().create() + CreateRoomResponse res = sdk.room().create() .call(); - if (res.createRoomResponse().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.createRoomResponse().isPresent()) { + // handle response } - } } ``` @@ -66,10 +57,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~get~~ @@ -84,32 +74,23 @@ 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.GetRoomResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetRoomResponse res = sdk.room().get() - .id("<value>") + GetRoomResponse res = sdk.room().get() + .id("<id>") .call(); - if (res.room().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.room().isPresent()) { + // handle response } - } } ``` @@ -126,10 +107,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~delete~~ @@ -144,30 +124,21 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteRoomResponse res = sdk.room().delete() - .id("<value>") + DeleteRoomResponse res = sdk.room().delete() + .id("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -184,10 +155,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~startEgress~~ @@ -205,33 +175,24 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - StartRoomEgressResponse res = sdk.room().startEgress() - .id("<value>") + StartRoomEgressResponse res = sdk.room().startEgress() + .id("<id>") .roomEgressPayload(RoomEgressPayload.builder() .streamId("aac12556-4d65-4d34-9fb6-d1f0985eb0a9") .build()) .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -249,10 +210,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~stopEgress~~ @@ -267,30 +227,21 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - StopRoomEgressResponse res = sdk.room().stopEgress() - .id("<value>") + StopRoomEgressResponse res = sdk.room().stopEgress() + .id("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -307,10 +258,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~createUser~~ @@ -329,19 +279,18 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - CreateRoomUserResponse res = sdk.room().createUser() - .id("<value>") + CreateRoomUserResponse res = sdk.room().createUser() + .id("<id>") .roomUserPayload(RoomUserPayload.builder() .name("name") .canPublish(true) @@ -349,17 +298,9 @@ public class Application { .build()) .call(); - if (res.roomUserResponse().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.roomUserResponse().isPresent()) { + // handle response } - } } ``` @@ -377,10 +318,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~getUser~~ @@ -395,33 +335,24 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetRoomUserResponse res = sdk.room().getUser() - .id("<value>") - .userId("<value>") + GetRoomUserResponse res = sdk.room().getUser() + .id("<id>") + .userId("<id>") .call(); - if (res.getRoomUserResponse().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.getRoomUserResponse().isPresent()) { + // handle response } - } } ``` @@ -439,10 +370,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~updateUser~~ @@ -458,35 +388,24 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateRoomUserResponse res = sdk.room().updateUser() - .id("<value>") - .userId("<value>") + UpdateRoomUserResponse res = sdk.room().updateUser() + .id("<id>") + .userId("<id>") .roomUserUpdatePayload(RoomUserUpdatePayload.builder() - .canPublish(true) - .canPublishData(true) .build()) .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -505,10 +424,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~deleteUser~~ @@ -523,31 +441,22 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteRoomUserResponse res = sdk.room().deleteUser() - .id("<value>") - .userId("<value>") + DeleteRoomUserResponse res = sdk.room().deleteUser() + .id("<id>") + .userId("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -565,6 +474,6 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/session/README.md b/docs/sdks/session/README.md index b08c6181..88d7aadc 100644 --- a/docs/sdks/session/README.md +++ b/docs/sdks/session/README.md @@ -23,32 +23,23 @@ 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.GetSessionClipsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetSessionClipsResponse res = sdk.session().getClips() - .id("<value>") + GetSessionClipsResponse res = sdk.session().getClips() + .id("<id>") .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -65,10 +56,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getAll @@ -81,31 +71,22 @@ 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.GetSessionsResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetSessionsResponse res = sdk.session().getAll() + GetSessionsResponse res = sdk.session().getAll() .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -116,10 +97,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## get @@ -132,32 +112,23 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetSessionResponse res = sdk.session().get() - .id("<value>") + GetSessionResponse res = sdk.session().get() + .id("<id>") .call(); - if (res.session().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.session().isPresent()) { + // handle response } - } } ``` @@ -174,10 +145,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getRecorded @@ -190,34 +160,25 @@ 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.GetRecordedSessionsResponse; import studio.livepeer.livepeer.models.operations.Record; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetRecordedSessionsResponse res = sdk.session().getRecorded() - .parentId("<value>") + GetRecordedSessionsResponse res = sdk.session().getRecorded() + .parentId("<id>") .record(Record.of(true)) .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -227,7 +188,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | | `parentId` | *String* | :heavy_check_mark: | ID of the parent stream | | -| `record` | [Optional<Record>](../../models/operations/Record.md) | :heavy_minus_sign: | Flag indicating if the response should only include recorded<br/>sessions<br/> | true | +| `record` | [Optional\<Record>](../../models/operations/Record.md) | :heavy_minus_sign: | Flag indicating if the response should only include recorded<br/>sessions<br/> | true | ### Response @@ -235,6 +196,6 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/stream/README.md b/docs/sdks/stream/README.md index bf313be9..64d3952c 100644 --- a/docs/sdks/stream/README.md +++ b/docs/sdks/stream/README.md @@ -45,40 +45,26 @@ 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.components.*; import studio.livepeer.livepeer.models.operations.CreateStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - NewStreamPayload req = NewStreamPayload.builder() + 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) + .lat(39.739) + .lon(-104.988) .build()) .build()) .playbackPolicy(PlaybackPolicy.builder() @@ -86,9 +72,20 @@ public class Application { .webhookId("1bde4o2i6xycudoy") .webhookContext(Map.ofEntries( Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) + .refreshInterval(600) .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(), FfmpegProfile.builder() .width(1280L) .name("720p") @@ -103,6 +100,18 @@ public class Application { .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(), TranscodeProfile.builder() .bitrate(3000000L) .width(1280L) @@ -120,7 +129,6 @@ public class Application { .targets(List.of( Target.builder() .profile("720p0") - .videoOnly(false) .id("PUSH123") .spec(TargetSpec.builder() .url("rtmps://live.my-service.tv/channel/secretKey") @@ -130,21 +138,13 @@ public class Application { .build()) .build(); - CreateStreamResponse res = sdk.stream().create() + CreateStreamResponse res = sdk.stream().create() .request(req) .call(); - if (res.stream().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.stream().isPresent()) { + // handle response } - } } ``` @@ -161,10 +161,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getAll @@ -177,41 +176,31 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetStreamsResponse res = sdk.stream().getAll() - .streamsonly("<value>") + GetStreamsResponse res = sdk.stream().getAll() .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` ### Parameters -| Parameter | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `streamsonly` | *Optional<String>* | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `streamsonly` | *Optional\<String>* | :heavy_minus_sign: | N/A | ### Response @@ -219,10 +208,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## get @@ -235,32 +223,23 @@ 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.GetStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetStreamResponse res = sdk.stream().get() - .id("<value>") + GetStreamResponse res = sdk.stream().get() + .id("<id>") .call(); - if (res.stream().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.stream().isPresent()) { + // handle response } - } } ``` @@ -277,10 +256,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## update @@ -295,38 +273,25 @@ 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.Multistream; -import studio.livepeer.livepeer.models.components.PlaybackPolicy; -import studio.livepeer.livepeer.models.components.Profile; -import studio.livepeer.livepeer.models.components.RecordingSpec; -import studio.livepeer.livepeer.models.components.StreamPatchPayload; -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.components.*; import studio.livepeer.livepeer.models.operations.UpdateStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateStreamResponse res = sdk.stream().update() - .id("<value>") + UpdateStreamResponse res = sdk.stream().update() + .id("<id>") .streamPatchPayload(StreamPatchPayload.builder() .record(false) .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") @@ -339,9 +304,31 @@ public class Application { .webhookId("1bde4o2i6xycudoy") .webhookContext(Map.ofEntries( Map.entry("streamerId", "my-custom-id"))) - .refreshInterval(600d) + .refreshInterval(600) .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(), + FfmpegProfile.builder() + .width(1280L) + .name("720p") + .height(720L) + .bitrate(3000000L) + .fps(30L) + .fpsDen(1L) + .quality(23L) + .gop("2") + .profile(Profile.H264_BASELINE) + .build(), FfmpegProfile.builder() .width(1280L) .name("720p") @@ -355,6 +342,18 @@ public class Application { .build())) .recordingSpec(RecordingSpec.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(), TranscodeProfile.builder() .bitrate(3000000L) .width(1280L) @@ -368,18 +367,11 @@ public class Application { .encoder(TranscodeProfileEncoder.H264) .build())) .build()) + .name("test_stream") .build()) .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -397,10 +389,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## delete @@ -417,30 +408,21 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteStreamResponse res = sdk.stream().delete() - .id("<value>") + DeleteStreamResponse res = sdk.stream().delete() + .id("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -457,10 +439,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## terminate @@ -481,30 +462,21 @@ 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.TerminateStreamResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - TerminateStreamResponse res = sdk.stream().terminate() - .id("<value>") + TerminateStreamResponse res = sdk.stream().terminate() + .id("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -521,10 +493,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## startPull @@ -544,30 +515,21 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - StartPullStreamResponse res = sdk.stream().startPull() - .id("<value>") + StartPullStreamResponse res = sdk.stream().startPull() + .id("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -584,10 +546,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## createClip @@ -601,40 +562,31 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - ClipPayload req = ClipPayload.builder() + ClipPayload req = ClipPayload.builder() .playbackId("eaw4nk06ts2d0mzb") - .startTime(1587667174725d) - .endTime(1587667174725d) + .startTime(1587667174725) + .endTime(1587667174725) .name("My Clip") .sessionId("de7818e7-610a-4057-8f6f-b785dc1e6f88") .build(); - CreateClipResponse res = sdk.stream().createClip() + CreateClipResponse res = sdk.stream().createClip() .request(req) .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -651,10 +603,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getClips @@ -667,32 +618,23 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetClipsResponse res = sdk.stream().getClips() - .id("<value>") + GetClipsResponse res = sdk.stream().getClips() + .id("<id>") .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -709,10 +651,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## addMultistreamTarget @@ -727,22 +668,20 @@ import java.lang.Exception; import studio.livepeer.livepeer.Livepeer; import studio.livepeer.livepeer.models.components.TargetAddPayload; import studio.livepeer.livepeer.models.components.TargetAddPayloadSpec; -import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.AddMultistreamTargetResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - AddMultistreamTargetResponse res = sdk.stream().addMultistreamTarget() - .id("<value>") + AddMultistreamTargetResponse res = sdk.stream().addMultistreamTarget() + .id("<id>") .targetAddPayload(TargetAddPayload.builder() .profile("720p0") - .videoOnly(false) .id("PUSH123") .spec(TargetAddPayloadSpec.builder() .url("rtmps://live.my-service.tv/channel/secretKey") @@ -751,15 +690,7 @@ public class Application { .build()) .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -777,10 +708,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## removeMultistreamTarget @@ -793,31 +723,22 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - RemoveMultistreamTargetResponse res = sdk.stream().removeMultistreamTarget() - .id("<value>") - .targetId("<value>") + RemoveMultistreamTargetResponse res = sdk.stream().removeMultistreamTarget() + .id("<id>") + .targetId("<id>") .call(); - // handle response - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - + // handle response } } ``` @@ -835,6 +756,6 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/task/README.md b/docs/sdks/task/README.md index 7264fbca..c74d57ae 100644 --- a/docs/sdks/task/README.md +++ b/docs/sdks/task/README.md @@ -21,31 +21,22 @@ 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.GetTasksResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetTasksResponse res = sdk.task().getAll() + GetTasksResponse res = sdk.task().getAll() .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -56,10 +47,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## get @@ -72,32 +62,23 @@ 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.GetTaskResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetTaskResponse res = sdk.task().get() - .taskId("<value>") + GetTaskResponse res = sdk.task().get() + .taskId("<id>") .call(); - if (res.task().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.task().isPresent()) { + // handle response } - } } ``` @@ -114,6 +95,6 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/transcode/README.md b/docs/sdks/transcode/README.md index fc6c5e1d..484d07cb 100644 --- a/docs/sdks/transcode/README.md +++ b/docs/sdks/transcode/README.md @@ -142,56 +142,51 @@ 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.components.*; import studio.livepeer.livepeer.models.operations.TranscodeVideoResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - TranscodePayload req = TranscodePayload.builder() + 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())) + .url("https://s3.amazonaws.com/bucket/file.mp4") + .build())) + .storage(TranscodePayloadStorage.of(Storage2.builder() + .type(TranscodePayloadStorageType.WEB3_STORAGE) + .credentials(TranscodePayloadStorageCredentials.builder() + .proof("EaJlcm9vdHOAZ3ZlcnNpb24BmgIBcRIg2uxHpcPYSWNtifMKFkPC7IEDvFDCxCd3ADViv0coV7SnYXNYRO2hA0AnblHEW38s3lSlcwaDjPn") + .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()) + .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(), TranscodeProfile.builder() .bitrate(3000000L) .width(1280L) @@ -206,21 +201,13 @@ public class Application { .build())) .build(); - TranscodeVideoResponse res = sdk.transcode().create() + TranscodeVideoResponse res = sdk.transcode().create() .request(req) .call(); - if (res.task().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.task().isPresent()) { + // handle response } - } } ``` @@ -237,6 +224,6 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/webhook/README.md b/docs/sdks/webhook/README.md index f48748e1..3eef8485 100644 --- a/docs/sdks/webhook/README.md +++ b/docs/sdks/webhook/README.md @@ -27,31 +27,22 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetWebhooksResponse res = sdk.webhook().getAll() + GetWebhooksResponse res = sdk.webhook().getAll() .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -62,10 +53,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## create @@ -82,18 +72,17 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - WebhookInput req = WebhookInput.builder() + WebhookInput req = WebhookInput.builder() .name("test_webhook") .url("https://my-service.com/webhook") .projectId("aac12556-4d65-4d34-9fb6-d1f0985eb0a9") @@ -104,21 +93,13 @@ public class Application { .streamId("de7818e7-610a-4057-8f6f-b785dc1e6f88") .build(); - CreateWebhookResponse res = sdk.webhook().create() + CreateWebhookResponse res = sdk.webhook().create() .request(req) .call(); - if (res.webhook().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.webhook().isPresent()) { + // handle response } - } } ``` @@ -135,10 +116,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## get @@ -151,32 +131,23 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetWebhookResponse res = sdk.webhook().get() - .id("<value>") + GetWebhookResponse res = sdk.webhook().get() + .id("<id>") .call(); - if (res.webhook().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.webhook().isPresent()) { + // handle response } - } } ``` @@ -193,10 +164,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## update @@ -212,19 +182,18 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - UpdateWebhookResponse res = sdk.webhook().update() - .id("<value>") + UpdateWebhookResponse res = sdk.webhook().update() + .id("<id>") .webhook(WebhookInput.builder() .name("test_webhook") .url("https://my-service.com/webhook") @@ -237,17 +206,9 @@ public class Application { .build()) .call(); - if (res.webhook().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.webhook().isPresent()) { + // handle response } - } } ``` @@ -265,10 +226,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## delete @@ -281,32 +241,23 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - DeleteWebhookResponse res = sdk.webhook().delete() - .id("<value>") + DeleteWebhookResponse res = sdk.webhook().delete() + .id("<id>") .call(); - if (res.webhook().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.webhook().isPresent()) { + // handle response } - } } ``` @@ -323,10 +274,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getLogs @@ -339,32 +289,23 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetWebhookLogsResponse res = sdk.webhook().getLogs() - .id("<value>") + GetWebhookLogsResponse res = sdk.webhook().getLogs() + .id("<id>") .call(); - if (res.data().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.data().isPresent()) { + // handle response } - } } ``` @@ -381,10 +322,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getLog @@ -397,33 +337,24 @@ 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; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - GetWebhookLogResponse res = sdk.webhook().getLog() - .id("<value>") - .logId("<value>") + GetWebhookLogResponse res = sdk.webhook().getLog() + .id("<id>") + .logId("<id>") .call(); - if (res.webhookLog().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.webhookLog().isPresent()) { + // handle response } - } } ``` @@ -441,10 +372,9 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## resendLog @@ -460,33 +390,24 @@ 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.ResendWebhookResponse; public class Application { public static void main(String[] args) throws Exception { - try { - Livepeer sdk = Livepeer.builder() + + Livepeer sdk = Livepeer.builder() .apiKey("<YOUR_BEARER_TOKEN_HERE>") - .build(); + .build(); - ResendWebhookResponse res = sdk.webhook().resendLog() - .id("<value>") - .logId("<value>") + ResendWebhookResponse res = sdk.webhook().resendLog() + .id("<id>") + .logId("<id>") .call(); - if (res.webhookLog().isPresent()) { - // handle response - } - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.webhookLog().isPresent()) { + // handle response } - } } ``` @@ -504,6 +425,6 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..e6b01ca0 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,3 @@ +groupId=studio.livepeer +artifactId=livepeer +version=0.6.0 \ No newline at end of file diff --git a/src/main/java/studio/livepeer/livepeer/AccessControl.java b/src/main/java/studio/livepeer/livepeer/AccessControl.java index 029ab24e..a5863c9f 100644 --- a/src/main/java/studio/livepeer/livepeer/AccessControl.java +++ b/src/main/java/studio/livepeer/livepeer/AccessControl.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import com.fasterxml.jackson.core.type.TypeReference; @@ -13,8 +12,8 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.SigningKey; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.CreateSigningKeyRequestBuilder; import studio.livepeer.livepeer.models.operations.CreateSigningKeyResponse; @@ -38,7 +37,7 @@ import studio.livepeer.livepeer.utils.Hook.BeforeRequestContextImpl; import studio.livepeer.livepeer.utils.SerializedBody; import studio.livepeer.livepeer.utils.Utils.JsonShape; -import studio.livepeer.livepeer.utils.Utils; +import studio.livepeer.livepeer.utils.Utils; /** * Operations related to access control/signing keys api @@ -59,7 +58,8 @@ public class AccessControl implements /** * Create a signing key - * The publicKey is a representation of the public key, encoded as base 64 and is passed as a string, and the privateKey is displayed only on creation. This is the only moment where the client can save the private key, otherwise it will be lost. Remember to decode your string when signing JWTs. + * + * <p>The publicKey is a representation of the public key, encoded as base 64 and is passed as a string, and the privateKey is displayed only on creation. This is the only moment where the client can save the private key, otherwise it will be lost. Remember to decode your string when signing JWTs. * Up to 10 signing keys can be generated, after that you must delete at least one signing key to create a new one. * * @return The call builder @@ -70,7 +70,8 @@ public CreateSigningKeyRequestBuilder create() { /** * Create a signing key - * The publicKey is a representation of the public key, encoded as base 64 and is passed as a string, and the privateKey is displayed only on creation. This is the only moment where the client can save the private key, otherwise it will be lost. Remember to decode your string when signing JWTs. + * + * <p>The publicKey is a representation of the public key, encoded as base 64 and is passed as a string, and the privateKey is displayed only on creation. This is the only moment where the client can save the private key, otherwise it will be lost. Remember to decode your string when signing JWTs. * Up to 10 signing keys can be generated, after that you must delete at least one signing key to create a new one. * * @return The response from the API call @@ -85,19 +86,20 @@ public CreateSigningKeyResponse createDirect() throws Exception { HTTPRequest _req = new HTTPRequest(_url, "POST"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "createSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -106,27 +108,30 @@ public CreateSigningKeyResponse createDirect() throws Exception { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "createSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -158,7 +163,15 @@ public CreateSigningKeyResponse createDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -192,6 +205,7 @@ public CreateSigningKeyResponse createDirect() throws Exception { /** * Retrieves signing keys + * * @return The call builder */ public GetSigningKeysRequestBuilder getAll() { @@ -200,6 +214,7 @@ public GetSigningKeysRequestBuilder getAll() { /** * Retrieves signing keys + * * @return The response from the API call * @throws Exception if the API call fails */ @@ -212,19 +227,20 @@ public GetSigningKeysResponse getAllDirect() throws Exception { HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getSigningKeys", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -233,27 +249,30 @@ public GetSigningKeysResponse getAllDirect() throws Exception { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getSigningKeys", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getSigningKeys", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getSigningKeys", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -285,7 +304,15 @@ public GetSigningKeysResponse getAllDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -319,6 +346,7 @@ public GetSigningKeysResponse getAllDirect() throws Exception { /** * Delete Signing Key + * * @return The call builder */ public DeleteSigningKeyRequestBuilder delete() { @@ -327,6 +355,7 @@ public DeleteSigningKeyRequestBuilder delete() { /** * Delete Signing Key + * * @param keyId ID of the signing key * @return The response from the API call * @throws Exception if the API call fails @@ -349,19 +378,20 @@ public DeleteSigningKeyResponse delete( HTTPRequest _req = new HTTPRequest(_url, "DELETE"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "deleteSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -370,27 +400,30 @@ public DeleteSigningKeyResponse delete( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "deleteSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -411,7 +444,15 @@ public DeleteSigningKeyResponse delete( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -445,6 +486,7 @@ public DeleteSigningKeyResponse delete( /** * Retrieves a signing key + * * @return The call builder */ public GetSigningKeyRequestBuilder get() { @@ -453,6 +495,7 @@ public GetSigningKeyRequestBuilder get() { /** * Retrieves a signing key + * * @param keyId ID of the signing key * @return The response from the API call * @throws Exception if the API call fails @@ -475,19 +518,20 @@ public GetSigningKeyResponse get( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -496,27 +540,30 @@ public GetSigningKeyResponse get( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -548,7 +595,15 @@ public GetSigningKeyResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -582,6 +637,7 @@ public GetSigningKeyResponse get( /** * Update a signing key + * * @return The call builder */ public UpdateSigningKeyRequestBuilder update() { @@ -590,8 +646,9 @@ public UpdateSigningKeyRequestBuilder update() { /** * Update a signing key + * * @param keyId ID of the signing key - * @param requestBody + * @param requestBody * @return The response from the API call * @throws Exception if the API call fails */ @@ -628,19 +685,20 @@ public UpdateSigningKeyResponse update( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "updateSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -649,27 +707,30 @@ public UpdateSigningKeyResponse update( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "updateSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateSigningKey", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -690,7 +751,15 @@ public UpdateSigningKeyResponse update( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/studio/livepeer/livepeer/Asset.java b/src/main/java/studio/livepeer/livepeer/Asset.java index 60a8f1f6..cd4f57b7 100644 --- a/src/main/java/studio/livepeer/livepeer/Asset.java +++ b/src/main/java/studio/livepeer/livepeer/Asset.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import com.fasterxml.jackson.core.type.TypeReference; @@ -14,9 +13,9 @@ import java.util.List; import java.util.Optional; import studio.livepeer.livepeer.models.components.AssetPatchPayload; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.NewAssetFromUrlPayload; import studio.livepeer.livepeer.models.components.NewAssetPayload; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.DeleteAssetRequest; import studio.livepeer.livepeer.models.operations.DeleteAssetRequestBuilder; @@ -44,7 +43,7 @@ import studio.livepeer.livepeer.utils.Hook.BeforeRequestContextImpl; import studio.livepeer.livepeer.utils.SerializedBody; import studio.livepeer.livepeer.utils.Utils.JsonShape; -import studio.livepeer.livepeer.utils.Utils; +import studio.livepeer.livepeer.utils.Utils; /** * Operations related to asset/vod api @@ -66,6 +65,7 @@ public class Asset implements /** * Retrieve assets + * * @return The call builder */ public GetAssetsRequestBuilder getAll() { @@ -74,6 +74,7 @@ public GetAssetsRequestBuilder getAll() { /** * Retrieve assets + * * @return The response from the API call * @throws Exception if the API call fails */ @@ -86,19 +87,20 @@ public GetAssetsResponse getAllDirect() throws Exception { HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getAssets", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -107,27 +109,30 @@ public GetAssetsResponse getAllDirect() throws Exception { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getAssets", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getAssets", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getAssets", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -159,7 +164,15 @@ public GetAssetsResponse getAllDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -193,7 +206,8 @@ public GetAssetsResponse getAllDirect() throws Exception { /** * Upload an asset - * To upload an asset, your first need to request for a direct upload URL + * + * <p>To upload an asset, your first need to request for a direct upload URL * and only then actually upload the contents of the asset. * \ * \ @@ -203,14 +217,12 @@ public GetAssetsResponse getAllDirect() throws Exception { * connections. If you want a simpler implementation though, you should * just use a direct upload. * - * - * ## Direct Upload + * <p>## Direct Upload * For a direct upload, make a PUT request to the URL received in the url * field of the response above, with the raw video file as the request * body. response above: * - * - * ## Resumable Upload + * <p>## Resumable Upload * Livepeer supports resumable uploads via Tus. This section provides a * simple example of how to use tus-js-client to upload a video file. * \ @@ -220,16 +232,15 @@ public GetAssetsResponse getAllDirect() throws Exception { * tusEndpoint field of the response to upload the video file and track the * progress: * - * ``` + * <p>``` * # This assumes there is an `input` element of `type="file"` with id * `fileInput` in the HTML * + * <p>const input = document.getElementById('fileInput'); * - * const input = document.getElementById('fileInput'); - * - * const file = input.files[0]; + * <p>const file = input.files[0]; * - * const upload = new tus.Upload(file, { + * <p>const upload = new tus.Upload(file, { * endpoint: tusEndpoint, // URL from `tusEndpoint` field in the * `/request-upload` response * metadata: { @@ -249,17 +260,17 @@ public GetAssetsResponse getAllDirect() throws Exception { * }, * }); * - * const previousUploads = await upload.findPreviousUploads(); + * <p>const previousUploads = await upload.findPreviousUploads(); * - * if (previousUploads.length > 0) { + * <p>if (previousUploads.length > 0) { * upload.resumeFromPreviousUpload(previousUploads[0]); * } * - * upload.start(); + * <p>upload.start(); * - * ``` + * <p>``` * - * > Note: If you are using tus from node.js, you need to add a custom URL + * <p>> Note: If you are using tus from node.js, you need to add a custom URL * storage to enable resuming from previous uploads. On the browser, this * is enabled by default using local storage. In node.js, add urlStorage: * new tus.FileUrlStorage("path/to/tmp/file"), to the UploadFile object @@ -273,7 +284,8 @@ public RequestUploadRequestBuilder create() { /** * Upload an asset - * To upload an asset, your first need to request for a direct upload URL + * + * <p>To upload an asset, your first need to request for a direct upload URL * and only then actually upload the contents of the asset. * \ * \ @@ -283,14 +295,12 @@ public RequestUploadRequestBuilder create() { * connections. If you want a simpler implementation though, you should * just use a direct upload. * - * - * ## Direct Upload + * <p>## Direct Upload * For a direct upload, make a PUT request to the URL received in the url * field of the response above, with the raw video file as the request * body. response above: * - * - * ## Resumable Upload + * <p>## Resumable Upload * Livepeer supports resumable uploads via Tus. This section provides a * simple example of how to use tus-js-client to upload a video file. * \ @@ -300,16 +310,15 @@ public RequestUploadRequestBuilder create() { * tusEndpoint field of the response to upload the video file and track the * progress: * - * ``` + * <p>``` * # This assumes there is an `input` element of `type="file"` with id * `fileInput` in the HTML * + * <p>const input = document.getElementById('fileInput'); * - * const input = document.getElementById('fileInput'); + * <p>const file = input.files[0]; * - * const file = input.files[0]; - * - * const upload = new tus.Upload(file, { + * <p>const upload = new tus.Upload(file, { * endpoint: tusEndpoint, // URL from `tusEndpoint` field in the * `/request-upload` response * metadata: { @@ -329,17 +338,17 @@ public RequestUploadRequestBuilder create() { * }, * }); * - * const previousUploads = await upload.findPreviousUploads(); + * <p>const previousUploads = await upload.findPreviousUploads(); * - * if (previousUploads.length > 0) { + * <p>if (previousUploads.length > 0) { * upload.resumeFromPreviousUpload(previousUploads[0]); * } * - * upload.start(); + * <p>upload.start(); * - * ``` + * <p>``` * - * > Note: If you are using tus from node.js, you need to add a custom URL + * <p>> Note: If you are using tus from node.js, you need to add a custom URL * storage to enable resuming from previous uploads. On the browser, this * is enabled by default using local storage. In node.js, add urlStorage: * new tus.FileUrlStorage("path/to/tmp/file"), to the UploadFile object @@ -372,19 +381,20 @@ public RequestUploadResponse create( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "requestUpload", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -393,27 +403,30 @@ public RequestUploadResponse create( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "requestUpload", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "requestUpload", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "requestUpload", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -445,7 +458,15 @@ public RequestUploadResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -479,6 +500,7 @@ public RequestUploadResponse create( /** * Upload asset via URL + * * @return The call builder */ public UploadAssetRequestBuilder createViaUrl() { @@ -487,6 +509,7 @@ public UploadAssetRequestBuilder createViaUrl() { /** * Upload asset via URL + * * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails @@ -514,19 +537,20 @@ public UploadAssetResponse createViaUrl( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "uploadAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -535,27 +559,30 @@ public UploadAssetResponse createViaUrl( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "uploadAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "uploadAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "uploadAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -602,7 +629,15 @@ public UploadAssetResponse createViaUrl( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -636,6 +671,7 @@ public UploadAssetResponse createViaUrl( /** * Retrieves an asset + * * @return The call builder */ public GetAssetRequestBuilder get() { @@ -644,6 +680,7 @@ public GetAssetRequestBuilder get() { /** * Retrieves an asset + * * @param assetId ID of the asset * @return The response from the API call * @throws Exception if the API call fails @@ -666,19 +703,20 @@ public GetAssetResponse get( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -687,27 +725,30 @@ public GetAssetResponse get( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -739,7 +780,15 @@ public GetAssetResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -773,6 +822,7 @@ public GetAssetResponse get( /** * Patch an asset + * * @return The call builder */ public UpdateAssetRequestBuilder update() { @@ -781,8 +831,9 @@ public UpdateAssetRequestBuilder update() { /** * Patch an asset + * * @param assetId ID of the asset - * @param assetPatchPayload + * @param assetPatchPayload * @return The response from the API call * @throws Exception if the API call fails */ @@ -819,19 +870,20 @@ public UpdateAssetResponse update( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "updateAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -840,27 +892,30 @@ public UpdateAssetResponse update( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "updateAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -892,7 +947,15 @@ public UpdateAssetResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -926,6 +989,7 @@ public UpdateAssetResponse update( /** * Delete an asset + * * @return The call builder */ public DeleteAssetRequestBuilder delete() { @@ -934,6 +998,7 @@ public DeleteAssetRequestBuilder delete() { /** * Delete an asset + * * @param assetId ID of the asset * @return The response from the API call * @throws Exception if the API call fails @@ -956,19 +1021,20 @@ public DeleteAssetResponse delete( HTTPRequest _req = new HTTPRequest(_url, "DELETE"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "deleteAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -977,27 +1043,30 @@ public DeleteAssetResponse delete( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "deleteAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteAsset", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1018,7 +1087,15 @@ public DeleteAssetResponse delete( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/studio/livepeer/livepeer/Livepeer.java b/src/main/java/studio/livepeer/livepeer/Livepeer.java index 9a962cc9..e4f237df 100644 --- a/src/main/java/studio/livepeer/livepeer/Livepeer.java +++ b/src/main/java/studio/livepeer/livepeer/Livepeer.java @@ -1,22 +1,21 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import java.lang.String; import java.util.Map; import java.util.Optional; -import studio.livepeer.livepeer.models.operations.SDKMethodInterfaces.*; +import java.util.function.Consumer; import studio.livepeer.livepeer.utils.HTTPClient; import studio.livepeer.livepeer.utils.RetryConfig; import studio.livepeer.livepeer.utils.SpeakeasyHTTPClient; +import studio.livepeer.livepeer.utils.Utils; /** * 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. - * */ public class Livepeer { @@ -197,6 +196,7 @@ public Builder apiKey(String apiKey) { /** * Configures the SDK to use a custom security source. + * * @param securitySource The security source to use for all requests. * @return The builder instance. */ @@ -224,7 +224,7 @@ public Builder serverURL(String serverUrl) { * @return The builder instance. */ public Builder serverURL(String serverUrl, Map<String, String> params) { - this.sdkConfiguration.serverUrl = studio.livepeer.livepeer.utils.Utils.templateUrl(serverUrl, params); + this.sdkConfiguration.serverUrl = Utils.templateUrl(serverUrl, params); return this; } @@ -250,13 +250,21 @@ public Builder retryConfig(RetryConfig retryConfig) { this.sdkConfiguration.retryConfig = Optional.of(retryConfig); return this; } - // Visible for testing, will be accessed via reflection - void _hooks(studio.livepeer.livepeer.utils.Hooks hooks) { - sdkConfiguration.setHooks(hooks); + // Visible for testing, may be accessed via reflection in tests + Builder _hooks(studio.livepeer.livepeer.utils.Hooks hooks) { + sdkConfiguration.setHooks(hooks); + return this; + } + + // Visible for testing, may be accessed via reflection in tests + Builder _hooks(Consumer<? super studio.livepeer.livepeer.utils.Hooks> consumer) { + consumer.accept(sdkConfiguration.hooks()); + return this; } /** * Builds a new instance of the SDK. + * * @return The SDK instance. */ public Livepeer build() { @@ -279,6 +287,7 @@ public Livepeer build() { /** * Get a new instance of the SDK builder to configure a new instance of the SDK. + * * @return The SDK builder instance. */ public static Builder builder() { @@ -299,4 +308,5 @@ private Livepeer(SDKConfiguration sdkConfiguration) { this.transcode = new Transcode(sdkConfiguration); this.playback = new Playback(sdkConfiguration); this.sdkConfiguration.initialize(); - }} + } +} diff --git a/src/main/java/studio/livepeer/livepeer/Metrics.java b/src/main/java/studio/livepeer/livepeer/Metrics.java index 6f1c074c..0ca79dd2 100644 --- a/src/main/java/studio/livepeer/livepeer/Metrics.java +++ b/src/main/java/studio/livepeer/livepeer/Metrics.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import com.fasterxml.jackson.core.type.TypeReference; @@ -12,10 +11,10 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.RealtimeViewershipMetric; import studio.livepeer.livepeer.models.components.UsageMetric; import studio.livepeer.livepeer.models.components.ViewershipMetric; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.BreakdownBy; import studio.livepeer.livepeer.models.operations.GetCreatorViewershipMetricsRequest; @@ -40,7 +39,7 @@ import studio.livepeer.livepeer.utils.Hook.AfterErrorContextImpl; import studio.livepeer.livepeer.utils.Hook.AfterSuccessContextImpl; import studio.livepeer.livepeer.utils.Hook.BeforeRequestContextImpl; -import studio.livepeer.livepeer.utils.Utils; +import studio.livepeer.livepeer.utils.Utils; /** * Operations related to metrics api @@ -61,7 +60,8 @@ public class Metrics implements /** * Query realtime viewership - * Requires a private (non-CORS) API key to be used. + * + * <p>Requires a private (non-CORS) API key to be used. * * @return The call builder */ @@ -71,7 +71,8 @@ public GetRealtimeViewershipNowRequestBuilder getRealtimeViewership() { /** * Query realtime viewership - * Requires a private (non-CORS) API key to be used. + * + * <p>Requires a private (non-CORS) API key to be used. * * @return The response from the API call * @throws Exception if the API call fails @@ -82,16 +83,17 @@ public GetRealtimeViewershipNowResponse getRealtimeViewershipDirect() throws Exc /** * Query realtime viewership - * Requires a private (non-CORS) API key to be used. + * + * <p>Requires a private (non-CORS) API key to be used. * * @param playbackId 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 - + * playback ID from Livepeer assets or streams, or dStorage identifiers + * for assets + * * @param creatorId The creator ID to filter the query results * @param breakdownBy The list of fields to break down the query results. Specify this - query-string multiple times to break down by multiple fields. - + * query-string multiple times to break down by multiple fields. + * * @return The response from the API call * @throws Exception if the API call fails */ @@ -115,24 +117,25 @@ public GetRealtimeViewershipNowResponse getRealtimeViewership( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( GetRealtimeViewershipNowRequest.class, request, null)); - + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getRealtimeViewershipNow", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -141,27 +144,30 @@ public GetRealtimeViewershipNowResponse getRealtimeViewership( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getRealtimeViewershipNow", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getRealtimeViewershipNow", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getRealtimeViewershipNow", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -193,7 +199,15 @@ public GetRealtimeViewershipNowResponse getRealtimeViewership( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -227,7 +241,8 @@ public GetRealtimeViewershipNowResponse getRealtimeViewership( /** * Query viewership metrics - * Requires a private (non-CORS) API key to be used. + * + * <p>Requires a private (non-CORS) API key to be used. * * @return The call builder */ @@ -237,7 +252,8 @@ public GetViewershipMetricsRequestBuilder getViewership() { /** * Query viewership metrics - * Requires a private (non-CORS) API key to be used. + * + * <p>Requires a private (non-CORS) API key to be used. * * @param request The request object containing all of the parameters for the API call. * @return The response from the API call @@ -253,24 +269,25 @@ public GetViewershipMetricsResponse getViewership( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( GetViewershipMetricsRequest.class, request, null)); - + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -279,27 +296,30 @@ public GetViewershipMetricsResponse getViewership( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -331,7 +351,15 @@ public GetViewershipMetricsResponse getViewership( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -365,7 +393,8 @@ public GetViewershipMetricsResponse getViewership( /** * Query creator viewership metrics - * 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). + * + * <p>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). * * @return The call builder */ @@ -375,7 +404,8 @@ public GetCreatorViewershipMetricsRequestBuilder getCreatorViewership() { /** * Query creator viewership metrics - * 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). + * + * <p>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). * * @param request The request object containing all of the parameters for the API call. * @return The response from the API call @@ -391,24 +421,25 @@ public GetCreatorViewershipMetricsResponse getCreatorViewership( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( GetCreatorViewershipMetricsRequest.class, request, null)); - + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getCreatorViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -417,27 +448,30 @@ public GetCreatorViewershipMetricsResponse getCreatorViewership( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getCreatorViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getCreatorViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getCreatorViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -469,7 +503,15 @@ public GetCreatorViewershipMetricsResponse getCreatorViewership( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -503,7 +545,8 @@ public GetCreatorViewershipMetricsResponse getCreatorViewership( /** * Query public total views metrics - * Allows querying for the public metrics for viewership about a video. + * + * <p>Allows querying for the public metrics for viewership about a video. * This can be called from the frontend with a CORS key, or even * unauthenticated. * @@ -515,14 +558,15 @@ public GetPublicViewershipMetricsRequestBuilder getPublicViewership() { /** * Query public total views metrics - * Allows querying for the public metrics for viewership about a video. + * + * <p>Allows querying for the public metrics for viewership about a video. * This can be called from the frontend with a CORS key, or even * unauthenticated. * * @param playbackId 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 - + * playback ID from Livepeer assets or streams, or dStorage identifiers + * for assets + * * @return The response from the API call * @throws Exception if the API call fails */ @@ -544,19 +588,20 @@ public GetPublicViewershipMetricsResponse getPublicViewership( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getPublicViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -565,27 +610,30 @@ public GetPublicViewershipMetricsResponse getPublicViewership( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getPublicViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getPublicViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getPublicViewershipMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -617,7 +665,15 @@ public GetPublicViewershipMetricsResponse getPublicViewership( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -651,6 +707,7 @@ public GetPublicViewershipMetricsResponse getPublicViewership( /** * Query usage metrics + * * @return The call builder */ public GetUsageMetricsRequestBuilder getUsage() { @@ -659,6 +716,7 @@ public GetUsageMetricsRequestBuilder getUsage() { /** * Query usage metrics + * * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails @@ -673,24 +731,25 @@ public GetUsageMetricsResponse getUsage( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( GetUsageMetricsRequest.class, request, null)); - + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getUsageMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -699,27 +758,30 @@ public GetUsageMetricsResponse getUsage( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getUsageMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getUsageMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getUsageMetrics", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -751,7 +813,15 @@ public GetUsageMetricsResponse getUsage( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/studio/livepeer/livepeer/Multistream.java b/src/main/java/studio/livepeer/livepeer/Multistream.java index 6315f4a5..6bb57184 100644 --- a/src/main/java/studio/livepeer/livepeer/Multistream.java +++ b/src/main/java/studio/livepeer/livepeer/Multistream.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import com.fasterxml.jackson.core.type.TypeReference; @@ -13,10 +12,9 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.MultistreamTarget; import studio.livepeer.livepeer.models.components.MultistreamTargetInput; -import studio.livepeer.livepeer.models.components.MultistreamTargetPatchPayload; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.CreateMultistreamTargetRequestBuilder; import studio.livepeer.livepeer.models.operations.CreateMultistreamTargetResponse; @@ -39,7 +37,7 @@ import studio.livepeer.livepeer.utils.Hook.BeforeRequestContextImpl; import studio.livepeer.livepeer.utils.SerializedBody; import studio.livepeer.livepeer.utils.Utils.JsonShape; -import studio.livepeer.livepeer.utils.Utils; +import studio.livepeer.livepeer.utils.Utils; /** * Operations related to multistream api @@ -60,6 +58,7 @@ public class Multistream implements /** * Retrieve Multistream Targets + * * @return The call builder */ public GetMultistreamTargetsRequestBuilder getAll() { @@ -68,6 +67,7 @@ public GetMultistreamTargetsRequestBuilder getAll() { /** * Retrieve Multistream Targets + * * @return The response from the API call * @throws Exception if the API call fails */ @@ -80,19 +80,20 @@ public GetMultistreamTargetsResponse getAllDirect() throws Exception { HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getMultistreamTargets", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -101,27 +102,30 @@ public GetMultistreamTargetsResponse getAllDirect() throws Exception { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getMultistreamTargets", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getMultistreamTargets", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getMultistreamTargets", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -153,7 +157,15 @@ public GetMultistreamTargetsResponse getAllDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -187,6 +199,7 @@ public GetMultistreamTargetsResponse getAllDirect() throws Exception { /** * Create a multistream target + * * @return The call builder */ public CreateMultistreamTargetRequestBuilder create() { @@ -195,6 +208,7 @@ public CreateMultistreamTargetRequestBuilder create() { /** * Create a multistream target + * * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails @@ -222,19 +236,20 @@ public CreateMultistreamTargetResponse create( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "createMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -243,27 +258,30 @@ public CreateMultistreamTargetResponse create( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "createMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -295,7 +313,15 @@ public CreateMultistreamTargetResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -329,6 +355,7 @@ public CreateMultistreamTargetResponse create( /** * Retrieve a multistream target + * * @return The call builder */ public GetMultistreamTargetRequestBuilder get() { @@ -337,6 +364,7 @@ public GetMultistreamTargetRequestBuilder get() { /** * Retrieve a multistream target + * * @param id ID of the multistream target * @return The response from the API call * @throws Exception if the API call fails @@ -359,19 +387,20 @@ public GetMultistreamTargetResponse get( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -380,27 +409,30 @@ public GetMultistreamTargetResponse get( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -432,7 +464,15 @@ public GetMultistreamTargetResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -466,6 +506,7 @@ public GetMultistreamTargetResponse get( /** * Update Multistream Target + * * @return The call builder */ public UpdateMultistreamTargetRequestBuilder update() { @@ -474,19 +515,20 @@ public UpdateMultistreamTargetRequestBuilder update() { /** * Update Multistream Target + * * @param id ID of the multistream target - * @param multistreamTargetPatchPayload + * @param multistreamTarget * @return The response from the API call * @throws Exception if the API call fails */ public UpdateMultistreamTargetResponse update( String id, - MultistreamTargetPatchPayload multistreamTargetPatchPayload) throws Exception { + MultistreamTargetInput multistreamTarget) throws Exception { UpdateMultistreamTargetRequest request = UpdateMultistreamTargetRequest .builder() .id(id) - .multistreamTargetPatchPayload(multistreamTargetPatchPayload) + .multistreamTarget(multistreamTarget) .build(); String _baseUrl = this.sdkConfiguration.serverUrl; @@ -503,7 +545,7 @@ public UpdateMultistreamTargetResponse update( new TypeReference<Object>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, - "multistreamTargetPatchPayload", + "multistreamTarget", "json", false); if (_serializedRequestBody == null) { @@ -512,19 +554,20 @@ public UpdateMultistreamTargetResponse update( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "updateMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -533,27 +576,30 @@ public UpdateMultistreamTargetResponse update( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "updateMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -574,7 +620,15 @@ public UpdateMultistreamTargetResponse update( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -608,7 +662,8 @@ public UpdateMultistreamTargetResponse update( /** * Delete a multistream target - * Make sure to remove any references to the target on existing + * + * <p>Make sure to remove any references to the target on existing * streams before actually deleting it from the API. * * @return The call builder @@ -619,7 +674,8 @@ public DeleteMultistreamTargetRequestBuilder delete() { /** * Delete a multistream target - * Make sure to remove any references to the target on existing + * + * <p>Make sure to remove any references to the target on existing * streams before actually deleting it from the API. * * @param id ID of the multistream target @@ -644,19 +700,20 @@ public DeleteMultistreamTargetResponse delete( HTTPRequest _req = new HTTPRequest(_url, "DELETE"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "deleteMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -665,27 +722,30 @@ public DeleteMultistreamTargetResponse delete( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "deleteMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -706,7 +766,15 @@ public DeleteMultistreamTargetResponse delete( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/studio/livepeer/livepeer/Playback.java b/src/main/java/studio/livepeer/livepeer/Playback.java index e6f8a7e9..9097b9a0 100644 --- a/src/main/java/studio/livepeer/livepeer/Playback.java +++ b/src/main/java/studio/livepeer/livepeer/Playback.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import com.fasterxml.jackson.core.type.TypeReference; @@ -24,7 +23,7 @@ import studio.livepeer.livepeer.utils.Hook.AfterErrorContextImpl; import studio.livepeer.livepeer.utils.Hook.AfterSuccessContextImpl; import studio.livepeer.livepeer.utils.Hook.BeforeRequestContextImpl; -import studio.livepeer.livepeer.utils.Utils; +import studio.livepeer.livepeer.utils.Utils; /** * Operations related to playback api @@ -41,6 +40,7 @@ public class Playback implements /** * Retrieve Playback Info + * * @return The call builder */ public GetPlaybackInfoRequestBuilder get() { @@ -49,6 +49,7 @@ public GetPlaybackInfoRequestBuilder get() { /** * Retrieve Playback Info + * * @param id The playback ID from the asset or livestream, e.g. `eaw4nk06ts2d0mzb`. * @return The response from the API call * @throws Exception if the API call fails @@ -71,19 +72,20 @@ public GetPlaybackInfoResponse get( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getPlaybackInfo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -92,27 +94,30 @@ public GetPlaybackInfoResponse get( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getPlaybackInfo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getPlaybackInfo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getPlaybackInfo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -158,7 +163,15 @@ public GetPlaybackInfoResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -166,6 +179,21 @@ public GetPlaybackInfoResponse get( "API error occurred", Utils.extractByteArrayFromBody(_httpRes)); } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + studio.livepeer.livepeer.models.components.Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference<studio.livepeer.livepeer.models.components.Error>() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } throw new SDKError( _httpRes, _httpRes.statusCode(), diff --git a/src/main/java/studio/livepeer/livepeer/Room.java b/src/main/java/studio/livepeer/livepeer/Room.java index 42b6847e..52357795 100644 --- a/src/main/java/studio/livepeer/livepeer/Room.java +++ b/src/main/java/studio/livepeer/livepeer/Room.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import com.fasterxml.jackson.core.type.TypeReference; @@ -14,11 +13,11 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.RoomEgressPayload; import studio.livepeer.livepeer.models.components.RoomUserPayload; import studio.livepeer.livepeer.models.components.RoomUserResponse; import studio.livepeer.livepeer.models.components.RoomUserUpdatePayload; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.CreateRoomRequestBuilder; import studio.livepeer.livepeer.models.operations.CreateRoomResponse; @@ -54,7 +53,7 @@ import studio.livepeer.livepeer.utils.Hook.BeforeRequestContextImpl; import studio.livepeer.livepeer.utils.SerializedBody; import studio.livepeer.livepeer.utils.Utils.JsonShape; -import studio.livepeer.livepeer.utils.Utils; +import studio.livepeer.livepeer.utils.Utils; /** * Operations related to rooms api @@ -79,7 +78,8 @@ public class Room implements /** * Create a room - * Create a multiparticipant livestreaming room. + * + * <p>Create a multiparticipant livestreaming room. * * @return The call builder * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. @@ -91,7 +91,8 @@ public CreateRoomRequestBuilder create() { /** * Create a room - * Create a multiparticipant livestreaming room. + * + * <p>Create a multiparticipant livestreaming room. * * @return The response from the API call * @throws Exception if the API call fails @@ -107,19 +108,20 @@ public CreateRoomResponse createDirect() throws Exception { HTTPRequest _req = new HTTPRequest(_url, "POST"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "createRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -128,27 +130,30 @@ public CreateRoomResponse createDirect() throws Exception { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "createRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -180,7 +185,15 @@ public CreateRoomResponse createDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -214,6 +227,7 @@ public CreateRoomResponse createDirect() throws Exception { /** * Retrieve a room + * * @return The call builder * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -224,7 +238,8 @@ public GetRoomRequestBuilder get() { /** * Retrieve a room - * @param id + * + * @param id * @return The response from the API call * @throws Exception if the API call fails * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. @@ -248,19 +263,20 @@ public GetRoomResponse get( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -269,27 +285,30 @@ public GetRoomResponse get( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -321,7 +340,15 @@ public GetRoomResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -355,6 +382,7 @@ public GetRoomResponse get( /** * Delete a room + * * @return The call builder * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -365,7 +393,8 @@ public DeleteRoomRequestBuilder delete() { /** * Delete a room - * @param id + * + * @param id * @return The response from the API call * @throws Exception if the API call fails * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. @@ -389,19 +418,20 @@ public DeleteRoomResponse delete( HTTPRequest _req = new HTTPRequest(_url, "DELETE"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "deleteRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -410,27 +440,30 @@ public DeleteRoomResponse delete( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "deleteRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteRoom", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -451,7 +484,15 @@ public DeleteRoomResponse delete( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -485,7 +526,8 @@ public DeleteRoomResponse delete( /** * Start room RTMP egress - * Create a livestream for your room. + * + * <p>Create a livestream for your room. * This allows you to leverage livestreaming features like recording and HLS output. * * @return The call builder @@ -498,11 +540,12 @@ public StartRoomEgressRequestBuilder startEgress() { /** * Start room RTMP egress - * Create a livestream for your room. + * + * <p>Create a livestream for your room. * This allows you to leverage livestreaming features like recording and HLS output. * - * @param id - * @param roomEgressPayload + * @param id + * @param roomEgressPayload * @return The response from the API call * @throws Exception if the API call fails * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. @@ -541,19 +584,20 @@ public StartRoomEgressResponse startEgress( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "startRoomEgress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -562,27 +606,30 @@ public StartRoomEgressResponse startEgress( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "startRoomEgress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "startRoomEgress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "startRoomEgress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -603,7 +650,15 @@ public StartRoomEgressResponse startEgress( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -637,6 +692,7 @@ public StartRoomEgressResponse startEgress( /** * Stop room RTMP egress + * * @return The call builder * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -647,7 +703,8 @@ public StopRoomEgressRequestBuilder stopEgress() { /** * Stop room RTMP egress - * @param id + * + * @param id * @return The response from the API call * @throws Exception if the API call fails * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. @@ -671,19 +728,20 @@ public StopRoomEgressResponse stopEgress( HTTPRequest _req = new HTTPRequest(_url, "DELETE"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "stopRoomEgress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -692,27 +750,30 @@ public StopRoomEgressResponse stopEgress( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "stopRoomEgress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "stopRoomEgress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "stopRoomEgress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -733,7 +794,15 @@ public StopRoomEgressResponse stopEgress( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -767,7 +836,8 @@ public StopRoomEgressResponse stopEgress( /** * Create a room user - * Call this endpoint to add a user to a room, specifying a display name at a minimum. + * + * <p>Call this endpoint to add a user to a room, specifying a display name at a minimum. * The response will contain a joining URL for Livepeer's default meeting app. * Alternatively the joining token can be used with a custom app. * @@ -781,12 +851,13 @@ public CreateRoomUserRequestBuilder createUser() { /** * Create a room user - * Call this endpoint to add a user to a room, specifying a display name at a minimum. + * + * <p>Call this endpoint to add a user to a room, specifying a display name at a minimum. * The response will contain a joining URL for Livepeer's default meeting app. * Alternatively the joining token can be used with a custom app. * - * @param id - * @param roomUserPayload + * @param id + * @param roomUserPayload * @return The response from the API call * @throws Exception if the API call fails * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. @@ -825,19 +896,20 @@ public CreateRoomUserResponse createUser( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "createRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -846,27 +918,30 @@ public CreateRoomUserResponse createUser( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "createRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -898,7 +973,15 @@ public CreateRoomUserResponse createUser( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -932,6 +1015,7 @@ public CreateRoomUserResponse createUser( /** * Get user details + * * @return The call builder * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -942,8 +1026,9 @@ public GetRoomUserRequestBuilder getUser() { /** * Get user details - * @param id - * @param userId + * + * @param id + * @param userId * @return The response from the API call * @throws Exception if the API call fails * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. @@ -969,19 +1054,20 @@ public GetRoomUserResponse getUser( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -990,27 +1076,30 @@ public GetRoomUserResponse getUser( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1042,7 +1131,15 @@ public GetRoomUserResponse getUser( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1076,7 +1173,9 @@ public GetRoomUserResponse getUser( /** * Update a room user - * Update properties for a user. + * + * <p>Update properties for a user. + * * @return The call builder * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -1087,10 +1186,12 @@ public UpdateRoomUserRequestBuilder updateUser() { /** * Update a room user - * Update properties for a user. - * @param id - * @param userId - * @param roomUserUpdatePayload + * + * <p>Update properties for a user. + * + * @param id + * @param userId + * @param roomUserUpdatePayload * @return The response from the API call * @throws Exception if the API call fails * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. @@ -1131,19 +1232,20 @@ public UpdateRoomUserResponse updateUser( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "updateRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -1152,27 +1254,30 @@ public UpdateRoomUserResponse updateUser( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "updateRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1193,7 +1298,15 @@ public UpdateRoomUserResponse updateUser( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1227,6 +1340,7 @@ public UpdateRoomUserResponse updateUser( /** * Remove a user from the room + * * @return The call builder * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ @@ -1237,8 +1351,9 @@ public DeleteRoomUserRequestBuilder deleteUser() { /** * Remove a user from the room - * @param id - * @param userId + * + * @param id + * @param userId * @return The response from the API call * @throws Exception if the API call fails * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. @@ -1264,19 +1379,20 @@ public DeleteRoomUserResponse deleteUser( HTTPRequest _req = new HTTPRequest(_url, "DELETE"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "deleteRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -1285,27 +1401,30 @@ public DeleteRoomUserResponse deleteUser( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "deleteRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteRoomUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1326,7 +1445,15 @@ public DeleteRoomUserResponse deleteUser( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/studio/livepeer/livepeer/SDKConfiguration.java b/src/main/java/studio/livepeer/livepeer/SDKConfiguration.java index a9cb585f..2b43dca9 100644 --- a/src/main/java/studio/livepeer/livepeer/SDKConfiguration.java +++ b/src/main/java/studio/livepeer/livepeer/SDKConfiguration.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import java.lang.String; @@ -18,14 +17,23 @@ class SDKConfiguration { public Optional<SecuritySource> securitySource() { return Optional.ofNullable(securitySource); } + public HTTPClient defaultClient; + public String serverUrl; + + public String resolvedServerUrl() { + return serverUrl; + } public int serverIdx = 0; - public String language = "java"; - public String openapiDocVersion = "1.0.0"; - 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 static final String LANGUAGE = "java"; + public static final String OPENAPI_DOC_VERSION = "1.0.0"; + public static final String SDK_VERSION = "0.6.0"; + public static final String GEN_VERSION = "2.597.9"; + private static final String BASE_PACKAGE = "studio.livepeer.livepeer"; + public static final String USER_AGENT = + String.format("speakeasy-sdk/%s %s %s %s %s", + LANGUAGE, SDK_VERSION, GEN_VERSION, OPENAPI_DOC_VERSION, BASE_PACKAGE); private Hooks _hooks = createHooks(); @@ -48,7 +56,7 @@ public void setHooks(Hooks hooks) { public void initialize() { SDKHooks.initialize(_hooks); // apply the sdk init hook immediately - SdkInitData data = _hooks.sdkInit(new SdkInitData(serverUrl, defaultClient)); + SdkInitData data = _hooks.sdkInit(new SdkInitData(resolvedServerUrl(), defaultClient)); this.serverUrl = data.baseUrl(); this.defaultClient = data.client(); } diff --git a/src/main/java/studio/livepeer/livepeer/SecuritySource.java b/src/main/java/studio/livepeer/livepeer/SecuritySource.java index a8176b58..d87c43cf 100644 --- a/src/main/java/studio/livepeer/livepeer/SecuritySource.java +++ b/src/main/java/studio/livepeer/livepeer/SecuritySource.java @@ -1,27 +1,26 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; -import studio.livepeer.livepeer.models.components.Security; +import studio.livepeer.livepeer.utils.HasSecurity; public interface SecuritySource { - Security getSecurity(); + HasSecurity getSecurity(); - public static SecuritySource of(Security security) { + public static SecuritySource of(HasSecurity security) { return new DefaultSecuritySource(security); } public static class DefaultSecuritySource implements SecuritySource { - private Security security; + private HasSecurity security; - public DefaultSecuritySource(Security security) { + public DefaultSecuritySource(HasSecurity security) { this.security = security; } - public Security getSecurity() { + public HasSecurity getSecurity() { return security; } } diff --git a/src/main/java/studio/livepeer/livepeer/Session.java b/src/main/java/studio/livepeer/livepeer/Session.java index 04836d1f..1247f3d3 100644 --- a/src/main/java/studio/livepeer/livepeer/Session.java +++ b/src/main/java/studio/livepeer/livepeer/Session.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import com.fasterxml.jackson.core.type.TypeReference; @@ -13,7 +12,7 @@ import java.util.List; import java.util.Optional; import studio.livepeer.livepeer.models.components.Asset; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.GetRecordedSessionsRequest; import studio.livepeer.livepeer.models.operations.GetRecordedSessionsRequestBuilder; @@ -33,7 +32,7 @@ import studio.livepeer.livepeer.utils.Hook.AfterErrorContextImpl; import studio.livepeer.livepeer.utils.Hook.AfterSuccessContextImpl; import studio.livepeer.livepeer.utils.Hook.BeforeRequestContextImpl; -import studio.livepeer.livepeer.utils.Utils; +import studio.livepeer.livepeer.utils.Utils; /** * Operations related to session api @@ -53,6 +52,7 @@ public class Session implements /** * Retrieve clips of a session + * * @return The call builder */ public GetSessionClipsRequestBuilder getClips() { @@ -61,6 +61,7 @@ public GetSessionClipsRequestBuilder getClips() { /** * Retrieve clips of a session + * * @param id ID of the parent session * @return The response from the API call * @throws Exception if the API call fails @@ -83,19 +84,20 @@ public GetSessionClipsResponse getClips( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getSessionClips", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -104,27 +106,30 @@ public GetSessionClipsResponse getClips( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getSessionClips", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getSessionClips", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getSessionClips", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -156,7 +161,15 @@ public GetSessionClipsResponse getClips( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -190,6 +203,7 @@ public GetSessionClipsResponse getClips( /** * Retrieve sessions + * * @return The call builder */ public GetSessionsRequestBuilder getAll() { @@ -198,6 +212,7 @@ public GetSessionsRequestBuilder getAll() { /** * Retrieve sessions + * * @return The response from the API call * @throws Exception if the API call fails */ @@ -210,19 +225,20 @@ public GetSessionsResponse getAllDirect() throws Exception { HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getSessions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -231,27 +247,30 @@ public GetSessionsResponse getAllDirect() throws Exception { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getSessions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getSessions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getSessions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -283,7 +302,15 @@ public GetSessionsResponse getAllDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -317,6 +344,7 @@ public GetSessionsResponse getAllDirect() throws Exception { /** * Retrieve a session + * * @return The call builder */ public GetSessionRequestBuilder get() { @@ -325,6 +353,7 @@ public GetSessionRequestBuilder get() { /** * Retrieve a session + * * @param id ID of the session * @return The response from the API call * @throws Exception if the API call fails @@ -347,19 +376,20 @@ public GetSessionResponse get( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -368,27 +398,30 @@ public GetSessionResponse get( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -420,7 +453,15 @@ public GetSessionResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -454,6 +495,7 @@ public GetSessionResponse get( /** * Retrieve Recorded Sessions + * * @return The call builder */ public GetRecordedSessionsRequestBuilder getRecorded() { @@ -462,6 +504,7 @@ public GetRecordedSessionsRequestBuilder getRecorded() { /** * Retrieve Recorded Sessions + * * @param parentId ID of the parent stream * @return The response from the API call * @throws Exception if the API call fails @@ -473,10 +516,11 @@ public GetRecordedSessionsResponse getRecorded( /** * Retrieve Recorded Sessions + * * @param parentId ID of the parent stream * @param record Flag indicating if the response should only include recorded - sessions - + * sessions + * * @return The response from the API call * @throws Exception if the API call fails */ @@ -500,24 +544,25 @@ public GetRecordedSessionsResponse getRecorded( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( GetRecordedSessionsRequest.class, request, null)); - + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getRecordedSessions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -526,27 +571,30 @@ public GetRecordedSessionsResponse getRecorded( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getRecordedSessions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getRecordedSessions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getRecordedSessions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -578,7 +626,15 @@ public GetRecordedSessionsResponse getRecorded( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/studio/livepeer/livepeer/Stream.java b/src/main/java/studio/livepeer/livepeer/Stream.java index ef77c0f9..04cd45b2 100644 --- a/src/main/java/studio/livepeer/livepeer/Stream.java +++ b/src/main/java/studio/livepeer/livepeer/Stream.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import com.fasterxml.jackson.core.type.TypeReference; @@ -15,10 +14,10 @@ import java.util.Optional; import studio.livepeer.livepeer.models.components.Asset; import studio.livepeer.livepeer.models.components.ClipPayload; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.NewStreamPayload; import studio.livepeer.livepeer.models.components.StreamPatchPayload; import studio.livepeer.livepeer.models.components.TargetAddPayload; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.AddMultistreamTargetRequest; import studio.livepeer.livepeer.models.operations.AddMultistreamTargetRequestBuilder; @@ -60,7 +59,7 @@ import studio.livepeer.livepeer.utils.Hook.BeforeRequestContextImpl; import studio.livepeer.livepeer.utils.SerializedBody; import studio.livepeer.livepeer.utils.Utils.JsonShape; -import studio.livepeer.livepeer.utils.Utils; +import studio.livepeer.livepeer.utils.Utils; /** * Operations related to livestream api @@ -87,7 +86,8 @@ public class Stream implements /** * Create a stream - * The only parameter you are required to set is the name of your stream, + * + * <p>The only parameter you are required to set is the name of your stream, * but we also highly recommend that you define transcoding profiles * parameter that suits your specific broadcasting configuration. * \ @@ -109,7 +109,8 @@ public CreateStreamRequestBuilder create() { /** * Create a stream - * The only parameter you are required to set is the name of your stream, + * + * <p>The only parameter you are required to set is the name of your stream, * but we also highly recommend that you define transcoding profiles * parameter that suits your specific broadcasting configuration. * \ @@ -150,19 +151,20 @@ public CreateStreamResponse create( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "createStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -171,27 +173,30 @@ public CreateStreamResponse create( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "createStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -223,7 +228,15 @@ public CreateStreamResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -257,6 +270,7 @@ public CreateStreamResponse create( /** * Retrieve streams + * * @return The call builder */ public GetStreamsRequestBuilder getAll() { @@ -265,6 +279,7 @@ public GetStreamsRequestBuilder getAll() { /** * Retrieve streams + * * @return The response from the API call * @throws Exception if the API call fails */ @@ -274,7 +289,8 @@ public GetStreamsResponse getAllDirect() throws Exception { /** * Retrieve streams - * @param streamsonly + * + * @param streamsonly * @return The response from the API call * @throws Exception if the API call fails */ @@ -294,24 +310,25 @@ public GetStreamsResponse getAll( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( GetStreamsRequest.class, request, null)); - + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getStreams", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -320,27 +337,30 @@ public GetStreamsResponse getAll( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getStreams", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getStreams", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getStreams", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -372,7 +392,15 @@ public GetStreamsResponse getAll( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -406,6 +434,7 @@ public GetStreamsResponse getAll( /** * Retrieve a stream + * * @return The call builder */ public GetStreamRequestBuilder get() { @@ -414,6 +443,7 @@ public GetStreamRequestBuilder get() { /** * Retrieve a stream + * * @param id ID of the stream * @return The response from the API call * @throws Exception if the API call fails @@ -436,19 +466,20 @@ public GetStreamResponse get( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -457,27 +488,30 @@ public GetStreamResponse get( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -509,7 +543,15 @@ public GetStreamResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -543,6 +585,7 @@ public GetStreamResponse get( /** * Update a stream + * * @return The call builder */ public UpdateStreamRequestBuilder update() { @@ -551,8 +594,9 @@ public UpdateStreamRequestBuilder update() { /** * Update a stream + * * @param id ID of the stream - * @param streamPatchPayload + * @param streamPatchPayload * @return The response from the API call * @throws Exception if the API call fails */ @@ -589,19 +633,20 @@ public UpdateStreamResponse update( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "updateStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -610,27 +655,30 @@ public UpdateStreamResponse update( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "updateStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -651,7 +699,15 @@ public UpdateStreamResponse update( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -685,7 +741,8 @@ public UpdateStreamResponse update( /** * Delete a stream - * This will also suspend any active stream sessions, so make sure to wait + * + * <p>This will also suspend any active stream sessions, so make sure to wait * until the stream has finished. To explicitly interrupt an active * session, consider instead updating the suspended field in the stream * using the PATCH stream API. @@ -698,7 +755,8 @@ public DeleteStreamRequestBuilder delete() { /** * Delete a stream - * This will also suspend any active stream sessions, so make sure to wait + * + * <p>This will also suspend any active stream sessions, so make sure to wait * until the stream has finished. To explicitly interrupt an active * session, consider instead updating the suspended field in the stream * using the PATCH stream API. @@ -725,19 +783,20 @@ public DeleteStreamResponse delete( HTTPRequest _req = new HTTPRequest(_url, "DELETE"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "deleteStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -746,27 +805,30 @@ public DeleteStreamResponse delete( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "deleteStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -787,7 +849,15 @@ public DeleteStreamResponse delete( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -821,7 +891,8 @@ public DeleteStreamResponse delete( /** * Terminates a live stream - * `DELETE /stream/{id}/terminate` can be used to terminate an ongoing + * + * <p>`DELETE /stream/{id}/terminate` can be used to terminate an ongoing * session on a live stream. Unlike suspending the stream, it allows the * streamer to restart streaming even immediately, but it will force * terminate the current session and stop the recording. @@ -838,7 +909,8 @@ public TerminateStreamRequestBuilder terminate() { /** * Terminates a live stream - * `DELETE /stream/{id}/terminate` can be used to terminate an ongoing + * + * <p>`DELETE /stream/{id}/terminate` can be used to terminate an ongoing * session on a live stream. Unlike suspending the stream, it allows the * streamer to restart streaming even immediately, but it will force * terminate the current session and stop the recording. @@ -869,19 +941,20 @@ public TerminateStreamResponse terminate( HTTPRequest _req = new HTTPRequest(_url, "DELETE"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "terminateStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -890,27 +963,30 @@ public TerminateStreamResponse terminate( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "terminateStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "terminateStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "terminateStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -931,7 +1007,15 @@ public TerminateStreamResponse terminate( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -965,7 +1049,8 @@ public TerminateStreamResponse terminate( /** * Start ingest for a pull stream - * `POST /stream/{id}/start-pull` can be used to start ingest for a stream + * + * <p>`POST /stream/{id}/start-pull` can be used to start ingest for a stream * configured with a pull source. If the stream has recording configured, * it will also start recording. * \ @@ -981,7 +1066,8 @@ public StartPullStreamRequestBuilder startPull() { /** * Start ingest for a pull stream - * `POST /stream/{id}/start-pull` can be used to start ingest for a stream + * + * <p>`POST /stream/{id}/start-pull` can be used to start ingest for a stream * configured with a pull source. If the stream has recording configured, * it will also start recording. * \ @@ -1011,19 +1097,20 @@ public StartPullStreamResponse startPull( HTTPRequest _req = new HTTPRequest(_url, "POST"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "startPullStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -1032,27 +1119,30 @@ public StartPullStreamResponse startPull( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "startPullStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "startPullStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "startPullStream", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1073,7 +1163,15 @@ public StartPullStreamResponse startPull( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1107,6 +1205,7 @@ public StartPullStreamResponse startPull( /** * Create a clip + * * @return The call builder */ public CreateClipRequestBuilder createClip() { @@ -1115,6 +1214,7 @@ public CreateClipRequestBuilder createClip() { /** * Create a clip + * * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails @@ -1142,19 +1242,20 @@ public CreateClipResponse createClip( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "createClip", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -1163,27 +1264,30 @@ public CreateClipResponse createClip( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createClip", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "createClip", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createClip", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1215,7 +1319,15 @@ public CreateClipResponse createClip( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1249,6 +1361,7 @@ public CreateClipResponse createClip( /** * Retrieve clips of a livestream + * * @return The call builder */ public GetClipsRequestBuilder getClips() { @@ -1257,6 +1370,7 @@ public GetClipsRequestBuilder getClips() { /** * Retrieve clips of a livestream + * * @param id ID of the parent stream or playbackId of parent stream * @return The response from the API call * @throws Exception if the API call fails @@ -1279,19 +1393,20 @@ public GetClipsResponse getClips( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getClips", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -1300,27 +1415,30 @@ public GetClipsResponse getClips( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getClips", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getClips", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getClips", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1352,7 +1470,15 @@ public GetClipsResponse getClips( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1386,6 +1512,7 @@ public GetClipsResponse getClips( /** * Add a multistream target + * * @return The call builder */ public AddMultistreamTargetRequestBuilder addMultistreamTarget() { @@ -1394,8 +1521,9 @@ public AddMultistreamTargetRequestBuilder addMultistreamTarget() { /** * Add a multistream target + * * @param id ID of the parent stream - * @param targetAddPayload + * @param targetAddPayload * @return The response from the API call * @throws Exception if the API call fails */ @@ -1432,19 +1560,20 @@ public AddMultistreamTargetResponse addMultistreamTarget( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "addMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -1453,27 +1582,30 @@ public AddMultistreamTargetResponse addMultistreamTarget( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "addMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "addMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "addMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1494,7 +1626,15 @@ public AddMultistreamTargetResponse addMultistreamTarget( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1528,6 +1668,7 @@ public AddMultistreamTargetResponse addMultistreamTarget( /** * Remove a multistream target + * * @return The call builder */ public RemoveMultistreamTargetRequestBuilder removeMultistreamTarget() { @@ -1536,6 +1677,7 @@ public RemoveMultistreamTargetRequestBuilder removeMultistreamTarget() { /** * Remove a multistream target + * * @param id ID of the parent stream * @param targetId ID of the multistream target * @return The response from the API call @@ -1561,19 +1703,20 @@ public RemoveMultistreamTargetResponse removeMultistreamTarget( HTTPRequest _req = new HTTPRequest(_url, "DELETE"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "removeMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -1582,27 +1725,30 @@ public RemoveMultistreamTargetResponse removeMultistreamTarget( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "removeMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "removeMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "removeMultistreamTarget", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1623,7 +1769,15 @@ public RemoveMultistreamTargetResponse removeMultistreamTarget( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/studio/livepeer/livepeer/Task.java b/src/main/java/studio/livepeer/livepeer/Task.java index fd634d91..ecbed673 100644 --- a/src/main/java/studio/livepeer/livepeer/Task.java +++ b/src/main/java/studio/livepeer/livepeer/Task.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import com.fasterxml.jackson.core.type.TypeReference; @@ -12,7 +11,7 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.GetTaskRequest; import studio.livepeer.livepeer.models.operations.GetTaskRequestBuilder; @@ -25,7 +24,7 @@ import studio.livepeer.livepeer.utils.Hook.AfterErrorContextImpl; import studio.livepeer.livepeer.utils.Hook.AfterSuccessContextImpl; import studio.livepeer.livepeer.utils.Hook.BeforeRequestContextImpl; -import studio.livepeer.livepeer.utils.Utils; +import studio.livepeer.livepeer.utils.Utils; /** * Operations related to tasks api @@ -43,6 +42,7 @@ public class Task implements /** * Retrieve Tasks + * * @return The call builder */ public GetTasksRequestBuilder getAll() { @@ -51,6 +51,7 @@ public GetTasksRequestBuilder getAll() { /** * Retrieve Tasks + * * @return The response from the API call * @throws Exception if the API call fails */ @@ -63,19 +64,20 @@ public GetTasksResponse getAllDirect() throws Exception { HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getTasks", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -84,27 +86,30 @@ public GetTasksResponse getAllDirect() throws Exception { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getTasks", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getTasks", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getTasks", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -136,7 +141,15 @@ public GetTasksResponse getAllDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -170,6 +183,7 @@ public GetTasksResponse getAllDirect() throws Exception { /** * Retrieve a Task + * * @return The call builder */ public GetTaskRequestBuilder get() { @@ -178,6 +192,7 @@ public GetTaskRequestBuilder get() { /** * Retrieve a Task + * * @param taskId ID of the task * @return The response from the API call * @throws Exception if the API call fails @@ -200,19 +215,20 @@ public GetTaskResponse get( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getTask", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -221,27 +237,30 @@ public GetTaskResponse get( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getTask", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getTask", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getTask", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -273,7 +292,15 @@ public GetTaskResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/studio/livepeer/livepeer/Transcode.java b/src/main/java/studio/livepeer/livepeer/Transcode.java index c6b66686..bb8ddd05 100644 --- a/src/main/java/studio/livepeer/livepeer/Transcode.java +++ b/src/main/java/studio/livepeer/livepeer/Transcode.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import com.fasterxml.jackson.core.type.TypeReference; @@ -13,9 +12,9 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Task; import studio.livepeer.livepeer.models.components.TranscodePayload; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.SDKMethodInterfaces.*; import studio.livepeer.livepeer.models.operations.TranscodeVideoRequestBuilder; @@ -27,7 +26,7 @@ import studio.livepeer.livepeer.utils.Hook.BeforeRequestContextImpl; import studio.livepeer.livepeer.utils.SerializedBody; import studio.livepeer.livepeer.utils.Utils.JsonShape; -import studio.livepeer.livepeer.utils.Utils; +import studio.livepeer.livepeer.utils.Utils; /** * Operations related to transcode api @@ -44,7 +43,8 @@ public class Transcode implements /** * Transcode a video - * `POST /transcode` transcodes a video file and uploads the results to the + * + * <p>`POST /transcode` transcodes a video file and uploads the results to the * specified storage service. * \ * \ @@ -81,7 +81,7 @@ public class Transcode implements * | ---- | ------ | ------------------------------------ | * | url | string | A public HTTP URL for the video file. | * - * Note: For IPFS HTTP gateway URLs, the API currently only supports “path + * <p>Note: For IPFS HTTP gateway URLs, the API currently only supports “path * style” URLs and does not support “subdomain style” URLs. The API will * support both styles of URLs in a future update. * \ @@ -92,7 +92,7 @@ public class Transcode implements * S3 credentials can be used to authenticate with a S3 API compatible * service to read a video file. * - * ```json + * <p>```json * { * "type": "s3", * "endpoint": "https://gateway.storjshare.io", @@ -105,8 +105,7 @@ public class Transcode implements * } * ``` * - * - * ## Storage + * <p>## Storage * \ * This endpoint currently supports the following storage services: * - S3 API Compatible Service @@ -126,9 +125,9 @@ public class Transcode implements * } * ``` * - * **Web3 Storage** + * <p>**Web3 Storage** * - * ```json + * <p>```json * { * "type": "web3.storage", * "credentials": { @@ -137,17 +136,15 @@ public class Transcode implements * } * ``` * - * - * - * ## Outputs + * <p>## Outputs * \ * This endpoint currently supports the following output types: * - HLS * - MP4 * - * **HLS** + * <p>**HLS** * - * ```json + * <p>```json * { * "hls": { * "path": "/samplevideo/hls" @@ -155,10 +152,9 @@ public class Transcode implements * } * ``` * + * <p>**MP4** * - * **MP4** - * - * ```json + * <p>```json * { * "mp4": { * "path": "/samplevideo/mp4" @@ -174,7 +170,8 @@ public TranscodeVideoRequestBuilder create() { /** * Transcode a video - * `POST /transcode` transcodes a video file and uploads the results to the + * + * <p>`POST /transcode` transcodes a video file and uploads the results to the * specified storage service. * \ * \ @@ -211,7 +208,7 @@ public TranscodeVideoRequestBuilder create() { * | ---- | ------ | ------------------------------------ | * | url | string | A public HTTP URL for the video file. | * - * Note: For IPFS HTTP gateway URLs, the API currently only supports “path + * <p>Note: For IPFS HTTP gateway URLs, the API currently only supports “path * style” URLs and does not support “subdomain style” URLs. The API will * support both styles of URLs in a future update. * \ @@ -222,7 +219,7 @@ public TranscodeVideoRequestBuilder create() { * S3 credentials can be used to authenticate with a S3 API compatible * service to read a video file. * - * ```json + * <p>```json * { * "type": "s3", * "endpoint": "https://gateway.storjshare.io", @@ -235,8 +232,7 @@ public TranscodeVideoRequestBuilder create() { * } * ``` * - * - * ## Storage + * <p>## Storage * \ * This endpoint currently supports the following storage services: * - S3 API Compatible Service @@ -256,9 +252,9 @@ public TranscodeVideoRequestBuilder create() { * } * ``` * - * **Web3 Storage** + * <p>**Web3 Storage** * - * ```json + * <p>```json * { * "type": "web3.storage", * "credentials": { @@ -267,17 +263,15 @@ public TranscodeVideoRequestBuilder create() { * } * ``` * - * - * - * ## Outputs + * <p>## Outputs * \ * This endpoint currently supports the following output types: * - HLS * - MP4 * - * **HLS** + * <p>**HLS** * - * ```json + * <p>```json * { * "hls": { * "path": "/samplevideo/hls" @@ -285,10 +279,9 @@ public TranscodeVideoRequestBuilder create() { * } * ``` * + * <p>**MP4** * - * **MP4** - * - * ```json + * <p>```json * { * "mp4": { * "path": "/samplevideo/mp4" @@ -323,19 +316,20 @@ public TranscodeVideoResponse create( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "transcodeVideo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -344,27 +338,30 @@ public TranscodeVideoResponse create( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "transcodeVideo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "transcodeVideo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "transcodeVideo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -396,7 +393,15 @@ public TranscodeVideoResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/studio/livepeer/livepeer/Webhook.java b/src/main/java/studio/livepeer/livepeer/Webhook.java index 8ca36b18..11a7df92 100644 --- a/src/main/java/studio/livepeer/livepeer/Webhook.java +++ b/src/main/java/studio/livepeer/livepeer/Webhook.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer; import com.fasterxml.jackson.core.type.TypeReference; @@ -13,9 +12,9 @@ import java.net.http.HttpResponse; import java.util.List; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.WebhookInput; import studio.livepeer.livepeer.models.components.WebhookLog; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.models.errors.SDKError; import studio.livepeer.livepeer.models.operations.CreateWebhookRequestBuilder; import studio.livepeer.livepeer.models.operations.CreateWebhookResponse; @@ -47,7 +46,7 @@ import studio.livepeer.livepeer.utils.Hook.BeforeRequestContextImpl; import studio.livepeer.livepeer.utils.SerializedBody; import studio.livepeer.livepeer.utils.Utils.JsonShape; -import studio.livepeer.livepeer.utils.Utils; +import studio.livepeer.livepeer.utils.Utils; /** * Operations related to webhook api @@ -71,6 +70,7 @@ public class Webhook implements /** * Retrieve a Webhook + * * @return The call builder */ public GetWebhooksRequestBuilder getAll() { @@ -79,6 +79,7 @@ public GetWebhooksRequestBuilder getAll() { /** * Retrieve a Webhook + * * @return The response from the API call * @throws Exception if the API call fails */ @@ -91,19 +92,20 @@ public GetWebhooksResponse getAllDirect() throws Exception { HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getWebhooks", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -112,27 +114,30 @@ public GetWebhooksResponse getAllDirect() throws Exception { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getWebhooks", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getWebhooks", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getWebhooks", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -164,7 +169,15 @@ public GetWebhooksResponse getAllDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -198,7 +211,8 @@ public GetWebhooksResponse getAllDirect() throws Exception { /** * Create a webhook - * 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. + * + * <p>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. * * @return The call builder */ @@ -208,7 +222,8 @@ public CreateWebhookRequestBuilder create() { /** * Create a webhook - * 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. + * + * <p>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. * * @param request The request object containing all of the parameters for the API call. * @return The response from the API call @@ -237,19 +252,20 @@ public CreateWebhookResponse create( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "createWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -258,27 +274,30 @@ public CreateWebhookResponse create( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "createWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "createWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -310,7 +329,15 @@ public CreateWebhookResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -344,6 +371,7 @@ public CreateWebhookResponse create( /** * Retrieve a webhook + * * @return The call builder */ public GetWebhookRequestBuilder get() { @@ -352,7 +380,8 @@ public GetWebhookRequestBuilder get() { /** * Retrieve a webhook - * @param id + * + * @param id * @return The response from the API call * @throws Exception if the API call fails */ @@ -374,19 +403,20 @@ public GetWebhookResponse get( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -395,27 +425,30 @@ public GetWebhookResponse get( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -447,7 +480,15 @@ public GetWebhookResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -481,6 +522,7 @@ public GetWebhookResponse get( /** * Update a webhook + * * @return The call builder */ public UpdateWebhookRequestBuilder update() { @@ -489,8 +531,9 @@ public UpdateWebhookRequestBuilder update() { /** * Update a webhook - * @param id - * @param webhook + * + * @param id + * @param webhook * @return The response from the API call * @throws Exception if the API call fails */ @@ -527,19 +570,20 @@ public UpdateWebhookResponse update( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "updateWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -548,27 +592,30 @@ public UpdateWebhookResponse update( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "updateWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "updateWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -600,7 +647,15 @@ public UpdateWebhookResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -634,6 +689,7 @@ public UpdateWebhookResponse update( /** * Delete a webhook + * * @return The call builder */ public DeleteWebhookRequestBuilder delete() { @@ -642,7 +698,8 @@ public DeleteWebhookRequestBuilder delete() { /** * Delete a webhook - * @param id + * + * @param id * @return The response from the API call * @throws Exception if the API call fails */ @@ -664,19 +721,20 @@ public DeleteWebhookResponse delete( HTTPRequest _req = new HTTPRequest(_url, "DELETE"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "deleteWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -685,27 +743,30 @@ public DeleteWebhookResponse delete( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "deleteWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "deleteWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -737,7 +798,15 @@ public DeleteWebhookResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -771,6 +840,7 @@ public DeleteWebhookResponse delete( /** * Retrieve webhook logs + * * @return The call builder */ public GetWebhookLogsRequestBuilder getLogs() { @@ -779,7 +849,8 @@ public GetWebhookLogsRequestBuilder getLogs() { /** * Retrieve webhook logs - * @param id + * + * @param id * @return The response from the API call * @throws Exception if the API call fails */ @@ -801,19 +872,20 @@ public GetWebhookLogsResponse getLogs( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getWebhookLogs", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -822,27 +894,30 @@ public GetWebhookLogsResponse getLogs( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getWebhookLogs", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getWebhookLogs", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getWebhookLogs", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -874,7 +949,15 @@ public GetWebhookLogsResponse getLogs( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -908,6 +991,7 @@ public GetWebhookLogsResponse getLogs( /** * Retrieve a webhook log + * * @return The call builder */ public GetWebhookLogRequestBuilder getLog() { @@ -916,8 +1000,9 @@ public GetWebhookLogRequestBuilder getLog() { /** * Retrieve a webhook log - * @param id - * @param logId + * + * @param id + * @param logId * @return The response from the API call * @throws Exception if the API call fails */ @@ -941,19 +1026,20 @@ public GetWebhookLogResponse getLog( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "getWebhookLog", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -962,27 +1048,30 @@ public GetWebhookLogResponse getLog( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getWebhookLog", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "getWebhookLog", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "getWebhookLog", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1014,7 +1103,15 @@ public GetWebhookLogResponse getLog( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1048,7 +1145,8 @@ public GetWebhookLogResponse getLog( /** * Resend a webhook - * Use this API to resend the same webhook request. This is useful when + * + * <p>Use this API to resend the same webhook request. This is useful when * developing and debugging, allowing you to easily repeat the same webhook * to check or fix the behaviour in your handler. * @@ -1060,12 +1158,13 @@ public ResendWebhookRequestBuilder resendLog() { /** * Resend a webhook - * Use this API to resend the same webhook request. This is useful when + * + * <p>Use this API to resend the same webhook request. This is useful when * developing and debugging, allowing you to easily repeat the same webhook * to check or fix the behaviour in your handler. * - * @param id - * @param logId + * @param id + * @param logId * @return The response from the API call * @throws Exception if the API call fails */ @@ -1089,19 +1188,20 @@ public ResendWebhookResponse resendLog( HTTPRequest _req = new HTTPRequest(_url, "POST"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); - + SDKConfiguration.USER_AGENT); + + Optional<SecuritySource> _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( new BeforeRequestContextImpl( + _baseUrl, "resendWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse<InputStream> _httpRes; try { @@ -1110,27 +1210,30 @@ public ResendWebhookResponse resendLog( _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "resendWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( new AfterSuccessContextImpl( + _baseUrl, "resendWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( + _baseUrl, "resendWebhook", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1162,7 +1265,15 @@ public ResendWebhookResponse resendLog( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Asset.java b/src/main/java/studio/livepeer/livepeer/models/components/Asset.java index e1f54422..df57fc82 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Asset.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Asset.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -21,7 +19,6 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class Asset { @JsonProperty("id") @@ -42,6 +39,7 @@ public class Asset { private Optional<String> playbackId; /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @@ -83,7 +81,6 @@ public class Asset { * field for recordings. If not specified, default profiles are derived * based on the source input. If this is a recording, the source will * not be present in this list but will be available for playback. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("profiles") @@ -102,7 +99,6 @@ public class Asset { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ @JsonProperty("name") private String name; @@ -240,6 +236,7 @@ public Optional<String> playbackId() { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -290,7 +287,6 @@ public Optional<CreatorId> creatorId() { * field for recordings. If not specified, default profiles are derived * based on the source input. If this is a recording, the source will * not be present in this list but will be available for playback. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -315,7 +311,6 @@ public Optional<AssetStatus> status() { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ @JsonIgnore public String name() { @@ -374,7 +369,7 @@ public Optional<VideoSpec> videoSpec() { public final static Builder builder() { return new Builder(); - } + } public Asset withId(String id) { Utils.checkNotNull(id, "id"); @@ -419,6 +414,7 @@ public Asset withPlaybackId(Optional<String> playbackId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -429,6 +425,7 @@ public Asset withUserId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -516,7 +513,6 @@ public Asset withCreatorId(Optional<? extends CreatorId> creatorId) { * field for recordings. If not specified, default profiles are derived * based on the source input. If this is a recording, the source will * not be present in this list but will be available for playback. - * */ public Asset withProfiles(List<TranscodeProfile> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -530,7 +526,6 @@ public Asset withProfiles(List<TranscodeProfile> profiles) { * field for recordings. If not specified, default profiles are derived * based on the source input. If this is a recording, the source will * not be present in this list but will be available for playback. - * */ public Asset withProfiles(Optional<? extends List<TranscodeProfile>> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -570,7 +565,6 @@ public Asset withStatus(Optional<? extends AssetStatus> status) { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ public Asset withName(String name) { Utils.checkNotNull(name, "name"); @@ -685,6 +679,7 @@ public Asset withVideoSpec(Optional<? extends VideoSpec> videoSpec) { this.videoSpec = videoSpec; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -804,7 +799,7 @@ public final static class Builder { private JsonNullable<? extends List<Hash>> hash = JsonNullable.undefined(); - private Optional<? extends VideoSpec> videoSpec = Optional.empty(); + private Optional<? extends VideoSpec> videoSpec = Optional.empty(); private Builder() { // force use of static builder() method @@ -853,6 +848,7 @@ public Builder playbackId(Optional<String> playbackId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -863,6 +859,7 @@ public Builder userId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -950,7 +947,6 @@ public Builder creatorId(Optional<? extends CreatorId> creatorId) { * field for recordings. If not specified, default profiles are derived * based on the source input. If this is a recording, the source will * not be present in this list but will be available for playback. - * */ public Builder profiles(List<TranscodeProfile> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -964,7 +960,6 @@ public Builder profiles(List<TranscodeProfile> profiles) { * field for recordings. If not specified, default profiles are derived * based on the source input. If this is a recording, the source will * not be present in this list but will be available for playback. - * */ public Builder profiles(Optional<? extends List<TranscodeProfile>> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -1004,7 +999,6 @@ public Builder status(Optional<? extends AssetStatus> status) { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ public Builder name(String name) { Utils.checkNotNull(name, "name"); @@ -1144,4 +1138,3 @@ public Asset build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetIpfs.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetIpfs.java index 873dd5bb..4447483d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetIpfs.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetIpfs.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,7 +17,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class AssetIpfs { @JsonInclude(Include.NON_ABSENT) @@ -37,7 +34,6 @@ public class AssetIpfs { /** * Timestamp (in milliseconds) at which IPFS export task was * updated - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedAt") @@ -84,7 +80,6 @@ public Optional<IpfsFileInfo> nftMetadata() { /** * Timestamp (in milliseconds) at which IPFS export task was * updated - * */ @JsonIgnore public Optional<Double> updatedAt() { @@ -93,7 +88,7 @@ public Optional<Double> updatedAt() { public final static Builder builder() { return new Builder(); - } + } public AssetIpfs withSpec(AssetSpec spec) { Utils.checkNotNull(spec, "spec"); @@ -134,7 +129,6 @@ public AssetIpfs withNftMetadata(Optional<? extends IpfsFileInfo> nftMetadata) { /** * Timestamp (in milliseconds) at which IPFS export task was * updated - * */ public AssetIpfs withUpdatedAt(double updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); @@ -145,13 +139,13 @@ public AssetIpfs withUpdatedAt(double updatedAt) { /** * Timestamp (in milliseconds) at which IPFS export task was * updated - * */ public AssetIpfs withUpdatedAt(Optional<Double> updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = updatedAt; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -195,7 +189,7 @@ public final static class Builder { private Optional<? extends IpfsFileInfo> nftMetadata = Optional.empty(); - private Optional<Double> updatedAt = Optional.empty(); + private Optional<Double> updatedAt = Optional.empty(); private Builder() { // force use of static builder() method @@ -240,7 +234,6 @@ public Builder nftMetadata(Optional<? extends IpfsFileInfo> nftMetadata) { /** * Timestamp (in milliseconds) at which IPFS export task was * updated - * */ public Builder updatedAt(double updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); @@ -251,7 +244,6 @@ public Builder updatedAt(double updatedAt) { /** * Timestamp (in milliseconds) at which IPFS export task was * updated - * */ public Builder updatedAt(Optional<Double> updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); @@ -268,4 +260,3 @@ public AssetIpfs build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadata.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadata.java index 49754efa..ae7634bf 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadata.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadata.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import java.lang.Override; import java.lang.String; @@ -12,12 +10,12 @@ import studio.livepeer.livepeer.utils.Utils; /** - * AssetNftMetadata - Additional data to add to the NFT metadata exported to + * AssetNftMetadata + * + * <p>Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ - public class AssetNftMetadata { @JsonCreator @@ -28,7 +26,8 @@ public AssetNftMetadata() { public final static Builder builder() { return new Builder(); - } + } + @Override public boolean equals(java.lang.Object o) { @@ -52,7 +51,7 @@ public String toString() { return Utils.toString(AssetNftMetadata.class); } - public final static class Builder { + public final static class Builder { private Builder() { // force use of static builder() method @@ -64,4 +63,3 @@ public AssetNftMetadata build() { } } } - 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 114ea73c..b45d95ee 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadataTemplate.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetNftMetadataTemplate.java @@ -1,17 +1,19 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * AssetNftMetadataTemplate - Name of the NFT metadata template to export. 'player' + * AssetNftMetadataTemplate + * + * <p>Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ public enum AssetNftMetadataTemplate { FILE("file"), @@ -27,4 +29,14 @@ private AssetNftMetadataTemplate(String value) { public String value() { return value; } + + public static Optional<AssetNftMetadataTemplate> fromValue(String value) { + for (AssetNftMetadataTemplate o: AssetNftMetadataTemplate.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetPatchPayload.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetPatchPayload.java index 9122183f..bebc39a5 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetPatchPayload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetPatchPayload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,12 +16,10 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class AssetPatchPayload { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("name") @@ -66,7 +62,6 @@ public AssetPatchPayload() { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ @JsonIgnore public Optional<String> name() { @@ -96,11 +91,10 @@ public Optional<Storage> storage() { public final static Builder builder() { return new Builder(); - } + } /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ public AssetPatchPayload withName(String name) { Utils.checkNotNull(name, "name"); @@ -110,7 +104,6 @@ public AssetPatchPayload withName(String name) { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ public AssetPatchPayload withName(Optional<String> name) { Utils.checkNotNull(name, "name"); @@ -159,6 +152,7 @@ public AssetPatchPayload withStorage(Optional<? extends Storage> storage) { this.storage = storage; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -202,7 +196,7 @@ public final static class Builder { private JsonNullable<? extends PlaybackPolicy> playbackPolicy = JsonNullable.undefined(); - private Optional<? extends Storage> storage = Optional.empty(); + private Optional<? extends Storage> storage = Optional.empty(); private Builder() { // force use of static builder() method @@ -210,7 +204,6 @@ private Builder() { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ public Builder name(String name) { Utils.checkNotNull(name, "name"); @@ -220,7 +213,6 @@ public Builder name(String name) { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ public Builder name(Optional<String> name) { Utils.checkNotNull(name, "name"); @@ -279,4 +271,3 @@ public AssetPatchPayload build() { } } } - 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 e4088026..ff7866f9 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetPhase.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetPhase.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * AssetPhase - Phase of the asset + * AssetPhase + * + * <p>Phase of the asset */ public enum AssetPhase { UPLOADING("uploading"), @@ -29,4 +32,14 @@ private AssetPhase(String value) { public String value() { return value; } + + public static Optional<AssetPhase> fromValue(String value) { + for (AssetPhase o: AssetPhase.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 7da8d974..75072219 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetSource3Type.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetSource3Type.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum AssetSource3Type { DIRECT_UPLOAD("directUpload"), @@ -21,4 +22,14 @@ private AssetSource3Type(String value) { public String value() { return value; } + + public static Optional<AssetSource3Type> fromValue(String value) { + for (AssetSource3Type o: AssetSource3Type.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 9f8468f1..6d3f4d1d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetSourceType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetSourceType.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum AssetSourceType { RECORDING("recording"); @@ -20,4 +21,14 @@ private AssetSourceType(String value) { public String value() { return value; } + + public static Optional<AssetSourceType> fromValue(String value) { + for (AssetSourceType o: AssetSourceType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetSpec.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetSpec.java index 6cb5a019..0a3cd687 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetSpec.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetSpec.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,14 +17,12 @@ import studio.livepeer.livepeer.utils.LazySingletonValue; import studio.livepeer.livepeer.utils.Utils; - public class AssetSpec { /** * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("nftMetadataTemplate") @@ -36,7 +32,6 @@ public class AssetSpec { * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("nftMetadata") @@ -60,7 +55,6 @@ public AssetSpec() { * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -72,7 +66,6 @@ public Optional<AssetNftMetadataTemplate> nftMetadataTemplate() { * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -82,13 +75,12 @@ public Optional<AssetNftMetadata> nftMetadata() { public final static Builder builder() { return new Builder(); - } + } /** * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ public AssetSpec withNftMetadataTemplate(AssetNftMetadataTemplate nftMetadataTemplate) { Utils.checkNotNull(nftMetadataTemplate, "nftMetadataTemplate"); @@ -100,7 +92,6 @@ public AssetSpec withNftMetadataTemplate(AssetNftMetadataTemplate nftMetadataTem * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ public AssetSpec withNftMetadataTemplate(Optional<? extends AssetNftMetadataTemplate> nftMetadataTemplate) { Utils.checkNotNull(nftMetadataTemplate, "nftMetadataTemplate"); @@ -112,7 +103,6 @@ public AssetSpec withNftMetadataTemplate(Optional<? extends AssetNftMetadataTemp * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ public AssetSpec withNftMetadata(AssetNftMetadata nftMetadata) { Utils.checkNotNull(nftMetadata, "nftMetadata"); @@ -124,13 +114,13 @@ public AssetSpec withNftMetadata(AssetNftMetadata nftMetadata) { * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ public AssetSpec withNftMetadata(Optional<? extends AssetNftMetadata> nftMetadata) { Utils.checkNotNull(nftMetadata, "nftMetadata"); this.nftMetadata = nftMetadata; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -164,7 +154,7 @@ public final static class Builder { private Optional<? extends AssetNftMetadataTemplate> nftMetadataTemplate; - private Optional<? extends AssetNftMetadata> nftMetadata = Optional.empty(); + private Optional<? extends AssetNftMetadata> nftMetadata = Optional.empty(); private Builder() { // force use of static builder() method @@ -174,7 +164,6 @@ private Builder() { * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ public Builder nftMetadataTemplate(AssetNftMetadataTemplate nftMetadataTemplate) { Utils.checkNotNull(nftMetadataTemplate, "nftMetadataTemplate"); @@ -186,7 +175,6 @@ public Builder nftMetadataTemplate(AssetNftMetadataTemplate nftMetadataTemplate) * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ public Builder nftMetadataTemplate(Optional<? extends AssetNftMetadataTemplate> nftMetadataTemplate) { Utils.checkNotNull(nftMetadataTemplate, "nftMetadataTemplate"); @@ -198,7 +186,6 @@ public Builder nftMetadataTemplate(Optional<? extends AssetNftMetadataTemplate> * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ public Builder nftMetadata(AssetNftMetadata nftMetadata) { Utils.checkNotNull(nftMetadata, "nftMetadata"); @@ -210,7 +197,6 @@ public Builder nftMetadata(AssetNftMetadata nftMetadata) { * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ public Builder nftMetadata(Optional<? extends AssetNftMetadata> nftMetadata) { Utils.checkNotNull(nftMetadata, "nftMetadata"); @@ -234,4 +220,3 @@ public AssetSpec build() { new TypeReference<Optional<? extends AssetNftMetadataTemplate>>() {}); } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetStatus.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetStatus.java index 48da496a..a62530ae 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetStatus.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetStatus.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,9 +16,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * AssetStatus - Status of the asset + * AssetStatus + * + * <p>Status of the asset */ - public class AssetStatus { /** @@ -105,7 +104,7 @@ public Optional<String> errorMessage() { public final static Builder builder() { return new Builder(); - } + } /** * Phase of the asset @@ -160,6 +159,7 @@ public AssetStatus withErrorMessage(Optional<String> errorMessage) { this.errorMessage = errorMessage; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -203,7 +203,7 @@ public final static class Builder { private Optional<Double> progress = Optional.empty(); - private Optional<String> errorMessage = Optional.empty(); + private Optional<String> errorMessage = Optional.empty(); private Builder() { // force use of static builder() method @@ -272,4 +272,3 @@ public AssetStatus build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AssetStorage.java b/src/main/java/studio/livepeer/livepeer/models/components/AssetStorage.java index 8d55d94b..719e1372 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetStorage.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetStorage.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class AssetStorage { @JsonInclude(Include.NON_ABSENT) @@ -56,7 +53,7 @@ public Optional<StorageStatus> status() { public final static Builder builder() { return new Builder(); - } + } public AssetStorage withIpfs(AssetIpfs ipfs) { Utils.checkNotNull(ipfs, "ipfs"); @@ -81,6 +78,7 @@ public AssetStorage withStatus(Optional<? extends StorageStatus> status) { this.status = status; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -114,7 +112,7 @@ public final static class Builder { private Optional<? extends AssetIpfs> ipfs = Optional.empty(); - private Optional<? extends StorageStatus> status = Optional.empty(); + private Optional<? extends StorageStatus> status = Optional.empty(); private Builder() { // force use of static builder() method @@ -151,4 +149,3 @@ public AssetStorage build() { } } } - 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 4ca15dfa..63360347 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetType.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * AssetType - Type of the asset. + * AssetType + * + * <p>Type of the asset. */ public enum AssetType { VIDEO("video"), @@ -24,4 +27,14 @@ private AssetType(String value) { public String value() { return value; } + + public static Optional<AssetType> fromValue(String value) { + for (AssetType o: AssetType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 d677d5a2..7b445fc3 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AssetVideoSpecType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AssetVideoSpecType.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * AssetVideoSpecType - type of track + * AssetVideoSpecType + * + * <p>type of track */ public enum AssetVideoSpecType { VIDEO("video"), @@ -24,4 +27,14 @@ private AssetVideoSpecType(String value) { public String value() { return value; } + + public static Optional<AssetVideoSpecType> fromValue(String value) { + for (AssetVideoSpecType o: AssetVideoSpecType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Attestation.java b/src/main/java/studio/livepeer/livepeer/models/components/Attestation.java index 055c1d44..c1d66a58 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Attestation.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Attestation.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,7 +16,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Attestation { @JsonInclude(Include.NON_ABSENT) @@ -159,7 +156,7 @@ public Optional<AttestationStorage> storage() { public final static Builder builder() { return new Builder(); - } + } public Attestation withId(String id) { Utils.checkNotNull(id, "id"); @@ -250,6 +247,7 @@ public Attestation withStorage(Optional<? extends AttestationStorage> storage) { this.storage = storage; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -313,7 +311,7 @@ public final static class Builder { private Optional<? extends SignatureType> signatureType = Optional.empty(); - private Optional<? extends AttestationStorage> storage = Optional.empty(); + private Optional<? extends AttestationStorage> storage = Optional.empty(); private Builder() { // force use of static builder() method @@ -422,4 +420,3 @@ public Attestation build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AttestationIpfs.java b/src/main/java/studio/livepeer/livepeer/models/components/AttestationIpfs.java index f1007b39..45cea715 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AttestationIpfs.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AttestationIpfs.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,7 +17,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class AttestationIpfs { @JsonInclude(Include.NON_ABSENT) @@ -28,7 +25,6 @@ public class AttestationIpfs { /** * Timestamp (in milliseconds) at which IPFS export task was updated - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedAt") @@ -56,7 +52,6 @@ public Optional<Object> dollarRef() { /** * Timestamp (in milliseconds) at which IPFS export task was updated - * */ @JsonIgnore public Optional<Double> updatedAt() { @@ -65,7 +60,7 @@ public Optional<Double> updatedAt() { public final static Builder builder() { return new Builder(); - } + } public AttestationIpfs withDollarRef(Object dollarRef) { Utils.checkNotNull(dollarRef, "dollarRef"); @@ -81,7 +76,6 @@ public AttestationIpfs withDollarRef(Optional<? extends Object> dollarRef) { /** * Timestamp (in milliseconds) at which IPFS export task was updated - * */ public AttestationIpfs withUpdatedAt(double updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); @@ -91,13 +85,13 @@ public AttestationIpfs withUpdatedAt(double updatedAt) { /** * Timestamp (in milliseconds) at which IPFS export task was updated - * */ public AttestationIpfs withUpdatedAt(Optional<Double> updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); this.updatedAt = updatedAt; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -131,7 +125,7 @@ public final static class Builder { private Optional<? extends Object> dollarRef = Optional.empty(); - private Optional<Double> updatedAt = Optional.empty(); + private Optional<Double> updatedAt = Optional.empty(); private Builder() { // force use of static builder() method @@ -151,7 +145,6 @@ public Builder dollarRef(Optional<? extends Object> dollarRef) { /** * Timestamp (in milliseconds) at which IPFS export task was updated - * */ public Builder updatedAt(double updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); @@ -161,7 +154,6 @@ public Builder updatedAt(double updatedAt) { /** * Timestamp (in milliseconds) at which IPFS export task was updated - * */ public Builder updatedAt(Optional<Double> updatedAt) { Utils.checkNotNull(updatedAt, "updatedAt"); @@ -176,4 +168,3 @@ public AttestationIpfs build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/AttestationStorage.java b/src/main/java/studio/livepeer/livepeer/models/components/AttestationStorage.java index 6184a800..ebb06afe 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/AttestationStorage.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/AttestationStorage.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class AttestationStorage { @JsonInclude(Include.NON_ABSENT) @@ -56,7 +53,7 @@ public Optional<StorageStatus> status() { public final static Builder builder() { return new Builder(); - } + } public AttestationStorage withIpfs(AttestationIpfs ipfs) { Utils.checkNotNull(ipfs, "ipfs"); @@ -81,6 +78,7 @@ public AttestationStorage withStatus(Optional<? extends StorageStatus> status) { this.status = status; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -114,7 +112,7 @@ public final static class Builder { private Optional<? extends AttestationIpfs> ipfs = Optional.empty(); - private Optional<? extends StorageStatus> status = Optional.empty(); + private Optional<? extends StorageStatus> status = Optional.empty(); private Builder() { // force use of static builder() method @@ -151,4 +149,3 @@ public AttestationStorage build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Attestations.java b/src/main/java/studio/livepeer/livepeer/models/components/Attestations.java index c511313d..9197aaa5 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Attestations.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Attestations.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class Attestations { @JsonProperty("role") @@ -44,7 +41,7 @@ public String address() { public final static Builder builder() { return new Builder(); - } + } public Attestations withRole(String role) { Utils.checkNotNull(role, "role"); @@ -57,6 +54,7 @@ public Attestations withAddress(String address) { this.address = address; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -90,7 +88,7 @@ public final static class Builder { private String role; - private String address; + private String address; private Builder() { // force use of static builder() method @@ -115,4 +113,3 @@ public Attestations build() { } } } - 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 c6e786a7..f5eb1cb3 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/CatalystPipelineStrategy.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/CatalystPipelineStrategy.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * CatalystPipelineStrategy - Force to use a specific strategy in the Catalyst pipeline. If not specified, the default strategy that Catalyst is configured for will be used. This field only available for admin users, and is only used for E2E testing. + * CatalystPipelineStrategy + * + * <p>Force to use a specific strategy in the Catalyst pipeline. If not specified, the default strategy that Catalyst is configured for will be used. This field only available for admin users, and is only used for E2E testing. */ public enum CatalystPipelineStrategy { CATALYST("catalyst"), @@ -28,4 +31,14 @@ private CatalystPipelineStrategy(String value) { public String value() { return value; } + + public static Optional<CatalystPipelineStrategy> fromValue(String value) { + for (CatalystPipelineStrategy o: CatalystPipelineStrategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Clip.java b/src/main/java/studio/livepeer/livepeer/models/components/Clip.java index 37440f88..3355ed2f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Clip.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Clip.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Clip { /** @@ -122,7 +119,7 @@ public Optional<String> inputId() { public final static Builder builder() { return new Builder(); - } + } /** * URL of the asset to "clip" @@ -213,6 +210,7 @@ public Clip withInputId(Optional<String> inputId) { this.inputId = inputId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -261,7 +259,7 @@ public final static class Builder { private Optional<String> sessionId = Optional.empty(); - private Optional<String> inputId = Optional.empty(); + private Optional<String> inputId = Optional.empty(); private Builder() { // force use of static builder() method @@ -367,4 +365,3 @@ public Clip build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/ClipPayload.java b/src/main/java/studio/livepeer/livepeer/models/components/ClipPayload.java index 7cebbdc6..e4f8d5de 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/ClipPayload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/ClipPayload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class ClipPayload { /** @@ -120,7 +117,7 @@ public Optional<String> sessionId() { public final static Builder builder() { return new Builder(); - } + } /** * The playback ID of the stream or stream recording to clip. Asset playback IDs are not supported yet. @@ -193,6 +190,7 @@ public ClipPayload withSessionId(Optional<String> sessionId) { this.sessionId = sessionId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -241,7 +239,7 @@ public final static class Builder { private Optional<String> name = Optional.empty(); - private Optional<String> sessionId = Optional.empty(); + private Optional<String> sessionId = Optional.empty(); private Builder() { // force use of static builder() method @@ -329,4 +327,3 @@ public ClipPayload build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/ClipStrategy.java b/src/main/java/studio/livepeer/livepeer/models/components/ClipStrategy.java index 0456974c..6e1cfdcc 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/ClipStrategy.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/ClipStrategy.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,9 +16,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * ClipStrategy - Strategy to use for clipping the asset. If not specified, the default strategy that Catalyst is configured for will be used. This field only available for admin users, and is only used for E2E testing. + * ClipStrategy + * + * <p>Strategy to use for clipping the asset. If not specified, the default strategy that Catalyst is configured for will be used. This field only available for admin users, and is only used for E2E testing. */ - public class ClipStrategy { /** @@ -87,7 +86,7 @@ public Optional<String> playbackId() { public final static Builder builder() { return new Builder(); - } + } /** * The start timestamp of the clip in Unix milliseconds. _See the ClipTrigger in the UI Kit for an example of how this is calculated (for HLS, it uses `Program Date-Time` tags, and for WebRTC, it uses the latency from server to client at stream startup)._ @@ -142,6 +141,7 @@ public ClipStrategy withPlaybackId(Optional<String> playbackId) { this.playbackId = playbackId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -180,7 +180,7 @@ public final static class Builder { private Optional<Double> endTime = Optional.empty(); - private Optional<String> playbackId = Optional.empty(); + private Optional<String> playbackId = Optional.empty(); private Builder() { // force use of static builder() method @@ -248,4 +248,3 @@ public ClipStrategy build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Content.java b/src/main/java/studio/livepeer/livepeer/models/components/Content.java index b3fcda60..0f0671ec 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Content.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Content.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import java.lang.Override; import java.lang.String; @@ -12,9 +10,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Content - File content to store into IPFS + * Content + * + * <p>File content to store into IPFS */ - public class Content { @JsonCreator @@ -25,7 +24,8 @@ public Content() { public final static Builder builder() { return new Builder(); - } + } + @Override public boolean equals(java.lang.Object o) { @@ -49,7 +49,7 @@ public String toString() { return Utils.toString(Content.class); } - public final static class Builder { + public final static class Builder { private Builder() { // force use of static builder() method @@ -61,4 +61,3 @@ public Content build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/CreateRoomResponse.java b/src/main/java/studio/livepeer/livepeer/models/components/CreateRoomResponse.java index 7cc86a7b..44b913d9 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/CreateRoomResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/CreateRoomResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -16,7 +14,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class CreateRoomResponse { /** @@ -47,7 +44,7 @@ public Optional<String> id() { public final static Builder builder() { return new Builder(); - } + } /** * The ID of the room @@ -66,6 +63,7 @@ public CreateRoomResponse withId(Optional<String> id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -94,7 +92,7 @@ public String toString() { public final static class Builder { - private Optional<String> id = Optional.empty(); + private Optional<String> id = Optional.empty(); private Builder() { // force use of static builder() method @@ -124,4 +122,3 @@ public CreateRoomResponse build() { } } } - 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 ed3b9d56..c264b563 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/CreatorId.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/CreatorId.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -18,7 +16,6 @@ import studio.livepeer.livepeer.utils.Utils.TypeReferenceWithShape; import studio.livepeer.livepeer.utils.Utils; - @JsonDeserialize(using = CreatorId._Deserializer.class) public class CreatorId { @@ -77,7 +74,7 @@ public static final class _Deserializer extends OneOfDeserializer<CreatorId> { public _Deserializer() { super(CreatorId.class, false, - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.CreatorId1>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<CreatorId1>() {}, JsonShape.DEFAULT)); } } @@ -88,3 +85,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/CreatorId1.java b/src/main/java/studio/livepeer/livepeer/models/components/CreatorId1.java index 30f26e48..30b5ef06 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/CreatorId1.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/CreatorId1.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class CreatorId1 { @JsonProperty("type") @@ -50,7 +47,7 @@ public String value() { public final static Builder builder() { return new Builder(); - } + } public CreatorId1 withType(CreatorIdType type) { Utils.checkNotNull(type, "type"); @@ -66,6 +63,7 @@ public CreatorId1 withValue(String value) { this.value = value; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -99,7 +97,7 @@ public final static class Builder { private CreatorIdType type; - private String value; + private String value; private Builder() { // force use of static builder() method @@ -127,4 +125,3 @@ public CreatorId1 build() { } } } - 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 40496d76..e62127a8 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/CreatorIdType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/CreatorIdType.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum CreatorIdType { UNVERIFIED("unverified"); @@ -20,4 +21,14 @@ private CreatorIdType(String value) { public String value() { return value; } + + public static Optional<CreatorIdType> fromValue(String value) { + for (CreatorIdType o: CreatorIdType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Credentials.java b/src/main/java/studio/livepeer/livepeer/models/components/Credentials.java index d14b183b..27c5de1f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Credentials.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Credentials.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,9 +12,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Credentials - Credentials for the private input video storage + * Credentials + * + * <p>Credentials for the private input video storage */ - public class Credentials { /** @@ -59,7 +58,7 @@ public String secretAccessKey() { public final static Builder builder() { return new Builder(); - } + } /** * Access Key ID @@ -78,6 +77,7 @@ public Credentials withSecretAccessKey(String secretAccessKey) { this.secretAccessKey = secretAccessKey; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -111,7 +111,7 @@ public final static class Builder { private String accessKeyId; - private String secretAccessKey; + private String secretAccessKey; private Builder() { // force use of static builder() method @@ -142,4 +142,3 @@ public Credentials build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Custom.java b/src/main/java/studio/livepeer/livepeer/models/components/Custom.java index 71daf050..4798c624 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Custom.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Custom.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -21,9 +19,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Custom - custom URL parameters for the export task + * Custom + * + * <p>custom URL parameters for the export task */ - public class Custom { /** @@ -91,7 +90,7 @@ public Optional<Map<String, String>> headers() { public final static Builder builder() { return new Builder(); - } + } /** * URL where to export the asset @@ -137,6 +136,7 @@ public Custom withHeaders(Optional<? extends Map<String, String>> headers) { this.headers = headers; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -175,7 +175,7 @@ public final static class Builder { private Optional<String> method; - private Optional<? extends Map<String, String>> headers = Optional.empty(); + private Optional<? extends Map<String, String>> headers = Optional.empty(); private Builder() { // force use of static builder() method @@ -243,4 +243,3 @@ public Custom build() { new TypeReference<Optional<String>>() {}); } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Domain.java b/src/main/java/studio/livepeer/livepeer/models/components/Domain.java index 6593b52d..d6c04939 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Domain.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Domain.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,9 +12,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Domain - Video Metadata EIP-712 domain + * Domain + * + * <p>Video Metadata EIP-712 domain */ - public class Domain { @JsonProperty("name") @@ -47,7 +46,7 @@ public Version version() { public final static Builder builder() { return new Builder(); - } + } public Domain withName(Name name) { Utils.checkNotNull(name, "name"); @@ -60,6 +59,7 @@ public Domain withVersion(Version version) { this.version = version; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -93,7 +93,7 @@ public final static class Builder { private Name name; - private Version version; + private Version version; private Builder() { // force use of static builder() method @@ -118,4 +118,3 @@ public Domain build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/DvrPlayback.java b/src/main/java/studio/livepeer/livepeer/models/components/DvrPlayback.java index d76b645b..10053c11 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/DvrPlayback.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/DvrPlayback.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class DvrPlayback { @JsonInclude(Include.NON_ABSENT) @@ -80,7 +77,7 @@ public Optional<String> error() { public final static Builder builder() { return new Builder(); - } + } public DvrPlayback withHrn(PlaybackInfoHrn hrn) { Utils.checkNotNull(hrn, "hrn"); @@ -129,6 +126,7 @@ public DvrPlayback withError(Optional<String> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -172,7 +170,7 @@ public final static class Builder { private Optional<String> url = Optional.empty(); - private Optional<String> error = Optional.empty(); + private Optional<String> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -235,4 +233,3 @@ public DvrPlayback build() { } } } - 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 b30a12fe..6c7e65c6 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Encoder.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Encoder.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Encoder { H264("H.264"); @@ -20,4 +21,14 @@ private Encoder(String value) { public String value() { return value; } + + public static Optional<Encoder> fromValue(String value) { + for (Encoder o: Encoder.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Encryption.java b/src/main/java/studio/livepeer/livepeer/models/components/Encryption.java index d476b678..bcd8d766 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Encryption.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Encryption.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class Encryption { /** @@ -39,7 +36,7 @@ public String encryptedKey() { public final static Builder builder() { return new Builder(); - } + } /** * Encryption key used to encrypt the asset. Only writable in the upload asset endpoints and cannot be retrieved back. @@ -49,6 +46,7 @@ public Encryption withEncryptedKey(String encryptedKey) { this.encryptedKey = encryptedKey; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String encryptedKey; + private String encryptedKey; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public Encryption build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/EncryptionOutput.java b/src/main/java/studio/livepeer/livepeer/models/components/EncryptionOutput.java index 13d1d9d6..1be322b5 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/EncryptionOutput.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/EncryptionOutput.java @@ -1,17 +1,14 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import java.lang.Override; import java.lang.String; import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class EncryptionOutput { @JsonCreator @@ -22,7 +19,8 @@ public EncryptionOutput() { public final static Builder builder() { return new Builder(); - } + } + @Override public boolean equals(java.lang.Object o) { @@ -46,7 +44,7 @@ public String toString() { return Utils.toString(EncryptionOutput.class); } - public final static class Builder { + public final static class Builder { private Builder() { // force use of static builder() method @@ -58,4 +56,3 @@ public EncryptionOutput build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Error.java b/src/main/java/studio/livepeer/livepeer/models/components/Error.java new file mode 100644 index 00000000..bf01c99e --- /dev/null +++ b/src/main/java/studio/livepeer/livepeer/models/components/Error.java @@ -0,0 +1,109 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package studio.livepeer.livepeer.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import studio.livepeer.livepeer.utils.Utils; + +public class Error { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("errors") + private Optional<? extends List<String>> errors; + + @JsonCreator + public Error( + @JsonProperty("errors") Optional<? extends List<String>> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + } + + public Error() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional<List<String>> errors() { + return (Optional<List<String>>) errors; + } + + public final static Builder builder() { + return new Builder(); + } + + public Error withErrors(List<String> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Error withErrors(Optional<? extends List<String>> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error other = (Error) o; + return + Objects.deepEquals(this.errors, other.errors); + } + + @Override + public int hashCode() { + return Objects.hash( + errors); + } + + @Override + public String toString() { + return Utils.toString(Error.class, + "errors", errors); + } + + public final static class Builder { + + private Optional<? extends List<String>> errors = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder errors(List<String> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = Optional.ofNullable(errors); + return this; + } + + public Builder errors(Optional<? extends List<String>> errors) { + Utils.checkNotNull(errors, "errors"); + this.errors = errors; + return this; + } + + public Error build() { + return new Error( + errors); + } + } +} 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 600ffe6a..32b9d44b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Events.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Events.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Events { STREAM_STARTED("stream.started"), @@ -39,4 +40,14 @@ private Events(String value) { public String value() { return value; } + + public static Optional<Events> fromValue(String value) { + for (Events o: Events.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Export.java b/src/main/java/studio/livepeer/livepeer/models/components/Export.java index b1e08e18..eaf9482d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Export.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Export.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,9 +16,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Export - Output of the export task + * Export + * + * <p>Output of the export task */ - public class Export { @JsonInclude(Include.NON_ABSENT) @@ -46,7 +45,7 @@ public Optional<TaskIpfs> ipfs() { public final static Builder builder() { return new Builder(); - } + } public Export withIpfs(TaskIpfs ipfs) { Utils.checkNotNull(ipfs, "ipfs"); @@ -59,6 +58,7 @@ public Export withIpfs(Optional<? extends TaskIpfs> ipfs) { this.ipfs = ipfs; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -87,7 +87,7 @@ public String toString() { public final static class Builder { - private Optional<? extends TaskIpfs> ipfs = Optional.empty(); + private Optional<? extends TaskIpfs> ipfs = Optional.empty(); private Builder() { // force use of static builder() method @@ -111,4 +111,3 @@ public Export build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/ExportData.java b/src/main/java/studio/livepeer/livepeer/models/components/ExportData.java index 12b52529..79f4a961 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/ExportData.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/ExportData.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,9 +16,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * ExportData - Output of the export data task + * ExportData + * + * <p>Output of the export data task */ - public class ExportData { @JsonInclude(Include.NON_ABSENT) @@ -46,7 +45,7 @@ public Optional<TaskOutputIpfs> ipfs() { public final static Builder builder() { return new Builder(); - } + } public ExportData withIpfs(TaskOutputIpfs ipfs) { Utils.checkNotNull(ipfs, "ipfs"); @@ -59,6 +58,7 @@ public ExportData withIpfs(Optional<? extends TaskOutputIpfs> ipfs) { this.ipfs = ipfs; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -87,7 +87,7 @@ public String toString() { public final static class Builder { - private Optional<? extends TaskOutputIpfs> ipfs = Optional.empty(); + private Optional<? extends TaskOutputIpfs> ipfs = Optional.empty(); private Builder() { // force use of static builder() method @@ -111,4 +111,3 @@ public ExportData build() { } } } - 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 7c181094..7386e3bb 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -19,9 +17,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * ExportTaskParams - Parameters for the export task + * ExportTaskParams + * + * <p>Parameters for the export task */ - @JsonDeserialize(using = ExportTaskParams._Deserializer.class) public class ExportTaskParams { @@ -86,8 +85,8 @@ public static final class _Deserializer extends OneOfDeserializer<ExportTaskPara public _Deserializer() { super(ExportTaskParams.class, false, - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.ExportTaskParams2>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.ExportTaskParams1>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<ExportTaskParams2>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<ExportTaskParams1>() {}, JsonShape.DEFAULT)); } } @@ -98,3 +97,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams1.java b/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams1.java index 521fa7f7..f8cde6f0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams1.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams1.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class ExportTaskParams1 { /** @@ -39,7 +36,7 @@ public Custom custom() { public final static Builder builder() { return new Builder(); - } + } /** * custom URL parameters for the export task @@ -49,6 +46,7 @@ public ExportTaskParams1 withCustom(Custom custom) { this.custom = custom; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private Custom custom; + private Custom custom; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public ExportTaskParams1 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams2.java b/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams2.java index 678aa8ea..a4d69495 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams2.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/ExportTaskParams2.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class ExportTaskParams2 { @JsonProperty("ipfs") @@ -33,13 +30,14 @@ public IpfsExportParams ipfs() { public final static Builder builder() { return new Builder(); - } + } public ExportTaskParams2 withIpfs(IpfsExportParams ipfs) { Utils.checkNotNull(ipfs, "ipfs"); this.ipfs = ipfs; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -68,7 +66,7 @@ public String toString() { public final static class Builder { - private IpfsExportParams ipfs; + private IpfsExportParams ipfs; private Builder() { // force use of static builder() method @@ -86,4 +84,3 @@ public ExportTaskParams2 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/FfmpegProfile.java b/src/main/java/studio/livepeer/livepeer/models/components/FfmpegProfile.java index 813166d3..701a8b42 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/FfmpegProfile.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/FfmpegProfile.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,9 +17,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * FfmpegProfile - Transcode profile + * FfmpegProfile + * + * <p>Transcode profile */ - public class FfmpegProfile { @JsonProperty("width") @@ -45,7 +44,6 @@ public class FfmpegProfile { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("quality") @@ -138,7 +136,6 @@ public Optional<Long> fpsDen() { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ @JsonIgnore public Optional<Long> quality() { @@ -164,7 +161,7 @@ public Optional<Encoder> encoder() { public final static Builder builder() { return new Builder(); - } + } public FfmpegProfile withWidth(long width) { Utils.checkNotNull(width, "width"); @@ -210,7 +207,6 @@ public FfmpegProfile withFpsDen(Optional<Long> fpsDen) { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ public FfmpegProfile withQuality(long quality) { Utils.checkNotNull(quality, "quality"); @@ -220,7 +216,6 @@ public FfmpegProfile withQuality(long quality) { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ public FfmpegProfile withQuality(Optional<Long> quality) { Utils.checkNotNull(quality, "quality"); @@ -263,6 +258,7 @@ public FfmpegProfile withEncoder(Optional<? extends Encoder> encoder) { this.encoder = encoder; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -336,7 +332,7 @@ public final static class Builder { private Optional<? extends Profile> profile = Optional.empty(); - private Optional<? extends Encoder> encoder = Optional.empty(); + private Optional<? extends Encoder> encoder = Optional.empty(); private Builder() { // force use of static builder() method @@ -386,7 +382,6 @@ public Builder fpsDen(Optional<Long> fpsDen) { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ public Builder quality(long quality) { Utils.checkNotNull(quality, "quality"); @@ -396,7 +391,6 @@ public Builder quality(long quality) { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ public Builder quality(Optional<Long> quality) { Utils.checkNotNull(quality, "quality"); @@ -455,4 +449,3 @@ public FfmpegProfile build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Fmp4.java b/src/main/java/studio/livepeer/livepeer/models/components/Fmp4.java index 74815dc6..bd3b05f2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Fmp4.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Fmp4.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,9 +12,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Fmp4 - FMP4 output format + * Fmp4 + * + * <p>FMP4 output format */ - public class Fmp4 { /** @@ -42,7 +41,7 @@ public String path() { public final static Builder builder() { return new Builder(); - } + } /** * Path for the FMP4 output @@ -52,6 +51,7 @@ public Fmp4 withPath(String path) { this.path = path; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -80,7 +80,7 @@ public String toString() { public final static class Builder { - private String path; + private String path; private Builder() { // force use of static builder() method @@ -101,4 +101,3 @@ public Fmp4 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/GetRoomUserResponse.java b/src/main/java/studio/livepeer/livepeer/models/components/GetRoomUserResponse.java index c2f76670..f5eaba1f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/GetRoomUserResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/GetRoomUserResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -20,7 +18,6 @@ import studio.livepeer.livepeer.utils.LazySingletonValue; import studio.livepeer.livepeer.utils.Utils; - public class GetRoomUserResponse { /** @@ -123,7 +120,7 @@ public Optional<String> metadata() { public final static Builder builder() { return new Builder(); - } + } /** * The ID of the user @@ -214,6 +211,7 @@ public GetRoomUserResponse withMetadata(Optional<String> metadata) { this.metadata = metadata; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -262,7 +260,7 @@ public final static class Builder { private Optional<Boolean> isPublisher; - private Optional<String> metadata = Optional.empty(); + private Optional<String> metadata = Optional.empty(); private Builder() { // force use of static builder() method @@ -377,4 +375,3 @@ public GetRoomUserResponse build() { new TypeReference<Optional<Boolean>>() {}); } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Hash.java b/src/main/java/studio/livepeer/livepeer/models/components/Hash.java index 6d78f60a..142f1ce9 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Hash.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Hash.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -16,7 +14,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Hash { /** @@ -65,7 +62,7 @@ public Optional<String> algorithm() { public final static Builder builder() { return new Builder(); - } + } /** * Hash of the asset @@ -102,6 +99,7 @@ public Hash withAlgorithm(Optional<String> algorithm) { this.algorithm = algorithm; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -135,7 +133,7 @@ public final static class Builder { private Optional<String> hash = Optional.empty(); - private Optional<String> algorithm = Optional.empty(); + private Optional<String> algorithm = Optional.empty(); private Builder() { // force use of static builder() method @@ -184,4 +182,3 @@ public Hash build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Hls.java b/src/main/java/studio/livepeer/livepeer/models/components/Hls.java index 628daf38..097db6ac 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Hls.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Hls.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,9 +12,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Hls - HLS output format + * Hls + * + * <p>HLS output format */ - public class Hls { /** @@ -42,7 +41,7 @@ public String path() { public final static Builder builder() { return new Builder(); - } + } /** * Path for the HLS output @@ -52,6 +51,7 @@ public Hls withPath(String path) { this.path = path; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -80,7 +80,7 @@ public String toString() { public final static class Builder { - private String path; + private String path; private Builder() { // force use of static builder() method @@ -101,4 +101,3 @@ public Hls build() { } } } - 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 e5bad45c..04fb12b4 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Hrn.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Hrn.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * Hrn - Human Readable Name + * Hrn + * + * <p>Human Readable Name */ public enum Hrn { HLS_TS("HLS (TS)"), @@ -29,4 +32,14 @@ private Hrn(String value) { public String value() { return value; } + + public static Optional<Hrn> fromValue(String value) { + for (Hrn o: Hrn.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 62249672..fc772717 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Input.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Input.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -18,7 +16,6 @@ import studio.livepeer.livepeer.utils.Utils.TypeReferenceWithShape; import studio.livepeer.livepeer.utils.Utils; - @JsonDeserialize(using = Input._Deserializer.class) public class Input { @@ -83,8 +80,8 @@ public static final class _Deserializer extends OneOfDeserializer<Input> { public _Deserializer() { super(Input.class, false, - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.Input2>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.Input1>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Input2>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<Input1>() {}, JsonShape.DEFAULT)); } } @@ -95,3 +92,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Input1.java b/src/main/java/studio/livepeer/livepeer/models/components/Input1.java index 82e62fa0..9be37635 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Input1.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Input1.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,9 +12,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Input1 - URL input video + * Input1 + * + * <p>URL input video */ - public class Input1 { /** @@ -42,7 +41,7 @@ public String url() { public final static Builder builder() { return new Builder(); - } + } /** * URL of the video to transcode @@ -52,6 +51,7 @@ public Input1 withUrl(String url) { this.url = url; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -80,7 +80,7 @@ public String toString() { public final static class Builder { - private String url; + private String url; private Builder() { // force use of static builder() method @@ -101,4 +101,3 @@ public Input1 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Input2.java b/src/main/java/studio/livepeer/livepeer/models/components/Input2.java index cda9795f..fb44fed6 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Input2.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Input2.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,15 +12,15 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Input2 - S3-like storage input video + * Input2 + * + * <p>S3-like storage input video */ - public class Input2 { /** * Type of service. This is optional and defaults to `url` if * ŚURL field is provided. - * */ @JsonProperty("type") private InputType type; @@ -73,7 +71,6 @@ public Input2( /** * Type of service. This is optional and defaults to `url` if * ŚURL field is provided. - * */ @JsonIgnore public InputType type() { @@ -114,12 +111,11 @@ public Credentials credentials() { public final static Builder builder() { return new Builder(); - } + } /** * Type of service. This is optional and defaults to `url` if * ŚURL field is provided. - * */ public Input2 withType(InputType type) { Utils.checkNotNull(type, "type"); @@ -162,6 +158,7 @@ public Input2 withCredentials(Credentials credentials) { this.credentials = credentials; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -210,7 +207,7 @@ public final static class Builder { private String path; - private Credentials credentials; + private Credentials credentials; private Builder() { // force use of static builder() method @@ -219,7 +216,6 @@ private Builder() { /** * Type of service. This is optional and defaults to `url` if * ŚURL field is provided. - * */ public Builder type(InputType type) { Utils.checkNotNull(type, "type"); @@ -273,4 +269,3 @@ public Input2 build() { } } } - 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 21877917..cb6e3f5f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -18,7 +16,6 @@ import studio.livepeer.livepeer.utils.Utils.TypeReferenceWithShape; import studio.livepeer.livepeer.utils.Utils; - @JsonDeserialize(using = InputCreatorId._Deserializer.class) public class InputCreatorId { @@ -83,8 +80,8 @@ public static final class _Deserializer extends OneOfDeserializer<InputCreatorId public _Deserializer() { super(InputCreatorId.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.String>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.InputCreatorId1>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<String>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<InputCreatorId1>() {}, JsonShape.DEFAULT)); } } @@ -95,3 +92,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId1.java b/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId1.java index 48f7e4b5..689767a6 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId1.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorId1.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class InputCreatorId1 { @JsonProperty("type") @@ -44,7 +41,7 @@ public String value() { public final static Builder builder() { return new Builder(); - } + } public InputCreatorId1 withType(InputCreatorIdType type) { Utils.checkNotNull(type, "type"); @@ -57,6 +54,7 @@ public InputCreatorId1 withValue(String value) { this.value = value; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -90,7 +88,7 @@ public final static class Builder { private InputCreatorIdType type; - private String value; + private String value; private Builder() { // force use of static builder() method @@ -115,4 +113,3 @@ public InputCreatorId1 build() { } } } - 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 9ce83185..a55fc17b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorIdType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/InputCreatorIdType.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum InputCreatorIdType { UNVERIFIED("unverified"); @@ -20,4 +21,14 @@ private InputCreatorIdType(String value) { public String value() { return value; } + + public static Optional<InputCreatorIdType> fromValue(String value) { + for (InputCreatorIdType o: InputCreatorIdType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 08088cd6..45cfc6ee 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/InputType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/InputType.java @@ -1,16 +1,18 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * InputType - Type of service. This is optional and defaults to `url` if - * ŚURL field is provided. + * InputType * + * <p>Type of service. This is optional and defaults to `url` if + * ŚURL field is provided. */ public enum InputType { S3("s3"); @@ -25,4 +27,14 @@ private InputType(String value) { public String value() { return value; } + + public static Optional<InputType> fromValue(String value) { + for (InputType o: InputType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 26b8b205..2887298c 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Ipfs.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Ipfs.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -19,12 +18,12 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Ipfs - Set to true to make default export to IPFS. To customize the + * Ipfs + * + * <p>Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ - @JsonDeserialize(using = Ipfs._Deserializer.class) public class Ipfs { @@ -89,8 +88,8 @@ public static final class _Deserializer extends OneOfDeserializer<Ipfs> { public _Deserializer() { super(Ipfs.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.Boolean>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.Ipfs1>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<Ipfs1>() {}, JsonShape.DEFAULT)); } } @@ -101,3 +100,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Ipfs1.java b/src/main/java/studio/livepeer/livepeer/models/components/Ipfs1.java index b61a480e..b141beaa 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Ipfs1.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Ipfs1.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class Ipfs1 { @JsonInclude(Include.NON_ABSENT) @@ -43,7 +40,7 @@ public JsonNullable<Spec> spec() { public final static Builder builder() { return new Builder(); - } + } public Ipfs1 withSpec(Spec spec) { Utils.checkNotNull(spec, "spec"); @@ -56,6 +53,7 @@ public Ipfs1 withSpec(JsonNullable<? extends Spec> spec) { this.spec = spec; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -84,7 +82,7 @@ public String toString() { public final static class Builder { - private JsonNullable<? extends Spec> spec = JsonNullable.undefined(); + private JsonNullable<? extends Spec> spec = JsonNullable.undefined(); private Builder() { // force use of static builder() method @@ -108,4 +106,3 @@ public Ipfs1 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/IpfsExportParams.java b/src/main/java/studio/livepeer/livepeer/models/components/IpfsExportParams.java index b2425027..7ef340a4 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/IpfsExportParams.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/IpfsExportParams.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,7 +16,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class IpfsExportParams { @JsonInclude(Include.NON_ABSENT) @@ -28,7 +25,6 @@ public class IpfsExportParams { /** * Custom credentials for the Piñata service. Must have either * a JWT or an API key and an API secret. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("pinata") @@ -57,7 +53,6 @@ public Optional<Object> dollarRef() { /** * Custom credentials for the Piñata service. Must have either * a JWT or an API key and an API secret. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -67,7 +62,7 @@ public Optional<Pinata> pinata() { public final static Builder builder() { return new Builder(); - } + } public IpfsExportParams withDollarRef(Object dollarRef) { Utils.checkNotNull(dollarRef, "dollarRef"); @@ -84,7 +79,6 @@ public IpfsExportParams withDollarRef(Optional<? extends Object> dollarRef) { /** * Custom credentials for the Piñata service. Must have either * a JWT or an API key and an API secret. - * */ public IpfsExportParams withPinata(Pinata pinata) { Utils.checkNotNull(pinata, "pinata"); @@ -95,13 +89,13 @@ public IpfsExportParams withPinata(Pinata pinata) { /** * Custom credentials for the Piñata service. Must have either * a JWT or an API key and an API secret. - * */ public IpfsExportParams withPinata(Optional<? extends Pinata> pinata) { Utils.checkNotNull(pinata, "pinata"); this.pinata = pinata; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -135,7 +129,7 @@ public final static class Builder { private Optional<? extends Object> dollarRef = Optional.empty(); - private Optional<? extends Pinata> pinata = Optional.empty(); + private Optional<? extends Pinata> pinata = Optional.empty(); private Builder() { // force use of static builder() method @@ -156,7 +150,6 @@ public Builder dollarRef(Optional<? extends Object> dollarRef) { /** * Custom credentials for the Piñata service. Must have either * a JWT or an API key and an API secret. - * */ public Builder pinata(Pinata pinata) { Utils.checkNotNull(pinata, "pinata"); @@ -167,7 +160,6 @@ public Builder pinata(Pinata pinata) { /** * Custom credentials for the Piñata service. Must have either * a JWT or an API key and an API secret. - * */ public Builder pinata(Optional<? extends Pinata> pinata) { Utils.checkNotNull(pinata, "pinata"); @@ -182,4 +174,3 @@ public IpfsExportParams build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/IpfsFileInfo.java b/src/main/java/studio/livepeer/livepeer/models/components/IpfsFileInfo.java index cf4da8cc..742cd9ce 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/IpfsFileInfo.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/IpfsFileInfo.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -16,7 +14,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class IpfsFileInfo { /** @@ -83,7 +80,7 @@ public Optional<String> gatewayUrl() { public final static Builder builder() { return new Builder(); - } + } /** * CID of the file on IPFS @@ -129,6 +126,7 @@ public IpfsFileInfo withGatewayUrl(Optional<String> gatewayUrl) { this.gatewayUrl = gatewayUrl; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -167,7 +165,7 @@ public final static class Builder { private Optional<String> url = Optional.empty(); - private Optional<String> gatewayUrl = Optional.empty(); + private Optional<String> gatewayUrl = Optional.empty(); private Builder() { // force use of static builder() method @@ -226,4 +224,3 @@ public IpfsFileInfo build() { } } } - 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 2a54d6f8..5177af62 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/IsMobile.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/IsMobile.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -19,9 +18,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * IsMobile - Indicates whether the stream will be pulled from a mobile source. + * IsMobile + * + * <p>Indicates whether the stream will be pulled from a mobile source. */ - @JsonDeserialize(using = IsMobile._Deserializer.class) public class IsMobile { @@ -86,8 +86,8 @@ public static final class _Deserializer extends OneOfDeserializer<IsMobile> { public _Deserializer() { super(IsMobile.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.Boolean>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.One>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<One>() {}, JsonShape.DEFAULT)); } } @@ -98,3 +98,4 @@ public String toString() { } } + 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 b7b31cd8..93190b83 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/IsMobile1.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/IsMobile1.java @@ -1,13 +1,16 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; /** - * IsMobile1 - 0: not mobile, 1: mobile screen share, 2: mobile camera. + * IsMobile1 + * + * <p>0: not mobile, 1: mobile screen share, 2: mobile camera. */ public enum IsMobile1 { ZERO(0L), @@ -24,4 +27,14 @@ private IsMobile1(long value) { public long value() { return value; } + + public static Optional<IsMobile1> fromValue(long value) { + for (IsMobile1 o: IsMobile1.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/LastFailure.java b/src/main/java/studio/livepeer/livepeer/models/components/LastFailure.java index ce1179b0..cfd4060a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/LastFailure.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/LastFailure.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,9 +16,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * LastFailure - failure timestamp and error message with status code + * LastFailure + * + * <p>failure timestamp and error message with status code */ - public class LastFailure { /** @@ -105,7 +104,7 @@ public Optional<Double> statusCode() { public final static Builder builder() { return new Builder(); - } + } /** * Timestamp (in milliseconds) at which the webhook last failed @@ -178,6 +177,7 @@ public LastFailure withStatusCode(Optional<Double> statusCode) { this.statusCode = statusCode; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -221,7 +221,7 @@ public final static class Builder { private Optional<String> response = Optional.empty(); - private Optional<Double> statusCode = Optional.empty(); + private Optional<Double> statusCode = Optional.empty(); private Builder() { // force use of static builder() method @@ -308,4 +308,3 @@ public LastFailure build() { } } } - 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 6d5fded1..3cb876e6 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Live.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Live.java @@ -1,10 +1,11 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; public enum Live { ZERO(0L), @@ -20,4 +21,14 @@ private Live(long value) { public long value() { return value; } + + public static Optional<Live> fromValue(long value) { + for (Live o: Live.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Location.java b/src/main/java/studio/livepeer/livepeer/models/components/Location.java index 56ab88a1..cc9f4079 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Location.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Location.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,10 +13,11 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Location - Approximate location of the pull source. The location is used to + * Location + * + * <p>Approximate location of the pull source. The location is used to * determine the closest Livepeer region to pull the stream from. */ - public class Location { /** @@ -65,7 +64,7 @@ public double lon() { public final static Builder builder() { return new Builder(); - } + } /** * Latitude of the pull source in degrees. North is positive, @@ -86,6 +85,7 @@ public Location withLon(double lon) { this.lon = lon; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -119,7 +119,7 @@ public final static class Builder { private Double lat; - private Double lon; + private Double lon; private Builder() { // force use of static builder() method @@ -152,4 +152,3 @@ public Location build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Message.java b/src/main/java/studio/livepeer/livepeer/models/components/Message.java index 22aa0ccb..ec5f8524 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Message.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Message.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,9 +14,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Message - Video Metadata EIP-712 message content + * Message + * + * <p>Video Metadata EIP-712 message content */ - public class Message { @JsonProperty("video") @@ -71,7 +70,7 @@ public double timestamp() { public final static Builder builder() { return new Builder(); - } + } public Message withVideo(String video) { Utils.checkNotNull(video, "video"); @@ -96,6 +95,7 @@ public Message withTimestamp(double timestamp) { this.timestamp = timestamp; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -139,7 +139,7 @@ public final static class Builder { private String signer; - private Double timestamp; + private Double timestamp; private Builder() { // force use of static builder() method @@ -178,4 +178,3 @@ public Message build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Meta.java b/src/main/java/studio/livepeer/livepeer/models/components/Meta.java index e61a2ca3..68b2c4da 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Meta.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Meta.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,7 +17,6 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class Meta { @JsonInclude(Include.NON_ABSENT) @@ -102,7 +99,7 @@ public Optional<Attestation> attestation() { public final static Builder builder() { return new Builder(); - } + } public Meta withLive(Live live) { Utils.checkNotNull(live, "live"); @@ -163,6 +160,7 @@ public Meta withAttestation(Optional<? extends Attestation> attestation) { this.attestation = attestation; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -211,7 +209,7 @@ public final static class Builder { private Optional<? extends List<DvrPlayback>> dvrPlayback = Optional.empty(); - private Optional<? extends Attestation> attestation = Optional.empty(); + private Optional<? extends Attestation> attestation = Optional.empty(); private Builder() { // force use of static builder() method @@ -287,4 +285,3 @@ public Meta build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Mp4.java b/src/main/java/studio/livepeer/livepeer/models/components/Mp4.java index 95e32399..e21009da 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Mp4.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Mp4.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,9 +12,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Mp4 - MP4 output format + * Mp4 + * + * <p>MP4 output format */ - public class Mp4 { /** @@ -42,7 +41,7 @@ public String path() { public final static Builder builder() { return new Builder(); - } + } /** * Path for the MP4 output @@ -52,6 +51,7 @@ public Mp4 withPath(String path) { this.path = path; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -80,7 +80,7 @@ public String toString() { public final static class Builder { - private String path; + private String path; private Builder() { // force use of static builder() method @@ -101,4 +101,3 @@ public Mp4 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Multistream.java b/src/main/java/studio/livepeer/livepeer/models/components/Multistream.java index 1993c18c..771d37fa 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Multistream.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Multistream.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,13 +16,11 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Multistream { /** * References to targets where this stream will be simultaneously * streamed to - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("targets") @@ -44,7 +40,6 @@ public Multistream() { /** * References to targets where this stream will be simultaneously * streamed to - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -54,12 +49,11 @@ public Optional<List<Target>> targets() { public final static Builder builder() { return new Builder(); - } + } /** * References to targets where this stream will be simultaneously * streamed to - * */ public Multistream withTargets(List<Target> targets) { Utils.checkNotNull(targets, "targets"); @@ -70,13 +64,13 @@ public Multistream withTargets(List<Target> targets) { /** * References to targets where this stream will be simultaneously * streamed to - * */ public Multistream withTargets(Optional<? extends List<Target>> targets) { Utils.checkNotNull(targets, "targets"); this.targets = targets; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -105,7 +99,7 @@ public String toString() { public final static class Builder { - private Optional<? extends List<Target>> targets = Optional.empty(); + private Optional<? extends List<Target>> targets = Optional.empty(); private Builder() { // force use of static builder() method @@ -114,7 +108,6 @@ private Builder() { /** * References to targets where this stream will be simultaneously * streamed to - * */ public Builder targets(List<Target> targets) { Utils.checkNotNull(targets, "targets"); @@ -125,7 +118,6 @@ public Builder targets(List<Target> targets) { /** * References to targets where this stream will be simultaneously * streamed to - * */ public Builder targets(Optional<? extends List<Target>> targets) { Utils.checkNotNull(targets, "targets"); @@ -139,4 +131,3 @@ public Multistream build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/MultistreamTarget.java b/src/main/java/studio/livepeer/livepeer/models/components/MultistreamTarget.java index c9d05288..4a664a2f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/MultistreamTarget.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/MultistreamTarget.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,7 +17,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class MultistreamTarget { @JsonInclude(Include.NON_ABSENT) @@ -31,6 +28,7 @@ public class MultistreamTarget { private Optional<String> name; /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @@ -41,7 +39,6 @@ public class MultistreamTarget { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("disabled") @@ -50,7 +47,6 @@ public class MultistreamTarget { /** * Timestamp (in milliseconds) at which multistream target object was * created - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("createdAt") @@ -90,6 +86,7 @@ public Optional<String> name() { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -101,7 +98,6 @@ public Optional<String> userId() { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ @JsonIgnore public Optional<Boolean> disabled() { @@ -111,7 +107,6 @@ public Optional<Boolean> disabled() { /** * Timestamp (in milliseconds) at which multistream target object was * created - * */ @JsonIgnore public Optional<Double> createdAt() { @@ -120,7 +115,7 @@ public Optional<Double> createdAt() { public final static Builder builder() { return new Builder(); - } + } public MultistreamTarget withId(String id) { Utils.checkNotNull(id, "id"); @@ -147,6 +142,7 @@ public MultistreamTarget withName(Optional<String> name) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -157,6 +153,7 @@ public MultistreamTarget withUserId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -169,7 +166,6 @@ public MultistreamTarget withUserId(Optional<String> userId) { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ public MultistreamTarget withDisabled(boolean disabled) { Utils.checkNotNull(disabled, "disabled"); @@ -180,7 +176,6 @@ public MultistreamTarget withDisabled(boolean disabled) { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ public MultistreamTarget withDisabled(Optional<Boolean> disabled) { Utils.checkNotNull(disabled, "disabled"); @@ -191,7 +186,6 @@ public MultistreamTarget withDisabled(Optional<Boolean> disabled) { /** * Timestamp (in milliseconds) at which multistream target object was * created - * */ public MultistreamTarget withCreatedAt(double createdAt) { Utils.checkNotNull(createdAt, "createdAt"); @@ -202,13 +196,13 @@ public MultistreamTarget withCreatedAt(double createdAt) { /** * Timestamp (in milliseconds) at which multistream target object was * created - * */ public MultistreamTarget withCreatedAt(Optional<Double> createdAt) { Utils.checkNotNull(createdAt, "createdAt"); this.createdAt = createdAt; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -258,7 +252,7 @@ public final static class Builder { private Optional<Boolean> disabled = Optional.empty(); - private Optional<Double> createdAt = Optional.empty(); + private Optional<Double> createdAt = Optional.empty(); private Builder() { // force use of static builder() method @@ -289,6 +283,7 @@ public Builder name(Optional<String> name) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -299,6 +294,7 @@ public Builder userId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -311,7 +307,6 @@ public Builder userId(Optional<String> userId) { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ public Builder disabled(boolean disabled) { Utils.checkNotNull(disabled, "disabled"); @@ -322,7 +317,6 @@ public Builder disabled(boolean disabled) { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ public Builder disabled(Optional<Boolean> disabled) { Utils.checkNotNull(disabled, "disabled"); @@ -333,7 +327,6 @@ public Builder disabled(Optional<Boolean> disabled) { /** * Timestamp (in milliseconds) at which multistream target object was * created - * */ public Builder createdAt(double createdAt) { Utils.checkNotNull(createdAt, "createdAt"); @@ -344,7 +337,6 @@ public Builder createdAt(double createdAt) { /** * Timestamp (in milliseconds) at which multistream target object was * created - * */ public Builder createdAt(Optional<Double> createdAt) { Utils.checkNotNull(createdAt, "createdAt"); @@ -362,4 +354,3 @@ public MultistreamTarget build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/MultistreamTargetInput.java b/src/main/java/studio/livepeer/livepeer/models/components/MultistreamTargetInput.java index 75ca94e6..b05b332b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/MultistreamTargetInput.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/MultistreamTargetInput.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class MultistreamTargetInput { @JsonInclude(Include.NON_ABSENT) @@ -33,7 +30,6 @@ public class MultistreamTargetInput { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("disabled") @@ -73,7 +69,6 @@ public String url() { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ @JsonIgnore public Optional<Boolean> disabled() { @@ -82,7 +77,7 @@ public Optional<Boolean> disabled() { public final static Builder builder() { return new Builder(); - } + } public MultistreamTargetInput withName(String name) { Utils.checkNotNull(name, "name"); @@ -108,7 +103,6 @@ public MultistreamTargetInput withUrl(String url) { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ public MultistreamTargetInput withDisabled(boolean disabled) { Utils.checkNotNull(disabled, "disabled"); @@ -119,13 +113,13 @@ public MultistreamTargetInput withDisabled(boolean disabled) { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ public MultistreamTargetInput withDisabled(Optional<Boolean> disabled) { Utils.checkNotNull(disabled, "disabled"); this.disabled = disabled; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -164,7 +158,7 @@ public final static class Builder { private String url; - private Optional<Boolean> disabled = Optional.empty(); + private Optional<Boolean> disabled = Optional.empty(); private Builder() { // force use of static builder() method @@ -194,7 +188,6 @@ public Builder url(String url) { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ public Builder disabled(boolean disabled) { Utils.checkNotNull(disabled, "disabled"); @@ -205,7 +198,6 @@ public Builder disabled(boolean disabled) { /** * If true then this multistream target will not be used for pushing * even if it is configured in a stream object. - * */ public Builder disabled(Optional<Boolean> disabled) { Utils.checkNotNull(disabled, "disabled"); @@ -221,4 +213,3 @@ public MultistreamTargetInput build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/MultistreamTargetPatchPayload.java b/src/main/java/studio/livepeer/livepeer/models/components/MultistreamTargetPatchPayload.java deleted file mode 100644 index aae8dafd..00000000 --- a/src/main/java/studio/livepeer/livepeer/models/components/MultistreamTargetPatchPayload.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package studio.livepeer.livepeer.models.components; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Boolean; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; -import studio.livepeer.livepeer.utils.Utils; - - -public class MultistreamTargetPatchPayload { - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("name") - private Optional<String> name; - - /** - * Livepeer-compatible multistream target URL (RTMP(S) or SRT) - */ - @JsonProperty("url") - private String url; - - /** - * If true then this multistream target will not be used for pushing - * even if it is configured in a stream object. - * - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("disabled") - private Optional<Boolean> disabled; - - @JsonCreator - public MultistreamTargetPatchPayload( - @JsonProperty("name") Optional<String> name, - @JsonProperty("url") String url, - @JsonProperty("disabled") Optional<Boolean> disabled) { - Utils.checkNotNull(name, "name"); - Utils.checkNotNull(url, "url"); - Utils.checkNotNull(disabled, "disabled"); - this.name = name; - this.url = url; - this.disabled = disabled; - } - - public MultistreamTargetPatchPayload( - String url) { - this(Optional.empty(), url, Optional.empty()); - } - - @JsonIgnore - public Optional<String> name() { - return name; - } - - /** - * Livepeer-compatible multistream target URL (RTMP(S) or SRT) - */ - @JsonIgnore - public String url() { - return url; - } - - /** - * If true then this multistream target will not be used for pushing - * even if it is configured in a stream object. - * - */ - @JsonIgnore - public Optional<Boolean> disabled() { - return disabled; - } - - public final static Builder builder() { - return new Builder(); - } - - public MultistreamTargetPatchPayload withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - public MultistreamTargetPatchPayload withName(Optional<String> name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - /** - * Livepeer-compatible multistream target URL (RTMP(S) or SRT) - */ - public MultistreamTargetPatchPayload withUrl(String url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - /** - * If true then this multistream target will not be used for pushing - * even if it is configured in a stream object. - * - */ - public MultistreamTargetPatchPayload withDisabled(boolean disabled) { - Utils.checkNotNull(disabled, "disabled"); - this.disabled = Optional.ofNullable(disabled); - return this; - } - - /** - * If true then this multistream target will not be used for pushing - * even if it is configured in a stream object. - * - */ - public MultistreamTargetPatchPayload withDisabled(Optional<Boolean> disabled) { - Utils.checkNotNull(disabled, "disabled"); - this.disabled = disabled; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MultistreamTargetPatchPayload other = (MultistreamTargetPatchPayload) o; - return - Objects.deepEquals(this.name, other.name) && - Objects.deepEquals(this.url, other.url) && - Objects.deepEquals(this.disabled, other.disabled); - } - - @Override - public int hashCode() { - return Objects.hash( - name, - url, - disabled); - } - - @Override - public String toString() { - return Utils.toString(MultistreamTargetPatchPayload.class, - "name", name, - "url", url, - "disabled", disabled); - } - - public final static class Builder { - - private Optional<String> name = Optional.empty(); - - private String url; - - private Optional<Boolean> disabled = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - public Builder name(String name) { - Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); - return this; - } - - public Builder name(Optional<String> name) { - Utils.checkNotNull(name, "name"); - this.name = name; - return this; - } - - /** - * Livepeer-compatible multistream target URL (RTMP(S) or SRT) - */ - public Builder url(String url) { - Utils.checkNotNull(url, "url"); - this.url = url; - return this; - } - - /** - * If true then this multistream target will not be used for pushing - * even if it is configured in a stream object. - * - */ - public Builder disabled(boolean disabled) { - Utils.checkNotNull(disabled, "disabled"); - this.disabled = Optional.ofNullable(disabled); - return this; - } - - /** - * If true then this multistream target will not be used for pushing - * even if it is configured in a stream object. - * - */ - public Builder disabled(Optional<Boolean> disabled) { - Utils.checkNotNull(disabled, "disabled"); - this.disabled = disabled; - return this; - } - - public MultistreamTargetPatchPayload build() { - return new MultistreamTargetPatchPayload( - name, - url, - disabled); - } - } -} - 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 07074bf1..1732e5a7 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Name.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Name.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Name { VERIFIABLE_VIDEO("Verifiable Video"); @@ -20,4 +21,14 @@ private Name(String value) { public String value() { return value; } + + public static Optional<Name> fromValue(String value) { + for (Name o: Name.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetFromUrlPayload.java b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetFromUrlPayload.java index 82877a17..1b8ff972 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetFromUrlPayload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetFromUrlPayload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -21,12 +19,10 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class NewAssetFromUrlPayload { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ @JsonProperty("name") private String name; @@ -57,7 +53,6 @@ public class NewAssetFromUrlPayload { * URL where the asset contents can be retrieved, e.g. `https://s3.amazonaws.com/my-bucket/path/filename.mp4`. * For an IPFS source, this should be similar to: `ipfs://{CID}`. For an Arweave * source: `ar://{CID}`. - * */ @JsonProperty("url") private String url; @@ -126,7 +121,6 @@ public NewAssetFromUrlPayload( /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ @JsonIgnore public String name() { @@ -166,7 +160,6 @@ public Optional<Storage> storage() { * URL where the asset contents can be retrieved, e.g. `https://s3.amazonaws.com/my-bucket/path/filename.mp4`. * For an IPFS source, this should be similar to: `ipfs://{CID}`. For an Arweave * source: `ar://{CID}`. - * */ @JsonIgnore public String url() { @@ -203,11 +196,10 @@ public Optional<Double> targetSegmentSizeSecs() { public final static Builder builder() { return new Builder(); - } + } /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ public NewAssetFromUrlPayload withName(String name) { Utils.checkNotNull(name, "name"); @@ -279,7 +271,6 @@ public NewAssetFromUrlPayload withStorage(Optional<? extends Storage> storage) { * URL where the asset contents can be retrieved, e.g. `https://s3.amazonaws.com/my-bucket/path/filename.mp4`. * For an IPFS source, this should be similar to: `ipfs://{CID}`. For an Arweave * source: `ar://{CID}`. - * */ public NewAssetFromUrlPayload withUrl(String url) { Utils.checkNotNull(url, "url"); @@ -346,6 +337,7 @@ public NewAssetFromUrlPayload withTargetSegmentSizeSecs(Optional<Double> targetS this.targetSegmentSizeSecs = targetSegmentSizeSecs; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -419,7 +411,7 @@ public final static class Builder { private JsonNullable<? extends List<TranscodeProfile>> profiles = JsonNullable.undefined(); - private Optional<Double> targetSegmentSizeSecs = Optional.empty(); + private Optional<Double> targetSegmentSizeSecs = Optional.empty(); private Builder() { // force use of static builder() method @@ -427,7 +419,6 @@ private Builder() { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ public Builder name(String name) { Utils.checkNotNull(name, "name"); @@ -499,7 +490,6 @@ public Builder storage(Optional<? extends Storage> storage) { * URL where the asset contents can be retrieved, e.g. `https://s3.amazonaws.com/my-bucket/path/filename.mp4`. * For an IPFS source, this should be similar to: `ipfs://{CID}`. For an Arweave * source: `ar://{CID}`. - * */ public Builder url(String url) { Utils.checkNotNull(url, "url"); @@ -582,4 +572,3 @@ public NewAssetFromUrlPayload build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayload.java b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayload.java index 85d515c4..4e5345eb 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -21,12 +19,10 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class NewAssetPayload { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ @JsonProperty("name") private String name; @@ -113,7 +109,6 @@ public NewAssetPayload( /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ @JsonIgnore public String name() { @@ -179,11 +174,10 @@ public Optional<Double> targetSegmentSizeSecs() { public final static Builder builder() { return new Builder(); - } + } /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ public NewAssetPayload withName(String name) { Utils.checkNotNull(name, "name"); @@ -310,6 +304,7 @@ public NewAssetPayload withTargetSegmentSizeSecs(Optional<Double> targetSegmentS this.targetSegmentSizeSecs = targetSegmentSizeSecs; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -378,7 +373,7 @@ public final static class Builder { private JsonNullable<? extends List<TranscodeProfile>> profiles = JsonNullable.undefined(); - private Optional<Double> targetSegmentSizeSecs = Optional.empty(); + private Optional<Double> targetSegmentSizeSecs = Optional.empty(); private Builder() { // force use of static builder() method @@ -386,7 +381,6 @@ private Builder() { /** * The name of the asset. This is not necessarily the filename - it can be a custom name or title. - * */ public Builder name(String name) { Utils.checkNotNull(name, "name"); @@ -528,4 +522,3 @@ public NewAssetPayload build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadEncryption.java b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadEncryption.java index bab8b92f..7200cc32 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadEncryption.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadEncryption.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class NewAssetPayloadEncryption { /** @@ -39,7 +36,7 @@ public String encryptedKey() { public final static Builder builder() { return new Builder(); - } + } /** * Encryption key used to encrypt the asset. Only writable in the upload asset endpoints and cannot be retrieved back. @@ -49,6 +46,7 @@ public NewAssetPayloadEncryption withEncryptedKey(String encryptedKey) { this.encryptedKey = encryptedKey; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String encryptedKey; + private String encryptedKey; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public NewAssetPayloadEncryption build() { } } } - 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 b9c58e10..13c9f30c 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -19,12 +18,12 @@ import studio.livepeer.livepeer.utils.Utils; /** - * NewAssetPayloadIpfs - Set to true to make default export to IPFS. To customize the + * NewAssetPayloadIpfs + * + * <p>Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ - @JsonDeserialize(using = NewAssetPayloadIpfs._Deserializer.class) public class NewAssetPayloadIpfs { @@ -89,8 +88,8 @@ public static final class _Deserializer extends OneOfDeserializer<NewAssetPayloa public _Deserializer() { super(NewAssetPayloadIpfs.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.Boolean>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.NewAssetPayloadIpfs1>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<NewAssetPayloadIpfs1>() {}, JsonShape.DEFAULT)); } } @@ -101,3 +100,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs1.java b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs1.java index 797e6c2a..f072ddda 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs1.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadIpfs1.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class NewAssetPayloadIpfs1 { @JsonInclude(Include.NON_ABSENT) @@ -43,7 +40,7 @@ public JsonNullable<Spec> spec() { public final static Builder builder() { return new Builder(); - } + } public NewAssetPayloadIpfs1 withSpec(Spec spec) { Utils.checkNotNull(spec, "spec"); @@ -56,6 +53,7 @@ public NewAssetPayloadIpfs1 withSpec(JsonNullable<? extends Spec> spec) { this.spec = spec; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -84,7 +82,7 @@ public String toString() { public final static class Builder { - private JsonNullable<? extends Spec> spec = JsonNullable.undefined(); + private JsonNullable<? extends Spec> spec = JsonNullable.undefined(); private Builder() { // force use of static builder() method @@ -108,4 +106,3 @@ public NewAssetPayloadIpfs1 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadStorage.java b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadStorage.java index 2bace348..b5397176 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadStorage.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NewAssetPayloadStorage.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,14 +15,12 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class NewAssetPayloadStorage { /** * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("ipfs") @@ -45,7 +41,6 @@ public NewAssetPayloadStorage() { * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -55,13 +50,12 @@ public JsonNullable<NewAssetPayloadIpfs> ipfs() { public final static Builder builder() { return new Builder(); - } + } /** * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ public NewAssetPayloadStorage withIpfs(NewAssetPayloadIpfs ipfs) { Utils.checkNotNull(ipfs, "ipfs"); @@ -73,13 +67,13 @@ public NewAssetPayloadStorage withIpfs(NewAssetPayloadIpfs ipfs) { * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ public NewAssetPayloadStorage withIpfs(JsonNullable<? extends NewAssetPayloadIpfs> ipfs) { Utils.checkNotNull(ipfs, "ipfs"); this.ipfs = ipfs; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -108,7 +102,7 @@ public String toString() { public final static class Builder { - private JsonNullable<? extends NewAssetPayloadIpfs> ipfs = JsonNullable.undefined(); + private JsonNullable<? extends NewAssetPayloadIpfs> ipfs = JsonNullable.undefined(); private Builder() { // force use of static builder() method @@ -118,7 +112,6 @@ private Builder() { * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ public Builder ipfs(NewAssetPayloadIpfs ipfs) { Utils.checkNotNull(ipfs, "ipfs"); @@ -130,7 +123,6 @@ public Builder ipfs(NewAssetPayloadIpfs ipfs) { * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ public Builder ipfs(JsonNullable<? extends NewAssetPayloadIpfs> ipfs) { Utils.checkNotNull(ipfs, "ipfs"); @@ -144,4 +136,3 @@ public NewAssetPayloadStorage build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayload.java b/src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayload.java index ac9be87c..6a4be16e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -21,7 +19,6 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class NewStreamPayload { @JsonProperty("name") @@ -54,7 +51,6 @@ public class NewStreamPayload { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("record") @@ -151,7 +147,6 @@ public JsonNullable<List<FfmpegProfile>> profiles() { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ @JsonIgnore public Optional<Boolean> record() { @@ -181,7 +176,7 @@ public Optional<Map<String, UserTags>> userTags() { public final static Builder builder() { return new Builder(); - } + } public NewStreamPayload withName(String name) { Utils.checkNotNull(name, "name"); @@ -256,7 +251,6 @@ public NewStreamPayload withProfiles(JsonNullable<? extends List<FfmpegProfile>> /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public NewStreamPayload withRecord(boolean record) { Utils.checkNotNull(record, "record"); @@ -267,7 +261,6 @@ public NewStreamPayload withRecord(boolean record) { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public NewStreamPayload withRecord(Optional<Boolean> record) { Utils.checkNotNull(record, "record"); @@ -316,6 +309,7 @@ public NewStreamPayload withUserTags(Optional<? extends Map<String, UserTags>> u this.userTags = userTags; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -384,7 +378,7 @@ public final static class Builder { private Optional<? extends Multistream> multistream = Optional.empty(); - private Optional<? extends Map<String, UserTags>> userTags = Optional.empty(); + private Optional<? extends Map<String, UserTags>> userTags = Optional.empty(); private Builder() { // force use of static builder() method @@ -463,7 +457,6 @@ public Builder profiles(JsonNullable<? extends List<FfmpegProfile>> profiles) { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public Builder record(boolean record) { Utils.checkNotNull(record, "record"); @@ -474,7 +467,6 @@ public Builder record(boolean record) { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public Builder record(Optional<Boolean> record) { Utils.checkNotNull(record, "record"); @@ -538,4 +530,3 @@ public NewStreamPayload build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayloadRecordingSpec.java b/src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayloadRecordingSpec.java index e734fa2f..b95a454b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayloadRecordingSpec.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NewStreamPayloadRecordingSpec.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,7 +16,6 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class NewStreamPayloadRecordingSpec { @JsonInclude(Include.NON_ABSENT) @@ -44,7 +41,7 @@ public JsonNullable<List<TranscodeProfile>> profiles() { public final static Builder builder() { return new Builder(); - } + } public NewStreamPayloadRecordingSpec withProfiles(List<TranscodeProfile> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -57,6 +54,7 @@ public NewStreamPayloadRecordingSpec withProfiles(JsonNullable<? extends List<Tr this.profiles = profiles; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -85,7 +83,7 @@ public String toString() { public final static class Builder { - private JsonNullable<? extends List<TranscodeProfile>> profiles = JsonNullable.undefined(); + private JsonNullable<? extends List<TranscodeProfile>> profiles = JsonNullable.undefined(); private Builder() { // force use of static builder() method @@ -109,4 +107,3 @@ public NewStreamPayloadRecordingSpec build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/NftMetadata.java b/src/main/java/studio/livepeer/livepeer/models/components/NftMetadata.java index 313d3076..88fa92b2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NftMetadata.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NftMetadata.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import java.lang.Override; import java.lang.String; @@ -12,12 +10,12 @@ import studio.livepeer.livepeer.utils.Utils; /** - * NftMetadata - Additional data to add to the NFT metadata exported to + * NftMetadata + * + * <p>Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ - public class NftMetadata { @JsonCreator @@ -28,7 +26,8 @@ public NftMetadata() { public final static Builder builder() { return new Builder(); - } + } + @Override public boolean equals(java.lang.Object o) { @@ -52,7 +51,7 @@ public String toString() { return Utils.toString(NftMetadata.class); } - public final static class Builder { + public final static class Builder { private Builder() { // force use of static builder() method @@ -64,4 +63,3 @@ public NftMetadata build() { } } } - 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 b3c33845..c2fe67bd 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/NftMetadataTemplate.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/NftMetadataTemplate.java @@ -1,17 +1,19 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * NftMetadataTemplate - Name of the NFT metadata template to export. 'player' + * NftMetadataTemplate + * + * <p>Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ public enum NftMetadataTemplate { FILE("file"), @@ -27,4 +29,14 @@ private NftMetadataTemplate(String value) { public String value() { return value; } + + public static Optional<NftMetadataTemplate> fromValue(String value) { + for (NftMetadataTemplate o: NftMetadataTemplate.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 dc7aa07f..98af2916 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/One.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/One.java @@ -1,13 +1,16 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Objects; +import java.util.Optional; /** - * One - 0: not mobile, 1: mobile screen share, 2: mobile camera. + * One + * + * <p>0: not mobile, 1: mobile screen share, 2: mobile camera. */ public enum One { ZERO(0L), @@ -24,4 +27,14 @@ private One(long value) { public long value() { return value; } + + public static Optional<One> fromValue(long value) { + for (One o: One.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Output.java b/src/main/java/studio/livepeer/livepeer/models/components/Output.java index 170848ed..31cf01cf 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Output.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Output.java @@ -1,28 +1,25 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; -import java.util.Map; import java.util.Objects; import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; /** - * Output - Output of the task + * Output + * + * <p>Output of the task */ - public class Output { /** @@ -30,7 +27,7 @@ public class Output { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("upload") - private Optional<? extends Map<String, Object>> upload; + private Optional<? extends TaskUpload> upload; /** * Output of the export task @@ -48,7 +45,7 @@ public class Output { @JsonCreator public Output( - @JsonProperty("upload") Optional<? extends Map<String, Object>> upload, + @JsonProperty("upload") Optional<? extends TaskUpload> upload, @JsonProperty("export") Optional<? extends Export> export, @JsonProperty("exportData") Optional<? extends ExportData> exportData) { Utils.checkNotNull(upload, "upload"); @@ -68,8 +65,8 @@ public Output() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional<Map<String, Object>> upload() { - return (Optional<Map<String, Object>>) upload; + public Optional<TaskUpload> upload() { + return (Optional<TaskUpload>) upload; } /** @@ -92,12 +89,12 @@ public Optional<ExportData> exportData() { public final static Builder builder() { return new Builder(); - } + } /** * Output of the upload task */ - public Output withUpload(Map<String, Object> upload) { + public Output withUpload(TaskUpload upload) { Utils.checkNotNull(upload, "upload"); this.upload = Optional.ofNullable(upload); return this; @@ -106,7 +103,7 @@ public Output withUpload(Map<String, Object> upload) { /** * Output of the upload task */ - public Output withUpload(Optional<? extends Map<String, Object>> upload) { + public Output withUpload(Optional<? extends TaskUpload> upload) { Utils.checkNotNull(upload, "upload"); this.upload = upload; return this; @@ -147,6 +144,7 @@ public Output withExportData(Optional<? extends ExportData> exportData) { this.exportData = exportData; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -181,11 +179,11 @@ public String toString() { public final static class Builder { - private Optional<? extends Map<String, Object>> upload = Optional.empty(); + private Optional<? extends TaskUpload> upload = Optional.empty(); private Optional<? extends Export> export = Optional.empty(); - private Optional<? extends ExportData> exportData = Optional.empty(); + private Optional<? extends ExportData> exportData = Optional.empty(); private Builder() { // force use of static builder() method @@ -194,7 +192,7 @@ private Builder() { /** * Output of the upload task */ - public Builder upload(Map<String, Object> upload) { + public Builder upload(TaskUpload upload) { Utils.checkNotNull(upload, "upload"); this.upload = Optional.ofNullable(upload); return this; @@ -203,7 +201,7 @@ public Builder upload(Map<String, Object> upload) { /** * Output of the upload task */ - public Builder upload(Optional<? extends Map<String, Object>> upload) { + public Builder upload(Optional<? extends TaskUpload> upload) { Utils.checkNotNull(upload, "upload"); this.upload = upload; return this; @@ -253,4 +251,3 @@ public Output build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Outputs.java b/src/main/java/studio/livepeer/livepeer/models/components/Outputs.java index 9007ee19..b56e0f6f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Outputs.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Outputs.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,9 +16,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Outputs - Output formats + * Outputs + * + * <p>Output formats */ - public class Outputs { /** @@ -90,7 +89,7 @@ public Optional<Fmp4> fmp4() { public final static Builder builder() { return new Builder(); - } + } /** * HLS output format @@ -145,6 +144,7 @@ public Outputs withFmp4(Optional<? extends Fmp4> fmp4) { this.fmp4 = fmp4; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -183,7 +183,7 @@ public final static class Builder { private Optional<? extends Mp4> mp4 = Optional.empty(); - private Optional<? extends Fmp4> fmp4 = Optional.empty(); + private Optional<? extends Fmp4> fmp4 = Optional.empty(); private Builder() { // force use of static builder() method @@ -251,4 +251,3 @@ public Outputs build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Params.java b/src/main/java/studio/livepeer/livepeer/models/components/Params.java index 6a2b323c..14172348 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Params.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Params.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,9 +16,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Params - Parameters of the task + * Params + * + * <p>Parameters of the task */ - public class Params { /** @@ -122,7 +121,7 @@ public Optional<Clip> clip() { public final static Builder builder() { return new Builder(); - } + } /** * Parameters for the upload task @@ -207,6 +206,7 @@ public Params withClip(Optional<? extends Clip> clip) { this.clip = clip; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -255,7 +255,7 @@ public final static class Builder { private Optional<? extends TranscodeFile> transcodeFile = Optional.empty(); - private Optional<? extends Clip> clip = Optional.empty(); + private Optional<? extends Clip> clip = Optional.empty(); private Builder() { // force use of static builder() method @@ -355,4 +355,3 @@ public Params build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Participants.java b/src/main/java/studio/livepeer/livepeer/models/components/Participants.java index e00267f7..eb5804c0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Participants.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Participants.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Participants { /** @@ -102,7 +99,7 @@ public Optional<Long> leftAt() { public final static Builder builder() { return new Builder(); - } + } /** * participant ID @@ -175,6 +172,7 @@ public Participants withLeftAt(Optional<Long> leftAt) { this.leftAt = leftAt; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -218,7 +216,7 @@ public final static class Builder { private Optional<Long> joinedAt = Optional.empty(); - private Optional<Long> leftAt = Optional.empty(); + private Optional<Long> leftAt = Optional.empty(); private Builder() { // force use of static builder() method @@ -305,4 +303,3 @@ public Participants build() { } } } - 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 4239f4e4..56848644 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Phase.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Phase.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * Phase - Phase of the asset storage + * Phase + * + * <p>Phase of the asset storage */ public enum Phase { WAITING("waiting"), @@ -27,4 +30,14 @@ private Phase(String value) { public String value() { return value; } + + public static Optional<Phase> fromValue(String value) { + for (Phase o: Phase.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 f8ade733..1b8cdf37 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Pinata.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Pinata.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -19,11 +17,11 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Pinata - Custom credentials for the Piñata service. Must have either - * a JWT or an API key and an API secret. + * Pinata * + * <p>Custom credentials for the Piñata service. Must have either + * a JWT or an API key and an API secret. */ - @JsonDeserialize(using = Pinata._Deserializer.class) public class Pinata { @@ -88,8 +86,8 @@ public static final class _Deserializer extends OneOfDeserializer<Pinata> { public _Deserializer() { super(Pinata.class, false, - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.Pinata2>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.Pinata1>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Pinata2>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<Pinata1>() {}, JsonShape.DEFAULT)); } } @@ -100,3 +98,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Pinata1.java b/src/main/java/studio/livepeer/livepeer/models/components/Pinata1.java index 6911ca85..327232ca 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Pinata1.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Pinata1.java @@ -1,17 +1,14 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import java.lang.Override; import java.lang.String; import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class Pinata1 { @JsonCreator @@ -22,7 +19,8 @@ public Pinata1() { public final static Builder builder() { return new Builder(); - } + } + @Override public boolean equals(java.lang.Object o) { @@ -46,7 +44,7 @@ public String toString() { return Utils.toString(Pinata1.class); } - public final static class Builder { + public final static class Builder { private Builder() { // force use of static builder() method @@ -58,4 +56,3 @@ public Pinata1 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Pinata2.java b/src/main/java/studio/livepeer/livepeer/models/components/Pinata2.java index 9e1db416..c834da09 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Pinata2.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Pinata2.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class Pinata2 { /** @@ -39,7 +36,7 @@ public String apiKey() { public final static Builder builder() { return new Builder(); - } + } /** * Will be added to the pinata_api_key header. @@ -49,6 +46,7 @@ public Pinata2 withApiKey(String apiKey) { this.apiKey = apiKey; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String apiKey; + private String apiKey; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public Pinata2 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfo.java b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfo.java index 2484e942..456abc40 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfo.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfo.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class PlaybackInfo { @JsonProperty("type") @@ -44,7 +41,7 @@ public Meta meta() { public final static Builder builder() { return new Builder(); - } + } public PlaybackInfo withType(PlaybackInfoType type) { Utils.checkNotNull(type, "type"); @@ -57,6 +54,7 @@ public PlaybackInfo withMeta(Meta meta) { this.meta = meta; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -90,7 +88,7 @@ public final static class Builder { private PlaybackInfoType type; - private Meta meta; + private Meta meta; private Builder() { // force use of static builder() method @@ -115,4 +113,3 @@ public PlaybackInfo build() { } } } - 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 52e5dd0b..a0ff3170 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoHrn.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoHrn.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum PlaybackInfoHrn { HLS_TS("HLS (TS)"); @@ -20,4 +21,14 @@ private PlaybackInfoHrn(String value) { public String value() { return value; } + + public static Optional<PlaybackInfoHrn> fromValue(String value) { + for (PlaybackInfoHrn o: PlaybackInfoHrn.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 868fc305..7e1054d1 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaDvrPlaybackType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaDvrPlaybackType.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum PlaybackInfoMetaDvrPlaybackType { HTML5_APPLICATION_VND_APPLE_MPEGURL("html5/application/vnd.apple.mpegurl"); @@ -20,4 +21,14 @@ private PlaybackInfoMetaDvrPlaybackType(String value) { public String value() { return value; } + + public static Optional<PlaybackInfoMetaDvrPlaybackType> fromValue(String value) { + for (PlaybackInfoMetaDvrPlaybackType o: PlaybackInfoMetaDvrPlaybackType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 7f3285df..eec02dba 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoMetaType.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum PlaybackInfoMetaType { HTML5_APPLICATION_VND_APPLE_MPEGURL("html5/application/vnd.apple.mpegurl"), @@ -26,4 +27,14 @@ private PlaybackInfoMetaType(String value) { public String value() { return value; } + + public static Optional<PlaybackInfoMetaType> fromValue(String value) { + for (PlaybackInfoMetaType o: PlaybackInfoMetaType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoSource.java b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoSource.java index 6c7a1f05..4fffc98d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoSource.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoSource.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class PlaybackInfoSource { /** @@ -120,7 +117,7 @@ public Optional<Double> bitrate() { public final static Builder builder() { return new Builder(); - } + } /** * Human Readable Name @@ -190,6 +187,7 @@ public PlaybackInfoSource withBitrate(Optional<Double> bitrate) { this.bitrate = bitrate; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -248,7 +246,7 @@ public final static class Builder { private Optional<Double> height = Optional.empty(); - private Optional<Double> bitrate = Optional.empty(); + private Optional<Double> bitrate = Optional.empty(); private Builder() { // force use of static builder() method @@ -335,4 +333,3 @@ public PlaybackInfoSource build() { } } } - 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 6f88669a..d0a650e9 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackInfoType.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum PlaybackInfoType { LIVE("live"), @@ -22,4 +23,14 @@ private PlaybackInfoType(String value) { public String value() { return value; } + + public static Optional<PlaybackInfoType> fromValue(String value) { + for (PlaybackInfoType o: PlaybackInfoType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackPolicy.java b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackPolicy.java index 3d42da69..dc935839 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PlaybackPolicy.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PlaybackPolicy.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -22,9 +20,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * PlaybackPolicy - Whether the playback policy for an asset or stream is public or signed + * PlaybackPolicy + * + * <p>Whether the playback policy for an asset or stream is public or signed */ - public class PlaybackPolicy { @JsonProperty("type") @@ -47,7 +46,6 @@ public class PlaybackPolicy { /** * Interval (in seconds) at which the playback policy should be * refreshed (default 600 seconds) - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("refreshInterval") @@ -109,7 +107,6 @@ public Optional<Map<String, Object>> webhookContext() { /** * Interval (in seconds) at which the playback policy should be * refreshed (default 600 seconds) - * */ @JsonIgnore public Optional<Double> refreshInterval() { @@ -127,7 +124,7 @@ public Optional<List<String>> allowedOrigins() { public final static Builder builder() { return new Builder(); - } + } public PlaybackPolicy withType(Type type) { Utils.checkNotNull(type, "type"); @@ -174,7 +171,6 @@ public PlaybackPolicy withWebhookContext(Optional<? extends Map<String, Object>> /** * Interval (in seconds) at which the playback policy should be * refreshed (default 600 seconds) - * */ public PlaybackPolicy withRefreshInterval(double refreshInterval) { Utils.checkNotNull(refreshInterval, "refreshInterval"); @@ -185,7 +181,6 @@ public PlaybackPolicy withRefreshInterval(double refreshInterval) { /** * Interval (in seconds) at which the playback policy should be * refreshed (default 600 seconds) - * */ public PlaybackPolicy withRefreshInterval(Optional<Double> refreshInterval) { Utils.checkNotNull(refreshInterval, "refreshInterval"); @@ -210,6 +205,7 @@ public PlaybackPolicy withAllowedOrigins(Optional<? extends List<String>> allowe this.allowedOrigins = allowedOrigins; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -258,7 +254,7 @@ public final static class Builder { private Optional<Double> refreshInterval = Optional.empty(); - private Optional<? extends List<String>> allowedOrigins = Optional.empty(); + private Optional<? extends List<String>> allowedOrigins = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,7 +305,6 @@ public Builder webhookContext(Optional<? extends Map<String, Object>> webhookCon /** * Interval (in seconds) at which the playback policy should be * refreshed (default 600 seconds) - * */ public Builder refreshInterval(double refreshInterval) { Utils.checkNotNull(refreshInterval, "refreshInterval"); @@ -320,7 +315,6 @@ public Builder refreshInterval(double refreshInterval) { /** * Interval (in seconds) at which the playback policy should be * refreshed (default 600 seconds) - * */ public Builder refreshInterval(Optional<Double> refreshInterval) { Utils.checkNotNull(refreshInterval, "refreshInterval"); @@ -356,4 +350,3 @@ public PlaybackPolicy build() { } } } - 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 fb65a999..a97112d0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/PrimaryType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/PrimaryType.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * PrimaryType - Video Metadata EIP-712 primaryType + * PrimaryType + * + * <p>Video Metadata EIP-712 primaryType */ public enum PrimaryType { VIDEO_ATTESTATION("VideoAttestation"); @@ -23,4 +26,14 @@ private PrimaryType(String value) { public String value() { return value; } + + public static Optional<PrimaryType> fromValue(String value) { + for (PrimaryType o: PrimaryType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 c93e0f06..b1862ec6 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Profile.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Profile.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Profile { H264_BASELINE("H264Baseline"), @@ -23,4 +24,14 @@ private Profile(String value) { public String value() { return value; } + + public static Optional<Profile> fromValue(String value) { + for (Profile o: Profile.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Pull.java b/src/main/java/studio/livepeer/livepeer/models/components/Pull.java index c5bfdff7..2792e93d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Pull.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Pull.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,11 +17,12 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Pull - Configuration for a stream that should be actively pulled from an + * Pull + * + * <p>Configuration for a stream that should be actively pulled from an * external source, rather than pushed to Livepeer. If specified, the * stream will not have a streamKey. */ - public class Pull { /** @@ -113,7 +112,7 @@ public Optional<Location> location() { public final static Builder builder() { return new Builder(); - } + } /** * URL from which to pull from. @@ -179,6 +178,7 @@ public Pull withLocation(Optional<? extends Location> location) { this.location = location; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -222,7 +222,7 @@ public final static class Builder { private Optional<? extends IsMobile> isMobile = Optional.empty(); - private Optional<? extends Location> location = Optional.empty(); + private Optional<? extends Location> location = Optional.empty(); private Builder() { // force use of static builder() method @@ -302,4 +302,3 @@ public Pull build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/RealtimeViewershipMetric.java b/src/main/java/studio/livepeer/livepeer/models/components/RealtimeViewershipMetric.java index 575b2a30..817f93f6 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/RealtimeViewershipMetric.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/RealtimeViewershipMetric.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,10 +17,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * RealtimeViewershipMetric - An individual metric about realtime viewership of a stream/asset. + * RealtimeViewershipMetric * + * <p>An individual metric about realtime viewership of a stream/asset. */ - public class RealtimeViewershipMetric { /** @@ -143,7 +141,7 @@ public double errorRate() { public final static Builder builder() { return new Builder(); - } + } /** * The playback ID associated with the metric. @@ -234,6 +232,7 @@ public RealtimeViewershipMetric withErrorRate(double errorRate) { this.errorRate = errorRate; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -287,7 +286,7 @@ public final static class Builder { private Long viewCount; - private Double errorRate; + private Double errorRate; private Builder() { // force use of static builder() method @@ -394,4 +393,3 @@ public RealtimeViewershipMetric build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/RecordingSpec.java b/src/main/java/studio/livepeer/livepeer/models/components/RecordingSpec.java index 35168023..6f2c7a61 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/RecordingSpec.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/RecordingSpec.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,7 +16,6 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class RecordingSpec { @JsonInclude(Include.NON_ABSENT) @@ -44,7 +41,7 @@ public JsonNullable<List<TranscodeProfile>> profiles() { public final static Builder builder() { return new Builder(); - } + } public RecordingSpec withProfiles(List<TranscodeProfile> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -57,6 +54,7 @@ public RecordingSpec withProfiles(JsonNullable<? extends List<TranscodeProfile>> this.profiles = profiles; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -85,7 +83,7 @@ public String toString() { public final static class Builder { - private JsonNullable<? extends List<TranscodeProfile>> profiles = JsonNullable.undefined(); + private JsonNullable<? extends List<TranscodeProfile>> profiles = JsonNullable.undefined(); private Builder() { // force use of static builder() method @@ -109,4 +107,3 @@ public RecordingSpec build() { } } } - 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 c844ad51..bd054c42 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/RecordingStatus.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/RecordingStatus.java @@ -1,19 +1,23 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * RecordingStatus - The status of the recording process of this stream session. + * RecordingStatus + * + * <p>The status of the recording process of this stream session. */ public enum RecordingStatus { WAITING("waiting"), READY("ready"), FAILED("failed"), + DELETED("deleted"), NONE("none"); @JsonValue @@ -26,4 +30,14 @@ private RecordingStatus(String value) { public String value() { return value; } + + public static Optional<RecordingStatus> fromValue(String value) { + for (RecordingStatus o: RecordingStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Renditions.java b/src/main/java/studio/livepeer/livepeer/models/components/Renditions.java index 5a71797e..1eefcb02 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Renditions.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Renditions.java @@ -1,17 +1,14 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import java.lang.Override; import java.lang.String; import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class Renditions { @JsonCreator @@ -22,7 +19,8 @@ public Renditions() { public final static Builder builder() { return new Builder(); - } + } + @Override public boolean equals(java.lang.Object o) { @@ -46,7 +44,7 @@ public String toString() { return Utils.toString(Renditions.class); } - public final static class Builder { + public final static class Builder { private Builder() { // force use of static builder() method @@ -58,4 +56,3 @@ public Renditions build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Request.java b/src/main/java/studio/livepeer/livepeer/models/components/Request.java index 24c3f96d..5df01197 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Request.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Request.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,7 +16,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Request { /** @@ -104,7 +101,7 @@ public Optional<String> body() { public final static Builder builder() { return new Builder(); - } + } /** * URL used for the request @@ -177,6 +174,7 @@ public Request withBody(Optional<String> body) { this.body = body; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -220,7 +218,7 @@ public final static class Builder { private Optional<? extends Map<String, String>> headers = Optional.empty(); - private Optional<String> body = Optional.empty(); + private Optional<String> body = Optional.empty(); private Builder() { // force use of static builder() method @@ -307,4 +305,3 @@ public Request build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Response.java b/src/main/java/studio/livepeer/livepeer/models/components/Response.java index d000dbb6..42410919 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Response.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Response.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Response { /** @@ -84,7 +81,7 @@ public Optional<String> statusText() { public final static Builder builder() { return new Builder(); - } + } /** * response body @@ -139,6 +136,7 @@ public Response withStatusText(Optional<String> statusText) { this.statusText = statusText; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -177,7 +175,7 @@ public final static class Builder { private Optional<Double> status = Optional.empty(); - private Optional<String> statusText = Optional.empty(); + private Optional<String> statusText = Optional.empty(); private Builder() { // force use of static builder() method @@ -245,4 +243,3 @@ public Response build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Room.java b/src/main/java/studio/livepeer/livepeer/models/components/Room.java index 6244c4a3..ae3cf0e8 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Room.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Room.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,7 +16,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Room { /** @@ -115,7 +112,7 @@ public Map<String, Participants> participants() { public final static Builder builder() { return new Builder(); - } + } /** * room ID @@ -185,6 +182,7 @@ public Room withParticipants(Map<String, Participants> participants) { this.participants = participants; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -233,7 +231,7 @@ public final static class Builder { private Optional<String> egressId = Optional.empty(); - private Map<String, Participants> participants; + private Map<String, Participants> participants; private Builder() { // force use of static builder() method @@ -318,4 +316,3 @@ public Room build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/RoomEgressPayload.java b/src/main/java/studio/livepeer/livepeer/models/components/RoomEgressPayload.java index 0d7a006a..f9b4b4d8 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/RoomEgressPayload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/RoomEgressPayload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class RoomEgressPayload { /** @@ -39,7 +36,7 @@ public String streamId() { public final static Builder builder() { return new Builder(); - } + } /** * The ID of the Livepeer Stream to stream to @@ -49,6 +46,7 @@ public RoomEgressPayload withStreamId(String streamId) { this.streamId = streamId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String streamId; + private String streamId; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public RoomEgressPayload build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/RoomUserPayload.java b/src/main/java/studio/livepeer/livepeer/models/components/RoomUserPayload.java index 9e29fc77..bc170d86 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/RoomUserPayload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/RoomUserPayload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class RoomUserPayload { /** @@ -102,7 +99,7 @@ public Optional<String> metadata() { public final static Builder builder() { return new Builder(); - } + } /** * Display name @@ -166,6 +163,7 @@ public RoomUserPayload withMetadata(Optional<String> metadata) { this.metadata = metadata; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -209,7 +207,7 @@ public final static class Builder { private Optional<Boolean> canPublishData = Optional.empty(); - private Optional<String> metadata = Optional.empty(); + private Optional<String> metadata = Optional.empty(); private Builder() { // force use of static builder() method @@ -287,4 +285,3 @@ public RoomUserPayload build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/RoomUserResponse.java b/src/main/java/studio/livepeer/livepeer/models/components/RoomUserResponse.java index a29271c5..e14967c8 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/RoomUserResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/RoomUserResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -16,7 +14,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class RoomUserResponse { /** @@ -83,7 +80,7 @@ public Optional<String> token() { public final static Builder builder() { return new Builder(); - } + } /** * The ID of the user @@ -138,6 +135,7 @@ public RoomUserResponse withToken(Optional<String> token) { this.token = token; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -176,7 +174,7 @@ public final static class Builder { private Optional<String> joinUrl = Optional.empty(); - private Optional<String> token = Optional.empty(); + private Optional<String> token = Optional.empty(); private Builder() { // force use of static builder() method @@ -244,4 +242,3 @@ public RoomUserResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/RoomUserUpdatePayload.java b/src/main/java/studio/livepeer/livepeer/models/components/RoomUserUpdatePayload.java index cfaa2ec4..60a83865 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/RoomUserUpdatePayload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/RoomUserUpdatePayload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,7 +17,6 @@ import studio.livepeer.livepeer.utils.LazySingletonValue; import studio.livepeer.livepeer.utils.Utils; - public class RoomUserUpdatePayload { /** @@ -86,7 +83,7 @@ public Optional<String> metadata() { public final static Builder builder() { return new Builder(); - } + } /** * Whether a user is allowed to publish audio/video tracks (i.e. their microphone and webcam) @@ -141,6 +138,7 @@ public RoomUserUpdatePayload withMetadata(Optional<String> metadata) { this.metadata = metadata; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -179,7 +177,7 @@ public final static class Builder { private Optional<Boolean> canPublishData; - private Optional<String> metadata = Optional.empty(); + private Optional<String> metadata = Optional.empty(); private Builder() { // force use of static builder() method @@ -265,4 +263,3 @@ public RoomUserUpdatePayload build() { new TypeReference<Optional<Boolean>>() {}); } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Security.java b/src/main/java/studio/livepeer/livepeer/models/components/Security.java index 7183964c..144d8626 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Security.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Security.java @@ -1,20 +1,18 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; import java.util.Objects; +import studio.livepeer.livepeer.utils.HasSecurity; import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - -public class Security { +public class Security implements HasSecurity { @SpeakeasyMetadata("security:scheme=true,type=http,subtype=bearer,name=Authorization") private String apiKey; @@ -33,13 +31,14 @@ public String apiKey() { public final static Builder builder() { return new Builder(); - } + } public Security withApiKey(String apiKey) { Utils.checkNotNull(apiKey, "apiKey"); this.apiKey = apiKey; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -68,7 +67,7 @@ public String toString() { public final static class Builder { - private String apiKey; + private String apiKey; private Builder() { // force use of static builder() method @@ -86,4 +85,3 @@ public Security build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Session.java b/src/main/java/studio/livepeer/livepeer/models/components/Session.java index 490e556c..5e3930c2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Session.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Session.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -22,7 +20,6 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class Session { @JsonInclude(Include.NON_ABSENT) @@ -30,6 +27,7 @@ public class Session { private Optional<String> id; /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @@ -38,6 +36,7 @@ public class Session { private Optional<String> kind; /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @@ -133,7 +132,6 @@ public class Session { /** * Whether the stream should be recorded. Uses default settings. For more customization, create and configure an object store. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("record") @@ -171,7 +169,6 @@ public class Session { * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("profiles") @@ -180,7 +177,6 @@ public class Session { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("recordingSpec") @@ -276,6 +272,7 @@ public Optional<String> id() { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -285,6 +282,7 @@ public Optional<String> kind() { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -398,7 +396,6 @@ public Optional<String> projectId() { /** * Whether the stream should be recorded. Uses default settings. For more customization, create and configure an object store. - * */ @JsonIgnore public Optional<Boolean> record() { @@ -442,7 +439,6 @@ public Optional<String> playbackId() { * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -453,7 +449,6 @@ public Optional<List<FfmpegProfile>> profiles() { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -463,7 +458,7 @@ public Optional<RecordingSpec> recordingSpec() { public final static Builder builder() { return new Builder(); - } + } public Session withId(String id) { Utils.checkNotNull(id, "id"); @@ -478,6 +473,7 @@ public Session withId(Optional<String> id) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -488,6 +484,7 @@ public Session withKind(String kind) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -498,6 +495,7 @@ public Session withKind(Optional<String> kind) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -508,6 +506,7 @@ public Session withUserId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -747,7 +746,6 @@ public Session withProjectId(Optional<String> projectId) { /** * Whether the stream should be recorded. Uses default settings. For more customization, create and configure an object store. - * */ public Session withRecord(boolean record) { Utils.checkNotNull(record, "record"); @@ -757,7 +755,6 @@ public Session withRecord(boolean record) { /** * Whether the stream should be recorded. Uses default settings. For more customization, create and configure an object store. - * */ public Session withRecord(Optional<Boolean> record) { Utils.checkNotNull(record, "record"); @@ -841,7 +838,6 @@ public Session withPlaybackId(Optional<String> playbackId) { * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ public Session withProfiles(List<FfmpegProfile> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -853,7 +849,6 @@ public Session withProfiles(List<FfmpegProfile> profiles) { * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ public Session withProfiles(Optional<? extends List<FfmpegProfile>> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -864,7 +859,6 @@ public Session withProfiles(Optional<? extends List<FfmpegProfile>> profiles) { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ public Session withRecordingSpec(RecordingSpec recordingSpec) { Utils.checkNotNull(recordingSpec, "recordingSpec"); @@ -875,13 +869,13 @@ public Session withRecordingSpec(RecordingSpec recordingSpec) { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ public Session withRecordingSpec(Optional<? extends RecordingSpec> recordingSpec) { Utils.checkNotNull(recordingSpec, "recordingSpec"); this.recordingSpec = recordingSpec; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -1032,7 +1026,7 @@ public final static class Builder { private Optional<? extends List<FfmpegProfile>> profiles = Optional.empty(); - private Optional<? extends RecordingSpec> recordingSpec = Optional.empty(); + private Optional<? extends RecordingSpec> recordingSpec = Optional.empty(); private Builder() { // force use of static builder() method @@ -1051,6 +1045,7 @@ public Builder id(Optional<String> id) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -1061,6 +1056,7 @@ public Builder kind(String kind) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -1071,6 +1067,7 @@ public Builder kind(Optional<String> kind) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -1081,6 +1078,7 @@ public Builder userId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -1320,7 +1318,6 @@ public Builder projectId(Optional<String> projectId) { /** * Whether the stream should be recorded. Uses default settings. For more customization, create and configure an object store. - * */ public Builder record(boolean record) { Utils.checkNotNull(record, "record"); @@ -1330,7 +1327,6 @@ public Builder record(boolean record) { /** * Whether the stream should be recorded. Uses default settings. For more customization, create and configure an object store. - * */ public Builder record(Optional<Boolean> record) { Utils.checkNotNull(record, "record"); @@ -1414,7 +1410,6 @@ public Builder playbackId(Optional<String> playbackId) { * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ public Builder profiles(List<FfmpegProfile> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -1426,7 +1421,6 @@ public Builder profiles(List<FfmpegProfile> profiles) { * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ public Builder profiles(Optional<? extends List<FfmpegProfile>> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -1437,7 +1431,6 @@ public Builder profiles(Optional<? extends List<FfmpegProfile>> profiles) { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ public Builder recordingSpec(RecordingSpec recordingSpec) { Utils.checkNotNull(recordingSpec, "recordingSpec"); @@ -1448,7 +1441,6 @@ public Builder recordingSpec(RecordingSpec recordingSpec) { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ public Builder recordingSpec(Optional<? extends RecordingSpec> recordingSpec) { Utils.checkNotNull(recordingSpec, "recordingSpec"); @@ -1486,4 +1478,3 @@ public Session build() { } } } - 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 98759a35..67d063d9 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/SignatureType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/SignatureType.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum SignatureType { EIP712("eip712"), @@ -21,4 +22,14 @@ private SignatureType(String value) { public String value() { return value; } + + public static Optional<SignatureType> fromValue(String value) { + for (SignatureType o: SignatureType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/SigningKey.java b/src/main/java/studio/livepeer/livepeer/models/components/SigningKey.java index 002e0477..b398b944 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/SigningKey.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/SigningKey.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,7 +17,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class SigningKey { @JsonInclude(Include.NON_ABSENT) @@ -34,6 +31,7 @@ public class SigningKey { private Optional<String> name; /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @@ -119,6 +117,7 @@ public Optional<String> name() { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -166,7 +165,7 @@ public Optional<String> projectId() { public final static Builder builder() { return new Builder(); - } + } public SigningKey withId(String id) { Utils.checkNotNull(id, "id"); @@ -199,6 +198,7 @@ public SigningKey withName(Optional<String> name) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -209,6 +209,7 @@ public SigningKey withUserId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -295,6 +296,7 @@ public SigningKey withProjectId(Optional<String> projectId) { this.projectId = projectId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -359,7 +361,7 @@ public final static class Builder { private Optional<Boolean> disabled = Optional.empty(); - private Optional<String> projectId = Optional.empty(); + private Optional<String> projectId = Optional.empty(); private Builder() { // force use of static builder() method @@ -396,6 +398,7 @@ public Builder name(Optional<String> name) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -406,6 +409,7 @@ public Builder userId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -506,4 +510,3 @@ public SigningKey build() { } } } - 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 56d92774..edc33df0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Source.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Source.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -18,7 +16,6 @@ import studio.livepeer.livepeer.utils.Utils.TypeReferenceWithShape; import studio.livepeer.livepeer.utils.Utils; - @JsonDeserialize(using = Source._Deserializer.class) public class Source { @@ -89,9 +86,9 @@ public static final class _Deserializer extends OneOfDeserializer<Source> { public _Deserializer() { super(Source.class, false, - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.Source3>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.Source1>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.Two>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Source3>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<Source1>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<Two>() {}, JsonShape.DEFAULT)); } } @@ -102,3 +99,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Source1.java b/src/main/java/studio/livepeer/livepeer/models/components/Source1.java index c03e873b..57f061f0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Source1.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Source1.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Source1 { @JsonProperty("type") @@ -91,7 +88,7 @@ public Optional<EncryptionOutput> encryption() { public final static Builder builder() { return new Builder(); - } + } public Source1 withType(SourceType type) { Utils.checkNotNull(type, "type"); @@ -137,6 +134,7 @@ public Source1 withEncryption(Optional<? extends EncryptionOutput> encryption) { this.encryption = encryption; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -180,7 +178,7 @@ public final static class Builder { private Optional<String> gatewayUrl = Optional.empty(); - private Optional<? extends EncryptionOutput> encryption = Optional.empty(); + private Optional<? extends EncryptionOutput> encryption = Optional.empty(); private Builder() { // force use of static builder() method @@ -240,4 +238,3 @@ public Source1 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Source3.java b/src/main/java/studio/livepeer/livepeer/models/components/Source3.java index 8cb3b689..1df72383 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Source3.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Source3.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Source3 { @JsonProperty("type") @@ -145,7 +142,7 @@ public Optional<String> assetId() { public final static Builder builder() { return new Builder(); - } + } public Source3 withType(AssetSource3Type type) { Utils.checkNotNull(type, "type"); @@ -254,6 +251,7 @@ public Source3 withAssetId(Optional<String> assetId) { this.assetId = assetId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -312,7 +310,7 @@ public final static class Builder { private Optional<String> requesterId = Optional.empty(); - private Optional<String> assetId = Optional.empty(); + private Optional<String> assetId = Optional.empty(); private Builder() { // force use of static builder() method @@ -438,4 +436,3 @@ public Source3 build() { } } } - 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 8dc55140..0b4c586d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/SourceType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/SourceType.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum SourceType { URL("url"); @@ -20,4 +21,14 @@ private SourceType(String value) { public String value() { return value; } + + public static Optional<SourceType> fromValue(String value) { + for (SourceType o: SourceType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Spec.java b/src/main/java/studio/livepeer/livepeer/models/components/Spec.java index ccfe2558..433eac0c 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Spec.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Spec.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,14 +17,12 @@ import studio.livepeer.livepeer.utils.LazySingletonValue; import studio.livepeer.livepeer.utils.Utils; - public class Spec { /** * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("nftMetadataTemplate") @@ -36,7 +32,6 @@ public class Spec { * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("nftMetadata") @@ -60,7 +55,6 @@ public Spec() { * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -72,7 +66,6 @@ public Optional<NftMetadataTemplate> nftMetadataTemplate() { * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -82,13 +75,12 @@ public Optional<NftMetadata> nftMetadata() { public final static Builder builder() { return new Builder(); - } + } /** * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ public Spec withNftMetadataTemplate(NftMetadataTemplate nftMetadataTemplate) { Utils.checkNotNull(nftMetadataTemplate, "nftMetadataTemplate"); @@ -100,7 +92,6 @@ public Spec withNftMetadataTemplate(NftMetadataTemplate nftMetadataTemplate) { * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ public Spec withNftMetadataTemplate(Optional<? extends NftMetadataTemplate> nftMetadataTemplate) { Utils.checkNotNull(nftMetadataTemplate, "nftMetadataTemplate"); @@ -112,7 +103,6 @@ public Spec withNftMetadataTemplate(Optional<? extends NftMetadataTemplate> nftM * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ public Spec withNftMetadata(NftMetadata nftMetadata) { Utils.checkNotNull(nftMetadata, "nftMetadata"); @@ -124,13 +114,13 @@ public Spec withNftMetadata(NftMetadata nftMetadata) { * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ public Spec withNftMetadata(Optional<? extends NftMetadata> nftMetadata) { Utils.checkNotNull(nftMetadata, "nftMetadata"); this.nftMetadata = nftMetadata; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -164,7 +154,7 @@ public final static class Builder { private Optional<? extends NftMetadataTemplate> nftMetadataTemplate; - private Optional<? extends NftMetadata> nftMetadata = Optional.empty(); + private Optional<? extends NftMetadata> nftMetadata = Optional.empty(); private Builder() { // force use of static builder() method @@ -174,7 +164,6 @@ private Builder() { * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ public Builder nftMetadataTemplate(NftMetadataTemplate nftMetadataTemplate) { Utils.checkNotNull(nftMetadataTemplate, "nftMetadataTemplate"); @@ -186,7 +175,6 @@ public Builder nftMetadataTemplate(NftMetadataTemplate nftMetadataTemplate) { * Name of the NFT metadata template to export. 'player' * will embed the Livepeer Player on the NFT while 'file' * will reference only the immutable MP4 files. - * */ public Builder nftMetadataTemplate(Optional<? extends NftMetadataTemplate> nftMetadataTemplate) { Utils.checkNotNull(nftMetadataTemplate, "nftMetadataTemplate"); @@ -198,7 +186,6 @@ public Builder nftMetadataTemplate(Optional<? extends NftMetadataTemplate> nftMe * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ public Builder nftMetadata(NftMetadata nftMetadata) { Utils.checkNotNull(nftMetadata, "nftMetadata"); @@ -210,7 +197,6 @@ public Builder nftMetadata(NftMetadata nftMetadata) { * Additional data to add to the NFT metadata exported to * IPFS. Will be deep merged with the default metadata * exported. - * */ public Builder nftMetadata(Optional<? extends NftMetadata> nftMetadata) { Utils.checkNotNull(nftMetadata, "nftMetadata"); @@ -234,4 +220,3 @@ public Spec build() { new TypeReference<Optional<? extends NftMetadataTemplate>>() {}); } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Status.java b/src/main/java/studio/livepeer/livepeer/models/components/Status.java index ad571341..f9340bd4 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Status.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Status.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,9 +17,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Status - status of webhook + * Status + * + * <p>status of webhook */ - public class Status { /** @@ -34,7 +33,6 @@ public class Status { /** * Timestamp (in milliseconds) at which the webhook last was * triggered - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("lastTriggeredAt") @@ -66,7 +64,6 @@ public Optional<LastFailure> lastFailure() { /** * Timestamp (in milliseconds) at which the webhook last was * triggered - * */ @JsonIgnore public Optional<Double> lastTriggeredAt() { @@ -75,7 +72,7 @@ public Optional<Double> lastTriggeredAt() { public final static Builder builder() { return new Builder(); - } + } /** * failure timestamp and error message with status code @@ -98,7 +95,6 @@ public Status withLastFailure(Optional<? extends LastFailure> lastFailure) { /** * Timestamp (in milliseconds) at which the webhook last was * triggered - * */ public Status withLastTriggeredAt(double lastTriggeredAt) { Utils.checkNotNull(lastTriggeredAt, "lastTriggeredAt"); @@ -109,13 +105,13 @@ public Status withLastTriggeredAt(double lastTriggeredAt) { /** * Timestamp (in milliseconds) at which the webhook last was * triggered - * */ public Status withLastTriggeredAt(Optional<Double> lastTriggeredAt) { Utils.checkNotNull(lastTriggeredAt, "lastTriggeredAt"); this.lastTriggeredAt = lastTriggeredAt; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -149,7 +145,7 @@ public final static class Builder { private Optional<? extends LastFailure> lastFailure = Optional.empty(); - private Optional<Double> lastTriggeredAt = Optional.empty(); + private Optional<Double> lastTriggeredAt = Optional.empty(); private Builder() { // force use of static builder() method @@ -176,7 +172,6 @@ public Builder lastFailure(Optional<? extends LastFailure> lastFailure) { /** * Timestamp (in milliseconds) at which the webhook last was * triggered - * */ public Builder lastTriggeredAt(double lastTriggeredAt) { Utils.checkNotNull(lastTriggeredAt, "lastTriggeredAt"); @@ -187,7 +182,6 @@ public Builder lastTriggeredAt(double lastTriggeredAt) { /** * Timestamp (in milliseconds) at which the webhook last was * triggered - * */ public Builder lastTriggeredAt(Optional<Double> lastTriggeredAt) { Utils.checkNotNull(lastTriggeredAt, "lastTriggeredAt"); @@ -202,4 +196,3 @@ public Status build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Storage.java b/src/main/java/studio/livepeer/livepeer/models/components/Storage.java index 5f51c6f0..84602008 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Storage.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Storage.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,14 +15,12 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class Storage { /** * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("ipfs") @@ -45,7 +41,6 @@ public Storage() { * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -55,13 +50,12 @@ public JsonNullable<Ipfs> ipfs() { public final static Builder builder() { return new Builder(); - } + } /** * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ public Storage withIpfs(Ipfs ipfs) { Utils.checkNotNull(ipfs, "ipfs"); @@ -73,13 +67,13 @@ public Storage withIpfs(Ipfs ipfs) { * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ public Storage withIpfs(JsonNullable<? extends Ipfs> ipfs) { Utils.checkNotNull(ipfs, "ipfs"); this.ipfs = ipfs; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -108,7 +102,7 @@ public String toString() { public final static class Builder { - private JsonNullable<? extends Ipfs> ipfs = JsonNullable.undefined(); + private JsonNullable<? extends Ipfs> ipfs = JsonNullable.undefined(); private Builder() { // force use of static builder() method @@ -118,7 +112,6 @@ private Builder() { * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ public Builder ipfs(Ipfs ipfs) { Utils.checkNotNull(ipfs, "ipfs"); @@ -130,7 +123,6 @@ public Builder ipfs(Ipfs ipfs) { * Set to true to make default export to IPFS. To customize the * pinned files, specify an object with a spec field. False or null * means to unpin from IPFS, but it's unsupported right now. - * */ public Builder ipfs(JsonNullable<? extends Ipfs> ipfs) { Utils.checkNotNull(ipfs, "ipfs"); @@ -144,4 +136,3 @@ public Storage build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Storage1.java b/src/main/java/studio/livepeer/livepeer/models/components/Storage1.java index 32998840..c43f7d93 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Storage1.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Storage1.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,9 +12,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Storage1 - Storage for the output files + * Storage1 + * + * <p>Storage for the output files */ - public class Storage1 { /** @@ -93,7 +92,7 @@ public StorageCredentials credentials() { public final static Builder builder() { return new Builder(); - } + } /** * Type of service used for output files @@ -130,6 +129,7 @@ public Storage1 withCredentials(StorageCredentials credentials) { this.credentials = credentials; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -173,7 +173,7 @@ public final static class Builder { private String bucket; - private StorageCredentials credentials; + private StorageCredentials credentials; private Builder() { // force use of static builder() method @@ -224,4 +224,3 @@ public Storage1 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Storage2.java b/src/main/java/studio/livepeer/livepeer/models/components/Storage2.java index 2a3c404c..acd99e17 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Storage2.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Storage2.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,9 +12,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Storage2 - Storage for the output files + * Storage2 + * + * <p>Storage for the output files */ - public class Storage2 { /** @@ -28,7 +27,6 @@ public class Storage2 { /** * Delegation proof for Livepeer to be able to upload to * web3.storage - * */ @JsonProperty("credentials") private TranscodePayloadStorageCredentials credentials; @@ -54,7 +52,6 @@ public TranscodePayloadStorageType type() { /** * Delegation proof for Livepeer to be able to upload to * web3.storage - * */ @JsonIgnore public TranscodePayloadStorageCredentials credentials() { @@ -63,7 +60,7 @@ public TranscodePayloadStorageCredentials credentials() { public final static Builder builder() { return new Builder(); - } + } /** * Type of service used for output files @@ -77,13 +74,13 @@ public Storage2 withType(TranscodePayloadStorageType type) { /** * Delegation proof for Livepeer to be able to upload to * web3.storage - * */ public Storage2 withCredentials(TranscodePayloadStorageCredentials credentials) { Utils.checkNotNull(credentials, "credentials"); this.credentials = credentials; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -117,7 +114,7 @@ public final static class Builder { private TranscodePayloadStorageType type; - private TranscodePayloadStorageCredentials credentials; + private TranscodePayloadStorageCredentials credentials; private Builder() { // force use of static builder() method @@ -135,7 +132,6 @@ public Builder type(TranscodePayloadStorageType type) { /** * Delegation proof for Livepeer to be able to upload to * web3.storage - * */ public Builder credentials(TranscodePayloadStorageCredentials credentials) { Utils.checkNotNull(credentials, "credentials"); @@ -150,4 +146,3 @@ public Storage2 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/StorageCredentials.java b/src/main/java/studio/livepeer/livepeer/models/components/StorageCredentials.java index 122cb187..6c34aeb2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StorageCredentials.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StorageCredentials.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,9 +12,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * StorageCredentials - Credentials for the output video storage + * StorageCredentials + * + * <p>Credentials for the output video storage */ - public class StorageCredentials { /** @@ -59,7 +58,7 @@ public String secretAccessKey() { public final static Builder builder() { return new Builder(); - } + } /** * Access Key ID @@ -78,6 +77,7 @@ public StorageCredentials withSecretAccessKey(String secretAccessKey) { this.secretAccessKey = secretAccessKey; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -111,7 +111,7 @@ public final static class Builder { private String accessKeyId; - private String secretAccessKey; + private String secretAccessKey; private Builder() { // force use of static builder() method @@ -142,4 +142,3 @@ public StorageCredentials build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/StorageStatus.java b/src/main/java/studio/livepeer/livepeer/models/components/StorageStatus.java index aee5bc91..fab99bd9 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StorageStatus.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StorageStatus.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class StorageStatus { /** @@ -96,7 +93,7 @@ public Tasks tasks() { public final static Builder builder() { return new Builder(); - } + } /** * Phase of the asset storage @@ -148,6 +145,7 @@ public StorageStatus withTasks(Tasks tasks) { this.tasks = tasks; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -191,7 +189,7 @@ public final static class Builder { private Optional<String> errorMessage = Optional.empty(); - private Tasks tasks; + private Tasks tasks; private Builder() { // force use of static builder() method @@ -257,4 +255,3 @@ public StorageStatus build() { } } } - 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 ebd256ea..9ae63f26 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StorageType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StorageType.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * StorageType - Type of service used for output files + * StorageType + * + * <p>Type of service used for output files */ public enum StorageType { S3("s3"); @@ -23,4 +26,14 @@ private StorageType(String value) { public String value() { return value; } + + public static Optional<StorageType> fromValue(String value) { + for (StorageType o: StorageType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Stream.java b/src/main/java/studio/livepeer/livepeer/models/components/Stream.java index a237dda5..303fc066 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Stream.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Stream.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -23,7 +21,6 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class Stream { @JsonInclude(Include.NON_ABSENT) @@ -34,6 +31,7 @@ public class Stream { private String name; /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @@ -176,7 +174,6 @@ public class Stream { * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("profiles") @@ -192,7 +189,6 @@ public class Stream { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("record") @@ -201,7 +197,6 @@ public class Stream { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("recordingSpec") @@ -226,6 +221,7 @@ public class Stream { private JsonNullable<Double> lastTerminatedAt; /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @@ -356,6 +352,7 @@ public String name() { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -525,7 +522,6 @@ public JsonNullable<PlaybackPolicy> playbackPolicy() { * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -544,7 +540,6 @@ public Optional<String> projectId() { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ @JsonIgnore public Optional<Boolean> record() { @@ -554,7 +549,6 @@ public Optional<Boolean> record() { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -585,6 +579,7 @@ public JsonNullable<Double> lastTerminatedAt() { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -601,7 +596,7 @@ public Optional<Renditions> renditions() { public final static Builder builder() { return new Builder(); - } + } public Stream withId(String id) { Utils.checkNotNull(id, "id"); @@ -622,6 +617,7 @@ public Stream withName(String name) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -632,6 +628,7 @@ public Stream withKind(String kind) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -991,7 +988,6 @@ public Stream withPlaybackPolicy(JsonNullable<? extends PlaybackPolicy> playback * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ public Stream withProfiles(List<FfmpegProfile> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -1003,7 +999,6 @@ public Stream withProfiles(List<FfmpegProfile> profiles) { * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ public Stream withProfiles(Optional<? extends List<FfmpegProfile>> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -1032,7 +1027,6 @@ public Stream withProjectId(Optional<String> projectId) { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public Stream withRecord(boolean record) { Utils.checkNotNull(record, "record"); @@ -1043,7 +1037,6 @@ public Stream withRecord(boolean record) { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public Stream withRecord(Optional<Boolean> record) { Utils.checkNotNull(record, "record"); @@ -1054,7 +1047,6 @@ public Stream withRecord(Optional<Boolean> record) { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ public Stream withRecordingSpec(StreamRecordingSpec recordingSpec) { Utils.checkNotNull(recordingSpec, "recordingSpec"); @@ -1065,7 +1057,6 @@ public Stream withRecordingSpec(StreamRecordingSpec recordingSpec) { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ public Stream withRecordingSpec(Optional<? extends StreamRecordingSpec> recordingSpec) { Utils.checkNotNull(recordingSpec, "recordingSpec"); @@ -1122,6 +1113,7 @@ public Stream withLastTerminatedAt(JsonNullable<Double> lastTerminatedAt) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -1132,6 +1124,7 @@ public Stream withUserId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -1152,6 +1145,7 @@ public Stream withRenditions(Optional<? extends Renditions> renditions) { this.renditions = renditions; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -1342,7 +1336,7 @@ public final static class Builder { @Deprecated private Optional<String> userId = Optional.empty(); - private Optional<? extends Renditions> renditions = Optional.empty(); + private Optional<? extends Renditions> renditions = Optional.empty(); private Builder() { // force use of static builder() method @@ -1367,6 +1361,7 @@ public Builder name(String name) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -1377,6 +1372,7 @@ public Builder kind(String kind) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -1736,7 +1732,6 @@ public Builder playbackPolicy(JsonNullable<? extends PlaybackPolicy> playbackPol * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ public Builder profiles(List<FfmpegProfile> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -1748,7 +1743,6 @@ public Builder profiles(List<FfmpegProfile> profiles) { * Profiles to transcode the stream into. If not specified, a default * set of profiles will be used with 240p, 360p, 480p and 720p * resolutions. Keep in mind that the source rendition is always kept. - * */ public Builder profiles(Optional<? extends List<FfmpegProfile>> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -1777,7 +1771,6 @@ public Builder projectId(Optional<String> projectId) { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public Builder record(boolean record) { Utils.checkNotNull(record, "record"); @@ -1788,7 +1781,6 @@ public Builder record(boolean record) { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public Builder record(Optional<Boolean> record) { Utils.checkNotNull(record, "record"); @@ -1799,7 +1791,6 @@ public Builder record(Optional<Boolean> record) { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ public Builder recordingSpec(StreamRecordingSpec recordingSpec) { Utils.checkNotNull(recordingSpec, "recordingSpec"); @@ -1810,7 +1801,6 @@ public Builder recordingSpec(StreamRecordingSpec recordingSpec) { /** * Configuration for recording the stream. This can only be set if * `record` is true. - * */ public Builder recordingSpec(Optional<? extends StreamRecordingSpec> recordingSpec) { Utils.checkNotNull(recordingSpec, "recordingSpec"); @@ -1867,6 +1857,7 @@ public Builder lastTerminatedAt(JsonNullable<Double> lastTerminatedAt) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -1877,6 +1868,7 @@ public Builder userId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -1936,4 +1928,3 @@ public Stream build() { } } } - 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 492e4c0c..d8ddc19e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StreamIsMobile.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StreamIsMobile.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -19,9 +18,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * StreamIsMobile - Indicates whether the stream will be pulled from a mobile source. + * StreamIsMobile + * + * <p>Indicates whether the stream will be pulled from a mobile source. */ - @JsonDeserialize(using = StreamIsMobile._Deserializer.class) public class StreamIsMobile { @@ -86,8 +86,8 @@ public static final class _Deserializer extends OneOfDeserializer<StreamIsMobile public _Deserializer() { super(StreamIsMobile.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.Boolean>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.IsMobile1>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<IsMobile1>() {}, JsonShape.DEFAULT)); } } @@ -98,3 +98,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/StreamLocation.java b/src/main/java/studio/livepeer/livepeer/models/components/StreamLocation.java index e3764117..d034c22d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StreamLocation.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StreamLocation.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,10 +13,11 @@ import studio.livepeer.livepeer.utils.Utils; /** - * StreamLocation - Approximate location of the pull source. The location is used to + * StreamLocation + * + * <p>Approximate location of the pull source. The location is used to * determine the closest Livepeer region to pull the stream from. */ - public class StreamLocation { /** @@ -65,7 +64,7 @@ public double lon() { public final static Builder builder() { return new Builder(); - } + } /** * Latitude of the pull source in degrees. North is positive, @@ -86,6 +85,7 @@ public StreamLocation withLon(double lon) { this.lon = lon; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -119,7 +119,7 @@ public final static class Builder { private Double lat; - private Double lon; + private Double lon; private Builder() { // force use of static builder() method @@ -152,4 +152,3 @@ public StreamLocation build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/StreamMultistream.java b/src/main/java/studio/livepeer/livepeer/models/components/StreamMultistream.java index 417d92e4..fceb051a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StreamMultistream.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StreamMultistream.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,13 +16,11 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class StreamMultistream { /** * References to targets where this stream will be simultaneously * streamed to - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("targets") @@ -44,7 +40,6 @@ public StreamMultistream() { /** * References to targets where this stream will be simultaneously * streamed to - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -54,12 +49,11 @@ public Optional<List<TargetOutput>> targets() { public final static Builder builder() { return new Builder(); - } + } /** * References to targets where this stream will be simultaneously * streamed to - * */ public StreamMultistream withTargets(List<TargetOutput> targets) { Utils.checkNotNull(targets, "targets"); @@ -70,13 +64,13 @@ public StreamMultistream withTargets(List<TargetOutput> targets) { /** * References to targets where this stream will be simultaneously * streamed to - * */ public StreamMultistream withTargets(Optional<? extends List<TargetOutput>> targets) { Utils.checkNotNull(targets, "targets"); this.targets = targets; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -105,7 +99,7 @@ public String toString() { public final static class Builder { - private Optional<? extends List<TargetOutput>> targets = Optional.empty(); + private Optional<? extends List<TargetOutput>> targets = Optional.empty(); private Builder() { // force use of static builder() method @@ -114,7 +108,6 @@ private Builder() { /** * References to targets where this stream will be simultaneously * streamed to - * */ public Builder targets(List<TargetOutput> targets) { Utils.checkNotNull(targets, "targets"); @@ -125,7 +118,6 @@ public Builder targets(List<TargetOutput> targets) { /** * References to targets where this stream will be simultaneously * streamed to - * */ public Builder targets(Optional<? extends List<TargetOutput>> targets) { Utils.checkNotNull(targets, "targets"); @@ -139,4 +131,3 @@ public StreamMultistream build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/StreamPatchPayload.java b/src/main/java/studio/livepeer/livepeer/models/components/StreamPatchPayload.java index ea3da9fa..b87196a1 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StreamPatchPayload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StreamPatchPayload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -21,7 +19,6 @@ import org.openapitools.jackson.nullable.JsonNullable; import studio.livepeer.livepeer.utils.Utils; - public class StreamPatchPayload { @JsonInclude(Include.NON_ABSENT) @@ -31,7 +28,6 @@ public class StreamPatchPayload { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("record") @@ -70,6 +66,10 @@ public class StreamPatchPayload { @JsonProperty("userTags") private Optional<? extends Map<String, UserTags>> userTags; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional<String> name; + @JsonCreator public StreamPatchPayload( @JsonProperty("creatorId") Optional<? extends InputCreatorId> creatorId, @@ -79,7 +79,8 @@ public StreamPatchPayload( @JsonProperty("playbackPolicy") JsonNullable<? extends PlaybackPolicy> playbackPolicy, @JsonProperty("profiles") JsonNullable<? extends List<FfmpegProfile>> profiles, @JsonProperty("recordingSpec") Optional<? extends RecordingSpec> recordingSpec, - @JsonProperty("userTags") Optional<? extends Map<String, UserTags>> userTags) { + @JsonProperty("userTags") Optional<? extends Map<String, UserTags>> userTags, + @JsonProperty("name") Optional<String> name) { Utils.checkNotNull(creatorId, "creatorId"); Utils.checkNotNull(record, "record"); Utils.checkNotNull(suspended, "suspended"); @@ -88,6 +89,7 @@ public StreamPatchPayload( Utils.checkNotNull(profiles, "profiles"); Utils.checkNotNull(recordingSpec, "recordingSpec"); Utils.checkNotNull(userTags, "userTags"); + Utils.checkNotNull(name, "name"); this.creatorId = creatorId; this.record = record; this.suspended = suspended; @@ -96,10 +98,11 @@ public StreamPatchPayload( this.profiles = profiles; this.recordingSpec = recordingSpec; this.userTags = userTags; + this.name = name; } public StreamPatchPayload() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") @@ -111,7 +114,6 @@ public Optional<InputCreatorId> creatorId() { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ @JsonIgnore public Optional<Boolean> record() { @@ -162,9 +164,14 @@ public Optional<Map<String, UserTags>> userTags() { return (Optional<Map<String, UserTags>>) userTags; } + @JsonIgnore + public Optional<String> name() { + return name; + } + public final static Builder builder() { return new Builder(); - } + } public StreamPatchPayload withCreatorId(InputCreatorId creatorId) { Utils.checkNotNull(creatorId, "creatorId"); @@ -181,7 +188,6 @@ public StreamPatchPayload withCreatorId(Optional<? extends InputCreatorId> creat /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public StreamPatchPayload withRecord(boolean record) { Utils.checkNotNull(record, "record"); @@ -192,7 +198,6 @@ public StreamPatchPayload withRecord(boolean record) { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public StreamPatchPayload withRecord(Optional<Boolean> record) { Utils.checkNotNull(record, "record"); @@ -289,6 +294,19 @@ public StreamPatchPayload withUserTags(Optional<? extends Map<String, UserTags>> this.userTags = userTags; return this; } + + public StreamPatchPayload withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public StreamPatchPayload withName(Optional<String> name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -307,7 +325,8 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.playbackPolicy, other.playbackPolicy) && Objects.deepEquals(this.profiles, other.profiles) && Objects.deepEquals(this.recordingSpec, other.recordingSpec) && - Objects.deepEquals(this.userTags, other.userTags); + Objects.deepEquals(this.userTags, other.userTags) && + Objects.deepEquals(this.name, other.name); } @Override @@ -320,7 +339,8 @@ public int hashCode() { playbackPolicy, profiles, recordingSpec, - userTags); + userTags, + name); } @Override @@ -333,7 +353,8 @@ public String toString() { "playbackPolicy", playbackPolicy, "profiles", profiles, "recordingSpec", recordingSpec, - "userTags", userTags); + "userTags", userTags, + "name", name); } public final static class Builder { @@ -352,7 +373,9 @@ public final static class Builder { private Optional<? extends RecordingSpec> recordingSpec = Optional.empty(); - private Optional<? extends Map<String, UserTags>> userTags = Optional.empty(); + private Optional<? extends Map<String, UserTags>> userTags = Optional.empty(); + + private Optional<String> name = Optional.empty(); private Builder() { // force use of static builder() method @@ -373,7 +396,6 @@ public Builder creatorId(Optional<? extends InputCreatorId> creatorId) { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public Builder record(boolean record) { Utils.checkNotNull(record, "record"); @@ -384,7 +406,6 @@ public Builder record(boolean record) { /** * Should this stream be recorded? Uses default settings. For more * customization, create and configure an object store. - * */ public Builder record(Optional<Boolean> record) { Utils.checkNotNull(record, "record"); @@ -481,6 +502,18 @@ public Builder userTags(Optional<? extends Map<String, UserTags>> userTags) { this.userTags = userTags; return this; } + + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Builder name(Optional<String> name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } public StreamPatchPayload build() { return new StreamPatchPayload( @@ -491,8 +524,8 @@ public StreamPatchPayload build() { playbackPolicy, profiles, recordingSpec, - userTags); + userTags, + name); } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/StreamPull.java b/src/main/java/studio/livepeer/livepeer/models/components/StreamPull.java index e074db2c..9a1cb05e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StreamPull.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StreamPull.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,11 +17,12 @@ import studio.livepeer.livepeer.utils.Utils; /** - * StreamPull - Configuration for a stream that should be actively pulled from an + * StreamPull + * + * <p>Configuration for a stream that should be actively pulled from an * external source, rather than pushed to Livepeer. If specified, the * stream will not have a streamKey. */ - public class StreamPull { /** @@ -113,7 +112,7 @@ public Optional<StreamLocation> location() { public final static Builder builder() { return new Builder(); - } + } /** * URL from which to pull from. @@ -179,6 +178,7 @@ public StreamPull withLocation(Optional<? extends StreamLocation> location) { this.location = location; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -222,7 +222,7 @@ public final static class Builder { private Optional<? extends StreamIsMobile> isMobile = Optional.empty(); - private Optional<? extends StreamLocation> location = Optional.empty(); + private Optional<? extends StreamLocation> location = Optional.empty(); private Builder() { // force use of static builder() method @@ -302,4 +302,3 @@ public StreamPull build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/StreamRecordingSpec.java b/src/main/java/studio/livepeer/livepeer/models/components/StreamRecordingSpec.java index 772f19fc..2f837870 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StreamRecordingSpec.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StreamRecordingSpec.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,18 +17,17 @@ import studio.livepeer.livepeer.utils.Utils; /** - * StreamRecordingSpec - Configuration for recording the stream. This can only be set if - * `record` is true. + * StreamRecordingSpec * + * <p>Configuration for recording the stream. This can only be set if + * `record` is true. */ - public class StreamRecordingSpec { /** * Profiles to process the recording of this stream into. If not * specified, default profiles will be derived based on the stream * input. Keep in mind that the source rendition is always kept. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("profiles") @@ -51,7 +48,6 @@ public StreamRecordingSpec() { * Profiles to process the recording of this stream into. If not * specified, default profiles will be derived based on the stream * input. Keep in mind that the source rendition is always kept. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -61,13 +57,12 @@ public Optional<List<TranscodeProfile>> profiles() { public final static Builder builder() { return new Builder(); - } + } /** * Profiles to process the recording of this stream into. If not * specified, default profiles will be derived based on the stream * input. Keep in mind that the source rendition is always kept. - * */ public StreamRecordingSpec withProfiles(List<TranscodeProfile> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -79,13 +74,13 @@ public StreamRecordingSpec withProfiles(List<TranscodeProfile> profiles) { * Profiles to process the recording of this stream into. If not * specified, default profiles will be derived based on the stream * input. Keep in mind that the source rendition is always kept. - * */ public StreamRecordingSpec withProfiles(Optional<? extends List<TranscodeProfile>> profiles) { Utils.checkNotNull(profiles, "profiles"); this.profiles = profiles; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -114,7 +109,7 @@ public String toString() { public final static class Builder { - private Optional<? extends List<TranscodeProfile>> profiles = Optional.empty(); + private Optional<? extends List<TranscodeProfile>> profiles = Optional.empty(); private Builder() { // force use of static builder() method @@ -124,7 +119,6 @@ private Builder() { * Profiles to process the recording of this stream into. If not * specified, default profiles will be derived based on the stream * input. Keep in mind that the source rendition is always kept. - * */ public Builder profiles(List<TranscodeProfile> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -136,7 +130,6 @@ public Builder profiles(List<TranscodeProfile> profiles) { * Profiles to process the recording of this stream into. If not * specified, default profiles will be derived based on the stream * input. Keep in mind that the source rendition is always kept. - * */ public Builder profiles(Optional<? extends List<TranscodeProfile>> profiles) { Utils.checkNotNull(profiles, "profiles"); @@ -150,4 +143,3 @@ public StreamRecordingSpec build() { } } } - 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 e9cf7af3..6213241f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/StreamUserTags.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/StreamUserTags.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Double; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -19,7 +18,6 @@ import studio.livepeer.livepeer.utils.Utils.TypeReferenceWithShape; import studio.livepeer.livepeer.utils.Utils; - @JsonDeserialize(using = StreamUserTags._Deserializer.class) public class StreamUserTags { @@ -90,9 +88,9 @@ public static final class _Deserializer extends OneOfDeserializer<StreamUserTags public _Deserializer() { super(StreamUserTags.class, false, - TypeReferenceWithShape.of(new TypeReference<java.util.List<studio.livepeer.livepeer.models.components.Three>>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<java.lang.Double>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<java.lang.String>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<List<Three>>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<Double>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<String>() {}, JsonShape.DEFAULT)); } } @@ -103,3 +101,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Target.java b/src/main/java/studio/livepeer/livepeer/models/components/Target.java index 046449f8..736e3c89 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Target.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Target.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -20,13 +18,11 @@ import studio.livepeer.livepeer.utils.LazySingletonValue; import studio.livepeer.livepeer.utils.Utils; - public class Target { /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ @JsonProperty("profile") private String profile; @@ -34,7 +30,6 @@ public class Target { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoOnly") @@ -51,7 +46,6 @@ public class Target { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("spec") @@ -81,7 +75,6 @@ public Target( /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ @JsonIgnore public String profile() { @@ -91,7 +84,6 @@ public String profile() { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ @JsonIgnore public Optional<Boolean> videoOnly() { @@ -110,7 +102,6 @@ public Optional<String> id() { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -120,12 +111,11 @@ public Optional<TargetSpec> spec() { public final static Builder builder() { return new Builder(); - } + } /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ public Target withProfile(String profile) { Utils.checkNotNull(profile, "profile"); @@ -136,7 +126,6 @@ public Target withProfile(String profile) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public Target withVideoOnly(boolean videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -147,7 +136,6 @@ public Target withVideoOnly(boolean videoOnly) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public Target withVideoOnly(Optional<Boolean> videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -177,7 +165,6 @@ public Target withId(Optional<String> id) { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ public Target withSpec(TargetSpec spec) { Utils.checkNotNull(spec, "spec"); @@ -189,13 +176,13 @@ public Target withSpec(TargetSpec spec) { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ public Target withSpec(Optional<? extends TargetSpec> spec) { Utils.checkNotNull(spec, "spec"); this.spec = spec; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -239,7 +226,7 @@ public final static class Builder { private Optional<String> id = Optional.empty(); - private Optional<? extends TargetSpec> spec = Optional.empty(); + private Optional<? extends TargetSpec> spec = Optional.empty(); private Builder() { // force use of static builder() method @@ -248,7 +235,6 @@ private Builder() { /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ public Builder profile(String profile) { Utils.checkNotNull(profile, "profile"); @@ -259,7 +245,6 @@ public Builder profile(String profile) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public Builder videoOnly(boolean videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -270,7 +255,6 @@ public Builder videoOnly(boolean videoOnly) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public Builder videoOnly(Optional<Boolean> videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -300,7 +284,6 @@ public Builder id(Optional<String> id) { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ public Builder spec(TargetSpec spec) { Utils.checkNotNull(spec, "spec"); @@ -312,7 +295,6 @@ public Builder spec(TargetSpec spec) { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ public Builder spec(Optional<? extends TargetSpec> spec) { Utils.checkNotNull(spec, "spec"); @@ -338,4 +320,3 @@ public Target build() { new TypeReference<Optional<Boolean>>() {}); } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayload.java b/src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayload.java index 84a3401c..394d03df 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -20,13 +18,11 @@ import studio.livepeer.livepeer.utils.LazySingletonValue; import studio.livepeer.livepeer.utils.Utils; - public class TargetAddPayload { /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ @JsonProperty("profile") private String profile; @@ -34,7 +30,6 @@ public class TargetAddPayload { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoOnly") @@ -51,7 +46,6 @@ public class TargetAddPayload { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("spec") @@ -81,7 +75,6 @@ public TargetAddPayload( /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ @JsonIgnore public String profile() { @@ -91,7 +84,6 @@ public String profile() { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ @JsonIgnore public Optional<Boolean> videoOnly() { @@ -110,7 +102,6 @@ public Optional<String> id() { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -120,12 +111,11 @@ public Optional<TargetAddPayloadSpec> spec() { public final static Builder builder() { return new Builder(); - } + } /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ public TargetAddPayload withProfile(String profile) { Utils.checkNotNull(profile, "profile"); @@ -136,7 +126,6 @@ public TargetAddPayload withProfile(String profile) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public TargetAddPayload withVideoOnly(boolean videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -147,7 +136,6 @@ public TargetAddPayload withVideoOnly(boolean videoOnly) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public TargetAddPayload withVideoOnly(Optional<Boolean> videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -177,7 +165,6 @@ public TargetAddPayload withId(Optional<String> id) { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ public TargetAddPayload withSpec(TargetAddPayloadSpec spec) { Utils.checkNotNull(spec, "spec"); @@ -189,13 +176,13 @@ public TargetAddPayload withSpec(TargetAddPayloadSpec spec) { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ public TargetAddPayload withSpec(Optional<? extends TargetAddPayloadSpec> spec) { Utils.checkNotNull(spec, "spec"); this.spec = spec; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -239,7 +226,7 @@ public final static class Builder { private Optional<String> id = Optional.empty(); - private Optional<? extends TargetAddPayloadSpec> spec = Optional.empty(); + private Optional<? extends TargetAddPayloadSpec> spec = Optional.empty(); private Builder() { // force use of static builder() method @@ -248,7 +235,6 @@ private Builder() { /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ public Builder profile(String profile) { Utils.checkNotNull(profile, "profile"); @@ -259,7 +245,6 @@ public Builder profile(String profile) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public Builder videoOnly(boolean videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -270,7 +255,6 @@ public Builder videoOnly(boolean videoOnly) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public Builder videoOnly(Optional<Boolean> videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -300,7 +284,6 @@ public Builder id(Optional<String> id) { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ public Builder spec(TargetAddPayloadSpec spec) { Utils.checkNotNull(spec, "spec"); @@ -312,7 +295,6 @@ public Builder spec(TargetAddPayloadSpec spec) { * Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ public Builder spec(Optional<? extends TargetAddPayloadSpec> spec) { Utils.checkNotNull(spec, "spec"); @@ -338,4 +320,3 @@ public TargetAddPayload build() { new TypeReference<Optional<Boolean>>() {}); } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayloadSpec.java b/src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayloadSpec.java index ddf45512..1ecd4725 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayloadSpec.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TargetAddPayloadSpec.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,12 +15,12 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TargetAddPayloadSpec - Inline multistream target object. Will automatically + * TargetAddPayloadSpec + * + * <p>Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ - public class TargetAddPayloadSpec { @JsonInclude(Include.NON_ABSENT) @@ -65,7 +63,7 @@ public String url() { public final static Builder builder() { return new Builder(); - } + } public TargetAddPayloadSpec withName(String name) { Utils.checkNotNull(name, "name"); @@ -87,6 +85,7 @@ public TargetAddPayloadSpec withUrl(String url) { this.url = url; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -120,7 +119,7 @@ public final static class Builder { private Optional<String> name = Optional.empty(); - private String url; + private String url; private Builder() { // force use of static builder() method @@ -154,4 +153,3 @@ public TargetAddPayloadSpec build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TargetOutput.java b/src/main/java/studio/livepeer/livepeer/models/components/TargetOutput.java index cfa43315..5af69c25 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TargetOutput.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TargetOutput.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,13 +17,11 @@ import studio.livepeer.livepeer.utils.LazySingletonValue; import studio.livepeer.livepeer.utils.Utils; - public class TargetOutput { /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ @JsonProperty("profile") private String profile; @@ -33,7 +29,6 @@ public class TargetOutput { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("videoOnly") @@ -67,7 +62,6 @@ public TargetOutput( /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ @JsonIgnore public String profile() { @@ -77,7 +71,6 @@ public String profile() { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ @JsonIgnore public Optional<Boolean> videoOnly() { @@ -94,12 +87,11 @@ public Optional<String> id() { public final static Builder builder() { return new Builder(); - } + } /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ public TargetOutput withProfile(String profile) { Utils.checkNotNull(profile, "profile"); @@ -110,7 +102,6 @@ public TargetOutput withProfile(String profile) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public TargetOutput withVideoOnly(boolean videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -121,7 +112,6 @@ public TargetOutput withVideoOnly(boolean videoOnly) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public TargetOutput withVideoOnly(Optional<Boolean> videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -146,6 +136,7 @@ public TargetOutput withId(Optional<String> id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -184,7 +175,7 @@ public final static class Builder { private Optional<Boolean> videoOnly; - private Optional<String> id = Optional.empty(); + private Optional<String> id = Optional.empty(); private Builder() { // force use of static builder() method @@ -193,7 +184,6 @@ private Builder() { /** * Name of transcoding profile that should be sent. Use * "source" for pushing source stream data - * */ public Builder profile(String profile) { Utils.checkNotNull(profile, "profile"); @@ -204,7 +194,6 @@ public Builder profile(String profile) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public Builder videoOnly(boolean videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -215,7 +204,6 @@ public Builder videoOnly(boolean videoOnly) { /** * If true, the stream audio will be muted and only silent * video will be pushed to the target. - * */ public Builder videoOnly(Optional<Boolean> videoOnly) { Utils.checkNotNull(videoOnly, "videoOnly"); @@ -258,4 +246,3 @@ public TargetOutput build() { new TypeReference<Optional<Boolean>>() {}); } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TargetSpec.java b/src/main/java/studio/livepeer/livepeer/models/components/TargetSpec.java index 01f7632e..698318fb 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TargetSpec.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TargetSpec.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,12 +15,12 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TargetSpec - Inline multistream target object. Will automatically + * TargetSpec + * + * <p>Inline multistream target object. Will automatically * create the target resource to be used by the created * stream. - * */ - public class TargetSpec { @JsonInclude(Include.NON_ABSENT) @@ -65,7 +63,7 @@ public String url() { public final static Builder builder() { return new Builder(); - } + } public TargetSpec withName(String name) { Utils.checkNotNull(name, "name"); @@ -87,6 +85,7 @@ public TargetSpec withUrl(String url) { this.url = url; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -120,7 +119,7 @@ public final static class Builder { private Optional<String> name = Optional.empty(); - private String url; + private String url; private Builder() { // force use of static builder() method @@ -154,4 +153,3 @@ public TargetSpec build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Task.java b/src/main/java/studio/livepeer/livepeer/models/components/Task.java index 82d95a61..5bb03a88 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Task.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Task.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,7 +16,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Task { /** @@ -45,7 +42,6 @@ public class Task { /** * Timestamp (in milliseconds) at which the task was scheduled for * execution (e.g. after file upload finished). - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("scheduledAt") @@ -65,6 +61,13 @@ public class Task { @JsonProperty("outputAssetId") private Optional<String> outputAssetId; + /** + * ID of the project + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("projectId") + private Optional<String> projectId; + /** * ID of the requester hash(IP + SALT + PlaybackId) */ @@ -101,6 +104,7 @@ public Task( @JsonProperty("scheduledAt") Optional<Double> scheduledAt, @JsonProperty("inputAssetId") Optional<String> inputAssetId, @JsonProperty("outputAssetId") Optional<String> outputAssetId, + @JsonProperty("projectId") Optional<String> projectId, @JsonProperty("requesterId") Optional<String> requesterId, @JsonProperty("params") Optional<? extends Params> params, @JsonProperty("status") Optional<? extends TaskStatus> status, @@ -111,6 +115,7 @@ public Task( Utils.checkNotNull(scheduledAt, "scheduledAt"); Utils.checkNotNull(inputAssetId, "inputAssetId"); Utils.checkNotNull(outputAssetId, "outputAssetId"); + Utils.checkNotNull(projectId, "projectId"); Utils.checkNotNull(requesterId, "requesterId"); Utils.checkNotNull(params, "params"); Utils.checkNotNull(status, "status"); @@ -121,6 +126,7 @@ public Task( this.scheduledAt = scheduledAt; this.inputAssetId = inputAssetId; this.outputAssetId = outputAssetId; + this.projectId = projectId; this.requesterId = requesterId; this.params = params; this.status = status; @@ -128,7 +134,7 @@ public Task( } public Task() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -159,7 +165,6 @@ public Optional<Double> createdAt() { /** * Timestamp (in milliseconds) at which the task was scheduled for * execution (e.g. after file upload finished). - * */ @JsonIgnore public Optional<Double> scheduledAt() { @@ -182,6 +187,14 @@ public Optional<String> outputAssetId() { return outputAssetId; } + /** + * ID of the project + */ + @JsonIgnore + public Optional<String> projectId() { + return projectId; + } + /** * ID of the requester hash(IP + SALT + PlaybackId) */ @@ -219,7 +232,7 @@ public Optional<Output> output() { public final static Builder builder() { return new Builder(); - } + } /** * Task ID @@ -278,7 +291,6 @@ public Task withCreatedAt(Optional<Double> createdAt) { /** * Timestamp (in milliseconds) at which the task was scheduled for * execution (e.g. after file upload finished). - * */ public Task withScheduledAt(double scheduledAt) { Utils.checkNotNull(scheduledAt, "scheduledAt"); @@ -289,7 +301,6 @@ public Task withScheduledAt(double scheduledAt) { /** * Timestamp (in milliseconds) at which the task was scheduled for * execution (e.g. after file upload finished). - * */ public Task withScheduledAt(Optional<Double> scheduledAt) { Utils.checkNotNull(scheduledAt, "scheduledAt"); @@ -333,6 +344,24 @@ public Task withOutputAssetId(Optional<String> outputAssetId) { return this; } + /** + * ID of the project + */ + public Task withProjectId(String projectId) { + Utils.checkNotNull(projectId, "projectId"); + this.projectId = Optional.ofNullable(projectId); + return this; + } + + /** + * ID of the project + */ + public Task withProjectId(Optional<String> projectId) { + Utils.checkNotNull(projectId, "projectId"); + this.projectId = projectId; + return this; + } + /** * ID of the requester hash(IP + SALT + PlaybackId) */ @@ -404,6 +433,7 @@ public Task withOutput(Optional<? extends Output> output) { this.output = output; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -421,6 +451,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.scheduledAt, other.scheduledAt) && Objects.deepEquals(this.inputAssetId, other.inputAssetId) && Objects.deepEquals(this.outputAssetId, other.outputAssetId) && + Objects.deepEquals(this.projectId, other.projectId) && Objects.deepEquals(this.requesterId, other.requesterId) && Objects.deepEquals(this.params, other.params) && Objects.deepEquals(this.status, other.status) && @@ -436,6 +467,7 @@ public int hashCode() { scheduledAt, inputAssetId, outputAssetId, + projectId, requesterId, params, status, @@ -451,6 +483,7 @@ public String toString() { "scheduledAt", scheduledAt, "inputAssetId", inputAssetId, "outputAssetId", outputAssetId, + "projectId", projectId, "requesterId", requesterId, "params", params, "status", status, @@ -471,13 +504,15 @@ public final static class Builder { private Optional<String> outputAssetId = Optional.empty(); + private Optional<String> projectId = Optional.empty(); + private Optional<String> requesterId = Optional.empty(); private Optional<? extends Params> params = Optional.empty(); private Optional<? extends TaskStatus> status = Optional.empty(); - private Optional<? extends Output> output = Optional.empty(); + private Optional<? extends Output> output = Optional.empty(); private Builder() { // force use of static builder() method @@ -540,7 +575,6 @@ public Builder createdAt(Optional<Double> createdAt) { /** * Timestamp (in milliseconds) at which the task was scheduled for * execution (e.g. after file upload finished). - * */ public Builder scheduledAt(double scheduledAt) { Utils.checkNotNull(scheduledAt, "scheduledAt"); @@ -551,7 +585,6 @@ public Builder scheduledAt(double scheduledAt) { /** * Timestamp (in milliseconds) at which the task was scheduled for * execution (e.g. after file upload finished). - * */ public Builder scheduledAt(Optional<Double> scheduledAt) { Utils.checkNotNull(scheduledAt, "scheduledAt"); @@ -595,6 +628,24 @@ public Builder outputAssetId(Optional<String> outputAssetId) { return this; } + /** + * ID of the project + */ + public Builder projectId(String projectId) { + Utils.checkNotNull(projectId, "projectId"); + this.projectId = Optional.ofNullable(projectId); + return this; + } + + /** + * ID of the project + */ + public Builder projectId(Optional<String> projectId) { + Utils.checkNotNull(projectId, "projectId"); + this.projectId = projectId; + return this; + } + /** * ID of the requester hash(IP + SALT + PlaybackId) */ @@ -675,6 +726,7 @@ public Task build() { scheduledAt, inputAssetId, outputAssetId, + projectId, requesterId, params, status, @@ -682,4 +734,3 @@ public Task build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskExportData.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskExportData.java index 94fa304b..406208fb 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskExportData.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskExportData.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,9 +16,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TaskExportData - Parameters for the export-data task + * TaskExportData + * + * <p>Parameters for the export-data task */ - public class TaskExportData { /** @@ -100,7 +99,7 @@ public Optional<String> id() { public final static Builder builder() { return new Builder(); - } + } /** * File content to store into IPFS @@ -158,6 +157,7 @@ public TaskExportData withId(Optional<String> id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -201,7 +201,7 @@ public final static class Builder { private Optional<String> type = Optional.empty(); - private Optional<String> id = Optional.empty(); + private Optional<String> id = Optional.empty(); private Builder() { // force use of static builder() method @@ -273,4 +273,3 @@ public TaskExportData build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskHls.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskHls.java index 1a26e0ed..a71518d3 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskHls.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskHls.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,9 +15,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TaskHls - HLS output format + * TaskHls + * + * <p>HLS output format */ - public class TaskHls { /** @@ -50,7 +49,7 @@ public Optional<String> path() { public final static Builder builder() { return new Builder(); - } + } /** * Path for the HLS output @@ -69,6 +68,7 @@ public TaskHls withPath(Optional<String> path) { this.path = path; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -97,7 +97,7 @@ public String toString() { public final static class Builder { - private Optional<String> path = Optional.empty(); + private Optional<String> path = Optional.empty(); private Builder() { // force use of static builder() method @@ -127,4 +127,3 @@ public TaskHls build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskInput.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskInput.java index 9db4ed2b..2a57e7ab 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskInput.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskInput.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,15 +15,15 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TaskInput - Input video file to transcode + * TaskInput + * + * <p>Input video file to transcode */ - public class TaskInput { /** * URL of a video to transcode, accepts object-store format * "s3+https" - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("url") @@ -45,7 +43,6 @@ public TaskInput() { /** * URL of a video to transcode, accepts object-store format * "s3+https" - * */ @JsonIgnore public Optional<String> url() { @@ -54,12 +51,11 @@ public Optional<String> url() { public final static Builder builder() { return new Builder(); - } + } /** * URL of a video to transcode, accepts object-store format * "s3+https" - * */ public TaskInput withUrl(String url) { Utils.checkNotNull(url, "url"); @@ -70,13 +66,13 @@ public TaskInput withUrl(String url) { /** * URL of a video to transcode, accepts object-store format * "s3+https" - * */ public TaskInput withUrl(Optional<String> url) { Utils.checkNotNull(url, "url"); this.url = url; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -105,7 +101,7 @@ public String toString() { public final static class Builder { - private Optional<String> url = Optional.empty(); + private Optional<String> url = Optional.empty(); private Builder() { // force use of static builder() method @@ -114,7 +110,6 @@ private Builder() { /** * URL of a video to transcode, accepts object-store format * "s3+https" - * */ public Builder url(String url) { Utils.checkNotNull(url, "url"); @@ -125,7 +120,6 @@ public Builder url(String url) { /** * URL of a video to transcode, accepts object-store format * "s3+https" - * */ public Builder url(Optional<String> url) { Utils.checkNotNull(url, "url"); @@ -139,4 +133,3 @@ public TaskInput build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskIpfs.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskIpfs.java index db7c9402..3ed2c101 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskIpfs.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskIpfs.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -16,7 +14,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class TaskIpfs { /** @@ -56,7 +53,6 @@ public class TaskIpfs { /** * URL to access metadata file via HTTP through an IPFS * gateway - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("nftMetadataGatewayUrl") @@ -132,7 +128,6 @@ public Optional<String> nftMetadataUrl() { /** * URL to access metadata file via HTTP through an IPFS * gateway - * */ @JsonIgnore public Optional<String> nftMetadataGatewayUrl() { @@ -141,7 +136,7 @@ public Optional<String> nftMetadataGatewayUrl() { public final static Builder builder() { return new Builder(); - } + } /** * IPFS CID of the exported video file @@ -227,7 +222,6 @@ public TaskIpfs withNftMetadataUrl(Optional<String> nftMetadataUrl) { /** * URL to access metadata file via HTTP through an IPFS * gateway - * */ public TaskIpfs withNftMetadataGatewayUrl(String nftMetadataGatewayUrl) { Utils.checkNotNull(nftMetadataGatewayUrl, "nftMetadataGatewayUrl"); @@ -238,13 +232,13 @@ public TaskIpfs withNftMetadataGatewayUrl(String nftMetadataGatewayUrl) { /** * URL to access metadata file via HTTP through an IPFS * gateway - * */ public TaskIpfs withNftMetadataGatewayUrl(Optional<String> nftMetadataGatewayUrl) { Utils.checkNotNull(nftMetadataGatewayUrl, "nftMetadataGatewayUrl"); this.nftMetadataGatewayUrl = nftMetadataGatewayUrl; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -298,7 +292,7 @@ public final static class Builder { private Optional<String> nftMetadataUrl = Optional.empty(); - private Optional<String> nftMetadataGatewayUrl = Optional.empty(); + private Optional<String> nftMetadataGatewayUrl = Optional.empty(); private Builder() { // force use of static builder() method @@ -388,7 +382,6 @@ public Builder nftMetadataUrl(Optional<String> nftMetadataUrl) { /** * URL to access metadata file via HTTP through an IPFS * gateway - * */ public Builder nftMetadataGatewayUrl(String nftMetadataGatewayUrl) { Utils.checkNotNull(nftMetadataGatewayUrl, "nftMetadataGatewayUrl"); @@ -399,7 +392,6 @@ public Builder nftMetadataGatewayUrl(String nftMetadataGatewayUrl) { /** * URL to access metadata file via HTTP through an IPFS * gateway - * */ public Builder nftMetadataGatewayUrl(Optional<String> nftMetadataGatewayUrl) { Utils.checkNotNull(nftMetadataGatewayUrl, "nftMetadataGatewayUrl"); @@ -418,4 +410,3 @@ public TaskIpfs build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskMp4.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskMp4.java index 1bd1e91e..5ba3dd8d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskMp4.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskMp4.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,9 +15,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TaskMp4 - MP4 output format + * TaskMp4 + * + * <p>MP4 output format */ - public class TaskMp4 { /** @@ -50,7 +49,7 @@ public Optional<String> path() { public final static Builder builder() { return new Builder(); - } + } /** * Path for the MP4 output @@ -69,6 +68,7 @@ public TaskMp4 withPath(Optional<String> path) { this.path = path; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -97,7 +97,7 @@ public String toString() { public final static class Builder { - private Optional<String> path = Optional.empty(); + private Optional<String> path = Optional.empty(); private Builder() { // force use of static builder() method @@ -127,4 +127,3 @@ public TaskMp4 build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskOutputIpfs.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskOutputIpfs.java index 9a42f56b..30c4fb74 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskOutputIpfs.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskOutputIpfs.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class TaskOutputIpfs { /** @@ -39,7 +36,7 @@ public String cid() { public final static Builder builder() { return new Builder(); - } + } /** * IPFS CID of the exported data @@ -49,6 +46,7 @@ public TaskOutputIpfs withCid(String cid) { this.cid = cid; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String cid; + private String cid; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public TaskOutputIpfs build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskOutputs.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskOutputs.java index 01fa3345..da22d9fc 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskOutputs.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskOutputs.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,9 +16,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TaskOutputs - Output formats + * TaskOutputs + * + * <p>Output formats */ - public class TaskOutputs { /** @@ -71,7 +70,7 @@ public Optional<TaskMp4> mp4() { public final static Builder builder() { return new Builder(); - } + } /** * HLS output format @@ -108,6 +107,7 @@ public TaskOutputs withMp4(Optional<? extends TaskMp4> mp4) { this.mp4 = mp4; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -141,7 +141,7 @@ public final static class Builder { private Optional<? extends TaskHls> hls = Optional.empty(); - private Optional<? extends TaskMp4> mp4 = Optional.empty(); + private Optional<? extends TaskMp4> mp4 = Optional.empty(); private Builder() { // force use of static builder() method @@ -190,4 +190,3 @@ public TaskOutputs build() { } } } - 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 4bcc4bdb..faaf7786 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskPhase.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskPhase.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * TaskPhase - Phase of the task + * TaskPhase + * + * <p>Phase of the task */ public enum TaskPhase { PENDING("pending"), @@ -28,4 +31,14 @@ private TaskPhase(String value) { public String value() { return value; } + + public static Optional<TaskPhase> fromValue(String value) { + for (TaskPhase o: TaskPhase.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskStatus.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskStatus.java index 279dda3e..5496a9c3 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskStatus.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskStatus.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,9 +16,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TaskStatus - Status of the task + * TaskStatus + * + * <p>Status of the task */ - public class TaskStatus { /** @@ -123,7 +122,7 @@ public Optional<Double> retries() { public final static Builder builder() { return new Builder(); - } + } /** * Phase of the task @@ -196,6 +195,7 @@ public TaskStatus withRetries(Optional<Double> retries) { this.retries = retries; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -244,7 +244,7 @@ public final static class Builder { private Optional<String> errorMessage = Optional.empty(); - private Optional<Double> retries = Optional.empty(); + private Optional<Double> retries = Optional.empty(); private Builder() { // force use of static builder() method @@ -332,4 +332,3 @@ public TaskStatus build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskStorage.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskStorage.java index 9992a339..f6dd9efc 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskStorage.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskStorage.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,15 +15,15 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TaskStorage - Storage for the output files + * TaskStorage + * + * <p>Storage for the output files */ - public class TaskStorage { /** * URL of the output storage, accepts object-store format * "s3+https" - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("url") @@ -45,7 +43,6 @@ public TaskStorage() { /** * URL of the output storage, accepts object-store format * "s3+https" - * */ @JsonIgnore public Optional<String> url() { @@ -54,12 +51,11 @@ public Optional<String> url() { public final static Builder builder() { return new Builder(); - } + } /** * URL of the output storage, accepts object-store format * "s3+https" - * */ public TaskStorage withUrl(String url) { Utils.checkNotNull(url, "url"); @@ -70,13 +66,13 @@ public TaskStorage withUrl(String url) { /** * URL of the output storage, accepts object-store format * "s3+https" - * */ public TaskStorage withUrl(Optional<String> url) { Utils.checkNotNull(url, "url"); this.url = url; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -105,7 +101,7 @@ public String toString() { public final static class Builder { - private Optional<String> url = Optional.empty(); + private Optional<String> url = Optional.empty(); private Builder() { // force use of static builder() method @@ -114,7 +110,6 @@ private Builder() { /** * URL of the output storage, accepts object-store format * "s3+https" - * */ public Builder url(String url) { Utils.checkNotNull(url, "url"); @@ -125,7 +120,6 @@ public Builder url(String url) { /** * URL of the output storage, accepts object-store format * "s3+https" - * */ public Builder url(Optional<String> url) { Utils.checkNotNull(url, "url"); @@ -139,4 +133,3 @@ public TaskStorage build() { } } } - 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 c00af619..7f411c1e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TaskType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskType.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * TaskType - Type of the task + * TaskType + * + * <p>Type of the task */ public enum TaskType { UPLOAD("upload"), @@ -27,4 +30,14 @@ private TaskType(String value) { public String value() { return value; } + + public static Optional<TaskType> fromValue(String value) { + for (TaskType o: TaskType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TaskUpload.java b/src/main/java/studio/livepeer/livepeer/models/components/TaskUpload.java new file mode 100644 index 00000000..7e5c0bea --- /dev/null +++ b/src/main/java/studio/livepeer/livepeer/models/components/TaskUpload.java @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package studio.livepeer.livepeer.models.components; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import studio.livepeer.livepeer.utils.Utils; + +/** + * TaskUpload + * + * <p>Output of the upload task + */ +public class TaskUpload { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("assetSpec") + private Optional<? extends Asset> assetSpec; + + @JsonIgnore + private Map<String, Object> additionalProperties; + + @JsonCreator + public TaskUpload( + @JsonProperty("assetSpec") Optional<? extends Asset> assetSpec) { + Utils.checkNotNull(assetSpec, "assetSpec"); + this.assetSpec = assetSpec; + this.additionalProperties = new HashMap<>(); + } + + public TaskUpload() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional<Asset> assetSpec() { + return (Optional<Asset>) assetSpec; + } + + @JsonAnyGetter + public Map<String, Object> additionalProperties() { + return additionalProperties; + } + + public final static Builder builder() { + return new Builder(); + } + + public TaskUpload withAssetSpec(Asset assetSpec) { + Utils.checkNotNull(assetSpec, "assetSpec"); + this.assetSpec = Optional.ofNullable(assetSpec); + return this; + } + + public TaskUpload withAssetSpec(Optional<? extends Asset> assetSpec) { + Utils.checkNotNull(assetSpec, "assetSpec"); + this.assetSpec = assetSpec; + return this; + } + + @JsonAnySetter + public TaskUpload withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + + public TaskUpload withAdditionalProperties(Map<String, Object> additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TaskUpload other = (TaskUpload) o; + return + Objects.deepEquals(this.assetSpec, other.assetSpec) && + Objects.deepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + assetSpec, + additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(TaskUpload.class, + "assetSpec", assetSpec, + "additionalProperties", additionalProperties); + } + + public final static class Builder { + + private Optional<? extends Asset> assetSpec = Optional.empty(); + + private Map<String, Object> additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + public Builder assetSpec(Asset assetSpec) { + Utils.checkNotNull(assetSpec, "assetSpec"); + this.assetSpec = Optional.ofNullable(assetSpec); + return this; + } + + public Builder assetSpec(Optional<? extends Asset> assetSpec) { + Utils.checkNotNull(assetSpec, "assetSpec"); + this.assetSpec = assetSpec; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + + public Builder additionalProperties(Map<String, Object> additionalProperties) { + Utils.checkNotNull(additionalProperties, "additionalProperties"); + this.additionalProperties = additionalProperties; + return this; + } + + public TaskUpload build() { + return new TaskUpload( + assetSpec) + .withAdditionalProperties(additionalProperties); + } + } +} diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Tasks.java b/src/main/java/studio/livepeer/livepeer/models/components/Tasks.java index d055e2f0..01c6d797 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Tasks.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Tasks.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -16,13 +14,11 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Tasks { /** * ID of any currently running task that is exporting this * asset to IPFS. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("pending") @@ -31,7 +27,6 @@ public class Tasks { /** * ID of the last task to run successfully, that created * the currently saved data. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("last") @@ -64,7 +59,6 @@ public Tasks() { /** * ID of any currently running task that is exporting this * asset to IPFS. - * */ @JsonIgnore public Optional<String> pending() { @@ -74,7 +68,6 @@ public Optional<String> pending() { /** * ID of the last task to run successfully, that created * the currently saved data. - * */ @JsonIgnore public Optional<String> last() { @@ -91,12 +84,11 @@ public Optional<String> failed() { public final static Builder builder() { return new Builder(); - } + } /** * ID of any currently running task that is exporting this * asset to IPFS. - * */ public Tasks withPending(String pending) { Utils.checkNotNull(pending, "pending"); @@ -107,7 +99,6 @@ public Tasks withPending(String pending) { /** * ID of any currently running task that is exporting this * asset to IPFS. - * */ public Tasks withPending(Optional<String> pending) { Utils.checkNotNull(pending, "pending"); @@ -118,7 +109,6 @@ public Tasks withPending(Optional<String> pending) { /** * ID of the last task to run successfully, that created * the currently saved data. - * */ public Tasks withLast(String last) { Utils.checkNotNull(last, "last"); @@ -129,7 +119,6 @@ public Tasks withLast(String last) { /** * ID of the last task to run successfully, that created * the currently saved data. - * */ public Tasks withLast(Optional<String> last) { Utils.checkNotNull(last, "last"); @@ -154,6 +143,7 @@ public Tasks withFailed(Optional<String> failed) { this.failed = failed; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -192,7 +182,7 @@ public final static class Builder { private Optional<String> last = Optional.empty(); - private Optional<String> failed = Optional.empty(); + private Optional<String> failed = Optional.empty(); private Builder() { // force use of static builder() method @@ -201,7 +191,6 @@ private Builder() { /** * ID of any currently running task that is exporting this * asset to IPFS. - * */ public Builder pending(String pending) { Utils.checkNotNull(pending, "pending"); @@ -212,7 +201,6 @@ public Builder pending(String pending) { /** * ID of any currently running task that is exporting this * asset to IPFS. - * */ public Builder pending(Optional<String> pending) { Utils.checkNotNull(pending, "pending"); @@ -223,7 +211,6 @@ public Builder pending(Optional<String> pending) { /** * ID of the last task to run successfully, that created * the currently saved data. - * */ public Builder last(String last) { Utils.checkNotNull(last, "last"); @@ -234,7 +221,6 @@ public Builder last(String last) { /** * ID of the last task to run successfully, that created * the currently saved data. - * */ public Builder last(Optional<String> last) { Utils.checkNotNull(last, "last"); @@ -268,4 +254,3 @@ public Tasks build() { } } } - 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 edbb17bd..8d5a81b2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Three.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Three.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Double; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -18,7 +17,6 @@ import studio.livepeer.livepeer.utils.Utils.TypeReferenceWithShape; import studio.livepeer.livepeer.utils.Utils; - @JsonDeserialize(using = Three._Deserializer.class) public class Three { @@ -83,8 +81,8 @@ public static final class _Deserializer extends OneOfDeserializer<Three> { public _Deserializer() { super(Three.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.Double>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<java.lang.String>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Double>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<String>() {}, JsonShape.DEFAULT)); } } @@ -95,3 +93,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Tracks.java b/src/main/java/studio/livepeer/livepeer/models/components/Tracks.java index fc31952a..5e563611 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Tracks.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Tracks.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Tracks { /** @@ -91,7 +88,6 @@ public class Tracks { /** * Sample rate of the track in samples per second - only for * audio tracks - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("sampleRate") @@ -233,7 +229,6 @@ public Optional<Double> channels() { /** * Sample rate of the track in samples per second - only for * audio tracks - * */ @JsonIgnore public Optional<Double> sampleRate() { @@ -250,7 +245,7 @@ public Optional<Double> bitDepth() { public final static Builder builder() { return new Builder(); - } + } /** * type of track @@ -417,7 +412,6 @@ public Tracks withChannels(Optional<Double> channels) { /** * Sample rate of the track in samples per second - only for * audio tracks - * */ public Tracks withSampleRate(double sampleRate) { Utils.checkNotNull(sampleRate, "sampleRate"); @@ -428,7 +422,6 @@ public Tracks withSampleRate(double sampleRate) { /** * Sample rate of the track in samples per second - only for * audio tracks - * */ public Tracks withSampleRate(Optional<Double> sampleRate) { Utils.checkNotNull(sampleRate, "sampleRate"); @@ -453,6 +446,7 @@ public Tracks withBitDepth(Optional<Double> bitDepth) { this.bitDepth = bitDepth; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -536,7 +530,7 @@ public final static class Builder { private Optional<Double> sampleRate = Optional.empty(); - private Optional<Double> bitDepth = Optional.empty(); + private Optional<Double> bitDepth = Optional.empty(); private Builder() { // force use of static builder() method @@ -707,7 +701,6 @@ public Builder channels(Optional<Double> channels) { /** * Sample rate of the track in samples per second - only for * audio tracks - * */ public Builder sampleRate(double sampleRate) { Utils.checkNotNull(sampleRate, "sampleRate"); @@ -718,7 +711,6 @@ public Builder sampleRate(double sampleRate) { /** * Sample rate of the track in samples per second - only for * audio tracks - * */ public Builder sampleRate(Optional<Double> sampleRate) { Utils.checkNotNull(sampleRate, "sampleRate"); @@ -761,4 +753,3 @@ public Tracks build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TranscodeFile.java b/src/main/java/studio/livepeer/livepeer/models/components/TranscodeFile.java index 8ff29f96..c3eb7a66 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodeFile.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodeFile.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -21,9 +19,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TranscodeFile - Parameters for the transcode-file task + * TranscodeFile + * + * <p>Parameters for the transcode-file task */ - public class TranscodeFile { /** @@ -54,7 +53,6 @@ public class TranscodeFile { /** * How many seconds the duration of each output segment should * be - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("targetSegmentSizeSecs") @@ -136,7 +134,6 @@ public Optional<List<TranscodeProfile>> profiles() { /** * How many seconds the duration of each output segment should * be - * */ @JsonIgnore public Optional<Double> targetSegmentSizeSecs() { @@ -159,7 +156,7 @@ public Optional<Boolean> c2pa() { public final static Builder builder() { return new Builder(); - } + } /** * Input video file to transcode @@ -230,7 +227,6 @@ public TranscodeFile withProfiles(Optional<? extends List<TranscodeProfile>> pro /** * How many seconds the duration of each output segment should * be - * */ public TranscodeFile withTargetSegmentSizeSecs(double targetSegmentSizeSecs) { Utils.checkNotNull(targetSegmentSizeSecs, "targetSegmentSizeSecs"); @@ -241,7 +237,6 @@ public TranscodeFile withTargetSegmentSizeSecs(double targetSegmentSizeSecs) { /** * How many seconds the duration of each output segment should * be - * */ public TranscodeFile withTargetSegmentSizeSecs(Optional<Double> targetSegmentSizeSecs) { Utils.checkNotNull(targetSegmentSizeSecs, "targetSegmentSizeSecs"); @@ -278,6 +273,7 @@ public TranscodeFile withC2pa(Optional<Boolean> c2pa) { this.c2pa = c2pa; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -336,7 +332,7 @@ public final static class Builder { private Optional<? extends InputCreatorId> creatorId = Optional.empty(); - private Optional<Boolean> c2pa = Optional.empty(); + private Optional<Boolean> c2pa = Optional.empty(); private Builder() { // force use of static builder() method @@ -411,7 +407,6 @@ public Builder profiles(Optional<? extends List<TranscodeProfile>> profiles) { /** * How many seconds the duration of each output segment should * be - * */ public Builder targetSegmentSizeSecs(double targetSegmentSizeSecs) { Utils.checkNotNull(targetSegmentSizeSecs, "targetSegmentSizeSecs"); @@ -422,7 +417,6 @@ public Builder targetSegmentSizeSecs(double targetSegmentSizeSecs) { /** * How many seconds the duration of each output segment should * be - * */ public Builder targetSegmentSizeSecs(Optional<Double> targetSegmentSizeSecs) { Utils.checkNotNull(targetSegmentSizeSecs, "targetSegmentSizeSecs"); @@ -472,4 +466,3 @@ public TranscodeFile build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayload.java b/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayload.java index 4d11e80a..8ccaf4cf 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -20,7 +18,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class TranscodePayload { @JsonProperty("input") @@ -137,7 +134,7 @@ public Optional<Boolean> c2pa() { public final static Builder builder() { return new Builder(); - } + } public TranscodePayload withInput(Input input) { Utils.checkNotNull(input, "input"); @@ -219,6 +216,7 @@ public TranscodePayload withC2pa(Optional<Boolean> c2pa) { this.c2pa = c2pa; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -277,7 +275,7 @@ public final static class Builder { private Optional<? extends InputCreatorId> creatorId = Optional.empty(); - private Optional<Boolean> c2pa = Optional.empty(); + private Optional<Boolean> c2pa = Optional.empty(); private Builder() { // force use of static builder() method @@ -376,4 +374,3 @@ public TranscodePayload build() { } } } - 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 b94a15b3..ae309ead 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorage.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorage.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -18,7 +16,6 @@ import studio.livepeer.livepeer.utils.Utils.TypeReferenceWithShape; import studio.livepeer.livepeer.utils.Utils; - @JsonDeserialize(using = TranscodePayloadStorage._Deserializer.class) public class TranscodePayloadStorage { @@ -83,8 +80,8 @@ public static final class _Deserializer extends OneOfDeserializer<TranscodePaylo public _Deserializer() { super(TranscodePayloadStorage.class, false, - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.Storage1>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<studio.livepeer.livepeer.models.components.Storage2>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Storage1>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<Storage2>() {}, JsonShape.DEFAULT)); } } @@ -95,3 +92,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageCredentials.java b/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageCredentials.java index 05f12fea..0ee315be 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageCredentials.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageCredentials.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,11 +12,11 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TranscodePayloadStorageCredentials - Delegation proof for Livepeer to be able to upload to - * web3.storage + * TranscodePayloadStorageCredentials * + * <p>Delegation proof for Livepeer to be able to upload to + * web3.storage */ - public class TranscodePayloadStorageCredentials { /** @@ -44,7 +42,7 @@ public String proof() { public final static Builder builder() { return new Builder(); - } + } /** * Base64 encoded UCAN delegation proof @@ -54,6 +52,7 @@ public TranscodePayloadStorageCredentials withProof(String proof) { this.proof = proof; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -82,7 +81,7 @@ public String toString() { public final static class Builder { - private String proof; + private String proof; private Builder() { // force use of static builder() method @@ -103,4 +102,3 @@ public TranscodePayloadStorageCredentials build() { } } } - 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 5ae3fe5b..b32db961 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageType.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodePayloadStorageType.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * TranscodePayloadStorageType - Type of service used for output files + * TranscodePayloadStorageType + * + * <p>Type of service used for output files */ public enum TranscodePayloadStorageType { WEB3_STORAGE("web3.storage"); @@ -23,4 +26,14 @@ private TranscodePayloadStorageType(String value) { public String value() { return value; } + + public static Optional<TranscodePayloadStorageType> fromValue(String value) { + for (TranscodePayloadStorageType o: TranscodePayloadStorageType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfile.java b/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfile.java index 100aae85..11a71766 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfile.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfile.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,9 +17,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * TranscodeProfile - Transcode API profile + * TranscodeProfile + * + * <p>Transcode API profile */ - public class TranscodeProfile { @JsonInclude(Include.NON_ABSENT) @@ -41,7 +40,6 @@ public class TranscodeProfile { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("quality") @@ -128,7 +126,6 @@ public long bitrate() { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ @JsonIgnore public Optional<Long> quality() { @@ -164,7 +161,7 @@ public Optional<TranscodeProfileEncoder> encoder() { public final static Builder builder() { return new Builder(); - } + } public TranscodeProfile withWidth(long width) { Utils.checkNotNull(width, "width"); @@ -210,7 +207,6 @@ public TranscodeProfile withBitrate(long bitrate) { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ public TranscodeProfile withQuality(long quality) { Utils.checkNotNull(quality, "quality"); @@ -220,7 +216,6 @@ public TranscodeProfile withQuality(long quality) { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ public TranscodeProfile withQuality(Optional<Long> quality) { Utils.checkNotNull(quality, "quality"); @@ -287,6 +282,7 @@ public TranscodeProfile withEncoder(Optional<? extends TranscodeProfileEncoder> this.encoder = encoder; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -360,7 +356,7 @@ public final static class Builder { private Optional<? extends TranscodeProfileProfile> profile = Optional.empty(); - private Optional<? extends TranscodeProfileEncoder> encoder = Optional.empty(); + private Optional<? extends TranscodeProfileEncoder> encoder = Optional.empty(); private Builder() { // force use of static builder() method @@ -410,7 +406,6 @@ public Builder bitrate(long bitrate) { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ public Builder quality(long quality) { Utils.checkNotNull(quality, "quality"); @@ -420,7 +415,6 @@ public Builder quality(long quality) { /** * Restricts the size of the output video using the constant quality feature. Increasing this value will result in a lower quality video. Note that this parameter might not work if the transcoder lacks support for it. - * */ public Builder quality(Optional<Long> quality) { Utils.checkNotNull(quality, "quality"); @@ -503,4 +497,3 @@ public TranscodeProfile build() { } } } - 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 2188f797..621478ce 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileEncoder.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileEncoder.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum TranscodeProfileEncoder { H264("H.264"), @@ -23,4 +24,14 @@ private TranscodeProfileEncoder(String value) { public String value() { return value; } + + public static Optional<TranscodeProfileEncoder> fromValue(String value) { + for (TranscodeProfileEncoder o: TranscodeProfileEncoder.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 ac2ee4bd..b5f17b18 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileProfile.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/TranscodeProfileProfile.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum TranscodeProfileProfile { H264_BASELINE("H264Baseline"), @@ -23,4 +24,14 @@ private TranscodeProfileProfile(String value) { public String value() { return value; } + + public static Optional<TranscodeProfileProfile> fromValue(String value) { + for (TranscodeProfileProfile o: TranscodeProfileProfile.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Two.java b/src/main/java/studio/livepeer/livepeer/models/components/Two.java index a8e0417b..c5145301 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Two.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Two.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class Two { @JsonProperty("type") @@ -50,7 +47,7 @@ public String sessionId() { public final static Builder builder() { return new Builder(); - } + } public Two withType(AssetSourceType type) { Utils.checkNotNull(type, "type"); @@ -66,6 +63,7 @@ public Two withSessionId(String sessionId) { this.sessionId = sessionId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -99,7 +97,7 @@ public final static class Builder { private AssetSourceType type; - private String sessionId; + private String sessionId; private Builder() { // force use of static builder() method @@ -127,4 +125,3 @@ public Two build() { } } } - 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 caa57ce0..6fca5953 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Type.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Type.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Type { PUBLIC("public"), @@ -22,4 +23,14 @@ private Type(String value) { public String value() { return value; } + + public static Optional<Type> fromValue(String value) { + for (Type o: Type.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Upload.java b/src/main/java/studio/livepeer/livepeer/models/components/Upload.java index 50dadbd7..c28f7666 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Upload.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Upload.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -21,9 +19,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Upload - Parameters for the upload task + * Upload + * + * <p>Parameters for the upload task */ - public class Upload { /** @@ -116,7 +115,7 @@ public Optional<Double> targetSegmentSizeSecs() { public final static Builder builder() { return new Builder(); - } + } /** * URL of the asset to "upload" @@ -195,6 +194,7 @@ public Upload withTargetSegmentSizeSecs(Optional<Double> targetSegmentSizeSecs) this.targetSegmentSizeSecs = targetSegmentSizeSecs; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -243,7 +243,7 @@ public final static class Builder { private Optional<? extends List<TranscodeProfile>> profiles = Optional.empty(); - private Optional<Double> targetSegmentSizeSecs = Optional.empty(); + private Optional<Double> targetSegmentSizeSecs = Optional.empty(); private Builder() { // force use of static builder() method @@ -337,4 +337,3 @@ public Upload build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/UsageMetric.java b/src/main/java/studio/livepeer/livepeer/models/components/UsageMetric.java index 55376bcf..a2a17d05 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/UsageMetric.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/UsageMetric.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,10 +16,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * UsageMetric - An individual metric about usage of a user. + * UsageMetric * + * <p>An individual metric about usage of a user. */ - public class UsageMetric { /** @@ -124,7 +122,7 @@ public Optional<Double> storageUsageMins() { public final static Builder builder() { return new Builder(); - } + } /** * The user ID associated with the metric @@ -215,6 +213,7 @@ public UsageMetric withStorageUsageMins(Optional<Double> storageUsageMins) { this.storageUsageMins = storageUsageMins; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -263,7 +262,7 @@ public final static class Builder { private Optional<Double> totalUsageMins = Optional.empty(); - private Optional<Double> storageUsageMins = Optional.empty(); + private Optional<Double> storageUsageMins = Optional.empty(); private Builder() { // force use of static builder() method @@ -369,4 +368,3 @@ public UsageMetric build() { } } } - 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 b43039d0..ab967179 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/UserTags.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/UserTags.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Double; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -19,7 +18,6 @@ import studio.livepeer.livepeer.utils.Utils.TypeReferenceWithShape; import studio.livepeer.livepeer.utils.Utils; - @JsonDeserialize(using = UserTags._Deserializer.class) public class UserTags { @@ -90,9 +88,9 @@ public static final class _Deserializer extends OneOfDeserializer<UserTags> { public _Deserializer() { super(UserTags.class, false, - TypeReferenceWithShape.of(new TypeReference<java.util.List<studio.livepeer.livepeer.models.components.UserTags3>>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<java.lang.Double>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<java.lang.String>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<List<UserTags3>>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<Double>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<String>() {}, JsonShape.DEFAULT)); } } @@ -103,3 +101,4 @@ public String toString() { } } + 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 3f9d3414..e05dbf10 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/UserTags3.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/UserTags3.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Double; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -18,7 +17,6 @@ import studio.livepeer.livepeer.utils.Utils.TypeReferenceWithShape; import studio.livepeer.livepeer.utils.Utils; - @JsonDeserialize(using = UserTags3._Deserializer.class) public class UserTags3 { @@ -83,8 +81,8 @@ public static final class _Deserializer extends OneOfDeserializer<UserTags3> { public _Deserializer() { super(UserTags3.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.Double>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<java.lang.String>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Double>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<String>() {}, JsonShape.DEFAULT)); } } @@ -95,3 +93,4 @@ public String toString() { } } + 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 c6239ef1..92adf9ed 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Version.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Version.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Version { ONE("1"); @@ -20,4 +21,14 @@ private Version(String value) { public String value() { return value; } + + public static Optional<Version> fromValue(String value) { + for (Version o: Version.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/components/VideoSpec.java b/src/main/java/studio/livepeer/livepeer/models/components/VideoSpec.java index bbd49bd7..fd02949a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/VideoSpec.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/VideoSpec.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -20,9 +18,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * VideoSpec - Video metadata + * VideoSpec + * + * <p>Video metadata */ - public class VideoSpec { /** @@ -49,7 +48,6 @@ public class VideoSpec { /** * List of tracks associated with the asset when the format * contemplates them (e.g. mp4) - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("tracks") @@ -102,7 +100,6 @@ public Optional<Double> bitrate() { /** * List of tracks associated with the asset when the format * contemplates them (e.g. mp4) - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -112,7 +109,7 @@ public Optional<List<Tracks>> tracks() { public final static Builder builder() { return new Builder(); - } + } /** * Format of the asset @@ -171,7 +168,6 @@ public VideoSpec withBitrate(Optional<Double> bitrate) { /** * List of tracks associated with the asset when the format * contemplates them (e.g. mp4) - * */ public VideoSpec withTracks(List<Tracks> tracks) { Utils.checkNotNull(tracks, "tracks"); @@ -182,13 +178,13 @@ public VideoSpec withTracks(List<Tracks> tracks) { /** * List of tracks associated with the asset when the format * contemplates them (e.g. mp4) - * */ public VideoSpec withTracks(Optional<? extends List<Tracks>> tracks) { Utils.checkNotNull(tracks, "tracks"); this.tracks = tracks; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -232,7 +228,7 @@ public final static class Builder { private Optional<Double> bitrate = Optional.empty(); - private Optional<? extends List<Tracks>> tracks = Optional.empty(); + private Optional<? extends List<Tracks>> tracks = Optional.empty(); private Builder() { // force use of static builder() method @@ -295,7 +291,6 @@ public Builder bitrate(Optional<Double> bitrate) { /** * List of tracks associated with the asset when the format * contemplates them (e.g. mp4) - * */ public Builder tracks(List<Tracks> tracks) { Utils.checkNotNull(tracks, "tracks"); @@ -306,7 +301,6 @@ public Builder tracks(List<Tracks> tracks) { /** * List of tracks associated with the asset when the format * contemplates them (e.g. mp4) - * */ public Builder tracks(Optional<? extends List<Tracks>> tracks) { Utils.checkNotNull(tracks, "tracks"); @@ -323,4 +317,3 @@ public VideoSpec build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/ViewershipMetric.java b/src/main/java/studio/livepeer/livepeer/models/components/ViewershipMetric.java index 944600ea..b1d2f7be 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/ViewershipMetric.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/ViewershipMetric.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,11 +17,11 @@ import studio.livepeer.livepeer.utils.Utils; /** - * ViewershipMetric - An individual metric about viewership of a stream/asset. Necessarily, at least - * 1 of playbackId and dStorageUrl will be present, depending on the query. + * ViewershipMetric * + * <p>An individual metric about viewership of a stream/asset. Necessarily, at least + * 1 of playbackId and dStorageUrl will be present, depending on the query. */ - public class ViewershipMetric { /** @@ -58,7 +56,6 @@ public class ViewershipMetric { * Timestamp (in milliseconds) when the metric was recorded. If the * query contains a time step, this timestamp will point to the * beginning of the time step period. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("timestamp") @@ -123,7 +120,6 @@ public class ViewershipMetric { /** * The subdivision (e.g., state or province) where the viewer is * located. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("subdivision") @@ -179,7 +175,6 @@ public class ViewershipMetric { /** * The percentage of sessions that existed before the asset started * playing. - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("exitsBeforeStart") @@ -297,7 +292,6 @@ public Optional<String> dStorageUrl() { * Timestamp (in milliseconds) when the metric was recorded. If the * query contains a time step, this timestamp will point to the * beginning of the time step period. - * */ @JsonIgnore public Optional<Double> timestamp() { @@ -371,7 +365,6 @@ public Optional<String> country() { /** * The subdivision (e.g., state or province) where the viewer is * located. - * */ @JsonIgnore public Optional<String> subdivision() { @@ -437,7 +430,6 @@ public Optional<Double> errorRate() { /** * The percentage of sessions that existed before the asset started * playing. - * */ @JsonIgnore public Optional<Double> exitsBeforeStart() { @@ -446,7 +438,7 @@ public Optional<Double> exitsBeforeStart() { public final static Builder builder() { return new Builder(); - } + } /** * The playback ID associated with the metric. @@ -524,7 +516,6 @@ public ViewershipMetric withDStorageUrl(Optional<String> dStorageUrl) { * Timestamp (in milliseconds) when the metric was recorded. If the * query contains a time step, this timestamp will point to the * beginning of the time step period. - * */ public ViewershipMetric withTimestamp(double timestamp) { Utils.checkNotNull(timestamp, "timestamp"); @@ -536,7 +527,6 @@ public ViewershipMetric withTimestamp(double timestamp) { * Timestamp (in milliseconds) when the metric was recorded. If the * query contains a time step, this timestamp will point to the * beginning of the time step period. - * */ public ViewershipMetric withTimestamp(Optional<Double> timestamp) { Utils.checkNotNull(timestamp, "timestamp"); @@ -691,7 +681,6 @@ public ViewershipMetric withCountry(Optional<String> country) { /** * The subdivision (e.g., state or province) where the viewer is * located. - * */ public ViewershipMetric withSubdivision(String subdivision) { Utils.checkNotNull(subdivision, "subdivision"); @@ -702,7 +691,6 @@ public ViewershipMetric withSubdivision(String subdivision) { /** * The subdivision (e.g., state or province) where the viewer is * located. - * */ public ViewershipMetric withSubdivision(Optional<String> subdivision) { Utils.checkNotNull(subdivision, "subdivision"); @@ -821,7 +809,6 @@ public ViewershipMetric withErrorRate(Optional<Double> errorRate) { /** * The percentage of sessions that existed before the asset started * playing. - * */ public ViewershipMetric withExitsBeforeStart(double exitsBeforeStart) { Utils.checkNotNull(exitsBeforeStart, "exitsBeforeStart"); @@ -832,13 +819,13 @@ public ViewershipMetric withExitsBeforeStart(double exitsBeforeStart) { /** * The percentage of sessions that existed before the asset started * playing. - * */ public ViewershipMetric withExitsBeforeStart(Optional<Double> exitsBeforeStart) { Utils.checkNotNull(exitsBeforeStart, "exitsBeforeStart"); this.exitsBeforeStart = exitsBeforeStart; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -972,7 +959,7 @@ public final static class Builder { private Optional<Double> errorRate = Optional.empty(); - private Optional<Double> exitsBeforeStart = Optional.empty(); + private Optional<Double> exitsBeforeStart = Optional.empty(); private Builder() { // force use of static builder() method @@ -1054,7 +1041,6 @@ public Builder dStorageUrl(Optional<String> dStorageUrl) { * Timestamp (in milliseconds) when the metric was recorded. If the * query contains a time step, this timestamp will point to the * beginning of the time step period. - * */ public Builder timestamp(double timestamp) { Utils.checkNotNull(timestamp, "timestamp"); @@ -1066,7 +1052,6 @@ public Builder timestamp(double timestamp) { * Timestamp (in milliseconds) when the metric was recorded. If the * query contains a time step, this timestamp will point to the * beginning of the time step period. - * */ public Builder timestamp(Optional<Double> timestamp) { Utils.checkNotNull(timestamp, "timestamp"); @@ -1221,7 +1206,6 @@ public Builder country(Optional<String> country) { /** * The subdivision (e.g., state or province) where the viewer is * located. - * */ public Builder subdivision(String subdivision) { Utils.checkNotNull(subdivision, "subdivision"); @@ -1232,7 +1216,6 @@ public Builder subdivision(String subdivision) { /** * The subdivision (e.g., state or province) where the viewer is * located. - * */ public Builder subdivision(Optional<String> subdivision) { Utils.checkNotNull(subdivision, "subdivision"); @@ -1351,7 +1334,6 @@ public Builder errorRate(Optional<Double> errorRate) { /** * The percentage of sessions that existed before the asset started * playing. - * */ public Builder exitsBeforeStart(double exitsBeforeStart) { Utils.checkNotNull(exitsBeforeStart, "exitsBeforeStart"); @@ -1362,7 +1344,6 @@ public Builder exitsBeforeStart(double exitsBeforeStart) { /** * The percentage of sessions that existed before the asset started * playing. - * */ public Builder exitsBeforeStart(Optional<Double> exitsBeforeStart) { Utils.checkNotNull(exitsBeforeStart, "exitsBeforeStart"); @@ -1397,4 +1378,3 @@ public ViewershipMetric build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/Webhook.java b/src/main/java/studio/livepeer/livepeer/models/components/Webhook.java index 5aecbf99..f0b4442c 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/Webhook.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/Webhook.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -20,7 +18,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class Webhook { @JsonInclude(Include.NON_ABSENT) @@ -31,6 +28,7 @@ public class Webhook { private String name; /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @@ -39,6 +37,7 @@ public class Webhook { private Optional<String> kind; /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @@ -132,6 +131,7 @@ public String name() { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -141,6 +141,7 @@ public Optional<String> kind() { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -195,7 +196,7 @@ public Optional<Status> status() { public final static Builder builder() { return new Builder(); - } + } public Webhook withId(String id) { Utils.checkNotNull(id, "id"); @@ -216,6 +217,7 @@ public Webhook withName(String name) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -226,6 +228,7 @@ public Webhook withKind(String kind) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -236,6 +239,7 @@ public Webhook withKind(Optional<String> kind) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -246,6 +250,7 @@ public Webhook withUserId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -344,6 +349,7 @@ public Webhook withStatus(Optional<? extends Status> status) { this.status = status; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -419,7 +425,7 @@ public final static class Builder { private Optional<String> streamId = Optional.empty(); - private Optional<? extends Status> status = Optional.empty(); + private Optional<? extends Status> status = Optional.empty(); private Builder() { // force use of static builder() method @@ -444,6 +450,7 @@ public Builder name(String name) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -454,6 +461,7 @@ public Builder kind(String kind) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -464,6 +472,7 @@ public Builder kind(Optional<String> kind) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -474,6 +483,7 @@ public Builder userId(String userId) { } /** + * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated @@ -588,4 +598,3 @@ public Webhook build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/WebhookInput.java b/src/main/java/studio/livepeer/livepeer/models/components/WebhookInput.java index 06321d2c..5c173d0d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/WebhookInput.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/WebhookInput.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -18,7 +16,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class WebhookInput { @JsonProperty("name") @@ -122,7 +119,7 @@ public Optional<String> streamId() { public final static Builder builder() { return new Builder(); - } + } public WebhookInput withName(String name) { Utils.checkNotNull(name, "name"); @@ -201,6 +198,7 @@ public WebhookInput withStreamId(Optional<String> streamId) { this.streamId = streamId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -254,7 +252,7 @@ public final static class Builder { private Optional<String> sharedSecret = Optional.empty(); - private Optional<String> streamId = Optional.empty(); + private Optional<String> streamId = Optional.empty(); private Builder() { // force use of static builder() method @@ -349,4 +347,3 @@ public WebhookInput build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/components/WebhookLog.java b/src/main/java/studio/livepeer/livepeer/models/components/WebhookLog.java index f477f505..52339345 100644 --- a/src/main/java/studio/livepeer/livepeer/models/components/WebhookLog.java +++ b/src/main/java/studio/livepeer/livepeer/models/components/WebhookLog.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.components; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,7 +17,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class WebhookLog { @JsonProperty("id") @@ -41,7 +38,6 @@ public class WebhookLog { /** * Timestamp (in milliseconds) at which webhook request object was * created - * */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("createdAt") @@ -127,7 +123,6 @@ public Optional<String> event() { /** * Timestamp (in milliseconds) at which webhook request object was * created - * */ @JsonIgnore public Optional<Double> createdAt() { @@ -164,7 +159,7 @@ public Optional<Response> response() { public final static Builder builder() { return new Builder(); - } + } public WebhookLog withId(String id) { Utils.checkNotNull(id, "id"); @@ -202,7 +197,6 @@ public WebhookLog withEvent(Optional<String> event) { /** * Timestamp (in milliseconds) at which webhook request object was * created - * */ public WebhookLog withCreatedAt(double createdAt) { Utils.checkNotNull(createdAt, "createdAt"); @@ -213,7 +207,6 @@ public WebhookLog withCreatedAt(double createdAt) { /** * Timestamp (in milliseconds) at which webhook request object was * created - * */ public WebhookLog withCreatedAt(Optional<Double> createdAt) { Utils.checkNotNull(createdAt, "createdAt"); @@ -280,6 +273,7 @@ public WebhookLog withResponse(Optional<? extends Response> response) { this.response = response; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -343,7 +337,7 @@ public final static class Builder { private Optional<? extends Request> request = Optional.empty(); - private Optional<? extends Response> response = Optional.empty(); + private Optional<? extends Response> response = Optional.empty(); private Builder() { // force use of static builder() method @@ -385,7 +379,6 @@ public Builder event(Optional<String> event) { /** * Timestamp (in milliseconds) at which webhook request object was * created - * */ public Builder createdAt(double createdAt) { Utils.checkNotNull(createdAt, "createdAt"); @@ -396,7 +389,6 @@ public Builder createdAt(double createdAt) { /** * Timestamp (in milliseconds) at which webhook request object was * created - * */ public Builder createdAt(Optional<Double> createdAt) { Utils.checkNotNull(createdAt, "createdAt"); @@ -477,4 +469,3 @@ public WebhookLog build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/errors/AuthException.java b/src/main/java/studio/livepeer/livepeer/models/errors/AuthException.java index 1d8e36b9..a6a86c34 100644 --- a/src/main/java/studio/livepeer/livepeer/models/errors/AuthException.java +++ b/src/main/java/studio/livepeer/livepeer/models/errors/AuthException.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.errors; import java.util.Optional; diff --git a/src/main/java/studio/livepeer/livepeer/models/errors/Error.java b/src/main/java/studio/livepeer/livepeer/models/errors/Error.java index 2e60a81c..4794b082 100644 --- a/src/main/java/studio/livepeer/livepeer/models/errors/Error.java +++ b/src/main/java/studio/livepeer/livepeer/models/errors/Error.java @@ -1,14 +1,15 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.errors; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Override; +import java.lang.RuntimeException; import java.lang.String; import java.lang.SuppressWarnings; import java.util.List; @@ -16,6 +17,7 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; +@SuppressWarnings("serial") public class Error extends RuntimeException { @JsonInclude(Include.NON_ABSENT) @@ -34,26 +36,28 @@ public Error() { } @SuppressWarnings("unchecked") - public Optional<List<String>> errors(){ + @JsonIgnore + public Optional<List<String>> errors() { return (Optional<List<String>>) errors; } - + public final static Builder builder() { return new Builder(); - } + } public Error withErrors(List<String> errors) { Utils.checkNotNull(errors, "errors"); this.errors = Optional.ofNullable(errors); return this; } - + public Error withErrors(Optional<? extends List<String>> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,26 +67,26 @@ public boolean equals(java.lang.Object o) { return false; } Error other = (Error) o; - return + return Objects.deepEquals(this.errors, other.errors); } - + @Override public int hashCode() { - return java.util.Objects.hash( + return Objects.hash( errors); } - + @Override public String toString() { return Utils.toString(Error.class, "errors", errors); } - + public final static class Builder { - + private Optional<? extends List<String>> errors = Optional.empty(); - + private Builder() { // force use of static builder() method } @@ -92,16 +96,17 @@ public Builder errors(List<String> errors) { this.errors = Optional.ofNullable(errors); return this; } - + public Builder errors(Optional<? extends List<String>> errors) { Utils.checkNotNull(errors, "errors"); this.errors = errors; return this; } - + public Error build() { return new Error( errors); } } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/errors/SDKError.java b/src/main/java/studio/livepeer/livepeer/models/errors/SDKError.java index 59116dcf..cf52ca94 100644 --- a/src/main/java/studio/livepeer/livepeer/models/errors/SDKError.java +++ b/src/main/java/studio/livepeer/livepeer/models/errors/SDKError.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.errors; import java.net.http.HttpResponse; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequest.java index 3f2a4882..fb8e2507 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -14,7 +12,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class AddMultistreamTargetRequest { /** @@ -51,7 +48,7 @@ public TargetAddPayload targetAddPayload() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the parent stream @@ -67,6 +64,7 @@ public AddMultistreamTargetRequest withTargetAddPayload(TargetAddPayload targetA this.targetAddPayload = targetAddPayload; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -100,7 +98,7 @@ public final static class Builder { private String id; - private TargetAddPayload targetAddPayload; + private TargetAddPayload targetAddPayload; private Builder() { // force use of static builder() method @@ -128,4 +126,3 @@ public AddMultistreamTargetRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequestBuilder.java index 4976ba22..e9224348 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.models.components.TargetAddPayload; import studio.livepeer.livepeer.utils.Utils; @@ -18,13 +18,13 @@ public AddMultistreamTargetRequestBuilder(SDKMethodInterfaces.MethodCallAddMulti this.sdk = sdk; } - public AddMultistreamTargetRequestBuilder id(java.lang.String id) { + public AddMultistreamTargetRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public AddMultistreamTargetRequestBuilder targetAddPayload(studio.livepeer.livepeer.models.components.TargetAddPayload targetAddPayload) { + public AddMultistreamTargetRequestBuilder targetAddPayload(TargetAddPayload targetAddPayload) { Utils.checkNotNull(targetAddPayload, "targetAddPayload"); this.targetAddPayload = targetAddPayload; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetResponse.java index 908144e1..6dc122b3 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/AddMultistreamTargetResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class AddMultistreamTargetResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public AddMultistreamTargetResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public AddMultistreamTargetResponse build() { } } } - 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 d26b8fff..87371357 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/BreakdownBy.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/BreakdownBy.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum BreakdownBy { PLAYBACK_ID("playbackId"), @@ -23,4 +24,14 @@ private BreakdownBy(String value) { public String value() { return value; } + + public static Optional<BreakdownBy> fromValue(String value) { + for (BreakdownBy o: BreakdownBy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipData.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipData.java index e674d7af..d88e3b6a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipData.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipData.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,9 +13,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * CreateClipData - Success + * CreateClipData + * + * <p>Success */ - public class CreateClipData { @JsonProperty("asset") @@ -48,7 +47,7 @@ public CreateClipTask task() { public final static Builder builder() { return new Builder(); - } + } public CreateClipData withAsset(Asset asset) { Utils.checkNotNull(asset, "asset"); @@ -61,6 +60,7 @@ public CreateClipData withTask(CreateClipTask task) { this.task = task; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -94,7 +94,7 @@ public final static class Builder { private Asset asset; - private CreateClipTask task; + private CreateClipTask task; private Builder() { // force use of static builder() method @@ -119,4 +119,3 @@ public CreateClipData build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipRequestBuilder.java index 0afbe77d..5a7b2041 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import studio.livepeer.livepeer.models.components.ClipPayload; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public CreateClipRequestBuilder(SDKMethodInterfaces.MethodCallCreateClip sdk) { this.sdk = sdk; } - public CreateClipRequestBuilder request(studio.livepeer.livepeer.models.components.ClipPayload request) { + public CreateClipRequestBuilder request(ClipPayload request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipResponse.java index 8e44d869..01c06834 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class CreateClipResponse implements Response { /** @@ -117,7 +114,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -181,6 +178,7 @@ public CreateClipResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -229,7 +227,7 @@ public final static class Builder { private Optional<? extends CreateClipData> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -308,4 +306,3 @@ public CreateClipResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipTask.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipTask.java index 0871d719..dd4030e2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipTask.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateClipTask.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -16,7 +14,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class CreateClipTask { @JsonInclude(Include.NON_ABSENT) @@ -41,7 +38,7 @@ public Optional<String> id() { public final static Builder builder() { return new Builder(); - } + } public CreateClipTask withId(String id) { Utils.checkNotNull(id, "id"); @@ -54,6 +51,7 @@ public CreateClipTask withId(Optional<String> id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -82,7 +80,7 @@ public String toString() { public final static class Builder { - private Optional<String> id = Optional.empty(); + private Optional<String> id = Optional.empty(); private Builder() { // force use of static builder() method @@ -106,4 +104,3 @@ public CreateClipTask build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetRequestBuilder.java index d3000484..4e5cab1c 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import studio.livepeer.livepeer.models.components.MultistreamTargetInput; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public CreateMultistreamTargetRequestBuilder(SDKMethodInterfaces.MethodCallCreat this.sdk = sdk; } - public CreateMultistreamTargetRequestBuilder request(studio.livepeer.livepeer.models.components.MultistreamTargetInput request) { + public CreateMultistreamTargetRequestBuilder request(MultistreamTargetInput request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetResponse.java index 71a30d56..05d0675a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateMultistreamTargetResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.MultistreamTarget; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class CreateMultistreamTargetResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public CreateMultistreamTargetResponse withError(Optional<? extends Error> error this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends MultistreamTarget> multistreamTarget = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public CreateMultistreamTargetResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomRequestBuilder.java index 64f53668..259c1379 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; public class CreateRoomRequestBuilder { diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomResponse.java index 2580285c..bab71333 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class CreateRoomResponse implements Response { /** @@ -117,7 +114,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -181,6 +178,7 @@ public CreateRoomResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -229,7 +227,7 @@ public final static class Builder { private Optional<? extends studio.livepeer.livepeer.models.components.CreateRoomResponse> createRoomResponse = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -308,4 +306,3 @@ public CreateRoomResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequest.java index dd47b597..50e014f4 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -14,7 +12,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class CreateRoomUserRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -45,7 +42,7 @@ public RoomUserPayload roomUserPayload() { public final static Builder builder() { return new Builder(); - } + } public CreateRoomUserRequest withId(String id) { Utils.checkNotNull(id, "id"); @@ -58,6 +55,7 @@ public CreateRoomUserRequest withRoomUserPayload(RoomUserPayload roomUserPayload this.roomUserPayload = roomUserPayload; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -91,7 +89,7 @@ public final static class Builder { private String id; - private RoomUserPayload roomUserPayload; + private RoomUserPayload roomUserPayload; private Builder() { // force use of static builder() method @@ -116,4 +114,3 @@ public CreateRoomUserRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequestBuilder.java index 51beebb7..ed60a519 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.models.components.RoomUserPayload; import studio.livepeer.livepeer.utils.Utils; @@ -18,13 +18,13 @@ public CreateRoomUserRequestBuilder(SDKMethodInterfaces.MethodCallCreateRoomUser this.sdk = sdk; } - public CreateRoomUserRequestBuilder id(java.lang.String id) { + public CreateRoomUserRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public CreateRoomUserRequestBuilder roomUserPayload(studio.livepeer.livepeer.models.components.RoomUserPayload roomUserPayload) { + public CreateRoomUserRequestBuilder roomUserPayload(RoomUserPayload roomUserPayload) { Utils.checkNotNull(roomUserPayload, "roomUserPayload"); this.roomUserPayload = roomUserPayload; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserResponse.java index 3a1233bf..afae828f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateRoomUserResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.RoomUserResponse; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class CreateRoomUserResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public CreateRoomUserResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends RoomUserResponse> roomUserResponse = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public CreateRoomUserResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyRequestBuilder.java index d4808095..65c27259 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; public class CreateSigningKeyRequestBuilder { diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyResponse.java index 0315a785..8c17c1b5 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateSigningKeyResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.SigningKey; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class CreateSigningKeyResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public CreateSigningKeyResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends SigningKey> signingKey = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public CreateSigningKeyResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamRequestBuilder.java index 52db6a7a..ceb285f7 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import studio.livepeer.livepeer.models.components.NewStreamPayload; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public CreateStreamRequestBuilder(SDKMethodInterfaces.MethodCallCreateStream sdk this.sdk = sdk; } - public CreateStreamRequestBuilder request(studio.livepeer.livepeer.models.components.NewStreamPayload request) { + public CreateStreamRequestBuilder request(NewStreamPayload request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamResponse.java index 57b22dc1..a305c5e8 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateStreamResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Stream; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class CreateStreamResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public CreateStreamResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends Stream> stream = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public CreateStreamResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookRequestBuilder.java index c45911aa..5db72ade 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import studio.livepeer.livepeer.models.components.WebhookInput; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public CreateWebhookRequestBuilder(SDKMethodInterfaces.MethodCallCreateWebhook s this.sdk = sdk; } - public CreateWebhookRequestBuilder request(studio.livepeer.livepeer.models.components.WebhookInput request) { + public CreateWebhookRequestBuilder request(WebhookInput request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookResponse.java index 0eb3f7bc..3c5ca60b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/CreateWebhookResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Webhook; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class CreateWebhookResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public CreateWebhookResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends Webhook> webhook = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public CreateWebhookResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequest.java index 7f8cfd49..68d49343 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class DeleteAssetRequest { /** @@ -39,7 +36,7 @@ public String assetId() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the asset @@ -49,6 +46,7 @@ public DeleteAssetRequest withAssetId(String assetId) { this.assetId = assetId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String assetId; + private String assetId; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public DeleteAssetRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequestBuilder.java index 93aa87b6..c301c2d0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public DeleteAssetRequestBuilder(SDKMethodInterfaces.MethodCallDeleteAsset sdk) this.sdk = sdk; } - public DeleteAssetRequestBuilder assetId(java.lang.String assetId) { + public DeleteAssetRequestBuilder assetId(String assetId) { Utils.checkNotNull(assetId, "assetId"); this.assetId = assetId; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetResponse.java index 5fed3794..e2208355 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteAssetResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class DeleteAssetResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public DeleteAssetResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public DeleteAssetResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequest.java index 54139b3f..71266e25 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class DeleteMultistreamTargetRequest { /** @@ -39,7 +36,7 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the multistream target @@ -49,6 +46,7 @@ public DeleteMultistreamTargetRequest withId(String id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public DeleteMultistreamTargetRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequestBuilder.java index 4335757e..ae1cf43e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public DeleteMultistreamTargetRequestBuilder(SDKMethodInterfaces.MethodCallDelet this.sdk = sdk; } - public DeleteMultistreamTargetRequestBuilder id(java.lang.String id) { + public DeleteMultistreamTargetRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetResponse.java index f1e72509..43f0fb0e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteMultistreamTargetResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class DeleteMultistreamTargetResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public DeleteMultistreamTargetResponse withError(Optional<? extends Error> error this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public DeleteMultistreamTargetResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequest.java index 48d9ee87..c10a3b3f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class DeleteRoomRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -33,13 +30,14 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } public DeleteRoomRequest withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -68,7 +66,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -86,4 +84,3 @@ public DeleteRoomRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequestBuilder.java index 881ae319..a6ba3e76 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public DeleteRoomRequestBuilder(SDKMethodInterfaces.MethodCallDeleteRoom sdk) { this.sdk = sdk; } - public DeleteRoomRequestBuilder id(java.lang.String id) { + public DeleteRoomRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomResponse.java index 70bc062d..95d66f4b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class DeleteRoomResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public DeleteRoomResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public DeleteRoomResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequest.java index 83d955b9..e9ad575e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class DeleteRoomUserRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -44,7 +41,7 @@ public String userId() { public final static Builder builder() { return new Builder(); - } + } public DeleteRoomUserRequest withId(String id) { Utils.checkNotNull(id, "id"); @@ -57,6 +54,7 @@ public DeleteRoomUserRequest withUserId(String userId) { this.userId = userId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -90,7 +88,7 @@ public final static class Builder { private String id; - private String userId; + private String userId; private Builder() { // force use of static builder() method @@ -115,4 +113,3 @@ public DeleteRoomUserRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequestBuilder.java index bc19de74..579a9bb8 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -17,13 +17,13 @@ public DeleteRoomUserRequestBuilder(SDKMethodInterfaces.MethodCallDeleteRoomUser this.sdk = sdk; } - public DeleteRoomUserRequestBuilder id(java.lang.String id) { + public DeleteRoomUserRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public DeleteRoomUserRequestBuilder userId(java.lang.String userId) { + public DeleteRoomUserRequestBuilder userId(String userId) { Utils.checkNotNull(userId, "userId"); this.userId = userId; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserResponse.java index c02116a0..08e56edb 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteRoomUserResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class DeleteRoomUserResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public DeleteRoomUserResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public DeleteRoomUserResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequest.java index 9c48b688..d6e2eca3 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class DeleteSigningKeyRequest { /** @@ -39,7 +36,7 @@ public String keyId() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the signing key @@ -49,6 +46,7 @@ public DeleteSigningKeyRequest withKeyId(String keyId) { this.keyId = keyId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String keyId; + private String keyId; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public DeleteSigningKeyRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequestBuilder.java index e66a712a..1f8cb9e2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public DeleteSigningKeyRequestBuilder(SDKMethodInterfaces.MethodCallDeleteSignin this.sdk = sdk; } - public DeleteSigningKeyRequestBuilder keyId(java.lang.String keyId) { + public DeleteSigningKeyRequestBuilder keyId(String keyId) { Utils.checkNotNull(keyId, "keyId"); this.keyId = keyId; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyResponse.java index 5c5ba5cb..5dc7799d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteSigningKeyResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class DeleteSigningKeyResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public DeleteSigningKeyResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public DeleteSigningKeyResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequest.java index 467ff9c5..e4f7fab5 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class DeleteStreamRequest { /** @@ -39,7 +36,7 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the stream @@ -49,6 +46,7 @@ public DeleteStreamRequest withId(String id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public DeleteStreamRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequestBuilder.java index fdeab72d..7158379d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public DeleteStreamRequestBuilder(SDKMethodInterfaces.MethodCallDeleteStream sdk this.sdk = sdk; } - public DeleteStreamRequestBuilder id(java.lang.String id) { + public DeleteStreamRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamResponse.java index 0ed9fbe1..34759fc1 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteStreamResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class DeleteStreamResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public DeleteStreamResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public DeleteStreamResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequest.java index 2ed6ca82..4c3ea90f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class DeleteWebhookRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -33,13 +30,14 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } public DeleteWebhookRequest withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -68,7 +66,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -86,4 +84,3 @@ public DeleteWebhookRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequestBuilder.java index c97044a4..609f49c2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public DeleteWebhookRequestBuilder(SDKMethodInterfaces.MethodCallDeleteWebhook s this.sdk = sdk; } - public DeleteWebhookRequestBuilder id(java.lang.String id) { + public DeleteWebhookRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookResponse.java index 2bf2d4c4..c0368202 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/DeleteWebhookResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Webhook; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class DeleteWebhookResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public DeleteWebhookResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends Webhook> webhook = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public DeleteWebhookResponse build() { } } } - 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 ea9acbaf..8b790a25 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/From.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/From.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -20,9 +19,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * From - Start timestamp for the query range (inclusive) + * From + * + * <p>Start timestamp for the query range (inclusive) */ - @JsonDeserialize(using = From._Deserializer.class) public class From { @@ -87,8 +87,8 @@ public static final class _Deserializer extends OneOfDeserializer<From> { public _Deserializer() { super(From.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.Long>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<java.time.OffsetDateTime>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Long>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<OffsetDateTime>() {}, JsonShape.DEFAULT)); } } @@ -99,3 +99,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequest.java index bfaaaba9..4a9b32c2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetAssetRequest { /** @@ -39,7 +36,7 @@ public String assetId() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the asset @@ -49,6 +46,7 @@ public GetAssetRequest withAssetId(String assetId) { this.assetId = assetId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String assetId; + private String assetId; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public GetAssetRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequestBuilder.java index 4f8dceb5..ab578365 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetAssetRequestBuilder(SDKMethodInterfaces.MethodCallGetAsset sdk) { this.sdk = sdk; } - public GetAssetRequestBuilder assetId(java.lang.String assetId) { + public GetAssetRequestBuilder assetId(String assetId) { Utils.checkNotNull(assetId, "assetId"); this.assetId = assetId; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetResponse.java index 3d5dd9e1..5c2132e3 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,11 +14,10 @@ import java.util.Objects; import java.util.Optional; import studio.livepeer.livepeer.models.components.Asset; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetAssetResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public GetAssetResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends Asset> asset = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public GetAssetResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsRequestBuilder.java index 2eee14c7..d508aa28 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; public class GetAssetsRequestBuilder { diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsResponse.java index 9ff146dd..28cc558e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetAssetsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -17,11 +15,10 @@ import java.util.Objects; import java.util.Optional; import studio.livepeer.livepeer.models.components.Asset; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetAssetsResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetAssetsResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<Asset>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetAssetsResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequest.java index f7305ef7..82cb90a0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetClipsRequest { /** @@ -39,7 +36,7 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the parent stream or playbackId of parent stream @@ -49,6 +46,7 @@ public GetClipsRequest withId(String id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public GetClipsRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequestBuilder.java index 9c178204..c225f8f5 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetClipsRequestBuilder(SDKMethodInterfaces.MethodCallGetClips sdk) { this.sdk = sdk; } - public GetClipsRequestBuilder id(java.lang.String id) { + public GetClipsRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsResponse.java index b4191b3f..91b407ff 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetClipsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -17,11 +15,10 @@ import java.util.Objects; import java.util.Optional; import studio.livepeer.livepeer.models.components.Asset; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetClipsResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetClipsResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<Asset>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetClipsResponse build() { } } } - 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 a5a904d5..5e81d968 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsQueryParamBreakdownBy.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum GetCreatorViewershipMetricsQueryParamBreakdownBy { DEVICE_TYPE("deviceType"), @@ -30,4 +31,14 @@ private GetCreatorViewershipMetricsQueryParamBreakdownBy(String value) { public String value() { return value; } + + public static Optional<GetCreatorViewershipMetricsQueryParamBreakdownBy> fromValue(String value) { + for (GetCreatorViewershipMetricsQueryParamBreakdownBy o: GetCreatorViewershipMetricsQueryParamBreakdownBy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequest.java index 660dc3b3..d2b66ca3 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -16,7 +14,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetCreatorViewershipMetricsRequest { /** @@ -58,7 +55,6 @@ public class GetCreatorViewershipMetricsRequest { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=breakdownBy[]") private Optional<? extends List<GetCreatorViewershipMetricsQueryParamBreakdownBy>> breakdownBy; @@ -146,7 +142,6 @@ public Optional<String> creatorId() { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -156,7 +151,7 @@ public Optional<List<GetCreatorViewershipMetricsQueryParamBreakdownBy>> breakdow public final static Builder builder() { return new Builder(); - } + } /** * Start timestamp for the query range (inclusive) @@ -269,7 +264,6 @@ public GetCreatorViewershipMetricsRequest withCreatorId(Optional<String> creator /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public GetCreatorViewershipMetricsRequest withBreakdownBy(List<GetCreatorViewershipMetricsQueryParamBreakdownBy> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -280,13 +274,13 @@ public GetCreatorViewershipMetricsRequest withBreakdownBy(List<GetCreatorViewers /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public GetCreatorViewershipMetricsRequest withBreakdownBy(Optional<? extends List<GetCreatorViewershipMetricsQueryParamBreakdownBy>> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); this.breakdownBy = breakdownBy; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -345,7 +339,7 @@ public final static class Builder { private Optional<String> creatorId = Optional.empty(); - private Optional<? extends List<GetCreatorViewershipMetricsQueryParamBreakdownBy>> breakdownBy = Optional.empty(); + private Optional<? extends List<GetCreatorViewershipMetricsQueryParamBreakdownBy>> breakdownBy = Optional.empty(); private Builder() { // force use of static builder() method @@ -462,7 +456,6 @@ public Builder creatorId(Optional<String> creatorId) { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public Builder breakdownBy(List<GetCreatorViewershipMetricsQueryParamBreakdownBy> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -473,7 +466,6 @@ public Builder breakdownBy(List<GetCreatorViewershipMetricsQueryParamBreakdownBy /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public Builder breakdownBy(Optional<? extends List<GetCreatorViewershipMetricsQueryParamBreakdownBy>> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -493,4 +485,3 @@ public GetCreatorViewershipMetricsRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequestBuilder.java index f5bc5bb5..435518c8 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import studio.livepeer.livepeer.utils.Utils; public class GetCreatorViewershipMetricsRequestBuilder { @@ -15,7 +15,7 @@ public GetCreatorViewershipMetricsRequestBuilder(SDKMethodInterfaces.MethodCallG this.sdk = sdk; } - public GetCreatorViewershipMetricsRequestBuilder request(studio.livepeer.livepeer.models.operations.GetCreatorViewershipMetricsRequest request) { + public GetCreatorViewershipMetricsRequestBuilder request(GetCreatorViewershipMetricsRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsResponse.java index 2b68e89a..2271768e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetCreatorViewershipMetricsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,12 +14,11 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.ViewershipMetric; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetCreatorViewershipMetricsResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetCreatorViewershipMetricsResponse withError(Optional<? extends Error> e this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<ViewershipMetric>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetCreatorViewershipMetricsResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequest.java index 56b44bce..92aa0a56 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetMultistreamTargetRequest { /** @@ -39,7 +36,7 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the multistream target @@ -49,6 +46,7 @@ public GetMultistreamTargetRequest withId(String id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public GetMultistreamTargetRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequestBuilder.java index 90d3b7ac..f72009dd 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetMultistreamTargetRequestBuilder(SDKMethodInterfaces.MethodCallGetMulti this.sdk = sdk; } - public GetMultistreamTargetRequestBuilder id(java.lang.String id) { + public GetMultistreamTargetRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetResponse.java index 587058de..35142d3c 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.MultistreamTarget; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetMultistreamTargetResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public GetMultistreamTargetResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends MultistreamTarget> multistreamTarget = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public GetMultistreamTargetResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsRequestBuilder.java index 9171e12d..819c47a2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; public class GetMultistreamTargetsRequestBuilder { diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsResponse.java index 70d231b5..ce3d9edf 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetMultistreamTargetsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,12 +14,11 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.MultistreamTarget; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetMultistreamTargetsResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetMultistreamTargetsResponse withError(Optional<? extends Error> error) this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<MultistreamTarget>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetMultistreamTargetsResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequest.java index ed7ea866..004eb165 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetPlaybackInfoRequest { /** @@ -39,7 +36,7 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } /** * The playback ID from the asset or livestream, e.g. `eaw4nk06ts2d0mzb`. @@ -49,6 +46,7 @@ public GetPlaybackInfoRequest withId(String id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public GetPlaybackInfoRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequestBuilder.java index 0e5e60ef..f1daf76e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetPlaybackInfoRequestBuilder(SDKMethodInterfaces.MethodCallGetPlaybackIn this.sdk = sdk; } - public GetPlaybackInfoRequestBuilder id(java.lang.String id) { + public GetPlaybackInfoRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoResponse.java index 4b1a9ef7..6ca8019b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetPlaybackInfoResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.PlaybackInfo; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetPlaybackInfoResponse implements Response { /** @@ -42,27 +40,35 @@ public class GetPlaybackInfoResponse implements Response { */ private Optional<? extends PlaybackInfo> playbackInfo; + /** + * Playback not found + */ + private Optional<? extends Error> error; + @JsonCreator public GetPlaybackInfoResponse( String contentType, int statusCode, HttpResponse<InputStream> rawResponse, - Optional<? extends PlaybackInfo> playbackInfo) { + Optional<? extends PlaybackInfo> playbackInfo, + Optional<? extends Error> error) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); Utils.checkNotNull(playbackInfo, "playbackInfo"); + Utils.checkNotNull(error, "error"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; this.playbackInfo = playbackInfo; + this.error = error; } public GetPlaybackInfoResponse( String contentType, int statusCode, HttpResponse<InputStream> rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, Optional.empty(), Optional.empty()); } /** @@ -98,9 +104,18 @@ public Optional<PlaybackInfo> playbackInfo() { return (Optional<PlaybackInfo>) playbackInfo; } + /** + * Playback not found + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional<Error> error() { + return (Optional<Error>) error; + } + public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +161,25 @@ public GetPlaybackInfoResponse withPlaybackInfo(Optional<? extends PlaybackInfo> this.playbackInfo = playbackInfo; return this; } + + /** + * Playback not found + */ + public GetPlaybackInfoResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Playback not found + */ + public GetPlaybackInfoResponse withError(Optional<? extends Error> error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + @Override public boolean equals(java.lang.Object o) { @@ -160,7 +194,8 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.contentType, other.contentType) && Objects.deepEquals(this.statusCode, other.statusCode) && Objects.deepEquals(this.rawResponse, other.rawResponse) && - Objects.deepEquals(this.playbackInfo, other.playbackInfo); + Objects.deepEquals(this.playbackInfo, other.playbackInfo) && + Objects.deepEquals(this.error, other.error); } @Override @@ -169,7 +204,8 @@ public int hashCode() { contentType, statusCode, rawResponse, - playbackInfo); + playbackInfo, + error); } @Override @@ -178,7 +214,8 @@ public String toString() { "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "playbackInfo", playbackInfo); + "playbackInfo", playbackInfo, + "error", error); } public final static class Builder { @@ -189,7 +226,9 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends PlaybackInfo> playbackInfo = Optional.empty(); + private Optional<? extends PlaybackInfo> playbackInfo = Optional.empty(); + + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -239,14 +278,32 @@ public Builder playbackInfo(Optional<? extends PlaybackInfo> playbackInfo) { this.playbackInfo = playbackInfo; return this; } + + /** + * Playback not found + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Playback not found + */ + public Builder error(Optional<? extends Error> error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } public GetPlaybackInfoResponse build() { return new GetPlaybackInfoResponse( contentType, statusCode, rawResponse, - playbackInfo); + playbackInfo, + error); } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsData.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsData.java index 71c21072..572b4b34 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsData.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsData.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -19,11 +17,11 @@ import studio.livepeer.livepeer.utils.Utils; /** - * GetPublicViewershipMetricsData - A simplified metric object about aggregate viewership of an - * asset. Either playbackId or dStorageUrl will be set. + * GetPublicViewershipMetricsData * + * <p>A simplified metric object about aggregate viewership of an + * asset. Either playbackId or dStorageUrl will be set. */ - public class GetPublicViewershipMetricsData { /** @@ -108,7 +106,7 @@ public Optional<Double> playtimeMins() { public final static Builder builder() { return new Builder(); - } + } /** * The playback ID associated with the metric. @@ -181,6 +179,7 @@ public GetPublicViewershipMetricsData withPlaytimeMins(Optional<Double> playtime this.playtimeMins = playtimeMins; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -224,7 +223,7 @@ public final static class Builder { private Optional<Long> viewCount = Optional.empty(); - private Optional<Double> playtimeMins = Optional.empty(); + private Optional<Double> playtimeMins = Optional.empty(); private Builder() { // force use of static builder() method @@ -311,4 +310,3 @@ public GetPublicViewershipMetricsData build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequest.java index 8d834ad6..586a8256 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,14 +11,12 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetPublicViewershipMetricsRequest { /** * 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 - * */ @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=playbackId") private String playbackId; @@ -36,7 +32,6 @@ public GetPublicViewershipMetricsRequest( * 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 - * */ @JsonIgnore public String playbackId() { @@ -45,19 +40,19 @@ public String playbackId() { public final static Builder builder() { return new Builder(); - } + } /** * 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 - * */ public GetPublicViewershipMetricsRequest withPlaybackId(String playbackId) { Utils.checkNotNull(playbackId, "playbackId"); this.playbackId = playbackId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -86,7 +81,7 @@ public String toString() { public final static class Builder { - private String playbackId; + private String playbackId; private Builder() { // force use of static builder() method @@ -96,7 +91,6 @@ private Builder() { * 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 - * */ public Builder playbackId(String playbackId) { Utils.checkNotNull(playbackId, "playbackId"); @@ -110,4 +104,3 @@ public GetPublicViewershipMetricsRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequestBuilder.java index 6f435f22..bdab3b38 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetPublicViewershipMetricsRequestBuilder(SDKMethodInterfaces.MethodCallGe this.sdk = sdk; } - public GetPublicViewershipMetricsRequestBuilder playbackId(java.lang.String playbackId) { + public GetPublicViewershipMetricsRequestBuilder playbackId(String playbackId) { Utils.checkNotNull(playbackId, "playbackId"); this.playbackId = playbackId; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsResponse.java index 2b49c5c5..74c31a51 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetPublicViewershipMetricsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetPublicViewershipMetricsResponse implements Response { /** @@ -117,7 +114,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -181,6 +178,7 @@ public GetPublicViewershipMetricsResponse withError(Optional<? extends Error> er this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -229,7 +227,7 @@ public final static class Builder { private Optional<? extends GetPublicViewershipMetricsData> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -308,4 +306,3 @@ public GetPublicViewershipMetricsResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequest.java index bdd282e0..26b5b3db 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -16,14 +14,12 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetRealtimeViewershipNowRequest { /** * 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 - * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playbackId") private Optional<String> playbackId; @@ -37,7 +33,6 @@ public class GetRealtimeViewershipNowRequest { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=breakdownBy[]") private Optional<? extends List<BreakdownBy>> breakdownBy; @@ -63,7 +58,6 @@ public GetRealtimeViewershipNowRequest() { * 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 - * */ @JsonIgnore public Optional<String> playbackId() { @@ -81,7 +75,6 @@ public Optional<String> creatorId() { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -91,13 +84,12 @@ public Optional<List<BreakdownBy>> breakdownBy() { public final static Builder builder() { return new Builder(); - } + } /** * 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 - * */ public GetRealtimeViewershipNowRequest withPlaybackId(String playbackId) { Utils.checkNotNull(playbackId, "playbackId"); @@ -109,7 +101,6 @@ public GetRealtimeViewershipNowRequest withPlaybackId(String playbackId) { * 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 - * */ public GetRealtimeViewershipNowRequest withPlaybackId(Optional<String> playbackId) { Utils.checkNotNull(playbackId, "playbackId"); @@ -138,7 +129,6 @@ public GetRealtimeViewershipNowRequest withCreatorId(Optional<String> creatorId) /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public GetRealtimeViewershipNowRequest withBreakdownBy(List<BreakdownBy> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -149,13 +139,13 @@ public GetRealtimeViewershipNowRequest withBreakdownBy(List<BreakdownBy> breakdo /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public GetRealtimeViewershipNowRequest withBreakdownBy(Optional<? extends List<BreakdownBy>> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); this.breakdownBy = breakdownBy; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -194,7 +184,7 @@ public final static class Builder { private Optional<String> creatorId = Optional.empty(); - private Optional<? extends List<BreakdownBy>> breakdownBy = Optional.empty(); + private Optional<? extends List<BreakdownBy>> breakdownBy = Optional.empty(); private Builder() { // force use of static builder() method @@ -204,7 +194,6 @@ private Builder() { * 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 - * */ public Builder playbackId(String playbackId) { Utils.checkNotNull(playbackId, "playbackId"); @@ -216,7 +205,6 @@ public Builder playbackId(String playbackId) { * 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 - * */ public Builder playbackId(Optional<String> playbackId) { Utils.checkNotNull(playbackId, "playbackId"); @@ -245,7 +233,6 @@ public Builder creatorId(Optional<String> creatorId) { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public Builder breakdownBy(List<BreakdownBy> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -256,7 +243,6 @@ public Builder breakdownBy(List<BreakdownBy> breakdownBy) { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public Builder breakdownBy(Optional<? extends List<BreakdownBy>> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -272,4 +258,3 @@ public GetRealtimeViewershipNowRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequestBuilder.java index 589383c0..b5e51ffd 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import java.util.List; import java.util.Optional; @@ -20,37 +20,37 @@ public GetRealtimeViewershipNowRequestBuilder(SDKMethodInterfaces.MethodCallGetR this.sdk = sdk; } - public GetRealtimeViewershipNowRequestBuilder playbackId(java.lang.String playbackId) { + public GetRealtimeViewershipNowRequestBuilder playbackId(String playbackId) { Utils.checkNotNull(playbackId, "playbackId"); this.playbackId = Optional.of(playbackId); return this; } - public GetRealtimeViewershipNowRequestBuilder playbackId(java.util.Optional<java.lang.String> playbackId) { + public GetRealtimeViewershipNowRequestBuilder playbackId(Optional<String> playbackId) { Utils.checkNotNull(playbackId, "playbackId"); this.playbackId = playbackId; return this; } - public GetRealtimeViewershipNowRequestBuilder creatorId(java.lang.String creatorId) { + public GetRealtimeViewershipNowRequestBuilder creatorId(String creatorId) { Utils.checkNotNull(creatorId, "creatorId"); this.creatorId = Optional.of(creatorId); return this; } - public GetRealtimeViewershipNowRequestBuilder creatorId(java.util.Optional<java.lang.String> creatorId) { + public GetRealtimeViewershipNowRequestBuilder creatorId(Optional<String> creatorId) { Utils.checkNotNull(creatorId, "creatorId"); this.creatorId = creatorId; return this; } - public GetRealtimeViewershipNowRequestBuilder breakdownBy(java.util.List<studio.livepeer.livepeer.models.operations.BreakdownBy> breakdownBy) { + public GetRealtimeViewershipNowRequestBuilder breakdownBy(List<BreakdownBy> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); this.breakdownBy = Optional.of(breakdownBy); return this; } - public GetRealtimeViewershipNowRequestBuilder breakdownBy(java.util.Optional<? extends java.util.List<studio.livepeer.livepeer.models.operations.BreakdownBy>> breakdownBy) { + public GetRealtimeViewershipNowRequestBuilder breakdownBy(Optional<? extends List<BreakdownBy>> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); this.breakdownBy = breakdownBy; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowResponse.java index 1f72bb84..1ba69c9f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRealtimeViewershipNowResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,12 +14,11 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.RealtimeViewershipMetric; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetRealtimeViewershipNowResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetRealtimeViewershipNowResponse withError(Optional<? extends Error> erro this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<RealtimeViewershipMetric>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetRealtimeViewershipNowResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequest.java index 0c1c5696..6c759857 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -15,7 +13,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetRecordedSessionsRequest { /** @@ -27,7 +24,6 @@ public class GetRecordedSessionsRequest { /** * Flag indicating if the response should only include recorded * sessions - * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=record") private Optional<? extends Record> record; @@ -58,7 +54,6 @@ public String parentId() { /** * Flag indicating if the response should only include recorded * sessions - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -68,7 +63,7 @@ public Optional<Record> record() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the parent stream @@ -82,7 +77,6 @@ public GetRecordedSessionsRequest withParentId(String parentId) { /** * Flag indicating if the response should only include recorded * sessions - * */ public GetRecordedSessionsRequest withRecord(Record record) { Utils.checkNotNull(record, "record"); @@ -93,13 +87,13 @@ public GetRecordedSessionsRequest withRecord(Record record) { /** * Flag indicating if the response should only include recorded * sessions - * */ public GetRecordedSessionsRequest withRecord(Optional<? extends Record> record) { Utils.checkNotNull(record, "record"); this.record = record; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -133,7 +127,7 @@ public final static class Builder { private String parentId; - private Optional<? extends Record> record = Optional.empty(); + private Optional<? extends Record> record = Optional.empty(); private Builder() { // force use of static builder() method @@ -151,7 +145,6 @@ public Builder parentId(String parentId) { /** * Flag indicating if the response should only include recorded * sessions - * */ public Builder record(Record record) { Utils.checkNotNull(record, "record"); @@ -162,7 +155,6 @@ public Builder record(Record record) { /** * Flag indicating if the response should only include recorded * sessions - * */ public Builder record(Optional<? extends Record> record) { Utils.checkNotNull(record, "record"); @@ -177,4 +169,3 @@ public GetRecordedSessionsRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequestBuilder.java index 2017ed17..f50bc504 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; @@ -18,19 +18,19 @@ public GetRecordedSessionsRequestBuilder(SDKMethodInterfaces.MethodCallGetRecord this.sdk = sdk; } - public GetRecordedSessionsRequestBuilder parentId(java.lang.String parentId) { + public GetRecordedSessionsRequestBuilder parentId(String parentId) { Utils.checkNotNull(parentId, "parentId"); this.parentId = parentId; return this; } - public GetRecordedSessionsRequestBuilder record(studio.livepeer.livepeer.models.operations.Record record) { + public GetRecordedSessionsRequestBuilder record(Record record) { Utils.checkNotNull(record, "record"); this.record = Optional.of(record); return this; } - public GetRecordedSessionsRequestBuilder record(java.util.Optional<? extends studio.livepeer.livepeer.models.operations.Record> record) { + public GetRecordedSessionsRequestBuilder record(Optional<? extends Record> record) { Utils.checkNotNull(record, "record"); this.record = record; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsResponse.java index 7cc44672..b3f27ae3 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRecordedSessionsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,12 +14,11 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Session; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetRecordedSessionsResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetRecordedSessionsResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<Session>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetRecordedSessionsResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequest.java index c7dd27bb..c2855daf 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetRoomRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -33,13 +30,14 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } public GetRoomRequest withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -68,7 +66,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -86,4 +84,3 @@ public GetRoomRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequestBuilder.java index e54d2c60..25bee38a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetRoomRequestBuilder(SDKMethodInterfaces.MethodCallGetRoom sdk) { this.sdk = sdk; } - public GetRoomRequestBuilder id(java.lang.String id) { + public GetRoomRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomResponse.java index e5df89b0..2ca4cb29 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Room; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetRoomResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public GetRoomResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends Room> room = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public GetRoomResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequest.java index 8a7e177a..8fecc243 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetRoomUserRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -44,7 +41,7 @@ public String userId() { public final static Builder builder() { return new Builder(); - } + } public GetRoomUserRequest withId(String id) { Utils.checkNotNull(id, "id"); @@ -57,6 +54,7 @@ public GetRoomUserRequest withUserId(String userId) { this.userId = userId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -90,7 +88,7 @@ public final static class Builder { private String id; - private String userId; + private String userId; private Builder() { // force use of static builder() method @@ -115,4 +113,3 @@ public GetRoomUserRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequestBuilder.java index 17fbe15e..558cf977 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -17,13 +17,13 @@ public GetRoomUserRequestBuilder(SDKMethodInterfaces.MethodCallGetRoomUser sdk) this.sdk = sdk; } - public GetRoomUserRequestBuilder id(java.lang.String id) { + public GetRoomUserRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public GetRoomUserRequestBuilder userId(java.lang.String userId) { + public GetRoomUserRequestBuilder userId(String userId) { Utils.checkNotNull(userId, "userId"); this.userId = userId; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserResponse.java index 002fe901..22106a60 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetRoomUserResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetRoomUserResponse implements Response { /** @@ -117,7 +114,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -181,6 +178,7 @@ public GetRoomUserResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -229,7 +227,7 @@ public final static class Builder { private Optional<? extends studio.livepeer.livepeer.models.components.GetRoomUserResponse> getRoomUserResponse = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -308,4 +306,3 @@ public GetRoomUserResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequest.java index 14c6cbbc..a4873cd3 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetSessionClipsRequest { /** @@ -39,7 +36,7 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the parent session @@ -49,6 +46,7 @@ public GetSessionClipsRequest withId(String id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public GetSessionClipsRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequestBuilder.java index de1abe41..0c259b4e 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetSessionClipsRequestBuilder(SDKMethodInterfaces.MethodCallGetSessionCli this.sdk = sdk; } - public GetSessionClipsRequestBuilder id(java.lang.String id) { + public GetSessionClipsRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsResponse.java index 8007b698..0ed28c41 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionClipsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -17,11 +15,10 @@ import java.util.Objects; import java.util.Optional; import studio.livepeer.livepeer.models.components.Asset; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetSessionClipsResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetSessionClipsResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<Asset>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetSessionClipsResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequest.java index d0ea4742..e93877ef 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetSessionRequest { /** @@ -39,7 +36,7 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the session @@ -49,6 +46,7 @@ public GetSessionRequest withId(String id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public GetSessionRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequestBuilder.java index 37d03546..6f85ec0a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetSessionRequestBuilder(SDKMethodInterfaces.MethodCallGetSession sdk) { this.sdk = sdk; } - public GetSessionRequestBuilder id(java.lang.String id) { + public GetSessionRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionResponse.java index 624b79c6..c54fafce 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Session; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetSessionResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public GetSessionResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends Session> session = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public GetSessionResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsRequestBuilder.java index 1154a120..c5b6cbb0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; public class GetSessionsRequestBuilder { diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsResponse.java index abd862ee..2a0c2253 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSessionsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,12 +14,11 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Session; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetSessionsResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetSessionsResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<Session>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetSessionsResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequest.java index 5a9655c9..3a7b0f4a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetSigningKeyRequest { /** @@ -39,7 +36,7 @@ public String keyId() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the signing key @@ -49,6 +46,7 @@ public GetSigningKeyRequest withKeyId(String keyId) { this.keyId = keyId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String keyId; + private String keyId; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public GetSigningKeyRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequestBuilder.java index bbb76121..2c1a1768 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetSigningKeyRequestBuilder(SDKMethodInterfaces.MethodCallGetSigningKey s this.sdk = sdk; } - public GetSigningKeyRequestBuilder keyId(java.lang.String keyId) { + public GetSigningKeyRequestBuilder keyId(String keyId) { Utils.checkNotNull(keyId, "keyId"); this.keyId = keyId; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyResponse.java index dc0b02c5..b77689a6 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeyResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.SigningKey; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetSigningKeyResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public GetSigningKeyResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends SigningKey> signingKey = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public GetSigningKeyResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysRequestBuilder.java index 4af9ce96..df67a430 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; public class GetSigningKeysRequestBuilder { diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysResponse.java index f47f52a0..0005942d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetSigningKeysResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,12 +14,11 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.SigningKey; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetSigningKeysResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetSigningKeysResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<SigningKey>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetSigningKeysResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequest.java index 23da661f..2ce876b0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetStreamRequest { /** @@ -39,7 +36,7 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the stream @@ -49,6 +46,7 @@ public GetStreamRequest withId(String id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public GetStreamRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequestBuilder.java index c49ac5cf..eb4db74f 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetStreamRequestBuilder(SDKMethodInterfaces.MethodCallGetStream sdk) { this.sdk = sdk; } - public GetStreamRequestBuilder id(java.lang.String id) { + public GetStreamRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamResponse.java index 8ef420b7..ff001e08 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Stream; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetStreamResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public GetStreamResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends Stream> stream = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public GetStreamResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequest.java index a8c2b5d1..c2b64ca0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -14,7 +12,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetStreamsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=streamsonly") @@ -38,7 +35,7 @@ public Optional<String> streamsonly() { public final static Builder builder() { return new Builder(); - } + } public GetStreamsRequest withStreamsonly(String streamsonly) { Utils.checkNotNull(streamsonly, "streamsonly"); @@ -51,6 +48,7 @@ public GetStreamsRequest withStreamsonly(Optional<String> streamsonly) { this.streamsonly = streamsonly; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -79,7 +77,7 @@ public String toString() { public final static class Builder { - private Optional<String> streamsonly = Optional.empty(); + private Optional<String> streamsonly = Optional.empty(); private Builder() { // force use of static builder() method @@ -103,4 +101,3 @@ public GetStreamsRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequestBuilder.java index 5b47ac73..a0a92e95 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; @@ -17,13 +17,13 @@ public GetStreamsRequestBuilder(SDKMethodInterfaces.MethodCallGetStreams sdk) { this.sdk = sdk; } - public GetStreamsRequestBuilder streamsonly(java.lang.String streamsonly) { + public GetStreamsRequestBuilder streamsonly(String streamsonly) { Utils.checkNotNull(streamsonly, "streamsonly"); this.streamsonly = Optional.of(streamsonly); return this; } - public GetStreamsRequestBuilder streamsonly(java.util.Optional<java.lang.String> streamsonly) { + public GetStreamsRequestBuilder streamsonly(Optional<String> streamsonly) { Utils.checkNotNull(streamsonly, "streamsonly"); this.streamsonly = streamsonly; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsResponse.java index 36cd5906..18c1f01a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetStreamsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,12 +14,11 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Stream; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetStreamsResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetStreamsResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<Stream>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetStreamsResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequest.java index 68b977c0..e8da8e08 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetTaskRequest { /** @@ -39,7 +36,7 @@ public String taskId() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the task @@ -49,6 +46,7 @@ public GetTaskRequest withTaskId(String taskId) { this.taskId = taskId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String taskId; + private String taskId; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public GetTaskRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequestBuilder.java index dc366233..53494a54 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetTaskRequestBuilder(SDKMethodInterfaces.MethodCallGetTask sdk) { this.sdk = sdk; } - public GetTaskRequestBuilder taskId(java.lang.String taskId) { + public GetTaskRequestBuilder taskId(String taskId) { Utils.checkNotNull(taskId, "taskId"); this.taskId = taskId; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskResponse.java index 93d05554..40d211c2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetTaskResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -19,7 +17,6 @@ import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetTaskResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Task> task() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public GetTaskResponse withTask(Optional<? extends Task> task) { this.task = task; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Task> task = Optional.empty(); + private Optional<? extends Task> task = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public GetTaskResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetTasksRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetTasksRequestBuilder.java index da2ef19a..bb2defc7 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetTasksRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetTasksRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; public class GetTasksRequestBuilder { diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetTasksResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetTasksResponse.java index 53c34ced..801b60f8 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetTasksResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetTasksResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,12 +14,11 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Task; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetTasksResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetTasksResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<Task>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetTasksResponse build() { } } } - 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 f4a377f8..9bc0ad93 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamBreakdownBy.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamBreakdownBy.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum GetUsageMetricsQueryParamBreakdownBy { CREATOR_ID("creatorId"); @@ -20,4 +21,14 @@ private GetUsageMetricsQueryParamBreakdownBy(String value) { public String value() { return value; } + + public static Optional<GetUsageMetricsQueryParamBreakdownBy> fromValue(String value) { + for (GetUsageMetricsQueryParamBreakdownBy o: GetUsageMetricsQueryParamBreakdownBy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 e85a72ee..9af4c0fb 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamTimeStep.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsQueryParamTimeStep.java @@ -1,15 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * GetUsageMetricsQueryParamTimeStep - The time step to aggregate viewership metrics by + * GetUsageMetricsQueryParamTimeStep * + * <p>The time step to aggregate viewership metrics by */ public enum GetUsageMetricsQueryParamTimeStep { HOUR("hour"), @@ -25,4 +27,14 @@ private GetUsageMetricsQueryParamTimeStep(String value) { public String value() { return value; } + + public static Optional<GetUsageMetricsQueryParamTimeStep> fromValue(String value) { + for (GetUsageMetricsQueryParamTimeStep o: GetUsageMetricsQueryParamTimeStep.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequest.java index bbcb6df7..95db4957 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Long; @@ -17,33 +15,28 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetUsageMetricsRequest { /** * Start millis timestamp for the query range (inclusive) - * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=from") private Optional<Long> from; /** * End millis timestamp for the query range (exclusive) - * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=to") private Optional<Long> to; /** * The time step to aggregate viewership metrics by - * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timeStep") private Optional<? extends GetUsageMetricsQueryParamTimeStep> timeStep; /** * The creator ID to filter the query results - * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=creatorId") private Optional<String> creatorId; @@ -51,7 +44,6 @@ public class GetUsageMetricsRequest { /** * The list of fields to break down the query results. Currently the * only supported breakdown is by `creatorId`. - * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=breakdownBy[]") private Optional<? extends List<GetUsageMetricsQueryParamBreakdownBy>> breakdownBy; @@ -81,7 +73,6 @@ public GetUsageMetricsRequest() { /** * Start millis timestamp for the query range (inclusive) - * */ @JsonIgnore public Optional<Long> from() { @@ -90,7 +81,6 @@ public Optional<Long> from() { /** * End millis timestamp for the query range (exclusive) - * */ @JsonIgnore public Optional<Long> to() { @@ -99,7 +89,6 @@ public Optional<Long> to() { /** * The time step to aggregate viewership metrics by - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -109,7 +98,6 @@ public Optional<GetUsageMetricsQueryParamTimeStep> timeStep() { /** * The creator ID to filter the query results - * */ @JsonIgnore public Optional<String> creatorId() { @@ -119,7 +107,6 @@ public Optional<String> creatorId() { /** * The list of fields to break down the query results. Currently the * only supported breakdown is by `creatorId`. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -129,11 +116,10 @@ public Optional<List<GetUsageMetricsQueryParamBreakdownBy>> breakdownBy() { public final static Builder builder() { return new Builder(); - } + } /** * Start millis timestamp for the query range (inclusive) - * */ public GetUsageMetricsRequest withFrom(long from) { Utils.checkNotNull(from, "from"); @@ -143,7 +129,6 @@ public GetUsageMetricsRequest withFrom(long from) { /** * Start millis timestamp for the query range (inclusive) - * */ public GetUsageMetricsRequest withFrom(Optional<Long> from) { Utils.checkNotNull(from, "from"); @@ -153,7 +138,6 @@ public GetUsageMetricsRequest withFrom(Optional<Long> from) { /** * End millis timestamp for the query range (exclusive) - * */ public GetUsageMetricsRequest withTo(long to) { Utils.checkNotNull(to, "to"); @@ -163,7 +147,6 @@ public GetUsageMetricsRequest withTo(long to) { /** * End millis timestamp for the query range (exclusive) - * */ public GetUsageMetricsRequest withTo(Optional<Long> to) { Utils.checkNotNull(to, "to"); @@ -173,7 +156,6 @@ public GetUsageMetricsRequest withTo(Optional<Long> to) { /** * The time step to aggregate viewership metrics by - * */ public GetUsageMetricsRequest withTimeStep(GetUsageMetricsQueryParamTimeStep timeStep) { Utils.checkNotNull(timeStep, "timeStep"); @@ -183,7 +165,6 @@ public GetUsageMetricsRequest withTimeStep(GetUsageMetricsQueryParamTimeStep tim /** * The time step to aggregate viewership metrics by - * */ public GetUsageMetricsRequest withTimeStep(Optional<? extends GetUsageMetricsQueryParamTimeStep> timeStep) { Utils.checkNotNull(timeStep, "timeStep"); @@ -193,7 +174,6 @@ public GetUsageMetricsRequest withTimeStep(Optional<? extends GetUsageMetricsQue /** * The creator ID to filter the query results - * */ public GetUsageMetricsRequest withCreatorId(String creatorId) { Utils.checkNotNull(creatorId, "creatorId"); @@ -203,7 +183,6 @@ public GetUsageMetricsRequest withCreatorId(String creatorId) { /** * The creator ID to filter the query results - * */ public GetUsageMetricsRequest withCreatorId(Optional<String> creatorId) { Utils.checkNotNull(creatorId, "creatorId"); @@ -214,7 +193,6 @@ public GetUsageMetricsRequest withCreatorId(Optional<String> creatorId) { /** * The list of fields to break down the query results. Currently the * only supported breakdown is by `creatorId`. - * */ public GetUsageMetricsRequest withBreakdownBy(List<GetUsageMetricsQueryParamBreakdownBy> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -225,13 +203,13 @@ public GetUsageMetricsRequest withBreakdownBy(List<GetUsageMetricsQueryParamBrea /** * The list of fields to break down the query results. Currently the * only supported breakdown is by `creatorId`. - * */ public GetUsageMetricsRequest withBreakdownBy(Optional<? extends List<GetUsageMetricsQueryParamBreakdownBy>> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); this.breakdownBy = breakdownBy; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -280,7 +258,7 @@ public final static class Builder { private Optional<String> creatorId = Optional.empty(); - private Optional<? extends List<GetUsageMetricsQueryParamBreakdownBy>> breakdownBy = Optional.empty(); + private Optional<? extends List<GetUsageMetricsQueryParamBreakdownBy>> breakdownBy = Optional.empty(); private Builder() { // force use of static builder() method @@ -288,7 +266,6 @@ private Builder() { /** * Start millis timestamp for the query range (inclusive) - * */ public Builder from(long from) { Utils.checkNotNull(from, "from"); @@ -298,7 +275,6 @@ public Builder from(long from) { /** * Start millis timestamp for the query range (inclusive) - * */ public Builder from(Optional<Long> from) { Utils.checkNotNull(from, "from"); @@ -308,7 +284,6 @@ public Builder from(Optional<Long> from) { /** * End millis timestamp for the query range (exclusive) - * */ public Builder to(long to) { Utils.checkNotNull(to, "to"); @@ -318,7 +293,6 @@ public Builder to(long to) { /** * End millis timestamp for the query range (exclusive) - * */ public Builder to(Optional<Long> to) { Utils.checkNotNull(to, "to"); @@ -328,7 +302,6 @@ public Builder to(Optional<Long> to) { /** * The time step to aggregate viewership metrics by - * */ public Builder timeStep(GetUsageMetricsQueryParamTimeStep timeStep) { Utils.checkNotNull(timeStep, "timeStep"); @@ -338,7 +311,6 @@ public Builder timeStep(GetUsageMetricsQueryParamTimeStep timeStep) { /** * The time step to aggregate viewership metrics by - * */ public Builder timeStep(Optional<? extends GetUsageMetricsQueryParamTimeStep> timeStep) { Utils.checkNotNull(timeStep, "timeStep"); @@ -348,7 +320,6 @@ public Builder timeStep(Optional<? extends GetUsageMetricsQueryParamTimeStep> ti /** * The creator ID to filter the query results - * */ public Builder creatorId(String creatorId) { Utils.checkNotNull(creatorId, "creatorId"); @@ -358,7 +329,6 @@ public Builder creatorId(String creatorId) { /** * The creator ID to filter the query results - * */ public Builder creatorId(Optional<String> creatorId) { Utils.checkNotNull(creatorId, "creatorId"); @@ -369,7 +339,6 @@ public Builder creatorId(Optional<String> creatorId) { /** * The list of fields to break down the query results. Currently the * only supported breakdown is by `creatorId`. - * */ public Builder breakdownBy(List<GetUsageMetricsQueryParamBreakdownBy> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -380,7 +349,6 @@ public Builder breakdownBy(List<GetUsageMetricsQueryParamBreakdownBy> breakdownB /** * The list of fields to break down the query results. Currently the * only supported breakdown is by `creatorId`. - * */ public Builder breakdownBy(Optional<? extends List<GetUsageMetricsQueryParamBreakdownBy>> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -398,4 +366,3 @@ public GetUsageMetricsRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequestBuilder.java index 70d758cc..4229d227 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import studio.livepeer.livepeer.utils.Utils; public class GetUsageMetricsRequestBuilder { @@ -15,7 +15,7 @@ public GetUsageMetricsRequestBuilder(SDKMethodInterfaces.MethodCallGetUsageMetri this.sdk = sdk; } - public GetUsageMetricsRequestBuilder request(studio.livepeer.livepeer.models.operations.GetUsageMetricsRequest request) { + public GetUsageMetricsRequestBuilder request(GetUsageMetricsRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsResponse.java index 4f43e8c7..91570527 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetUsageMetricsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.UsageMetric; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetUsageMetricsResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public GetUsageMetricsResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends UsageMetric> usageMetric = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public GetUsageMetricsResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequest.java index e39bedf3..cd2a2ab1 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -16,14 +14,12 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetViewershipMetricsRequest { /** * 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 - * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=playbackId") private Optional<String> playbackId; @@ -67,7 +63,6 @@ public class GetViewershipMetricsRequest { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=breakdownBy[]") private Optional<? extends List<QueryParamBreakdownBy>> breakdownBy; @@ -108,7 +103,6 @@ public GetViewershipMetricsRequest() { * 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 - * */ @JsonIgnore public Optional<String> playbackId() { @@ -169,7 +163,6 @@ public Optional<String> creatorId() { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ @SuppressWarnings("unchecked") @JsonIgnore @@ -179,13 +172,12 @@ public Optional<List<QueryParamBreakdownBy>> breakdownBy() { public final static Builder builder() { return new Builder(); - } + } /** * 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 - * */ public GetViewershipMetricsRequest withPlaybackId(String playbackId) { Utils.checkNotNull(playbackId, "playbackId"); @@ -197,7 +189,6 @@ public GetViewershipMetricsRequest withPlaybackId(String playbackId) { * 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 - * */ public GetViewershipMetricsRequest withPlaybackId(Optional<String> playbackId) { Utils.checkNotNull(playbackId, "playbackId"); @@ -316,7 +307,6 @@ public GetViewershipMetricsRequest withCreatorId(Optional<String> creatorId) { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public GetViewershipMetricsRequest withBreakdownBy(List<QueryParamBreakdownBy> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -327,13 +317,13 @@ public GetViewershipMetricsRequest withBreakdownBy(List<QueryParamBreakdownBy> b /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public GetViewershipMetricsRequest withBreakdownBy(Optional<? extends List<QueryParamBreakdownBy>> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); this.breakdownBy = breakdownBy; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -397,7 +387,7 @@ public final static class Builder { private Optional<String> creatorId = Optional.empty(); - private Optional<? extends List<QueryParamBreakdownBy>> breakdownBy = Optional.empty(); + private Optional<? extends List<QueryParamBreakdownBy>> breakdownBy = Optional.empty(); private Builder() { // force use of static builder() method @@ -407,7 +397,6 @@ private Builder() { * 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 - * */ public Builder playbackId(String playbackId) { Utils.checkNotNull(playbackId, "playbackId"); @@ -419,7 +408,6 @@ public Builder playbackId(String playbackId) { * 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 - * */ public Builder playbackId(Optional<String> playbackId) { Utils.checkNotNull(playbackId, "playbackId"); @@ -538,7 +526,6 @@ public Builder creatorId(Optional<String> creatorId) { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public Builder breakdownBy(List<QueryParamBreakdownBy> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -549,7 +536,6 @@ public Builder breakdownBy(List<QueryParamBreakdownBy> breakdownBy) { /** * The list of fields to break down the query results. Specify this * query-string multiple times to break down by multiple fields. - * */ public Builder breakdownBy(Optional<? extends List<QueryParamBreakdownBy>> breakdownBy) { Utils.checkNotNull(breakdownBy, "breakdownBy"); @@ -570,4 +556,3 @@ public GetViewershipMetricsRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequestBuilder.java index c563e8e9..97e5933a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import studio.livepeer.livepeer.utils.Utils; public class GetViewershipMetricsRequestBuilder { @@ -15,7 +15,7 @@ public GetViewershipMetricsRequestBuilder(SDKMethodInterfaces.MethodCallGetViewe this.sdk = sdk; } - public GetViewershipMetricsRequestBuilder request(studio.livepeer.livepeer.models.operations.GetViewershipMetricsRequest request) { + public GetViewershipMetricsRequestBuilder request(GetViewershipMetricsRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsResponse.java index 095fae09..13905314 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetViewershipMetricsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,12 +14,11 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.ViewershipMetric; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetViewershipMetricsResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetViewershipMetricsResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<ViewershipMetric>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetViewershipMetricsResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequest.java index 68b48b2c..8b44af21 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetWebhookLogRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -44,7 +41,7 @@ public String logId() { public final static Builder builder() { return new Builder(); - } + } public GetWebhookLogRequest withId(String id) { Utils.checkNotNull(id, "id"); @@ -57,6 +54,7 @@ public GetWebhookLogRequest withLogId(String logId) { this.logId = logId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -90,7 +88,7 @@ public final static class Builder { private String id; - private String logId; + private String logId; private Builder() { // force use of static builder() method @@ -115,4 +113,3 @@ public GetWebhookLogRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequestBuilder.java index e6ab3cf0..6fa87475 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -17,13 +17,13 @@ public GetWebhookLogRequestBuilder(SDKMethodInterfaces.MethodCallGetWebhookLog s this.sdk = sdk; } - public GetWebhookLogRequestBuilder id(java.lang.String id) { + public GetWebhookLogRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public GetWebhookLogRequestBuilder logId(java.lang.String logId) { + public GetWebhookLogRequestBuilder logId(String logId) { Utils.checkNotNull(logId, "logId"); this.logId = logId; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogResponse.java index 8aee8982..a69f11bb 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.WebhookLog; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetWebhookLogResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public GetWebhookLogResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends WebhookLog> webhookLog = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public GetWebhookLogResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequest.java index d6d7e10b..2e43a970 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetWebhookLogsRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -33,13 +30,14 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } public GetWebhookLogsRequest withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -68,7 +66,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -86,4 +84,3 @@ public GetWebhookLogsRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequestBuilder.java index d0d90660..67c13b52 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetWebhookLogsRequestBuilder(SDKMethodInterfaces.MethodCallGetWebhookLogs this.sdk = sdk; } - public GetWebhookLogsRequestBuilder id(java.lang.String id) { + public GetWebhookLogsRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsResponse.java index 1c52dabf..6589cdd4 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookLogsResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,12 +14,11 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.WebhookLog; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetWebhookLogsResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetWebhookLogsResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<WebhookLog>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetWebhookLogsResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequest.java index af354ea4..c46a4b54 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class GetWebhookRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -33,13 +30,14 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } public GetWebhookRequest withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -68,7 +66,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -86,4 +84,3 @@ public GetWebhookRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequestBuilder.java index a323d5c2..1b2f9529 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public GetWebhookRequestBuilder(SDKMethodInterfaces.MethodCallGetWebhook sdk) { this.sdk = sdk; } - public GetWebhookRequestBuilder id(java.lang.String id) { + public GetWebhookRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookResponse.java index a98dfb5f..b4daafe0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhookResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Webhook; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetWebhookResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public GetWebhookResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends Webhook> webhook = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public GetWebhookResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksRequestBuilder.java index 361fb452..6afdfa04 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; public class GetWebhooksRequestBuilder { diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksResponse.java index 6de1c67b..4290904d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/GetWebhooksResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,12 +14,11 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Webhook; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class GetWebhooksResponse implements Response { /** @@ -119,7 +116,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -183,6 +180,7 @@ public GetWebhooksResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -231,7 +229,7 @@ public final static class Builder { private Optional<? extends List<Webhook>> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -310,4 +308,3 @@ public GetWebhooksResponse build() { } } } - 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 48d98e99..fad1f6a0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamBreakdownBy.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamBreakdownBy.java @@ -1,11 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum QueryParamBreakdownBy { PLAYBACK_ID("playbackId"), @@ -33,4 +34,14 @@ private QueryParamBreakdownBy(String value) { public String value() { return value; } + + public static Optional<QueryParamBreakdownBy> fromValue(String value) { + for (QueryParamBreakdownBy o: QueryParamBreakdownBy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 c5a9be5f..c0241135 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamFrom.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamFrom.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -20,9 +19,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * QueryParamFrom - Start timestamp for the query range (inclusive) + * QueryParamFrom + * + * <p>Start timestamp for the query range (inclusive) */ - @JsonDeserialize(using = QueryParamFrom._Deserializer.class) public class QueryParamFrom { @@ -87,8 +87,8 @@ public static final class _Deserializer extends OneOfDeserializer<QueryParamFrom public _Deserializer() { super(QueryParamFrom.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.Long>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<java.time.OffsetDateTime>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Long>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<OffsetDateTime>() {}, JsonShape.DEFAULT)); } } @@ -99,3 +99,4 @@ public String toString() { } } + 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 b2547408..0634e174 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTimeStep.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTimeStep.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * QueryParamTimeStep - The time step to aggregate viewership metrics by + * QueryParamTimeStep + * + * <p>The time step to aggregate viewership metrics by */ public enum QueryParamTimeStep { HOUR("hour"), @@ -27,4 +30,14 @@ private QueryParamTimeStep(String value) { public String value() { return value; } + + public static Optional<QueryParamTimeStep> fromValue(String value) { + for (QueryParamTimeStep o: QueryParamTimeStep.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 5d1bb187..fa2024f4 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTo.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/QueryParamTo.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -20,9 +19,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * QueryParamTo - End timestamp for the query range (exclusive) + * QueryParamTo + * + * <p>End timestamp for the query range (exclusive) */ - @JsonDeserialize(using = QueryParamTo._Deserializer.class) public class QueryParamTo { @@ -87,8 +87,8 @@ public static final class _Deserializer extends OneOfDeserializer<QueryParamTo> public _Deserializer() { super(QueryParamTo.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.Long>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<java.time.OffsetDateTime>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Long>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<OffsetDateTime>() {}, JsonShape.DEFAULT)); } } @@ -99,3 +99,4 @@ public String toString() { } } + 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 e1020e81..f897c634 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/Record.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/Record.java @@ -1,13 +1,13 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Boolean; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -19,11 +19,11 @@ import studio.livepeer.livepeer.utils.Utils; /** - * Record - Flag indicating if the response should only include recorded - * sessions + * Record * + * <p>Flag indicating if the response should only include recorded + * sessions */ - @JsonDeserialize(using = Record._Deserializer.class) public class Record { @@ -88,8 +88,8 @@ public static final class _Deserializer extends OneOfDeserializer<Record> { public _Deserializer() { super(Record.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.Long>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<java.lang.Boolean>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Long>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<Boolean>() {}, JsonShape.DEFAULT)); } } @@ -100,3 +100,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequest.java index 12032e65..a783cc72 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class RemoveMultistreamTargetRequest { /** @@ -56,7 +53,7 @@ public String targetId() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the parent stream @@ -75,6 +72,7 @@ public RemoveMultistreamTargetRequest withTargetId(String targetId) { this.targetId = targetId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -108,7 +106,7 @@ public final static class Builder { private String id; - private String targetId; + private String targetId; private Builder() { // force use of static builder() method @@ -139,4 +137,3 @@ public RemoveMultistreamTargetRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequestBuilder.java index 739512d1..39ab1c47 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -17,13 +17,13 @@ public RemoveMultistreamTargetRequestBuilder(SDKMethodInterfaces.MethodCallRemov this.sdk = sdk; } - public RemoveMultistreamTargetRequestBuilder id(java.lang.String id) { + public RemoveMultistreamTargetRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public RemoveMultistreamTargetRequestBuilder targetId(java.lang.String targetId) { + public RemoveMultistreamTargetRequestBuilder targetId(String targetId) { Utils.checkNotNull(targetId, "targetId"); this.targetId = targetId; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetResponse.java index 12c7858d..a299a76d 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/RemoveMultistreamTargetResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class RemoveMultistreamTargetResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public RemoveMultistreamTargetResponse withError(Optional<? extends Error> error this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public RemoveMultistreamTargetResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadData.java b/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadData.java index 220e860d..4f57eab7 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadData.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadData.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,9 +13,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * RequestUploadData - Success + * RequestUploadData + * + * <p>Success */ - public class RequestUploadData { /** @@ -82,7 +81,7 @@ public Task task() { public final static Builder builder() { return new Builder(); - } + } /** * The direct upload endpoint for which supports PUT requests. **It is recommended to use the Tus endpoint for a better upload experience.** @@ -113,6 +112,7 @@ public RequestUploadData withTask(Task task) { this.task = task; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -156,7 +156,7 @@ public final static class Builder { private Asset asset; - private Task task; + private Task task; private Builder() { // force use of static builder() method @@ -201,4 +201,3 @@ public RequestUploadData build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadRequestBuilder.java index c1e527c2..e4567409 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import studio.livepeer.livepeer.models.components.NewAssetPayload; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public RequestUploadRequestBuilder(SDKMethodInterfaces.MethodCallRequestUpload s this.sdk = sdk; } - public RequestUploadRequestBuilder request(studio.livepeer.livepeer.models.components.NewAssetPayload request) { + public RequestUploadRequestBuilder request(NewAssetPayload request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadResponse.java index 0ec9161a..eb59a394 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/RequestUploadResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class RequestUploadResponse implements Response { /** @@ -117,7 +114,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -181,6 +178,7 @@ public RequestUploadResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -229,7 +227,7 @@ public final static class Builder { private Optional<? extends RequestUploadData> data = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -308,4 +306,3 @@ public RequestUploadResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequest.java index 322c706b..d5ef8617 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class ResendWebhookRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -44,7 +41,7 @@ public String logId() { public final static Builder builder() { return new Builder(); - } + } public ResendWebhookRequest withId(String id) { Utils.checkNotNull(id, "id"); @@ -57,6 +54,7 @@ public ResendWebhookRequest withLogId(String logId) { this.logId = logId; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -90,7 +88,7 @@ public final static class Builder { private String id; - private String logId; + private String logId; private Builder() { // force use of static builder() method @@ -115,4 +113,3 @@ public ResendWebhookRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequestBuilder.java index d12ba511..7b118a60 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -17,13 +17,13 @@ public ResendWebhookRequestBuilder(SDKMethodInterfaces.MethodCallResendWebhook s this.sdk = sdk; } - public ResendWebhookRequestBuilder id(java.lang.String id) { + public ResendWebhookRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public ResendWebhookRequestBuilder logId(java.lang.String logId) { + public ResendWebhookRequestBuilder logId(String logId) { Utils.checkNotNull(logId, "logId"); this.logId = logId; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookResponse.java index 65962c50..6234eb30 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/ResendWebhookResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.WebhookLog; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class ResendWebhookResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public ResendWebhookResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends WebhookLog> webhookLog = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public ResendWebhookResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/SDKMethodInterfaces.java b/src/main/java/studio/livepeer/livepeer/models/operations/SDKMethodInterfaces.java index 0246e859..d59617e6 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/SDKMethodInterfaces.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/SDKMethodInterfaces.java @@ -1,16 +1,15 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import java.util.List; import java.util.Optional; import studio.livepeer.livepeer.models.components.AssetPatchPayload; import studio.livepeer.livepeer.models.components.ClipPayload; import studio.livepeer.livepeer.models.components.MultistreamTargetInput; -import studio.livepeer.livepeer.models.components.MultistreamTargetPatchPayload; import studio.livepeer.livepeer.models.components.NewAssetFromUrlPayload; import studio.livepeer.livepeer.models.components.NewAssetPayload; import studio.livepeer.livepeer.models.components.NewStreamPayload; @@ -24,357 +23,298 @@ public class SDKMethodInterfaces { - public interface MethodCallCreateStream { - studio.livepeer.livepeer.models.operations.CreateStreamResponse create( + CreateStreamResponse create( NewStreamPayload request) throws Exception; } - public interface MethodCallGetStreams { - studio.livepeer.livepeer.models.operations.GetStreamsResponse getAll( + GetStreamsResponse getAll( Optional<String> streamsonly) throws Exception; } - public interface MethodCallGetStream { - studio.livepeer.livepeer.models.operations.GetStreamResponse get( + GetStreamResponse get( String id) throws Exception; } - public interface MethodCallUpdateStream { - studio.livepeer.livepeer.models.operations.UpdateStreamResponse update( + UpdateStreamResponse update( String id, StreamPatchPayload streamPatchPayload) throws Exception; } - public interface MethodCallDeleteStream { - studio.livepeer.livepeer.models.operations.DeleteStreamResponse delete( + DeleteStreamResponse delete( String id) throws Exception; } - public interface MethodCallTerminateStream { - studio.livepeer.livepeer.models.operations.TerminateStreamResponse terminate( + TerminateStreamResponse terminate( String id) throws Exception; } - public interface MethodCallStartPullStream { - studio.livepeer.livepeer.models.operations.StartPullStreamResponse startPull( + StartPullStreamResponse startPull( String id) throws Exception; } - public interface MethodCallCreateClip { - studio.livepeer.livepeer.models.operations.CreateClipResponse createClip( + CreateClipResponse createClip( ClipPayload request) throws Exception; } - public interface MethodCallGetClips { - studio.livepeer.livepeer.models.operations.GetClipsResponse getClips( + GetClipsResponse getClips( String id) throws Exception; } - public interface MethodCallAddMultistreamTarget { - studio.livepeer.livepeer.models.operations.AddMultistreamTargetResponse addMultistreamTarget( + AddMultistreamTargetResponse addMultistreamTarget( String id, TargetAddPayload targetAddPayload) throws Exception; } - public interface MethodCallRemoveMultistreamTarget { - studio.livepeer.livepeer.models.operations.RemoveMultistreamTargetResponse removeMultistreamTarget( + RemoveMultistreamTargetResponse removeMultistreamTarget( String id, String targetId) throws Exception; } - public interface MethodCallGetMultistreamTargets { - studio.livepeer.livepeer.models.operations.GetMultistreamTargetsResponse getAllDirect() throws Exception; + GetMultistreamTargetsResponse getAllDirect() throws Exception; } - public interface MethodCallCreateMultistreamTarget { - studio.livepeer.livepeer.models.operations.CreateMultistreamTargetResponse create( + CreateMultistreamTargetResponse create( MultistreamTargetInput request) throws Exception; } - public interface MethodCallGetMultistreamTarget { - studio.livepeer.livepeer.models.operations.GetMultistreamTargetResponse get( + GetMultistreamTargetResponse get( String id) throws Exception; } - public interface MethodCallUpdateMultistreamTarget { - studio.livepeer.livepeer.models.operations.UpdateMultistreamTargetResponse update( + UpdateMultistreamTargetResponse update( String id, - MultistreamTargetPatchPayload multistreamTargetPatchPayload) throws Exception; + MultistreamTargetInput multistreamTarget) throws Exception; } - public interface MethodCallDeleteMultistreamTarget { - studio.livepeer.livepeer.models.operations.DeleteMultistreamTargetResponse delete( + DeleteMultistreamTargetResponse delete( String id) throws Exception; } - public interface MethodCallGetWebhooks { - studio.livepeer.livepeer.models.operations.GetWebhooksResponse getAllDirect() throws Exception; + GetWebhooksResponse getAllDirect() throws Exception; } - public interface MethodCallCreateWebhook { - studio.livepeer.livepeer.models.operations.CreateWebhookResponse create( + CreateWebhookResponse create( WebhookInput request) throws Exception; } - public interface MethodCallGetWebhook { - studio.livepeer.livepeer.models.operations.GetWebhookResponse get( + GetWebhookResponse get( String id) throws Exception; } - public interface MethodCallUpdateWebhook { - studio.livepeer.livepeer.models.operations.UpdateWebhookResponse update( + UpdateWebhookResponse update( String id, WebhookInput webhook) throws Exception; } - public interface MethodCallDeleteWebhook { - studio.livepeer.livepeer.models.operations.DeleteWebhookResponse delete( + DeleteWebhookResponse delete( String id) throws Exception; } - public interface MethodCallGetWebhookLogs { - studio.livepeer.livepeer.models.operations.GetWebhookLogsResponse getLogs( + GetWebhookLogsResponse getLogs( String id) throws Exception; } - public interface MethodCallGetWebhookLog { - studio.livepeer.livepeer.models.operations.GetWebhookLogResponse getLog( + GetWebhookLogResponse getLog( String id, String logId) throws Exception; } - public interface MethodCallResendWebhook { - studio.livepeer.livepeer.models.operations.ResendWebhookResponse resendLog( + ResendWebhookResponse resendLog( String id, String logId) throws Exception; } - public interface MethodCallGetAssets { - studio.livepeer.livepeer.models.operations.GetAssetsResponse getAllDirect() throws Exception; + GetAssetsResponse getAllDirect() throws Exception; } - public interface MethodCallRequestUpload { - studio.livepeer.livepeer.models.operations.RequestUploadResponse create( + RequestUploadResponse create( NewAssetPayload request) throws Exception; } - public interface MethodCallUploadAsset { - studio.livepeer.livepeer.models.operations.UploadAssetResponse createViaUrl( + UploadAssetResponse createViaUrl( NewAssetFromUrlPayload request) throws Exception; } - public interface MethodCallGetAsset { - studio.livepeer.livepeer.models.operations.GetAssetResponse get( + GetAssetResponse get( String assetId) throws Exception; } - public interface MethodCallUpdateAsset { - studio.livepeer.livepeer.models.operations.UpdateAssetResponse update( + UpdateAssetResponse update( String assetId, AssetPatchPayload assetPatchPayload) throws Exception; } - public interface MethodCallDeleteAsset { - studio.livepeer.livepeer.models.operations.DeleteAssetResponse delete( + DeleteAssetResponse delete( String assetId) throws Exception; } - public interface MethodCallGetSessionClips { - studio.livepeer.livepeer.models.operations.GetSessionClipsResponse getClips( + GetSessionClipsResponse getClips( String id) throws Exception; } - public interface MethodCallGetSessions { - studio.livepeer.livepeer.models.operations.GetSessionsResponse getAllDirect() throws Exception; + GetSessionsResponse getAllDirect() throws Exception; } - public interface MethodCallGetSession { - studio.livepeer.livepeer.models.operations.GetSessionResponse get( + GetSessionResponse get( String id) throws Exception; } - public interface MethodCallGetRecordedSessions { - studio.livepeer.livepeer.models.operations.GetRecordedSessionsResponse getRecorded( + GetRecordedSessionsResponse getRecorded( String parentId, Optional<? extends Record> record) throws Exception; } - public interface MethodCallCreateRoom { - studio.livepeer.livepeer.models.operations.CreateRoomResponse createDirect() throws Exception; + CreateRoomResponse createDirect() throws Exception; } - public interface MethodCallGetRoom { - studio.livepeer.livepeer.models.operations.GetRoomResponse get( + GetRoomResponse get( String id) throws Exception; } - public interface MethodCallDeleteRoom { - studio.livepeer.livepeer.models.operations.DeleteRoomResponse delete( + DeleteRoomResponse delete( String id) throws Exception; } - public interface MethodCallStartRoomEgress { - studio.livepeer.livepeer.models.operations.StartRoomEgressResponse startEgress( + StartRoomEgressResponse startEgress( String id, RoomEgressPayload roomEgressPayload) throws Exception; } - public interface MethodCallStopRoomEgress { - studio.livepeer.livepeer.models.operations.StopRoomEgressResponse stopEgress( + StopRoomEgressResponse stopEgress( String id) throws Exception; } - public interface MethodCallCreateRoomUser { - studio.livepeer.livepeer.models.operations.CreateRoomUserResponse createUser( + CreateRoomUserResponse createUser( String id, RoomUserPayload roomUserPayload) throws Exception; } - public interface MethodCallGetRoomUser { - studio.livepeer.livepeer.models.operations.GetRoomUserResponse getUser( + GetRoomUserResponse getUser( String id, String userId) throws Exception; } - public interface MethodCallUpdateRoomUser { - studio.livepeer.livepeer.models.operations.UpdateRoomUserResponse updateUser( + UpdateRoomUserResponse updateUser( String id, String userId, RoomUserUpdatePayload roomUserUpdatePayload) throws Exception; } - public interface MethodCallDeleteRoomUser { - studio.livepeer.livepeer.models.operations.DeleteRoomUserResponse deleteUser( + DeleteRoomUserResponse deleteUser( String id, String userId) throws Exception; } - public interface MethodCallGetRealtimeViewershipNow { - studio.livepeer.livepeer.models.operations.GetRealtimeViewershipNowResponse getRealtimeViewership( + GetRealtimeViewershipNowResponse getRealtimeViewership( Optional<String> playbackId, Optional<String> creatorId, Optional<? extends List<BreakdownBy>> breakdownBy) throws Exception; } - public interface MethodCallGetViewershipMetrics { - studio.livepeer.livepeer.models.operations.GetViewershipMetricsResponse getViewership( + GetViewershipMetricsResponse getViewership( GetViewershipMetricsRequest request) throws Exception; } - public interface MethodCallGetCreatorViewershipMetrics { - studio.livepeer.livepeer.models.operations.GetCreatorViewershipMetricsResponse getCreatorViewership( + GetCreatorViewershipMetricsResponse getCreatorViewership( GetCreatorViewershipMetricsRequest request) throws Exception; } - public interface MethodCallGetPublicViewershipMetrics { - studio.livepeer.livepeer.models.operations.GetPublicViewershipMetricsResponse getPublicViewership( + GetPublicViewershipMetricsResponse getPublicViewership( String playbackId) throws Exception; } - public interface MethodCallGetUsageMetrics { - studio.livepeer.livepeer.models.operations.GetUsageMetricsResponse getUsage( + GetUsageMetricsResponse getUsage( GetUsageMetricsRequest request) throws Exception; } - public interface MethodCallCreateSigningKey { - studio.livepeer.livepeer.models.operations.CreateSigningKeyResponse createDirect() throws Exception; + CreateSigningKeyResponse createDirect() throws Exception; } - public interface MethodCallGetSigningKeys { - studio.livepeer.livepeer.models.operations.GetSigningKeysResponse getAllDirect() throws Exception; + GetSigningKeysResponse getAllDirect() throws Exception; } - public interface MethodCallDeleteSigningKey { - studio.livepeer.livepeer.models.operations.DeleteSigningKeyResponse delete( + DeleteSigningKeyResponse delete( String keyId) throws Exception; } - public interface MethodCallGetSigningKey { - studio.livepeer.livepeer.models.operations.GetSigningKeyResponse get( + GetSigningKeyResponse get( String keyId) throws Exception; } - public interface MethodCallUpdateSigningKey { - studio.livepeer.livepeer.models.operations.UpdateSigningKeyResponse update( + UpdateSigningKeyResponse update( String keyId, UpdateSigningKeyRequestBody requestBody) throws Exception; } - public interface MethodCallGetTasks { - studio.livepeer.livepeer.models.operations.GetTasksResponse getAllDirect() throws Exception; + GetTasksResponse getAllDirect() throws Exception; } - public interface MethodCallGetTask { - studio.livepeer.livepeer.models.operations.GetTaskResponse get( + GetTaskResponse get( String taskId) throws Exception; } - public interface MethodCallTranscodeVideo { - studio.livepeer.livepeer.models.operations.TranscodeVideoResponse create( + TranscodeVideoResponse create( TranscodePayload request) throws Exception; } - public interface MethodCallGetPlaybackInfo { - studio.livepeer.livepeer.models.operations.GetPlaybackInfoResponse get( + GetPlaybackInfoResponse get( String id) throws Exception; } - - } diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequest.java index f1b41f75..c1c192d0 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class StartPullStreamRequest { /** @@ -39,7 +36,7 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the stream @@ -49,6 +46,7 @@ public StartPullStreamRequest withId(String id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public StartPullStreamRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequestBuilder.java index 736a7bd8..fe1932b2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public StartPullStreamRequestBuilder(SDKMethodInterfaces.MethodCallStartPullStre this.sdk = sdk; } - public StartPullStreamRequestBuilder id(java.lang.String id) { + public StartPullStreamRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamResponse.java index 37c1f7a8..0980c010 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/StartPullStreamResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class StartPullStreamResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public StartPullStreamResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public StartPullStreamResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequest.java index 70f9f5d3..ebfd1c92 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -14,7 +12,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class StartRoomEgressRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -45,7 +42,7 @@ public RoomEgressPayload roomEgressPayload() { public final static Builder builder() { return new Builder(); - } + } public StartRoomEgressRequest withId(String id) { Utils.checkNotNull(id, "id"); @@ -58,6 +55,7 @@ public StartRoomEgressRequest withRoomEgressPayload(RoomEgressPayload roomEgress this.roomEgressPayload = roomEgressPayload; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -91,7 +89,7 @@ public final static class Builder { private String id; - private RoomEgressPayload roomEgressPayload; + private RoomEgressPayload roomEgressPayload; private Builder() { // force use of static builder() method @@ -116,4 +114,3 @@ public StartRoomEgressRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequestBuilder.java index ee8e6329..73fc0950 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.models.components.RoomEgressPayload; import studio.livepeer.livepeer.utils.Utils; @@ -18,13 +18,13 @@ public StartRoomEgressRequestBuilder(SDKMethodInterfaces.MethodCallStartRoomEgre this.sdk = sdk; } - public StartRoomEgressRequestBuilder id(java.lang.String id) { + public StartRoomEgressRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public StartRoomEgressRequestBuilder roomEgressPayload(studio.livepeer.livepeer.models.components.RoomEgressPayload roomEgressPayload) { + public StartRoomEgressRequestBuilder roomEgressPayload(RoomEgressPayload roomEgressPayload) { Utils.checkNotNull(roomEgressPayload, "roomEgressPayload"); this.roomEgressPayload = roomEgressPayload; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressResponse.java index 248f0ea1..e7cfe405 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/StartRoomEgressResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class StartRoomEgressResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public StartRoomEgressResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public StartRoomEgressResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequest.java index ac7c2f1d..6804867a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class StopRoomEgressRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -33,13 +30,14 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } public StopRoomEgressRequest withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -68,7 +66,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -86,4 +84,3 @@ public StopRoomEgressRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequestBuilder.java index 53f69e6d..7f416e7c 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public StopRoomEgressRequestBuilder(SDKMethodInterfaces.MethodCallStopRoomEgress this.sdk = sdk; } - public StopRoomEgressRequestBuilder id(java.lang.String id) { + public StopRoomEgressRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressResponse.java index e3036d24..266f03b2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/StopRoomEgressResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class StopRoomEgressResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public StopRoomEgressResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public StopRoomEgressResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/Task.java b/src/main/java/studio/livepeer/livepeer/models/operations/Task.java index c89f6173..a07632a8 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/Task.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/Task.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class Task { @JsonProperty("id") @@ -33,13 +30,14 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } public Task withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -68,7 +66,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -86,4 +84,3 @@ public Task build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequest.java index e843cb94..ee9db360 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class TerminateStreamRequest { /** @@ -39,7 +36,7 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the stream @@ -49,6 +46,7 @@ public TerminateStreamRequest withId(String id) { this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -77,7 +75,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -98,4 +96,3 @@ public TerminateStreamRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequestBuilder.java index 78e27258..99118228 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public TerminateStreamRequestBuilder(SDKMethodInterfaces.MethodCallTerminateStre this.sdk = sdk; } - public TerminateStreamRequestBuilder id(java.lang.String id) { + public TerminateStreamRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamResponse.java index 286cddcc..8793639a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/TerminateStreamResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class TerminateStreamResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public TerminateStreamResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public TerminateStreamResponse build() { } } } - 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 d762743e..101d42e5 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/TimeStep.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/TimeStep.java @@ -1,14 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** - * TimeStep - The time step to aggregate viewership metrics by + * TimeStep + * + * <p>The time step to aggregate viewership metrics by */ public enum TimeStep { HOUR("hour"), @@ -27,4 +30,14 @@ private TimeStep(String value) { public String value() { return value; } + + public static Optional<TimeStep> fromValue(String value) { + for (TimeStep o: TimeStep.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } + 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 7a25a676..da0a43ba 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/To.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/To.java @@ -1,13 +1,12 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Long; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -20,9 +19,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * To - End timestamp for the query range (exclusive) + * To + * + * <p>End timestamp for the query range (exclusive) */ - @JsonDeserialize(using = To._Deserializer.class) public class To { @@ -87,8 +87,8 @@ public static final class _Deserializer extends OneOfDeserializer<To> { public _Deserializer() { super(To.class, false, - TypeReferenceWithShape.of(new TypeReference<java.lang.Long>() {}, JsonShape.DEFAULT), - TypeReferenceWithShape.of(new TypeReference<java.time.OffsetDateTime>() {}, JsonShape.DEFAULT)); + TypeReferenceWithShape.of(new TypeReference<Long>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference<OffsetDateTime>() {}, JsonShape.DEFAULT)); } } @@ -99,3 +99,4 @@ public String toString() { } } + diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoRequestBuilder.java index c350c687..777bd9a1 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import studio.livepeer.livepeer.models.components.TranscodePayload; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public TranscodeVideoRequestBuilder(SDKMethodInterfaces.MethodCallTranscodeVideo this.sdk = sdk; } - public TranscodeVideoRequestBuilder request(studio.livepeer.livepeer.models.components.TranscodePayload request) { + public TranscodeVideoRequestBuilder request(TranscodePayload request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoResponse.java index cf5c29f8..65c0df12 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/TranscodeVideoResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Task; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class TranscodeVideoResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public TranscodeVideoResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends Task> task = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public TranscodeVideoResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequest.java index 317bfb2b..e9844bb9 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -14,7 +12,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class UpdateAssetRequest { /** @@ -51,7 +48,7 @@ public AssetPatchPayload assetPatchPayload() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the asset @@ -67,6 +64,7 @@ public UpdateAssetRequest withAssetPatchPayload(AssetPatchPayload assetPatchPayl this.assetPatchPayload = assetPatchPayload; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -100,7 +98,7 @@ public final static class Builder { private String assetId; - private AssetPatchPayload assetPatchPayload; + private AssetPatchPayload assetPatchPayload; private Builder() { // force use of static builder() method @@ -128,4 +126,3 @@ public UpdateAssetRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequestBuilder.java index d1a1997f..3d5fb2d2 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.models.components.AssetPatchPayload; import studio.livepeer.livepeer.utils.Utils; @@ -18,13 +18,13 @@ public UpdateAssetRequestBuilder(SDKMethodInterfaces.MethodCallUpdateAsset sdk) this.sdk = sdk; } - public UpdateAssetRequestBuilder assetId(java.lang.String assetId) { + public UpdateAssetRequestBuilder assetId(String assetId) { Utils.checkNotNull(assetId, "assetId"); this.assetId = assetId; return this; } - public UpdateAssetRequestBuilder assetPatchPayload(studio.livepeer.livepeer.models.components.AssetPatchPayload assetPatchPayload) { + public UpdateAssetRequestBuilder assetPatchPayload(AssetPatchPayload assetPatchPayload) { Utils.checkNotNull(assetPatchPayload, "assetPatchPayload"); this.assetPatchPayload = assetPatchPayload; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetResponse.java index fae20626..a7d50aee 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateAssetResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -16,11 +14,10 @@ import java.util.Objects; import java.util.Optional; import studio.livepeer.livepeer.models.components.Asset; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class UpdateAssetResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public UpdateAssetResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends Asset> asset = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public UpdateAssetResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequest.java index ef14cde1..8c65e675 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequest.java @@ -1,20 +1,17 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; import java.util.Objects; -import studio.livepeer.livepeer.models.components.MultistreamTargetPatchPayload; +import studio.livepeer.livepeer.models.components.MultistreamTargetInput; import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class UpdateMultistreamTargetRequest { /** @@ -24,16 +21,16 @@ public class UpdateMultistreamTargetRequest { private String id; @SpeakeasyMetadata("request:mediaType=application/json") - private MultistreamTargetPatchPayload multistreamTargetPatchPayload; + private MultistreamTargetInput multistreamTarget; @JsonCreator public UpdateMultistreamTargetRequest( String id, - MultistreamTargetPatchPayload multistreamTargetPatchPayload) { + MultistreamTargetInput multistreamTarget) { Utils.checkNotNull(id, "id"); - Utils.checkNotNull(multistreamTargetPatchPayload, "multistreamTargetPatchPayload"); + Utils.checkNotNull(multistreamTarget, "multistreamTarget"); this.id = id; - this.multistreamTargetPatchPayload = multistreamTargetPatchPayload; + this.multistreamTarget = multistreamTarget; } /** @@ -45,13 +42,13 @@ public String id() { } @JsonIgnore - public MultistreamTargetPatchPayload multistreamTargetPatchPayload() { - return multistreamTargetPatchPayload; + public MultistreamTargetInput multistreamTarget() { + return multistreamTarget; } public final static Builder builder() { return new Builder(); - } + } /** * ID of the multistream target @@ -62,11 +59,12 @@ public UpdateMultistreamTargetRequest withId(String id) { return this; } - public UpdateMultistreamTargetRequest withMultistreamTargetPatchPayload(MultistreamTargetPatchPayload multistreamTargetPatchPayload) { - Utils.checkNotNull(multistreamTargetPatchPayload, "multistreamTargetPatchPayload"); - this.multistreamTargetPatchPayload = multistreamTargetPatchPayload; + public UpdateMultistreamTargetRequest withMultistreamTarget(MultistreamTargetInput multistreamTarget) { + Utils.checkNotNull(multistreamTarget, "multistreamTarget"); + this.multistreamTarget = multistreamTarget; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -79,28 +77,28 @@ public boolean equals(java.lang.Object o) { UpdateMultistreamTargetRequest other = (UpdateMultistreamTargetRequest) o; return Objects.deepEquals(this.id, other.id) && - Objects.deepEquals(this.multistreamTargetPatchPayload, other.multistreamTargetPatchPayload); + Objects.deepEquals(this.multistreamTarget, other.multistreamTarget); } @Override public int hashCode() { return Objects.hash( id, - multistreamTargetPatchPayload); + multistreamTarget); } @Override public String toString() { return Utils.toString(UpdateMultistreamTargetRequest.class, "id", id, - "multistreamTargetPatchPayload", multistreamTargetPatchPayload); + "multistreamTarget", multistreamTarget); } public final static class Builder { private String id; - private MultistreamTargetPatchPayload multistreamTargetPatchPayload; + private MultistreamTargetInput multistreamTarget; private Builder() { // force use of static builder() method @@ -115,17 +113,16 @@ public Builder id(String id) { return this; } - public Builder multistreamTargetPatchPayload(MultistreamTargetPatchPayload multistreamTargetPatchPayload) { - Utils.checkNotNull(multistreamTargetPatchPayload, "multistreamTargetPatchPayload"); - this.multistreamTargetPatchPayload = multistreamTargetPatchPayload; + public Builder multistreamTarget(MultistreamTargetInput multistreamTarget) { + Utils.checkNotNull(multistreamTarget, "multistreamTarget"); + this.multistreamTarget = multistreamTarget; return this; } public UpdateMultistreamTargetRequest build() { return new UpdateMultistreamTargetRequest( id, - multistreamTargetPatchPayload); + multistreamTarget); } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequestBuilder.java index 7f734f05..b7c33a60 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetRequestBuilder.java @@ -1,32 +1,32 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; -import studio.livepeer.livepeer.models.components.MultistreamTargetPatchPayload; +import studio.livepeer.livepeer.models.components.MultistreamTargetInput; import studio.livepeer.livepeer.utils.Utils; public class UpdateMultistreamTargetRequestBuilder { private String id; - private MultistreamTargetPatchPayload multistreamTargetPatchPayload; + private MultistreamTargetInput multistreamTarget; private final SDKMethodInterfaces.MethodCallUpdateMultistreamTarget sdk; public UpdateMultistreamTargetRequestBuilder(SDKMethodInterfaces.MethodCallUpdateMultistreamTarget sdk) { this.sdk = sdk; } - public UpdateMultistreamTargetRequestBuilder id(java.lang.String id) { + public UpdateMultistreamTargetRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public UpdateMultistreamTargetRequestBuilder multistreamTargetPatchPayload(studio.livepeer.livepeer.models.components.MultistreamTargetPatchPayload multistreamTargetPatchPayload) { - Utils.checkNotNull(multistreamTargetPatchPayload, "multistreamTargetPatchPayload"); - this.multistreamTargetPatchPayload = multistreamTargetPatchPayload; + public UpdateMultistreamTargetRequestBuilder multistreamTarget(MultistreamTargetInput multistreamTarget) { + Utils.checkNotNull(multistreamTarget, "multistreamTarget"); + this.multistreamTarget = multistreamTarget; return this; } @@ -34,6 +34,6 @@ public UpdateMultistreamTargetResponse call() throws Exception { return sdk.update( id, - multistreamTargetPatchPayload); + multistreamTarget); } } diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetResponse.java index 583616d8..d187b46b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateMultistreamTargetResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class UpdateMultistreamTargetResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public UpdateMultistreamTargetResponse withError(Optional<? extends Error> error this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public UpdateMultistreamTargetResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequest.java index 79ab6f0a..3cefa66b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -14,7 +12,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class UpdateRoomUserRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -56,7 +53,7 @@ public RoomUserUpdatePayload roomUserUpdatePayload() { public final static Builder builder() { return new Builder(); - } + } public UpdateRoomUserRequest withId(String id) { Utils.checkNotNull(id, "id"); @@ -75,6 +72,7 @@ public UpdateRoomUserRequest withRoomUserUpdatePayload(RoomUserUpdatePayload roo this.roomUserUpdatePayload = roomUserUpdatePayload; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -113,7 +111,7 @@ public final static class Builder { private String userId; - private RoomUserUpdatePayload roomUserUpdatePayload; + private RoomUserUpdatePayload roomUserUpdatePayload; private Builder() { // force use of static builder() method @@ -145,4 +143,3 @@ public UpdateRoomUserRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequestBuilder.java index 8775e3e0..8139af9a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.models.components.RoomUserUpdatePayload; import studio.livepeer.livepeer.utils.Utils; @@ -19,19 +19,19 @@ public UpdateRoomUserRequestBuilder(SDKMethodInterfaces.MethodCallUpdateRoomUser this.sdk = sdk; } - public UpdateRoomUserRequestBuilder id(java.lang.String id) { + public UpdateRoomUserRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public UpdateRoomUserRequestBuilder userId(java.lang.String userId) { + public UpdateRoomUserRequestBuilder userId(String userId) { Utils.checkNotNull(userId, "userId"); this.userId = userId; return this; } - public UpdateRoomUserRequestBuilder roomUserUpdatePayload(studio.livepeer.livepeer.models.components.RoomUserUpdatePayload roomUserUpdatePayload) { + public UpdateRoomUserRequestBuilder roomUserUpdatePayload(RoomUserUpdatePayload roomUserUpdatePayload) { Utils.checkNotNull(roomUserUpdatePayload, "roomUserUpdatePayload"); this.roomUserUpdatePayload = roomUserUpdatePayload; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserResponse.java index 2a218528..d06cccec 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateRoomUserResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class UpdateRoomUserResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public UpdateRoomUserResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public UpdateRoomUserResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequest.java index f66e40f4..25fb1580 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -13,7 +11,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class UpdateSigningKeyRequest { /** @@ -50,7 +47,7 @@ public UpdateSigningKeyRequestBody requestBody() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the signing key @@ -66,6 +63,7 @@ public UpdateSigningKeyRequest withRequestBody(UpdateSigningKeyRequestBody reque this.requestBody = requestBody; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -99,7 +97,7 @@ public final static class Builder { private String keyId; - private UpdateSigningKeyRequestBody requestBody; + private UpdateSigningKeyRequestBody requestBody; private Builder() { // force use of static builder() method @@ -127,4 +125,3 @@ public UpdateSigningKeyRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBody.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBody.java index 43d6be2b..5bd44e2b 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBody.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBody.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -17,7 +15,6 @@ import java.util.Optional; import studio.livepeer.livepeer.utils.Utils; - public class UpdateSigningKeyRequestBody { @JsonInclude(Include.NON_ABSENT) @@ -54,7 +51,7 @@ public Optional<String> name() { public final static Builder builder() { return new Builder(); - } + } public UpdateSigningKeyRequestBody withDisabled(boolean disabled) { Utils.checkNotNull(disabled, "disabled"); @@ -79,6 +76,7 @@ public UpdateSigningKeyRequestBody withName(Optional<String> name) { this.name = name; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -112,7 +110,7 @@ public final static class Builder { private Optional<Boolean> disabled = Optional.empty(); - private Optional<String> name = Optional.empty(); + private Optional<String> name = Optional.empty(); private Builder() { // force use of static builder() method @@ -149,4 +147,3 @@ public UpdateSigningKeyRequestBody build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBuilder.java index 7b841c56..79662739 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.utils.Utils; @@ -17,13 +17,13 @@ public UpdateSigningKeyRequestBuilder(SDKMethodInterfaces.MethodCallUpdateSignin this.sdk = sdk; } - public UpdateSigningKeyRequestBuilder keyId(java.lang.String keyId) { + public UpdateSigningKeyRequestBuilder keyId(String keyId) { Utils.checkNotNull(keyId, "keyId"); this.keyId = keyId; return this; } - public UpdateSigningKeyRequestBuilder requestBody(studio.livepeer.livepeer.models.operations.UpdateSigningKeyRequestBody requestBody) { + public UpdateSigningKeyRequestBuilder requestBody(UpdateSigningKeyRequestBody requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyResponse.java index 36b502dd..c4cf57fc 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateSigningKeyResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class UpdateSigningKeyResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public UpdateSigningKeyResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public UpdateSigningKeyResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequest.java index 51e28e77..eb68fc17 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -14,7 +12,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class UpdateStreamRequest { /** @@ -51,7 +48,7 @@ public StreamPatchPayload streamPatchPayload() { public final static Builder builder() { return new Builder(); - } + } /** * ID of the stream @@ -67,6 +64,7 @@ public UpdateStreamRequest withStreamPatchPayload(StreamPatchPayload streamPatch this.streamPatchPayload = streamPatchPayload; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -100,7 +98,7 @@ public final static class Builder { private String id; - private StreamPatchPayload streamPatchPayload; + private StreamPatchPayload streamPatchPayload; private Builder() { // force use of static builder() method @@ -128,4 +126,3 @@ public UpdateStreamRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequestBuilder.java index 78844075..bb537133 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.models.components.StreamPatchPayload; import studio.livepeer.livepeer.utils.Utils; @@ -18,13 +18,13 @@ public UpdateStreamRequestBuilder(SDKMethodInterfaces.MethodCallUpdateStream sdk this.sdk = sdk; } - public UpdateStreamRequestBuilder id(java.lang.String id) { + public UpdateStreamRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public UpdateStreamRequestBuilder streamPatchPayload(studio.livepeer.livepeer.models.components.StreamPatchPayload streamPatchPayload) { + public UpdateStreamRequestBuilder streamPatchPayload(StreamPatchPayload streamPatchPayload) { Utils.checkNotNull(streamPatchPayload, "streamPatchPayload"); this.streamPatchPayload = streamPatchPayload; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamResponse.java index a2697f0e..c5ee738c 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateStreamResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class UpdateStreamResponse implements Response { /** @@ -100,7 +97,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -146,6 +143,7 @@ public UpdateStreamResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -189,7 +187,7 @@ public final static class Builder { private HttpResponse<InputStream> rawResponse; - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -249,4 +247,3 @@ public UpdateStreamResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequest.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequest.java index c14f2342..da1a8f60 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequest.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequest.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; @@ -14,7 +12,6 @@ import studio.livepeer.livepeer.utils.SpeakeasyMetadata; import studio.livepeer.livepeer.utils.Utils; - public class UpdateWebhookRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") @@ -45,7 +42,7 @@ public WebhookInput webhook() { public final static Builder builder() { return new Builder(); - } + } public UpdateWebhookRequest withId(String id) { Utils.checkNotNull(id, "id"); @@ -58,6 +55,7 @@ public UpdateWebhookRequest withWebhook(WebhookInput webhook) { this.webhook = webhook; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -91,7 +89,7 @@ public final static class Builder { private String id; - private WebhookInput webhook; + private WebhookInput webhook; private Builder() { // force use of static builder() method @@ -116,4 +114,3 @@ public UpdateWebhookRequest build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequestBuilder.java index 5ee1a061..05b343b1 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import java.lang.String; import studio.livepeer.livepeer.models.components.WebhookInput; import studio.livepeer.livepeer.utils.Utils; @@ -18,13 +18,13 @@ public UpdateWebhookRequestBuilder(SDKMethodInterfaces.MethodCallUpdateWebhook s this.sdk = sdk; } - public UpdateWebhookRequestBuilder id(java.lang.String id) { + public UpdateWebhookRequestBuilder id(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } - public UpdateWebhookRequestBuilder webhook(studio.livepeer.livepeer.models.components.WebhookInput webhook) { + public UpdateWebhookRequestBuilder webhook(WebhookInput webhook) { Utils.checkNotNull(webhook, "webhook"); this.webhook = webhook; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookResponse.java index 7bdaa178..4143f9bc 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UpdateWebhookResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,12 +13,11 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.models.components.Webhook; -import studio.livepeer.livepeer.models.errors.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class UpdateWebhookResponse implements Response { /** @@ -118,7 +115,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -182,6 +179,7 @@ public UpdateWebhookResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -230,7 +228,7 @@ public final static class Builder { private Optional<? extends Webhook> webhook = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -309,4 +307,3 @@ public UpdateWebhookResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetAssetTask.java b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetAssetTask.java index 9533f383..c7683d43 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetAssetTask.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetAssetTask.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class UploadAssetAssetTask { @JsonProperty("id") @@ -33,13 +30,14 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } public UploadAssetAssetTask withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -68,7 +66,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -86,4 +84,3 @@ public UploadAssetAssetTask build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetData.java b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetData.java index 2e21400f..85cc8c4a 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetData.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetData.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,9 +13,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * UploadAssetData - Upload in progress + * UploadAssetData + * + * <p>Upload in progress */ - public class UploadAssetData { @JsonProperty("asset") @@ -48,7 +47,7 @@ public UploadAssetTask task() { public final static Builder builder() { return new Builder(); - } + } public UploadAssetData withAsset(Asset asset) { Utils.checkNotNull(asset, "asset"); @@ -61,6 +60,7 @@ public UploadAssetData withTask(UploadAssetTask task) { this.task = task; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -94,7 +94,7 @@ public final static class Builder { private Asset asset; - private UploadAssetTask task; + private UploadAssetTask task; private Builder() { // force use of static builder() method @@ -119,4 +119,3 @@ public UploadAssetData build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetDataOutput.java b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetDataOutput.java index 958c46a3..3923bc44 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetDataOutput.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetDataOutput.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,9 +13,10 @@ import studio.livepeer.livepeer.utils.Utils; /** - * UploadAssetDataOutput - Upload started + * UploadAssetDataOutput + * + * <p>Upload started */ - public class UploadAssetDataOutput { @JsonProperty("asset") @@ -48,7 +47,7 @@ public UploadAssetAssetTask task() { public final static Builder builder() { return new Builder(); - } + } public UploadAssetDataOutput withAsset(Asset asset) { Utils.checkNotNull(asset, "asset"); @@ -61,6 +60,7 @@ public UploadAssetDataOutput withTask(UploadAssetAssetTask task) { this.task = task; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -94,7 +94,7 @@ public final static class Builder { private Asset asset; - private UploadAssetAssetTask task; + private UploadAssetAssetTask task; private Builder() { // force use of static builder() method @@ -119,4 +119,3 @@ public UploadAssetDataOutput build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetRequestBuilder.java b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetRequestBuilder.java index c32ae049..deaed330 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetRequestBuilder.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetRequestBuilder.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; +import java.lang.Exception; import studio.livepeer.livepeer.models.components.NewAssetFromUrlPayload; import studio.livepeer.livepeer.utils.Utils; @@ -16,7 +16,7 @@ public UploadAssetRequestBuilder(SDKMethodInterfaces.MethodCallUploadAsset sdk) this.sdk = sdk; } - public UploadAssetRequestBuilder request(studio.livepeer.livepeer.models.components.NewAssetFromUrlPayload request) { + public UploadAssetRequestBuilder request(NewAssetFromUrlPayload request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetResponse.java b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetResponse.java index a02e51db..79536849 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetResponse.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetResponse.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.InputStream; @@ -15,11 +13,10 @@ import java.net.http.HttpResponse; import java.util.Objects; import java.util.Optional; -import studio.livepeer.livepeer.models.errors.Error; +import studio.livepeer.livepeer.models.components.Error; import studio.livepeer.livepeer.utils.Response; import studio.livepeer.livepeer.utils.Utils; - public class UploadAssetResponse implements Response { /** @@ -134,7 +131,7 @@ public Optional<Error> error() { public final static Builder builder() { return new Builder(); - } + } /** * HTTP response content type for this operation @@ -216,6 +213,7 @@ public UploadAssetResponse withError(Optional<? extends Error> error) { this.error = error; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -269,7 +267,7 @@ public final static class Builder { private Optional<? extends UploadAssetDataOutput> twoHundredAndOneApplicationJsonData = Optional.empty(); - private Optional<? extends Error> error = Optional.empty(); + private Optional<? extends Error> error = Optional.empty(); private Builder() { // force use of static builder() method @@ -367,4 +365,3 @@ public UploadAssetResponse build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetTask.java b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetTask.java index 2fd86b39..d52bf905 100644 --- a/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetTask.java +++ b/src/main/java/studio/livepeer/livepeer/models/operations/UploadAssetTask.java @@ -1,10 +1,8 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.models.operations; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,7 +11,6 @@ import java.util.Objects; import studio.livepeer.livepeer.utils.Utils; - public class UploadAssetTask { @JsonProperty("id") @@ -33,13 +30,14 @@ public String id() { public final static Builder builder() { return new Builder(); - } + } public UploadAssetTask withId(String id) { Utils.checkNotNull(id, "id"); this.id = id; return this; } + @Override public boolean equals(java.lang.Object o) { @@ -68,7 +66,7 @@ public String toString() { public final static class Builder { - private String id; + private String id; private Builder() { // force use of static builder() method @@ -86,4 +84,3 @@ public UploadAssetTask build() { } } } - diff --git a/src/main/java/studio/livepeer/livepeer/utils/BackoffStrategy.java b/src/main/java/studio/livepeer/livepeer/utils/BackoffStrategy.java index 428b34a8..7a59bd5d 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/BackoffStrategy.java +++ b/src/main/java/studio/livepeer/livepeer/utils/BackoffStrategy.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.util.concurrent.TimeUnit; diff --git a/src/main/java/studio/livepeer/livepeer/utils/BigDecimalString.java b/src/main/java/studio/livepeer/livepeer/utils/BigDecimalString.java index e84308cf..cb7a3054 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/BigDecimalString.java +++ b/src/main/java/studio/livepeer/livepeer/utils/BigDecimalString.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.IOException; @@ -24,8 +23,8 @@ // Note that Jackson 2.16.1 does not support @JsonValue and @JsonFormat combined so we must use // a custom serializer/deserializer -@JsonSerialize(using = BigDecimalString.BigDecimalStringSerializer.class) -@JsonDeserialize(using = BigDecimalString.BigDecimalStringDeserializer.class) +@JsonSerialize(using = BigDecimalString.Serializer.class) +@JsonDeserialize(using = BigDecimalString.Deserializer.class) public class BigDecimalString { private final BigDecimal value; @@ -64,16 +63,11 @@ public boolean equals(Object obj) { return Objects.equals(value, other.value); } - public static final class BigDecimalStringSerializer extends StdSerializer<BigDecimalString> { - - private static final long serialVersionUID = -3828937716095008071L; - - public BigDecimalStringSerializer() { - this(null); - } + @SuppressWarnings("serial") + public static final class Serializer extends StdSerializer<BigDecimalString> { - public BigDecimalStringSerializer(Class<BigDecimalString> t) { - super(t); + protected Serializer() { + super(BigDecimalString.class); } @Override @@ -83,16 +77,11 @@ public void serialize(BigDecimalString value, JsonGenerator g, SerializerProvide } } - public static final class BigDecimalStringDeserializer extends StdDeserializer<BigDecimalString> { - - private static final long serialVersionUID = -2474225842945673085L; - - public BigDecimalStringDeserializer() { - this(null); - } + @SuppressWarnings("serial") + public static final class Deserializer extends StdDeserializer<BigDecimalString> { - public BigDecimalStringDeserializer(Class<BigDecimalString> t) { - super(t); + protected Deserializer() { + super(BigDecimalString.class); } @Override diff --git a/src/main/java/studio/livepeer/livepeer/utils/BigIntegerString.java b/src/main/java/studio/livepeer/livepeer/utils/BigIntegerString.java index e608e26b..6ddf5fb6 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/BigIntegerString.java +++ b/src/main/java/studio/livepeer/livepeer/utils/BigIntegerString.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.IOException; @@ -24,8 +23,8 @@ // Note that Jackson 2.16.1 does not support @JsonValue and @JsonFormat combined so we must use // a custom serializer/deserializer -@JsonSerialize(using = BigIntegerString.BigIntegerStringSerializer.class) -@JsonDeserialize(using = BigIntegerString.BigIntegerStringDeserializer.class) +@JsonSerialize(using = BigIntegerString.Serializer.class) +@JsonDeserialize(using = BigIntegerString.Deserializer.class) public class BigIntegerString { private final BigInteger value; @@ -64,16 +63,11 @@ public boolean equals(Object obj) { return Objects.equals(value, other.value); } - public static final class BigIntegerStringSerializer extends StdSerializer<BigIntegerString> { - - private static final long serialVersionUID = -2474225842945673085L; - - public BigIntegerStringSerializer() { - this(null); - } + @SuppressWarnings("serial") + public static final class Serializer extends StdSerializer<BigIntegerString> { - public BigIntegerStringSerializer(Class<BigIntegerString> t) { - super(t); + protected Serializer() { + super(BigIntegerString.class); } @Override @@ -83,16 +77,11 @@ public void serialize(BigIntegerString value, JsonGenerator g, SerializerProvide } } - public static final class BigIntegerStringDeserializer extends StdDeserializer<BigIntegerString> { - - private static final long serialVersionUID = -2474225842945673085L; - - public BigIntegerStringDeserializer() { - this(null); - } + @SuppressWarnings("serial") + public static final class Deserializer extends StdDeserializer<BigIntegerString> { - public BigIntegerStringDeserializer(Class<BigIntegerString> t) { - super(t); + protected Deserializer() { + super(BigIntegerString.class); } @Override diff --git a/src/main/java/studio/livepeer/livepeer/utils/Constants.java b/src/main/java/studio/livepeer/livepeer/utils/Constants.java new file mode 100644 index 00000000..6059ab37 --- /dev/null +++ b/src/main/java/studio/livepeer/livepeer/utils/Constants.java @@ -0,0 +1,10 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package studio.livepeer.livepeer.utils; + +public final class Constants { + + public static final boolean HAS_CLIENT_CREDENTIALS_BASIC = false; + +} \ No newline at end of file diff --git a/src/main/java/studio/livepeer/livepeer/utils/Deserializers.java b/src/main/java/studio/livepeer/livepeer/utils/Deserializers.java index a1b7b76e..a4970eb8 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/Deserializers.java +++ b/src/main/java/studio/livepeer/livepeer/utils/Deserializers.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.IOException; diff --git a/src/main/java/studio/livepeer/livepeer/utils/EventStream.java b/src/main/java/studio/livepeer/livepeer/utils/EventStream.java index dd68b0ee..cbac6f52 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/EventStream.java +++ b/src/main/java/studio/livepeer/livepeer/utils/EventStream.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.IOException; @@ -33,12 +32,14 @@ public final class EventStream<T> implements AutoCloseable { private final EventStreamReader reader; private final TypeReference<T> typeReference; private final ObjectMapper mapper; + private final Optional<String> terminalMessage; // Internal use only - public EventStream(InputStream in, TypeReference<T> typeReference, ObjectMapper mapper) { + public EventStream(InputStream in, TypeReference<T> typeReference, ObjectMapper mapper, Optional<String> terminalMessage) { this.reader = new EventStreamReader(in); this.typeReference = typeReference; this.mapper = mapper; + this.terminalMessage = terminalMessage; } /** @@ -50,6 +51,7 @@ public EventStream(InputStream in, TypeReference<T> typeReference, ObjectMapper */ public Optional<T> next() throws IOException { return reader.readMessage() // + .filter(x -> !terminalMessage.isPresent() || !terminalMessage.get().equals(x.data())) // .map(x -> Utils.asType(x, mapper, typeReference)); } @@ -124,3 +126,4 @@ public void close() throws Exception { } } + diff --git a/src/main/java/studio/livepeer/livepeer/utils/EventStreamLineReader.java b/src/main/java/studio/livepeer/livepeer/utils/EventStreamLineReader.java index bec5001e..af53689c 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/EventStreamLineReader.java +++ b/src/main/java/studio/livepeer/livepeer/utils/EventStreamLineReader.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.IOException; diff --git a/src/main/java/studio/livepeer/livepeer/utils/EventStreamMessage.java b/src/main/java/studio/livepeer/livepeer/utils/EventStreamMessage.java index d41339c2..d3afe3d6 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/EventStreamMessage.java +++ b/src/main/java/studio/livepeer/livepeer/utils/EventStreamMessage.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.util.Optional; diff --git a/src/main/java/studio/livepeer/livepeer/utils/EventStreamReader.java b/src/main/java/studio/livepeer/livepeer/utils/EventStreamReader.java index 4f946507..2a93da4a 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/EventStreamReader.java +++ b/src/main/java/studio/livepeer/livepeer/utils/EventStreamReader.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.BufferedReader; diff --git a/src/main/java/studio/livepeer/livepeer/utils/FormMetadata.java b/src/main/java/studio/livepeer/livepeer/utils/FormMetadata.java index 8e338146..55e43354 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/FormMetadata.java +++ b/src/main/java/studio/livepeer/livepeer/utils/FormMetadata.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.lang.reflect.Field; diff --git a/src/main/java/studio/livepeer/livepeer/utils/HTTPClient.java b/src/main/java/studio/livepeer/livepeer/utils/HTTPClient.java index 9519f0a0..ffd64c8f 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/HTTPClient.java +++ b/src/main/java/studio/livepeer/livepeer/utils/HTTPClient.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.IOException; diff --git a/src/main/java/studio/livepeer/livepeer/utils/HTTPRequest.java b/src/main/java/studio/livepeer/livepeer/utils/HTTPRequest.java index fbb8a4f9..d1afcbad 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/HTTPRequest.java +++ b/src/main/java/studio/livepeer/livepeer/utils/HTTPRequest.java @@ -1,9 +1,9 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; +import java.net.URI; import java.net.URISyntaxException; import java.net.http.HttpRequest; import java.net.http.HttpRequest.BodyPublisher; @@ -15,15 +15,15 @@ import java.util.Map; import java.util.Optional; -import org.apache.http.NameValuePair; -import org.apache.http.client.utils.URIBuilder; -import org.apache.http.message.BasicNameValuePair; - public class HTTPRequest { + private static final String FRAGMENT_SEGMENT_START = "#"; + private static final String QUERY_NAME_VALUE_DELIMITER = "="; + private static final String QUERY_PARAMETER_DELIMITER = "&"; + private static final String QUERY_SEGMENT_START = "?"; private final String baseURL; private final String method; - private final List<NameValuePair> queryParams = new ArrayList<>(); + private final List<QueryParameter> queryParams = new ArrayList<>(); private final Map<String, List<String>> headers = new HashMap<>(); private Optional<SerializedBody> body = Optional.empty(); // mutable @@ -45,7 +45,9 @@ public HTTPRequest addHeader(String key, String value) { headerValues = new ArrayList<>(); headers.put(key, headerValues); } - headerValues.add(value); + if (!headerValues.contains(value)) { + headerValues.add(value); + } return this; } @@ -54,21 +56,21 @@ public HTTPRequest addHeaders(Map<String, List<String>> map) { return this; } - public HTTPRequest addQueryParam(String name, String value) { - addQueryParam(new BasicNameValuePair(name, value)); + public HTTPRequest addQueryParam(QueryParameter param) { + this.queryParams.add(param); return this; } - - public HTTPRequest addQueryParam(NameValuePair param) { - this.queryParams.add(param); + + public HTTPRequest addQueryParam(String key, String value, boolean allowReserved) { + this.queryParams.add(QueryParameter.of(key, value, allowReserved)); return this; } - public HTTPRequest addQueryParams(Collection<NameValuePair> params) { + public HTTPRequest addQueryParams(Collection<QueryParameter> params) { params.forEach(p -> addQueryParam(p)); return this; } - + public HttpRequest build() { HttpRequest.Builder requestBuilder = HttpRequest.newBuilder(); @@ -81,14 +83,49 @@ public HttpRequest build() { } requestBuilder.method(method, bodyPublisher); try { - URIBuilder b = new URIBuilder(this.baseURL); - queryParams.forEach(pair -> b.addParameter(pair.getName(), pair.getValue())); - requestBuilder.uri(b.build()); + requestBuilder.uri(new URI(buildUrl(baseURL, queryParams))); } catch (URISyntaxException e) { throw new RuntimeException(e); } headers.forEach((k, list) -> list.forEach(v -> requestBuilder.header(k, v))); return requestBuilder.build(); } - + + // VisibleForTesting + public static String buildUrl(String baseURL, Collection<QueryParameter> queryParams) { + if (queryParams.isEmpty()) { + return baseURL; + } else { + final String base; + final String fragment; + int i = baseURL.indexOf(FRAGMENT_SEGMENT_START); + if (i == -1) { + base = baseURL; + fragment = ""; + } else { + base = baseURL.substring(0, i); + fragment = baseURL.substring(i); + } + StringBuilder b = new StringBuilder(base); + if (!base.contains(QUERY_SEGMENT_START)) { + b.append(QUERY_SEGMENT_START); + } else { + b.append(QUERY_PARAMETER_DELIMITER); + } + boolean first = true; + for (QueryParameter p : queryParams) { + if (!first) { + b.append(QUERY_PARAMETER_DELIMITER); + } + first = false; + // don't allow reserved characters to be unencoded in key (??) + b.append(Utf8UrlEncoder.DEFAULT.encode(p.name())); + b.append(QUERY_NAME_VALUE_DELIMITER); + b.append(Utf8UrlEncoder.allowReserved(p.allowReserved()).encode(p.value())); + } + b.append(fragment); + return b.toString(); + } + } + } \ No newline at end of file diff --git a/src/main/java/studio/livepeer/livepeer/utils/HasSecurity.java b/src/main/java/studio/livepeer/livepeer/utils/HasSecurity.java new file mode 100644 index 00000000..5d44e567 --- /dev/null +++ b/src/main/java/studio/livepeer/livepeer/utils/HasSecurity.java @@ -0,0 +1,10 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package studio.livepeer.livepeer.utils; + +/** + * Implemented by classes that have security annotations on fields. + **/ +public interface HasSecurity { +} \ No newline at end of file diff --git a/src/main/java/studio/livepeer/livepeer/utils/HeaderMetadata.java b/src/main/java/studio/livepeer/livepeer/utils/HeaderMetadata.java index 86533683..9c621df5 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/HeaderMetadata.java +++ b/src/main/java/studio/livepeer/livepeer/utils/HeaderMetadata.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.lang.reflect.Field; diff --git a/src/main/java/studio/livepeer/livepeer/utils/Helpers.java b/src/main/java/studio/livepeer/livepeer/utils/Helpers.java index eed73a45..0e210eb1 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/Helpers.java +++ b/src/main/java/studio/livepeer/livepeer/utils/Helpers.java @@ -1,10 +1,16 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; +import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.net.http.HttpRequest; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Flow; +import java.util.concurrent.TimeUnit; import java.util.function.BiPredicate; /** @@ -45,4 +51,77 @@ public static HttpRequest.Builder copy(HttpRequest request) { public static HttpRequest.Builder copy(HttpRequest request, BiPredicate<String, String> filter) { return Utils.copy(request, filter); } + + + /** + * Returns the request body as a byte array. + * + * @param request http request to extract from + * @return byte array + */ + public static byte[] bodyBytes(HttpRequest request) { + return request.bodyPublisher() // + .map(p -> { + ByteBufferSubscriber sub = new ByteBufferSubscriber(); + p.subscribe(sub); + return sub.bytes(); + }).orElse(new byte[] {}); + } + + /** + * Returns the request body as a String assuming that the bytes of the request + * body are encoded with UTF-8. + * + * @param request http request to extract from + * @return request body as a String + */ + public static String bodyUtf8(HttpRequest request) { + return new String(bodyBytes(request), StandardCharsets.UTF_8); + } + + private static final class ByteBufferSubscriber implements Flow.Subscriber<ByteBuffer> { + + private final ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + private final CountDownLatch latch = new CountDownLatch(1); + + @Override + public void onSubscribe(Flow.Subscription subscription) { + // Retrieve all parts + subscription.request(Long.MAX_VALUE); + } + + @Override + public void onNext(ByteBuffer bb) { + byte[] buffer = new byte[bb.remaining()]; + bb.get(buffer); + try { + bytes.write(buffer); + } catch (IOException e) { + onError(e); + } + } + + @Override + public void onError(Throwable throwable) { + latch.countDown(); + Utils.rethrow(throwable); + } + + @Override + public void onComplete() { + latch.countDown(); + } + + public byte[] bytes() { + try { + if (!latch.await(30, TimeUnit.SECONDS)) { + throw new RuntimeException("timed out waiting for next byte array"); + } + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + return bytes.toByteArray(); + } + } + } diff --git a/src/main/java/studio/livepeer/livepeer/utils/Hook.java b/src/main/java/studio/livepeer/livepeer/utils/Hook.java index 40de3cac..3768e124 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/Hook.java +++ b/src/main/java/studio/livepeer/livepeer/utils/Hook.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.InputStream; @@ -27,6 +26,7 @@ private Hook() { * Context for a hook call. */ public interface HookContext { + String baseUrl(); String operationId(); Optional<List<String>> oauthScopes(); Optional<SecuritySource> securitySource(); @@ -40,16 +40,23 @@ public interface BeforeRequestContext extends HookContext { public static final class BeforeRequestContextImpl implements BeforeRequestContext { + private final String baseUrl; private final String operationId; private final Optional<List<String>> oauthScopes; private final Optional<SecuritySource> securitySource; - public BeforeRequestContextImpl(String operationId, Optional<List<String>> oauthScopes, Optional<SecuritySource> securitySource) { + public BeforeRequestContextImpl(String baseUrl, String operationId, Optional<List<String>> oauthScopes, Optional<SecuritySource> securitySource) { + this.baseUrl = baseUrl; this.operationId = operationId; this.oauthScopes = oauthScopes; this.securitySource = securitySource; } + @Override + public String baseUrl() { + return baseUrl; + } + @Override public String operationId() { return operationId; @@ -74,17 +81,24 @@ public interface AfterSuccessContext extends HookContext { public static final class AfterSuccessContextImpl implements AfterSuccessContext { + private final String baseUrl; private final String operationId; private final Optional<List<String>> oauthScopes; private final Optional<SecuritySource> securitySource; - public AfterSuccessContextImpl(String operationId, Optional<List<String>> oauthScopes, Optional<SecuritySource> securitySource) { + public AfterSuccessContextImpl(String baseUrl, String operationId, Optional<List<String>> oauthScopes, Optional<SecuritySource> securitySource) { Utils.checkNotNull(securitySource, "securitySource"); + this.baseUrl = baseUrl; this.operationId = operationId; this.oauthScopes = oauthScopes; this.securitySource = securitySource; } + @Override + public String baseUrl() { + return baseUrl; + } + @Override public String operationId() { return operationId; @@ -109,16 +123,23 @@ public interface AfterErrorContext extends HookContext { public static final class AfterErrorContextImpl implements AfterErrorContext { + private final String baseUrl; private final String operationId; private final Optional<List<String>> oauthScopes; private final Optional<SecuritySource> securitySource; - public AfterErrorContextImpl(String operationId, Optional<List<String>> oauthScopes, Optional<SecuritySource> securitySource) { + public AfterErrorContextImpl(String baseUrl, String operationId, Optional<List<String>> oauthScopes, Optional<SecuritySource> securitySource) { Utils.checkNotNull(securitySource, "securitySource"); + this.baseUrl = baseUrl; this.operationId = operationId; this.oauthScopes = oauthScopes; this.securitySource = securitySource; } + + @Override + public String baseUrl() { + return baseUrl; + } @Override public String operationId() { @@ -145,7 +166,7 @@ public interface BeforeRequest { * Transforms the given {@link HttpRequest} before sending. * * <p>Note that {@link HttpRequest} is immutable. To modify the request you can use - * {@link HttpRequest#newBuilder(HttpRequest, BiPredicate<String, String>)} with + * {@code HttpRequest#newBuilder(HttpRequest, BiPredicate<String, String>)} with * JDK 16 and later (which will copy the request for modification in a builder). * If that method is not available then use {@link Helpers#copy} (which also returns * a builder). diff --git a/src/main/java/studio/livepeer/livepeer/utils/Hooks.java b/src/main/java/studio/livepeer/livepeer/utils/Hooks.java index 90102616..d73d3140 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/Hooks.java +++ b/src/main/java/studio/livepeer/livepeer/utils/Hooks.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.InputStream; diff --git a/src/main/java/studio/livepeer/livepeer/utils/JSON.java b/src/main/java/studio/livepeer/livepeer/utils/JSON.java index 6d297cf3..b6bc099e 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/JSON.java +++ b/src/main/java/studio/livepeer/livepeer/utils/JSON.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import org.openapitools.jackson.nullable.JsonNullableModule; diff --git a/src/main/java/studio/livepeer/livepeer/utils/LazySingletonValue.java b/src/main/java/studio/livepeer/livepeer/utils/LazySingletonValue.java index 81a09d21..cabc4ae0 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/LazySingletonValue.java +++ b/src/main/java/studio/livepeer/livepeer/utils/LazySingletonValue.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import com.fasterxml.jackson.core.type.TypeReference; diff --git a/src/main/java/studio/livepeer/livepeer/utils/Metadata.java b/src/main/java/studio/livepeer/livepeer/utils/Metadata.java index 2d16cbb4..cd0eb961 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/Metadata.java +++ b/src/main/java/studio/livepeer/livepeer/utils/Metadata.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.lang.reflect.Field; diff --git a/src/main/java/studio/livepeer/livepeer/utils/Multipart.java b/src/main/java/studio/livepeer/livepeer/utils/Multipart.java new file mode 100644 index 00000000..92ba7e83 --- /dev/null +++ b/src/main/java/studio/livepeer/livepeer/utils/Multipart.java @@ -0,0 +1,209 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package studio.livepeer.livepeer.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.net.http.HttpRequest; +import java.net.http.HttpRequest.BodyPublisher; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.Optional; +import java.util.UUID; +import java.util.function.Supplier; + +public final class Multipart { + + private final static String DASHES = "--"; + private static final String APPLICATION_OCTET_STREAM = "application/octet-stream"; + + private final BodyPublisher bodyPublisher; + private final String boundary; + + private Multipart(BodyPublisher bodyPublisher, String boundary) { + this.bodyPublisher = bodyPublisher; + this.boundary = boundary; + } + + public BodyPublisher bodyPublisher() { + return bodyPublisher; + } + + public String contentType() { + return "multipart/form-data; charset=" + StandardCharsets.ISO_8859_1.name() + "; boundary=" + boundary; + } + + public static Builder builder() { + return new Builder(); + } + + public static final class Builder { + + private final List<Part> parts = new ArrayList<>(); + private final String boundary = UUID.randomUUID().toString(); + + public Builder addPart(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + Part p = new Part(); + p.type = PartType.STRING; + p.name = name; + p.value = value; + parts.add(p); + return this; + } + + public Builder addPart(String name, String value, String contentType) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + Utils.checkNotNull(contentType, "contentType"); + Part p = new Part(); + p.type = PartType.STRING; + p.name = name; + p.value = value; + p.contentType = contentType; + parts.add(p); + return this; + } + + public Builder addPart(String name, Supplier<InputStream> stream, String filename, + Optional<String> contentType) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(stream, "stream"); + Utils.checkNotNull(filename, "filename"); + Utils.checkNotNull(contentType, "contentType"); + Part p = new Part(); + p.type = PartType.STREAM; + p.name = name; + p.stream = stream; + p.filename = filename; + p.contentType = contentType.orElse(null); + parts.add(p); + return this; + } + + private void addFinalBoundaryPart() { + Part p = new Part(); + p.type = PartType.FINAL_BOUNDARY; + p.value = DASHES + boundary + DASHES; + parts.add(p); + } + + public Multipart build() { + if (parts.size() == 0) { + throw new IllegalStateException("Must have at least one part to build multipart message."); + } + addFinalBoundaryPart(); + BodyPublisher bp = HttpRequest.BodyPublishers.ofByteArrays( // + () -> new PartsIterator(parts, boundary)); + return new Multipart(bp, boundary); + } + } + + public enum PartType { + STRING, STREAM, FINAL_BOUNDARY + } + + static final class Part { + + // type is the only mandatory field. Not keen on + // a whole bunch of nullable fields but not public api + // so will forego the noise of chained builders and + // Optional use + + PartType type; + String name; + String value; + Supplier<InputStream> stream; + String filename; + String contentType; + + } + + private static final class PartsIterator implements Iterator<byte[]> { + + private final Iterator<Part> iter; + private final String boundary; + + private InputStream currentFileInput; + private boolean done; + private byte[] next; + + PartsIterator(List<Part> parts, String boundary) { + this.iter = parts.iterator(); + this.boundary = boundary; + } + + @Override + public boolean hasNext() { + if (done) + return false; + if (next != null) + return true; + try { + next = computeNext(); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + if (next == null) { + done = true; + return false; + } + return true; + } + + @Override + public byte[] next() { + if (!hasNext()) + throw new NoSuchElementException(); + byte[] res = next; + next = null; + return res; + } + + private byte[] computeNext() throws IOException { + if (currentFileInput == null) { + if (!iter.hasNext()) + return null; + Part nextPart = iter.next(); + if (PartType.STRING.equals(nextPart.type)) { + String part = DASHES + boundary + "\r\n" + "Content-Disposition: form-data; name=" + nextPart.name + + "\r\n" + "Content-Type: text/plain; charset=UTF-8\r\n\r\n" + nextPart.value + "\r\n"; + return part.getBytes(StandardCharsets.UTF_8); + } else if (PartType.FINAL_BOUNDARY.equals(nextPart.type)) { + return nextPart.value.getBytes(StandardCharsets.UTF_8); + } else { + String filename = nextPart.filename; + String contentType = nextPart.contentType; + if (contentType == null) { + contentType = APPLICATION_OCTET_STREAM; + } + currentFileInput = nextPart.stream.get(); + String partHeader = DASHES + boundary + "\r\n" + "Content-Disposition: form-data; name=" + + nextPart.name + "; filename=" + filename + "\r\n" + "Content-Type: " + contentType + + "\r\n\r\n"; + return partHeader.getBytes(StandardCharsets.UTF_8); + } + } else { + byte[] buf = new byte[8192]; + int r = currentFileInput.read(buf); + if (r > 0) { + byte[] actualBytes = new byte[r]; + System.arraycopy(buf, 0, actualBytes, 0, r); + return actualBytes; + } else { + currentFileInput.close(); + currentFileInput = null; + return "\r\n".getBytes(StandardCharsets.UTF_8); + } + } + } + } +} diff --git a/src/main/java/studio/livepeer/livepeer/utils/MultipartFormMetadata.java b/src/main/java/studio/livepeer/livepeer/utils/MultipartFormMetadata.java index 3af23dbd..d6d2f3ca 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/MultipartFormMetadata.java +++ b/src/main/java/studio/livepeer/livepeer/utils/MultipartFormMetadata.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.lang.reflect.Field; diff --git a/src/main/java/studio/livepeer/livepeer/utils/NameValue.java b/src/main/java/studio/livepeer/livepeer/utils/NameValue.java new file mode 100644 index 00000000..989bb87a --- /dev/null +++ b/src/main/java/studio/livepeer/livepeer/utils/NameValue.java @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package studio.livepeer.livepeer.utils; + +final class NameValue { + private final String name; + private final String value; + + NameValue(String name, String value) { + this.name = name; + this.value = value; + } + + String name() { + return name; + } + + String value() { + return value; + } +} \ No newline at end of file diff --git a/src/main/java/studio/livepeer/livepeer/utils/OneOfDeserializer.java b/src/main/java/studio/livepeer/livepeer/utils/OneOfDeserializer.java index 9b6ab687..4b1da6c2 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/OneOfDeserializer.java +++ b/src/main/java/studio/livepeer/livepeer/utils/OneOfDeserializer.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.IOException; @@ -35,7 +34,7 @@ public class OneOfDeserializer<T> extends StdDeserializer<T> { private static final long serialVersionUID = -1; - private final List<TypeReferenceWithShape> typeReferences; // oneOf subschemas + private final transient List<TypeReferenceWithShape> typeReferences; // oneOf subschemas private final Class<T> cls; private final boolean strict; private final ObjectMapper mapper; diff --git a/src/main/java/studio/livepeer/livepeer/utils/Options.java b/src/main/java/studio/livepeer/livepeer/utils/Options.java index 5cf3cc8d..099dafe5 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/Options.java +++ b/src/main/java/studio/livepeer/livepeer/utils/Options.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.util.Optional; @@ -13,14 +12,14 @@ public enum Option { RETRY_CONFIG; } - private Optional<studio.livepeer.livepeer.utils.RetryConfig> retryConfig = Optional.empty(); + private Optional<RetryConfig> retryConfig = Optional.empty(); - private Options(Optional<studio.livepeer.livepeer.utils.RetryConfig> retryConfig) { + private Options(Optional<RetryConfig> retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; } - public Optional<studio.livepeer.livepeer.utils.RetryConfig> retryConfig() { + public Optional<RetryConfig> retryConfig() { return retryConfig; } @@ -36,17 +35,17 @@ public final static Builder builder() { public final static class Builder { - private Optional<studio.livepeer.livepeer.utils.RetryConfig> retryConfig = Optional.empty(); + private Optional<RetryConfig> retryConfig = Optional.empty(); private Builder() {} - public Builder retryConfig(studio.livepeer.livepeer.utils.RetryConfig retryConfig) throws IllegalArgumentException { + public Builder retryConfig(RetryConfig retryConfig) throws IllegalArgumentException { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public Builder retryConfig(Optional<studio.livepeer.livepeer.utils.RetryConfig> retryConfig) throws IllegalArgumentException { + public Builder retryConfig(Optional<RetryConfig> retryConfig) throws IllegalArgumentException { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/src/main/java/studio/livepeer/livepeer/utils/PathParamsMetadata.java b/src/main/java/studio/livepeer/livepeer/utils/PathParamsMetadata.java index 909a1a75..8da51454 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/PathParamsMetadata.java +++ b/src/main/java/studio/livepeer/livepeer/utils/PathParamsMetadata.java @@ -1,22 +1,23 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.lang.reflect.Field; class PathParamsMetadata { + // these fields set via reflection + String style = "simple"; boolean explode; String name; String serialization; + boolean allowReserved; private PathParamsMetadata() { } - // pathParam:style=simple,explode=false,name=apiID static PathParamsMetadata parse(Field field) throws IllegalArgumentException, IllegalAccessException { return Metadata.parse("pathParam", new PathParamsMetadata(), field); } diff --git a/src/main/java/studio/livepeer/livepeer/utils/QueryEncoding.java b/src/main/java/studio/livepeer/livepeer/utils/QueryEncoding.java new file mode 100644 index 00000000..8f670e3c --- /dev/null +++ b/src/main/java/studio/livepeer/livepeer/utils/QueryEncoding.java @@ -0,0 +1,95 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package studio.livepeer.livepeer.utils; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.BitSet; + +final class QueryEncoding { + + private static final int RADIX = 16; + private static final char QUERY_PARAM_SEPARATOR = '&'; + private static final char PARAM_VALUE_SEPARATOR = '='; + + + ///////////////////////////////// + // Query Encoding + ///////////////////////////////// + + private static final BitSet UNRESERVED = new BitSet(256); + + static { + for (int i = 'a'; i <= 'z'; i++) { + UNRESERVED.set(i); + } + for (int i = 'A'; i <= 'Z'; i++) { + UNRESERVED.set(i); + } + // numeric characters + for (int i = '0'; i <= '9'; i++) { + UNRESERVED.set(i); + } + UNRESERVED.set('-'); + UNRESERVED.set('.'); + UNRESERVED.set('_'); + UNRESERVED.set('~'); + } + + /** + * Returns the encoded query string from the given parameters. + * + * @param parameters query parameters + * @param charset charset to apply for percent encoding + * @param blankAsPlus set to true to encode a blank as a plus character + * @return encoded query string + */ + static String formatQuery(final Iterable<? extends NameValue> parameters, + final Charset charset, final boolean blankAsPlus) { + StringBuilder buf = new StringBuilder(); + int i = 0; + for (final NameValue parameter : parameters) { + if (i > 0) { + buf.append(QUERY_PARAM_SEPARATOR); + } + percentEncode(buf, parameter.name(), charset, blankAsPlus); + if (parameter.value() != null) { + buf.append(PARAM_VALUE_SEPARATOR); + percentEncode(buf, parameter.value(), charset, blankAsPlus); + } + i++; + } + return buf.toString(); + } + + private static void percentEncode(final StringBuilder buf, final CharSequence content, final Charset charset, + final boolean blankAsPlus) { + percentEncode(buf, content, charset, UNRESERVED, blankAsPlus); + } + + private static void percentEncode(final StringBuilder buf, final CharSequence content, final Charset charset, + final BitSet safechars, final boolean blankAsPlus) { + if (content == null) { + return; + } + final CharBuffer cb = CharBuffer.wrap(content); + final ByteBuffer bb = (charset != null ? charset : StandardCharsets.UTF_8).encode(cb); + while (bb.hasRemaining()) { + final int b = bb.get() & 0xff; + if (safechars.get(b)) { + buf.append((char) b); + } else if (blankAsPlus && b == ' ') { + buf.append("+"); + } else { + buf.append("%"); + final char hex1 = Character.toUpperCase(Character.forDigit((b >> 4) & 0xF, RADIX)); + final char hex2 = Character.toUpperCase(Character.forDigit(b & 0xF, RADIX)); + buf.append(hex1); + buf.append(hex2); + } + } + } +} diff --git a/src/main/java/studio/livepeer/livepeer/utils/QueryParameter.java b/src/main/java/studio/livepeer/livepeer/utils/QueryParameter.java new file mode 100644 index 00000000..01dfe7bb --- /dev/null +++ b/src/main/java/studio/livepeer/livepeer/utils/QueryParameter.java @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package studio.livepeer.livepeer.utils; + +import java.util.Objects; + +// internal class, not for public use +// TODO move to internal package +public final class QueryParameter { + + private final String name; + private final String value; + private final boolean allowReserved; + + private QueryParameter(String name, String value, boolean allowReserved) { + this.name = name; + this.value = value; + this.allowReserved = allowReserved; + } + + public static QueryParameter of(String name, String value, boolean allowReserved) { + return new QueryParameter(name, value, allowReserved); + } + + public String name() { + return name; + } + + public String value() { + return value; + } + + public boolean allowReserved() { + return allowReserved; + } + + @Override + public String toString() { + return "QueryParameter [name=" + name + ", value=" + value + ", allowReserved=" + allowReserved + "]"; + } + + @Override + public int hashCode() { + return Objects.hash(allowReserved, name, value); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + QueryParameter other = (QueryParameter) obj; + return allowReserved == other.allowReserved && Objects.equals(name, other.name) + && Objects.equals(value, other.value); + } + +} diff --git a/src/main/java/studio/livepeer/livepeer/utils/QueryParameters.java b/src/main/java/studio/livepeer/livepeer/utils/QueryParameters.java index 0f617bc1..d0bb6c84 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/QueryParameters.java +++ b/src/main/java/studio/livepeer/livepeer/utils/QueryParameters.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.lang.reflect.Field; @@ -11,16 +10,13 @@ import java.util.Map; import java.util.stream.Collectors; -import org.apache.http.NameValuePair; -import org.apache.http.message.BasicNameValuePair; - import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; public class QueryParameters { - public static <T extends Object> List<NameValuePair> parseQueryParams(Class<T> type, T queryParams, + public static <T extends Object> List<QueryParameter> parseQueryParams(Class<T> type, T queryParams, Map<String, Map<String, Map<String, Object>>> globals) throws Exception { - List<NameValuePair> allParams = new ArrayList<>(); + List<QueryParameter> allParams = new ArrayList<>(); Field[] fields = type.getDeclaredFields(); @@ -45,22 +41,24 @@ public static <T extends Object> List<NameValuePair> parseQueryParams(Class<T> t } if (queryParamsMetadata.serialization != null && !queryParamsMetadata.serialization.isBlank()) { - List<NameValuePair> params = parseSerializedParams(queryParamsMetadata, value); + List<QueryParameter> params = parseSerializedParams(queryParamsMetadata, value); allParams.addAll(params); } else { switch (queryParamsMetadata.style) { case "form": - List<NameValuePair> formParams = parseDelimitedParams(queryParamsMetadata, value, ","); + List<QueryParameter> formParams = parseDelimitedParams(queryParamsMetadata, value, ","); allParams.addAll(formParams); break; case "deepObject": - List<NameValuePair> deepObjectParams = parseDeepObjectParams(queryParamsMetadata, value); + List<QueryParameter> deepObjectParams = parseDeepObjectParams(queryParamsMetadata, value); allParams.addAll(deepObjectParams); break; case "pipeDelimited": - List<NameValuePair> pipeDelimitedParams = parseDelimitedParams(queryParamsMetadata, value, "|"); + List<QueryParameter> pipeDelimitedParams = parseDelimitedParams(queryParamsMetadata, value, "|"); allParams.addAll(pipeDelimitedParams); break; + default: + break; } } } @@ -68,25 +66,24 @@ public static <T extends Object> List<NameValuePair> parseQueryParams(Class<T> t return allParams; } - private static List<NameValuePair> parseSerializedParams(QueryParamsMetadata queryParamsMetadata, Object value) + private static List<QueryParameter> parseSerializedParams(QueryParamsMetadata queryParamsMetadata, Object value) throws JsonProcessingException { - List<NameValuePair> params = new ArrayList<>(); - + List<QueryParameter> params = new ArrayList<>(); switch (queryParamsMetadata.serialization) { case "json": ObjectMapper mapper = JSON.getMapper(); String json = mapper.writeValueAsString(value); - - params.add(new BasicNameValuePair(queryParamsMetadata.name, json)); + params.add(QueryParameter.of(queryParamsMetadata.name, json, queryParamsMetadata.allowReserved)); + break; + default: break; } - return params; } - private static List<NameValuePair> parseDelimitedParams(QueryParamsMetadata queryParamsMetadata, Object value, String delimiter) + private static List<QueryParameter> parseDelimitedParams(QueryParamsMetadata queryParamsMetadata, Object value, String delimiter) throws IllegalArgumentException, IllegalAccessException { - List<NameValuePair> params = new ArrayList<>(); + List<QueryParameter> params = new ArrayList<>(); switch (Types.getType(value.getClass())) { case ARRAY: { @@ -106,7 +103,7 @@ private static List<NameValuePair> parseDelimitedParams(QueryParamsMetadata quer values.add(String.join(delimiter, items)); } - params.addAll(values.stream().map(v -> new BasicNameValuePair(queryParamsMetadata.name, v)) + params.addAll(values.stream().map(v -> QueryParameter.of(queryParamsMetadata.name, v, queryParamsMetadata.allowReserved)) .collect(Collectors.toList())); break; } @@ -120,20 +117,20 @@ private static List<NameValuePair> parseDelimitedParams(QueryParamsMetadata quer String val = Utils.valToString(entry.getValue()); if (queryParamsMetadata.explode) { - params.add(new BasicNameValuePair(key, val)); + params.add(QueryParameter.of(key, val, queryParamsMetadata.allowReserved)); } else { items.add(String.format("%s%s%s", key, delimiter, val)); } } if (items.size() > 0) { - params.add(new BasicNameValuePair(queryParamsMetadata.name, String.join(delimiter, items))); + params.add(QueryParameter.of(queryParamsMetadata.name, String.join(delimiter, items), queryParamsMetadata.allowReserved)); } break; } case OBJECT: { if (!Utils.allowIntrospection(value.getClass())) { - params.add(new BasicNameValuePair(queryParamsMetadata.name, Utils.valToString(value))); + params.add(QueryParameter.of(queryParamsMetadata.name, Utils.valToString(value), queryParamsMetadata.allowReserved)); break; } Field[] fields = value.getClass().getDeclaredFields(); @@ -154,29 +151,29 @@ private static List<NameValuePair> parseDelimitedParams(QueryParamsMetadata quer } if (queryParamsMetadata.explode) { - params.add(new BasicNameValuePair(metadata.name, Utils.valToString(val))); + params.add(QueryParameter.of(metadata.name, Utils.valToString(val), metadata.allowReserved)); } else { items.add(String.format("%s%s%s", metadata.name, delimiter, Utils.valToString(val))); } } if (items.size() > 0) { - params.add(new BasicNameValuePair(queryParamsMetadata.name, String.join(delimiter, items))); + params.add(QueryParameter.of(queryParamsMetadata.name, String.join(delimiter, items), queryParamsMetadata.allowReserved)); } break; } default: - params.add(new BasicNameValuePair(queryParamsMetadata.name, Utils.valToString(value))); + params.add(QueryParameter.of(queryParamsMetadata.name, Utils.valToString(value), queryParamsMetadata.allowReserved)); break; } return params; } - private static List<NameValuePair> parseDeepObjectParams(QueryParamsMetadata queryParamsMetadata, Object value) + private static List<QueryParameter> parseDeepObjectParams(QueryParamsMetadata queryParamsMetadata, Object value) throws Exception { - List<NameValuePair> params = new ArrayList<>(); + List<QueryParameter> params = new ArrayList<>(); switch (Types.getType(value.getClass())) { case MAP: { @@ -188,12 +185,12 @@ private static List<NameValuePair> parseDeepObjectParams(QueryParamsMetadata que if (val instanceof List || val.getClass().isArray()) { for (Object v : Utils.toList(val)) { - params.add(new BasicNameValuePair(String.format("%s[%s]", queryParamsMetadata.name, key), - Utils.valToString(v))); + params.add(QueryParameter.of(String.format("%s[%s]", queryParamsMetadata.name, key), + Utils.valToString(v), queryParamsMetadata.allowReserved)); } } else { - params.add(new BasicNameValuePair(String.format("%s[%s]", queryParamsMetadata.name, key), - Utils.valToString(val))); + params.add(QueryParameter.of(String.format("%s[%s]", queryParamsMetadata.name, key), + Utils.valToString(val), queryParamsMetadata.allowReserved)); } } @@ -220,14 +217,14 @@ private static List<NameValuePair> parseDeepObjectParams(QueryParamsMetadata que if (val instanceof List || val.getClass().isArray()) { for (Object v : Utils.toList(val)) { - params.add(new BasicNameValuePair( + params.add(QueryParameter.of( String.format("%s[%s]", queryParamsMetadata.name, metadata.name), - Utils.valToString(v))); + Utils.valToString(v), metadata.allowReserved)); } } else { params.add( - new BasicNameValuePair(String.format("%s[%s]", queryParamsMetadata.name, metadata.name), - Utils.valToString(val))); + QueryParameter.of(String.format("%s[%s]", queryParamsMetadata.name, metadata.name), + Utils.valToString(val), metadata.allowReserved)); } } diff --git a/src/main/java/studio/livepeer/livepeer/utils/QueryParamsMetadata.java b/src/main/java/studio/livepeer/livepeer/utils/QueryParamsMetadata.java index 43c33f95..c49c95fa 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/QueryParamsMetadata.java +++ b/src/main/java/studio/livepeer/livepeer/utils/QueryParamsMetadata.java @@ -1,19 +1,20 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.lang.reflect.Field; class QueryParamsMetadata { + // these parameters set via reflection + String style = "form"; boolean explode = true; String name; String serialization; + boolean allowReserved; - // queryParam:style=simple,explode=false,name=apiID static QueryParamsMetadata parse(Field field) throws IllegalArgumentException, IllegalAccessException { return Metadata.parse("queryParam", new QueryParamsMetadata(), field); } diff --git a/src/main/java/studio/livepeer/livepeer/utils/RecordingClient.java b/src/main/java/studio/livepeer/livepeer/utils/RecordingClient.java new file mode 100644 index 00000000..98531d28 --- /dev/null +++ b/src/main/java/studio/livepeer/livepeer/utils/RecordingClient.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package studio.livepeer.livepeer.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URISyntaxException; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.function.UnaryOperator; + +// internal testing use +public final class RecordingClient implements HTTPClient { + + private final List<HttpRequest> requests = new CopyOnWriteArrayList<>(); + private final HTTPClient client; + private final List<UnaryOperator<HttpRequest>> beforeRequestHooks = new ArrayList<>(); + private final List<UnaryOperator<HttpResponse<InputStream>>> afterResponseHooks = new ArrayList<>(); + + public RecordingClient() { + this.client = new SpeakeasyHTTPClient(); + } + + @Override + public HttpResponse<InputStream> send(HttpRequest request) + throws IOException, InterruptedException, URISyntaxException { + for (var hook : beforeRequestHooks) { + request = hook.apply(request); + } + requests.add(request); + var response = client.send(request); + for (var hook: afterResponseHooks) { + response = hook.apply(response); + } + return response; + } + + public List<HttpRequest> requests() { + return requests; + } + + public RecordingClient beforeRequest(UnaryOperator<HttpRequest> hook) { + beforeRequestHooks.add(hook); + return this; + } + + public RecordingClient afterResponse(UnaryOperator<HttpResponse<InputStream>> hook) { + afterResponseHooks.add(hook); + return this; + } + + public void reset() { + requests.clear(); + } + +} \ No newline at end of file diff --git a/src/main/java/studio/livepeer/livepeer/utils/RequestBody.java b/src/main/java/studio/livepeer/livepeer/utils/RequestBody.java index b80dc5cf..1e9b3978 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/RequestBody.java +++ b/src/main/java/studio/livepeer/livepeer/utils/RequestBody.java @@ -1,51 +1,40 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; +import java.io.ByteArrayInputStream; import java.io.IOException; -import java.io.UncheckedIOException; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.net.http.HttpRequest.BodyPublishers; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.regex.Pattern; import java.util.Optional; - -import org.apache.http.HttpEntity; -import org.apache.http.NameValuePair; -import org.apache.http.client.entity.UrlEncodedFormEntity; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.mime.HttpMultipartMode; -import org.apache.http.entity.mime.MultipartEntityBuilder; -import org.apache.http.message.BasicNameValuePair; +import java.util.regex.Pattern; import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.databind.ObjectMapper; public final class RequestBody { - private static final Map<String, String> SERIALIZATION_METHOD_TO_CONTENT_TYPE = Map.of( - "json", "application/json", - "form", "application/x-www-form-urlencoded", - "multipart", "multipart/form-data", - "raw", "application/octet-stream", - "string", "text/plain"); + private static final Map<String, String> SERIALIZATION_METHOD_TO_CONTENT_TYPE = Map.of("json", "application/json", + "form", "application/x-www-form-urlencoded", "multipart", "multipart/form-data", "raw", + "application/octet-stream", "string", "text/plain"); private RequestBody() { // prevent instantiation } - public static SerializedBody serialize(Object request, String requestField, String serializationMethod, boolean nullable) - throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException, + public static SerializedBody serialize(Object request, String requestField, String serializationMethod, + boolean nullable) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException, UnsupportedOperationException, IOException { if (request == null) { return null; } - + if (!nullable && (request instanceof Optional) && ((Optional<?>) request).isEmpty()) { request = JsonNullable.undefined(); } @@ -98,8 +87,7 @@ private static SerializedBody serializeContentType(String fieldName, String cont if (value instanceof JsonNullable && !((JsonNullable<?>) value).isPresent()) { body = new SerializedBody(contentType, BodyPublishers.noBody()); } else { - body = new SerializedBody(contentType, - BodyPublishers.ofString(mapper.writeValueAsString(value))); + body = new SerializedBody(contentType, BodyPublishers.ofString(mapper.writeValueAsString(value))); } } else if (multipartPattern.matcher(contentType).matches()) { body = serializeMultipart(value); @@ -119,10 +107,7 @@ private static SerializedBody serializeContentType(String fieldName, String cont private static SerializedBody serializeMultipart(Object value) throws IllegalArgumentException, IllegalAccessException, UnsupportedOperationException, IOException { - MultipartEntityBuilder builder = MultipartEntityBuilder.create(); - builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); - String boundary = "-------------" + System.currentTimeMillis(); - builder.setBoundary(boundary); + Multipart.Builder builder = Multipart.builder(); Field[] fields = value.getClass().getDeclaredFields(); @@ -132,7 +117,7 @@ private static SerializedBody serializeMultipart(Object value) continue; } Object val = Utils.resolveOptionals(field.get(value)); - + if (val == null) { continue; } @@ -143,41 +128,33 @@ private static SerializedBody serializeMultipart(Object value) } if (metadata.file) { - serializeMultipartFile(builder, val); + serializeMultipartFile(metadata.name, builder, val); } else if (metadata.json) { ObjectMapper mapper = JSON.getMapper(); String json = mapper.writeValueAsString(val); - builder.addTextBody(metadata.name, json, ContentType.APPLICATION_JSON); + builder.addPart(metadata.name, json, "application/json"); } else { if (val instanceof List || val.getClass().isArray()) { List<?> arr = Utils.toList(val); for (Object item : arr) { - builder.addTextBody(metadata.name + "[]", Utils.valToString(item)); + builder.addPart(metadata.name + "[]", Utils.valToString(item)); } } else { - builder.addTextBody(metadata.name, Utils.valToString(val)); + builder.addPart(metadata.name, Utils.valToString(val)); } } } - HttpEntity entity = builder.build(); - String ct = builder.build().getContentType().getValue(); - return new SerializedBody(ct, BodyPublishers.ofInputStream(() -> { - try { - return entity.getContent(); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - })); + Multipart m = builder.build(); + return new SerializedBody(m.contentType(), m.bodyPublisher()); } - private static void serializeMultipartFile(MultipartEntityBuilder builder, Object file) + private static void serializeMultipartFile(String fieldName, Multipart.Builder builder, Object file) throws IllegalArgumentException, IllegalAccessException { if (Types.getType(file.getClass()) != Types.OBJECT) { throw new RuntimeException("Invalid type for multipart file"); } - String fieldName = ""; String fileName = ""; byte[] content = null; @@ -199,153 +176,147 @@ private static void serializeMultipartFile(MultipartEntityBuilder builder, Objec if (metadata.content) { content = (byte[]) val; } else { - fieldName = metadata.name; fileName = Utils.valToString(val); } } - if (fieldName.isBlank() || fileName.isBlank() || content == null) { + if (fileName.isBlank() || content == null) { throw new RuntimeException("Invalid multipart file"); } - - builder.addBinaryBody(fieldName, content, ContentType.APPLICATION_OCTET_STREAM, fileName); + byte[] cont = content; + builder.addPart(fieldName, () -> new ByteArrayInputStream(cont), fileName, + Optional.of("application/octet-stream")); } public static SerializedBody serializeFormData(Object value) throws IOException, IllegalArgumentException, IllegalAccessException { - List<NameValuePair> params = new ArrayList<>(); + List<NameValue> params = new ArrayList<>(); switch (Types.getType(value.getClass())) { - case MAP: - Map<?, ?> map = (Map<?, ?>) value; + case MAP: + Map<?, ?> map = (Map<?, ?>) value; - for (Map.Entry<?, ?> entry : map.entrySet()) { - params.add( - new BasicNameValuePair(Utils.valToString(entry.getKey()), - Utils.valToString(entry.getValue()))); + for (Map.Entry<?, ?> entry : map.entrySet()) { + params.add( + new NameValue(Utils.valToString(entry.getKey()), Utils.valToString(entry.getValue()))); + } + break; + case OBJECT: + if (!Utils.allowIntrospection(value.getClass())) { + throw new RuntimeException("Invalid type for form data"); + } + Field[] fields = value.getClass().getDeclaredFields(); + + for (Field field : fields) { + field.setAccessible(true); + Object val = Utils.resolveOptionals(field.get(value)); + + if (val == null) { + continue; } - break; - case OBJECT: - if (!Utils.allowIntrospection(value.getClass())) { - throw new RuntimeException("Invalid type for form data"); + + FormMetadata metadata = FormMetadata.parse(field); + if (metadata == null) { + continue; } - Field[] fields = value.getClass().getDeclaredFields(); - - for (Field field : fields) { - field.setAccessible(true); - Object val = Utils.resolveOptionals(field.get(value)); - - if (val == null) { - continue; - } - FormMetadata metadata = FormMetadata.parse(field); - if (metadata == null) { - continue; - } + if (metadata.json) { + ObjectMapper mapper = JSON.getMapper(); + String json = mapper.writeValueAsString(val); + params.add(new NameValue(metadata.name, json)); + } else { + switch (Types.getType(val.getClass())) { + case OBJECT: { + if (!Utils.allowIntrospection(val.getClass())) { + params.add(new NameValue(metadata.name, String.valueOf(val))); + } else { - if (metadata.json) { - ObjectMapper mapper = JSON.getMapper(); - String json = mapper.writeValueAsString(val); - params.add(new BasicNameValuePair(metadata.name, json)); - } else { - switch (Types.getType(val.getClass())) { - case OBJECT: { - if (!Utils.allowIntrospection(val.getClass())) { - params.add(new BasicNameValuePair(metadata.name, String.valueOf(val))); - } else { + Field[] valFields = val.getClass().getDeclaredFields(); - Field[] valFields = val.getClass().getDeclaredFields(); - - List<String> items = new ArrayList<>(); - - for (Field valField : valFields) { - valField.setAccessible(true); - Object v = Utils.resolveOptionals(valField.get(val)); - if (v == null) { - continue; - } - - FormMetadata valMetadata = FormMetadata.parse(valField); - if (valMetadata == null) { - continue; - } - - if (metadata.explode) { - params.add(new BasicNameValuePair(valMetadata.name, - Utils.valToString(v))); - } else { - items.add(String.format("%s,%s", valMetadata.name, - Utils.valToString(v))); - } - } - - if (items.size() > 0) { - params.add(new BasicNameValuePair(metadata.name, String.join(",", items))); - } + List<String> items = new ArrayList<>(); + + for (Field valField : valFields) { + valField.setAccessible(true); + Object v = Utils.resolveOptionals(valField.get(val)); + if (v == null) { + continue; } - break; - } - case MAP: { - Map<?, ?> valMap = (Map<?, ?>) val; - - List<String> items = new ArrayList<>(); - - for (Map.Entry<?, ?> entry : valMap.entrySet()) { - if (metadata.explode) { - params.add(new BasicNameValuePair(Utils.valToString(entry.getKey()), - Utils.valToString(entry.getValue()))); - } else { - items.add(String.format("%s,%s", entry.getKey(), entry.getValue())); - } + + FormMetadata valMetadata = FormMetadata.parse(valField); + if (valMetadata == null) { + continue; } - if (items.size() > 0) { - params.add(new BasicNameValuePair(metadata.name, String.join(",", items))); + if (metadata.explode) { + params.add(new NameValue(valMetadata.name, Utils.valToString(v))); + } else { + items.add(String.format("%s,%s", valMetadata.name, Utils.valToString(v))); } + } - break; + if (items.size() > 0) { + params.add(new NameValue(metadata.name, String.join(",", items))); } - case ARRAY: { - final List<?> array = Utils.toList(val); + } + break; + } + case MAP: { + Map<?, ?> valMap = (Map<?, ?>) val; - List<String> items = new ArrayList<>(); + List<String> items = new ArrayList<>(); - for (Object item : array) { - if (metadata.explode) { - params.add(new BasicNameValuePair(metadata.name, Utils.valToString(item))); - } else { - items.add(Utils.valToString(item)); - } - } + for (Map.Entry<?, ?> entry : valMap.entrySet()) { + if (metadata.explode) { + params.add(new NameValue(Utils.valToString(entry.getKey()), + Utils.valToString(entry.getValue()))); + } else { + items.add(String.format("%s,%s", entry.getKey(), entry.getValue())); + } + } - if (items.size() > 0) { - params.add(new BasicNameValuePair(metadata.name, String.join(",", items))); - } + if (items.size() > 0) { + params.add(new NameValue(metadata.name, String.join(",", items))); + } - break; + break; + } + case ARRAY: { + final List<?> array = Utils.toList(val); + + List<String> items = new ArrayList<>(); + + for (Object item : array) { + if (metadata.explode) { + params.add(new NameValue(metadata.name, Utils.valToString(item))); + } else { + items.add(Utils.valToString(item)); } - default: - params.add(new BasicNameValuePair(metadata.name, Utils.valToString(val))); - break; } + + if (items.size() > 0) { + params.add(new NameValue(metadata.name, String.join(",", items))); + } + + break; + } + default: + params.add(new NameValue(metadata.name, Utils.valToString(val))); + break; } } - break; - default: - throw new RuntimeException("Invalid type for form data"); + } + break; + default: + throw new RuntimeException("Invalid type for form data"); } - UrlEncodedFormEntity entity = new UrlEncodedFormEntity(params); - String ct = entity.getContentType().getValue(); // ensure that a fresh open input stream is provided every time - // by the BodyPublisher - return new SerializedBody(ct, BodyPublishers.ofInputStream(() -> { - try { - return entity.getContent(); - } catch (IOException e) { - throw new UncheckedIOException(e); - } + // by the BodyPublisher + String contentType = "application/x-www-form-urlencoded; charset=ISO-8859-1"; + return new SerializedBody(contentType, BodyPublishers.ofInputStream(() -> { + String query = QueryEncoding.formatQuery(params, StandardCharsets.ISO_8859_1, true); + return new ByteArrayInputStream(query.getBytes(StandardCharsets.ISO_8859_1)); })); } -} \ No newline at end of file + +} diff --git a/src/main/java/studio/livepeer/livepeer/utils/RequestMetadata.java b/src/main/java/studio/livepeer/livepeer/utils/RequestMetadata.java index b2ff2961..8c1eb03c 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/RequestMetadata.java +++ b/src/main/java/studio/livepeer/livepeer/utils/RequestMetadata.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.lang.reflect.Field; diff --git a/src/main/java/studio/livepeer/livepeer/utils/Response.java b/src/main/java/studio/livepeer/livepeer/utils/Response.java index e7aa9ade..095fd4f6 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/Response.java +++ b/src/main/java/studio/livepeer/livepeer/utils/Response.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.InputStream; diff --git a/src/main/java/studio/livepeer/livepeer/utils/Retries.java b/src/main/java/studio/livepeer/livepeer/utils/Retries.java index a62808ec..3da71a61 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/Retries.java +++ b/src/main/java/studio/livepeer/livepeer/utils/Retries.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.IOException; diff --git a/src/main/java/studio/livepeer/livepeer/utils/RetryConfig.java b/src/main/java/studio/livepeer/livepeer/utils/RetryConfig.java index c04f43ed..c720c8ce 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/RetryConfig.java +++ b/src/main/java/studio/livepeer/livepeer/utils/RetryConfig.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.util.Optional; diff --git a/src/main/java/studio/livepeer/livepeer/utils/Security.java b/src/main/java/studio/livepeer/livepeer/utils/Security.java index d0e314de..b4432342 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/Security.java +++ b/src/main/java/studio/livepeer/livepeer/utils/Security.java @@ -1,11 +1,21 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.lang.reflect.Field; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; import java.util.Base64; +import java.util.Deque; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; public final class Security { @@ -107,7 +117,7 @@ private static void parseSecuritySchemeValue(HTTPRequest request, SecurityMetada break; case "query": request.addQueryParam( - securityMetadata.name, Utils.valToString(value)); + securityMetadata.name, Utils.valToString(value), false); break; case "cookie": request.addHeader("Cookie", @@ -115,26 +125,32 @@ private static void parseSecuritySchemeValue(HTTPRequest request, SecurityMetada break; default: throw new RuntimeException( - "Unsupported security scheme subtype for apiKey: " + securityMetadata.subtype); + "Unsupported apiKey security scheme subtype: " + securityMetadata.subtype); } break; case "openIdConnect": request.addHeader(securityMetadata.name, Utils.prefixBearer(Utils.valToString(value))); break; case "oauth2": - request.addHeader(securityMetadata.name, Utils.prefixBearer(Utils.valToString(value))); + if (!"client_credentials".equals(schemeMetadata.subtype)) { + request.addHeader(securityMetadata.name, Utils.prefixBearer(Utils.valToString(value))); + } break; case "http": switch (schemeMetadata.subtype) { case "bearer": request.addHeader(securityMetadata.name, Utils.prefixBearer(Utils.valToString(value))); break; + case "custom": + // customers are expected to consume the security object and transform requests + // in their own BeforeRequest hook. + break; default: - throw new RuntimeException("Unsupported security scheme subtype for bearer"); + throw new RuntimeException("Unsupported http security scheme subtype: " + schemeMetadata.subtype); } break; default: - throw new RuntimeException("Unsupported security scheme type"); + throw new RuntimeException("Unsupported security scheme type: " + schemeMetadata.subtype); } } @@ -171,6 +187,117 @@ private static void parseBasicAuthScheme(HTTPRequest requestBuilder, Object sche } requestBuilder.addHeader("Authorization", - "Basic " + Base64.getEncoder().encodeToString(String.format("%s:%s", username, password).getBytes())); + "Basic " + + Base64.getEncoder() + .encodeToString(String.format("%s:%s", username, password) + .getBytes(StandardCharsets.UTF_8))); + } + + public static Optional<Object> findComplexObjectWithNonEmptyAnnotatedField(Object object, String... regexes) { + if (object == null || object instanceof String) { + return Optional.empty(); + } + Deque<Object> stack = new LinkedList<>(); + // be defensive about circular references (not expected) + Set<Object> processed = new HashSet<>(); + stack.push(object); + processed.add(object); + while (!stack.isEmpty()) { + Object o = stack.pop(); + Field[] fields = o.getClass().getDeclaredFields(); + List<Field> annotatedFields = Arrays.stream(fields) // + .filter(f -> { + SpeakeasyMetadata[] anns = f.getDeclaredAnnotationsByType(SpeakeasyMetadata.class); + return anns != null && anns.length > 0; + }) // + .collect(Collectors.toList()); + for (Field f : annotatedFields) { + SpeakeasyMetadata[] anns = f.getDeclaredAnnotationsByType(SpeakeasyMetadata.class); + Object value = getUnwrappedFieldValue(o, f); + if (value != null && !(value instanceof String)) { + // we are looking for a complex object (so can't be a String) + boolean regexMatches = Arrays // + .stream(regexes) // + .allMatch(regex -> matches(anns, regex)); + if (regexMatches) { + return Optional.of(value); + } else if (!processed.contains(value)) { + stack.push(value); + processed.add(value); + } + } + } + } + return Optional.empty(); + } + + private static Object getUnwrappedFieldValue(Object o, Field f) { + try { + f.setAccessible(true); + Object value = f.get(o); + if (value != null && value instanceof Optional) { + return ((Optional<?>) value).orElse(null); + } else { + return value; + } + } catch (IllegalArgumentException | IllegalAccessException e) { + throw new RuntimeException(e); + } + } + + public static Stream<Field> findFieldsWhereMetadataContainsRegexes(Object o, String... regexes) { + Field[] fields = o.getClass().getDeclaredFields(); + return Arrays.stream(fields) // + .filter(f -> { + SpeakeasyMetadata[] anns = f.getDeclaredAnnotationsByType(SpeakeasyMetadata.class); + if (anns == null) { + return false; + } + return Arrays // + .stream(regexes) // + .allMatch(regex -> matches(anns, regex)); + }); + } + + public static Optional<String> findStringValueWhereMetadataContainsRegexes(Object o, String... regexes) { + return findValueWhereMetadataContainsRegexes(o, regexes).map(x -> (String) x); + } + + public static Optional<String> findStringValueWhereMetadataNameIs(Object o, String name) { + return Security.findStringValueWhereMetadataContainsRegexes(o, "\\bname=" + name + "\\b"); + } + + public static Optional<Object> findValueWhereMetadataContainsRegexes(Object o, String... regexes) { + return findFieldsWhereMetadataContainsRegexes(o, regexes) + .flatMap(f -> { + f.setAccessible(true); + Object result; + try { + result = f.get(o); + } catch (IllegalArgumentException | IllegalAccessException e) { + throw new RuntimeException(e); + } + if (result instanceof Optional) { + @SuppressWarnings("unchecked") + Optional<Object> r = (Optional<Object>) result; + if (r.isEmpty()) { + return Stream.empty(); + } else { + return Stream.of(r.get()); + } + } else { + return Stream.of(result); + } + }).findAny(); + } + + private static boolean matches(SpeakeasyMetadata[] anns, String regex) { + Pattern pattern = Pattern.compile(regex); + for (SpeakeasyMetadata ann : anns) { + if (pattern.matcher(ann.value()).find()) { + return true; + } + } + return false; } -} \ No newline at end of file +} diff --git a/src/main/java/studio/livepeer/livepeer/utils/SecurityMetadata.java b/src/main/java/studio/livepeer/livepeer/utils/SecurityMetadata.java index 9c878ae5..ca306173 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/SecurityMetadata.java +++ b/src/main/java/studio/livepeer/livepeer/utils/SecurityMetadata.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.lang.reflect.Field; diff --git a/src/main/java/studio/livepeer/livepeer/utils/SerializedBody.java b/src/main/java/studio/livepeer/livepeer/utils/SerializedBody.java index 976837da..d6a5eb3f 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/SerializedBody.java +++ b/src/main/java/studio/livepeer/livepeer/utils/SerializedBody.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.net.http.HttpRequest.BodyPublisher; diff --git a/src/main/java/studio/livepeer/livepeer/utils/SessionManager.java b/src/main/java/studio/livepeer/livepeer/utils/SessionManager.java new file mode 100644 index 00000000..9ca45e7a --- /dev/null +++ b/src/main/java/studio/livepeer/livepeer/utils/SessionManager.java @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package studio.livepeer.livepeer.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.OffsetDateTime; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.Collectors; + +import studio.livepeer.livepeer.models.errors.AuthException; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public final class SessionManager<T extends SessionManager.HasSessionKey> { + + // VisibleForTesting + public static final int REFRESH_BEFORE_EXPIRY_SECONDS = 60; + + private final Map<String, Session<T>> sessions = new HashMap<>(); + + public interface HasSessionKey { + String sessionKey(); + } + + public final static class Session<T> { + private final T credentials; + private final Optional<String> token; + private final List<String> scopes; + private final Optional<OffsetDateTime> expiresAt; + + public Session(T credentials, Optional<String> token, List<String> scopes, Optional<OffsetDateTime> expiresAt) { + this.credentials = credentials; + this.token = token; + this.scopes = scopes; + this.expiresAt = expiresAt; + } + + public T credentials() { + return credentials; + } + + public Optional<String> token() { + return token; + } + + public List<String> scopes() { + return scopes; + } + + public Optional<OffsetDateTime> expiresAt() { + return expiresAt; + } + + } + + public Session<T> getSession(T credentials, Optional<List<String>> scopes, Function<List<String>, Session<T>> tokenProvider ) { + final String sessionKey = credentials.sessionKey(); + + Optional<Session<T>> currentSession = Optional.ofNullable(sessions.get(sessionKey)); + final Session<T> session; + if (shouldCreateNewSession(currentSession, scopes)) { + // note that we accumulate scopes. For example if a session existed + // for scope 'read' and this request requires scope 'write' then we + // request a new token for `read, write`. + + // TODO it may be better to rather make `sessions` a Map<String, List<Session>> + // where the none of the Session scope lists fully contains another in the same + // map value. + // This would ensure that an operation is always called with a token with the + // minimum + // permissions required and also would ensure that a token request is not + // rejected + // because of disallowed scope combinations (yet to see that in the wild). + // For the example above with `read` and `write` scoped requests we would get a + // token + // for `read` scope, and then get a token for `write` scope and store both + // tokens in separate + // Session objects in the map value list for the credential pair. + + List<String> accumulatedScopes = accumulateScopes(scopes, currentSession); + session = tokenProvider.apply(accumulatedScopes); + sessions.put(sessionKey, session); + } else { + session = currentSession.get(); + } + return session; + } + + // VisibleForTesting + public static <T extends HasSessionKey> boolean shouldCreateNewSession(Optional<Session<T>> currentSession, Optional<List<String>> oauthScopes) { + return !currentSession.isPresent() // + || !hasRequiredScopes(currentSession.get().scopes, oauthScopes) // + || hasTokenExpired(currentSession.get().expiresAt, OffsetDateTime.now()); + } + + + private static < T extends HasSessionKey> List<String> accumulateScopes(Optional<List<String>> requiredScopes, Optional<Session<T>> session) { + if (session.isPresent()) { + List<String> scopes = new ArrayList<>(requiredScopes.orElse(Collections.emptyList())); + scopes.addAll(session.get().scopes); + return scopes.stream() // + .distinct() // + .collect(Collectors.toList()); + } else { + return requiredScopes.orElse(Collections.emptyList()); + } + } + + // VisibleForTesting + public static boolean hasTokenExpired(Optional<OffsetDateTime> expiresAt, OffsetDateTime now) { + return expiresAt.isEmpty() // + || now.plusSeconds(REFRESH_BEFORE_EXPIRY_SECONDS).isAfter(expiresAt.get()); + } + + // VisibleForTesting + public static boolean hasRequiredScopes(List<String> sessionScopes, Optional<List<String>> requiredScopes) { + return sessionScopes.containsAll(requiredScopes.orElse(Collections.emptyList())); + } + + public void remove(String sessionKey) { + sessions.remove(sessionKey); + } + + public static <T extends HasSessionKey> Session<T> requestOAuth2Token(HTTPClient client, T credentials, List<String> scopes, + Map<String, String> body, Map<String, String> headers, URI tokenUri) { + try { + HttpRequest.Builder requestBuilder = HttpRequest // + .newBuilder(tokenUri) // + .header("Content-Type", "application/x-www-form-urlencoded") // + .POST(RequestBody.serializeFormData(body).body()); // + + for (Map.Entry<String, String> header : headers.entrySet()) { + requestBuilder.header(header.getKey(), header.getValue()); + } + + HttpRequest request = requestBuilder.build(); + HttpResponse<InputStream> response = client.send(request); + if (response.statusCode() != HttpURLConnection.HTTP_OK) { + String responseBody = Utils.toUtf8AndClose(response.body()); + throw new AuthException(response.statusCode(), + "Unexpected status code " + response.statusCode() + ": " + responseBody); + } + TokenResponse t = Utils.mapper().readValue(response.body(), TokenResponse.class); + if (!t.tokenType.orElse("").equals("Bearer")) { + throw new AuthException("Expected 'Bearer' token type but was '" + t.tokenType.orElse("") + "'"); + } + final Optional<OffsetDateTime> expiresAt = t.expiresInSeconds + .map(x -> OffsetDateTime.now().plus(x, ChronoUnit.SECONDS)); + return new Session<T>(credentials, t.accessToken, scopes, expiresAt); + } catch (IOException | IllegalArgumentException | IllegalAccessException | InterruptedException | URISyntaxException e) { + throw new RuntimeException(e); + } + } + + final static class TokenResponse { + + @JsonProperty("access_token") + Optional<String> accessToken; + + @JsonProperty("token_type") + Optional<String> tokenType; + + @JsonProperty("expires_in") + Optional<Long> expiresInSeconds;; + + } + +} diff --git a/src/main/java/studio/livepeer/livepeer/utils/SpeakeasyHTTPClient.java b/src/main/java/studio/livepeer/livepeer/utils/SpeakeasyHTTPClient.java index 3ff3030a..da54137d 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/SpeakeasyHTTPClient.java +++ b/src/main/java/studio/livepeer/livepeer/utils/SpeakeasyHTTPClient.java @@ -1,22 +1,142 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.IOException; +import java.io.InputStream; import java.net.URISyntaxException; import java.net.http.HttpClient; +import java.net.http.HttpHeaders; import java.net.http.HttpRequest; +import java.net.http.HttpRequest.BodyPublishers; import java.net.http.HttpResponse; -import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.util.Collection; +import java.util.Locale; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; public class SpeakeasyHTTPClient implements HTTPClient { + private static boolean debugEnabled = false; + + // uppercase + private static Set<String> redactedHeaders = Set.of("AUTHORIZATION", "X-API-KEY"); + + private static Consumer<? super String> logger = System.out::println; + + /** + * Experimental, may be changed anytime. Sets debug logging on or off for + * requests and responses including bodies for JSON content. WARNING: this + * setting may expose sensitive information in logs (like <i>Authorization</i> + * headers), and should only be enabled temporarily for local debugging + * purposes. By default, <i>Authorization</i> headers are redacted in the logs + * ( printed with a value of {@code [*******]}). Header suppression is controlled + * with the {@link #setRedactedHeaders(Collection)} method. + * + * @param enabled true to enable debug logging, false to disable it + */ + public static void setDebugLogging(boolean enabled) { + debugEnabled = enabled; + } + + /** + * Experimental, may be changed anytime. When debug logging is enabled this + * method controls the suppression of header values in the logs. By default, + * <i>Authorization</i> headers are redacted in the logs (printed with a value + * of {@code [*******]}). Header suppression is controlled with the + * {@link #setRedactedHeaders(Collection)} method. + * + * @param headerNames the names (case-insensitive) of the headers whose values + * will be redacted in the logs + */ + public static void setRedactedHeaders(Collection<String> headerNames) { + redactedHeaders = headerNames.stream() // + .map(x -> x.toUpperCase(Locale.ENGLISH)) // + .collect(Collectors.toSet()); + } + + public static void setLogger(Consumer<? super String> logger) { + SpeakeasyHTTPClient.logger = logger; + } + @Override public HttpResponse<InputStream> send(HttpRequest request) throws IOException, InterruptedException, URISyntaxException { HttpClient client = HttpClient.newHttpClient(); - return client.send(request, HttpResponse.BodyHandlers.ofInputStream()); + if (debugEnabled) { + request = logRequest(request); + } + var response = client.send(request, HttpResponse.BodyHandlers.ofInputStream()); + if (debugEnabled) { + response = logResponse(response); + } + return response; + } + + private HttpRequest logRequest(HttpRequest request) { + log("Sending request: " + request); + log("Request headers: " + redactHeaders(request.headers())); + // only log the body if it is present and the content type is JSON + if (request.bodyPublisher().isPresent() && request.headers() // + .firstValue("Content-Type") // + .filter(x -> x.equals("application/json") || x.equals("text/plain")).isPresent()) { + // we read the body and ensure that the BodyPublisher is rebuilt to pass to the + // http client + byte[] body = Helpers.bodyBytes(request); + request = Helpers // + .copy(request) // + .method(request.method(), BodyPublishers.ofByteArray(body)) // + .build(); + // note that in the case of text/plain a different encoding from UTF-8 + // may be in use but we just log the bytes as UTF-8. Unexpected encodings + // do not throw (substitution happens). + log("Request body:\n" + new String(body, StandardCharsets.UTF_8)); + } + return request; + } + + private static HttpResponse<InputStream> logResponse(HttpResponse<InputStream> response) throws IOException { + // make the response re-readable by loading the response body into a byte array + // and allowing the InputStream to be read many times + response = Utils.cache(response); + log("Received response: " + response); + log("Response headers: " + redactHeaders(response.headers())); + // only log the response body if it is present and the content type is JSON or plain text + if (response.headers() // + .firstValue("Content-Type") // + .filter(x -> x.equals("application/json") || x.equals("text/plain")) // + .isPresent()) { + // the response is re-readable so we can read and close it without + // affecting later processing of the response. + + // note that in the case of text/plain a different encoding from UTF-8 + // may be in use but we just log the bytes as UTF-8. Unexpected encodings + // do not throw (substitution happens). + log("Response body:\n" + Utils.toUtf8AndClose(response.body())); + } + return response; + } + + private static String redactHeaders(HttpHeaders headers) { + return "{" + headers.map() // + .entrySet() // + .stream() // + .map(entry -> { + final String value; + if (redactedHeaders.contains(entry.getKey().toUpperCase(Locale.ENGLISH))) { + value = "[******]"; + } else { + value = String.valueOf(entry.getValue()); + } + return entry.getKey() + "=" + value; + }) // + .collect(Collectors.joining(", ")) + "}"; + } + + private static void log(String message) { + logger.accept(message); } } diff --git a/src/main/java/studio/livepeer/livepeer/utils/SpeakeasyMetadata.java b/src/main/java/studio/livepeer/livepeer/utils/SpeakeasyMetadata.java index a0bd63a4..3539c1a6 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/SpeakeasyMetadata.java +++ b/src/main/java/studio/livepeer/livepeer/utils/SpeakeasyMetadata.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.lang.annotation.ElementType; diff --git a/src/main/java/studio/livepeer/livepeer/utils/TypedObject.java b/src/main/java/studio/livepeer/livepeer/utils/TypedObject.java index 9df9c0a4..7954f30e 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/TypedObject.java +++ b/src/main/java/studio/livepeer/livepeer/utils/TypedObject.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.io.IOException; @@ -37,7 +36,12 @@ public TypeReference<?> typeReference() { public JsonShape shape() { return shape; } - + + @Override + public String toString() { + return String.valueOf(value); + } + public static <T> TypedObject of(T value, JsonShape shape, TypeReference<T> typeReference) { return new TypedObject(value, shape, typeReference); } diff --git a/src/main/java/studio/livepeer/livepeer/utils/Types.java b/src/main/java/studio/livepeer/livepeer/utils/Types.java index ab350f59..284bdd3b 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/Types.java +++ b/src/main/java/studio/livepeer/livepeer/utils/Types.java @@ -1,7 +1,6 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; import java.util.HashSet; diff --git a/src/main/java/studio/livepeer/livepeer/utils/Utf8UrlEncoder.java b/src/main/java/studio/livepeer/livepeer/utils/Utf8UrlEncoder.java new file mode 100644 index 00000000..10588790 --- /dev/null +++ b/src/main/java/studio/livepeer/livepeer/utils/Utf8UrlEncoder.java @@ -0,0 +1,116 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package studio.livepeer.livepeer.utils; + +import java.io.CharArrayWriter; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.BitSet; +import java.util.Objects; + +// Internal use only +// TODO move to an internal package +public final class Utf8UrlEncoder { + + private static final BitSet DO_NOT_ENCODE_CHARS = createDoNotEncodeChars(); + private static final int CASE_DIFF = ('a' - 'A'); + + private final BitSet safeChars; + + public static final Utf8UrlEncoder ALLOW_RESERVED = new Utf8UrlEncoder(":/?#[]@!$&'()*+,;="); + public static final Utf8UrlEncoder DEFAULT = new Utf8UrlEncoder(""); + + public static Utf8UrlEncoder allowReserved(boolean allowReserved) { + return allowReserved ? ALLOW_RESERVED : DEFAULT; + } + + private Utf8UrlEncoder(String safeCharacters) { + Objects.requireNonNull(safeCharacters, "safeCharacters"); + int max = -1; + for (int i = 0; i < safeCharacters.length(); i++) { + char ch = safeCharacters.charAt(i); + max = Math.max(ch, max); + } + BitSet safeChars = new BitSet(max + 1); + for (int i = 0; i < safeCharacters.length(); i++) { + char ch = safeCharacters.charAt(i); + safeChars.set(ch); + } + this.safeChars = safeChars; + } + + public String encode(String s) { + return encode(s, StandardCharsets.UTF_8); + } + + private String encode(String s, Charset charset) { + boolean changed = false; + StringBuilder out = new StringBuilder(s.length()); + CharArrayWriter writer = new CharArrayWriter(); + + for (int i = 0; i < s.length();) { + int c = (int) s.charAt(i); + if (DO_NOT_ENCODE_CHARS.get(c) || safeChars.get(c)) { + out.append((char) c); + i++; + } else { + // convert to external encoding before hex conversion + do { + writer.write(c); + if (c >= 0xD800 && c <= 0xDBFF) { + if ((i + 1) < s.length()) { + int d = (int) s.charAt(i + 1); + if (d >= 0xDC00 && d <= 0xDFFF) { + writer.write(d); + i++; + } + } + } + i++; + } while (i < s.length() && !DO_NOT_ENCODE_CHARS.get((c = (int) s.charAt(i)))); + + writer.flush(); + String str = new String(writer.toCharArray()); + byte[] ba = str.getBytes(charset); + for (int j = 0; j < ba.length; j++) { + out.append('%'); + char ch = Character.forDigit((ba[j] >> 4) & 0xF, 16); + // converting to use uppercase letter as part of + // the hex value if ch is a letter. + if (Character.isLetter(ch)) { + ch -= CASE_DIFF; + } + out.append(ch); + ch = Character.forDigit(ba[j] & 0xF, 16); + if (Character.isLetter(ch)) { + ch -= CASE_DIFF; + } + out.append(ch); + } + writer.reset(); + changed = true; + } + } + + return (changed ? out.toString() : s); + } + + private static BitSet createDoNotEncodeChars() { + BitSet b = new BitSet(256); + for (int i = 'a'; i <= 'z'; i++) { + b.set(i); + } + for (int i = 'A'; i <= 'Z'; i++) { + b.set(i); + } + for (int i = '0'; i <= '9'; i++) { + b.set(i); + } + b.set('-'); + b.set('_'); + b.set('.'); + b.set('*'); + return b; + } +} diff --git a/src/main/java/studio/livepeer/livepeer/utils/Utils.java b/src/main/java/studio/livepeer/livepeer/utils/Utils.java index a0a07ad8..17946c93 100644 --- a/src/main/java/studio/livepeer/livepeer/utils/Utils.java +++ b/src/main/java/studio/livepeer/livepeer/utils/Utils.java @@ -1,39 +1,50 @@ /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ - package studio.livepeer.livepeer.utils; -import java.io.InputStream; import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.math.BigDecimal; import java.math.BigInteger; import java.net.URI; -import java.net.URLEncoder; +import java.net.URISyntaxException; import java.net.http.HttpClient.Version; import java.net.http.HttpHeaders; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.concurrent.Callable; -import java.util.function.BiPredicate; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Map.Entry; import java.util.NoSuchElementException; import java.util.Optional; +import java.util.Random; +import java.util.concurrent.Callable; +import java.util.function.BiPredicate; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -43,8 +54,6 @@ import javax.net.ssl.SSLSession; import org.apache.commons.io.IOUtils; -import org.apache.http.NameValuePair; - import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.core.JsonProcessingException; @@ -137,7 +146,9 @@ public static <T> String generateURL(Class<T> type, String baseURL, String path, pathParams.put(pathParamsMetadata.name, String.join(",", - array.stream().map(v -> Utils.valToString(v)) + array.stream() + .map(v -> valToString(v)) + .map(v -> pathEncode(v, pathParamsMetadata.allowReserved)) .collect(Collectors.toList()))); break; case MAP: @@ -149,17 +160,17 @@ public static <T> String generateURL(Class<T> type, String baseURL, String path, pathParams.put(pathParamsMetadata.name, String.join(",", map.entrySet().stream().map(e -> { if (pathParamsMetadata.explode) { - return String.format("%s=%s", Utils.valToString(e.getKey()), - Utils.valToString(e.getValue())); + return String.format("%s=%s", pathEncode(valToString(e.getKey()), false), + pathEncode(valToString(e.getValue()), false)); } else { - return String.format("%s,%s", Utils.valToString(e.getKey()), - Utils.valToString(e.getValue())); + return String.format("%s,%s", pathEncode(valToString(e.getKey()), false), + pathEncode(valToString(e.getValue()), false)); } }).collect(Collectors.toList()))); break; case OBJECT: if (!allowIntrospection(value.getClass())) { - pathParams.put(pathParamsMetadata.name, Utils.valToString(value)); + pathParams.put(pathParamsMetadata.name, pathEncode(valToString(value), pathParamsMetadata.allowReserved)); break; } List<String> values = new ArrayList<>(); @@ -180,17 +191,17 @@ public static <T> String generateURL(Class<T> type, String baseURL, String path, if (pathParamsMetadata.explode) { values.add(String.format("%s=%s", valuePathParamsMetadata.name, - Utils.valToString(val))); + pathEncode(valToString(val), valuePathParamsMetadata.allowReserved))); } else { values.add(String.format("%s,%s", valuePathParamsMetadata.name, - Utils.valToString(val))); + pathEncode(valToString(val), valuePathParamsMetadata.allowReserved))); } } pathParams.put(pathParamsMetadata.name, String.join(",", values)); break; default: - pathParams.put(pathParamsMetadata.name, Utils.valToString(value)); + pathParams.put(pathParamsMetadata.name, pathEncode(valToString(value), pathParamsMetadata.allowReserved)); break; } } @@ -199,6 +210,10 @@ public static <T> String generateURL(Class<T> type, String baseURL, String path, return baseURL + templateUrl(path, pathParams); } + + private static String pathEncode(String s, boolean allowReserved) { + return Utf8UrlEncoder.allowReserved(allowReserved).encode(s); + } public static boolean contentTypeMatches(String contentType, String pattern) { if (contentType == null || contentType.isBlank()) { @@ -249,7 +264,7 @@ public static SerializedBody serializeRequestBody(Object request, String request return RequestBody.serialize(request, requestField, serializationMethod, nullable); } - public static <T extends Object> List<NameValuePair> getQueryParams(Class<T> type, Optional<? extends T> params, + public static <T extends Object> List<QueryParameter> getQueryParams(Class<T> type, Optional<? extends T> params, Map<String, Map<String, Map<String, Object>>> globals) throws Exception { if (params.isEmpty()) { return Collections.emptyList(); @@ -258,7 +273,7 @@ public static <T extends Object> List<NameValuePair> getQueryParams(Class<T> typ } } - public static <T extends Object> List<NameValuePair> getQueryParams(Class<T> type, JsonNullable<? extends T> params, + public static <T extends Object> List<QueryParameter> getQueryParams(Class<T> type, JsonNullable<? extends T> params, Map<String, Map<String, Map<String, Object>>> globals) throws Exception { if (!params.isPresent() || params.get() == null) { return Collections.emptyList(); @@ -267,7 +282,7 @@ public static <T extends Object> List<NameValuePair> getQueryParams(Class<T> typ } } - public static <T extends Object> List<NameValuePair> getQueryParams(Class<T> type, T params, + public static <T extends Object> List<QueryParameter> getQueryParams(Class<T> type, T params, Map<String, Map<String, Map<String, Object>>> globals) throws Exception { return QueryParameters.parseQueryParams(type, params, globals); } @@ -275,6 +290,8 @@ public static <T extends Object> List<NameValuePair> getQueryParams(Class<T> typ public static HTTPRequest configureSecurity(HTTPRequest request, Object security) throws Exception { return Security.configureSecurity(request, security); } + + private static final String DOLLAR_MARKER = "D9qPtyhOYzkHGu3c"; public static String templateUrl(String url, Map<String, String> params) { StringBuilder sb = new StringBuilder(); @@ -287,12 +304,16 @@ public static String templateUrl(String url, Map<String, String> params) { String key = match.substring(1, match.length() - 1); String value = params.get(key); if (value != null) { - m.appendReplacement(sb, value); + // note that we replace $ characters in values with a marker + // and then replace the markers at the end with the $ characters + // because the presence of dollar signs can stuff up the next + // regex find + m.appendReplacement(sb, value.replace("$", DOLLAR_MARKER)); } } m.appendTail(sb); - return sb.toString(); + return sb.toString().replace(DOLLAR_MARKER, "$"); } public static Map<String, List<String>> getHeadersFromMetadata(Object headers, Map<String, Map<String, Map<String, Object>>> globals) throws Exception { @@ -344,10 +365,10 @@ public static Map<String, List<String>> getHeadersFromMetadata(Object headers, M if (headerMetadata.explode) { items.add( String.format("%s=%s", valueHeaderMetadata.name, - Utils.valToString(valueFieldValue))); + valToString(valueFieldValue))); } else { items.add(valueHeaderMetadata.name); - items.add(Utils.valToString(valueFieldValue)); + items.add(valToString(valueFieldValue)); } } @@ -370,11 +391,11 @@ public static Map<String, List<String>> getHeadersFromMetadata(Object headers, M for (Map.Entry<?, ?> entry : map.entrySet()) { if (headerMetadata.explode) { - items.add(String.format("%s=%s", Utils.valToString(entry.getKey()), - Utils.valToString(entry.getValue()))); + items.add(String.format("%s=%s", valToString(entry.getKey()), + valToString(entry.getValue()))); } else { - items.add(Utils.valToString(entry.getKey())); - items.add(Utils.valToString(entry.getValue())); + items.add(valToString(entry.getKey())); + items.add(valToString(entry.getValue())); } } @@ -397,7 +418,7 @@ public static Map<String, List<String>> getHeadersFromMetadata(Object headers, M List<String> items = new ArrayList<>(); for (Object item : array) { - items.add(Utils.valToString(item)); + items.add(valToString(item)); } if (!result.containsKey(headerMetadata.name)) { @@ -415,7 +436,7 @@ public static Map<String, List<String>> getHeadersFromMetadata(Object headers, M } List<String> values = result.get(headerMetadata.name); - values.add(Utils.valToString(value)); + values.add(valToString(value)); break; } } @@ -425,17 +446,16 @@ public static Map<String, List<String>> getHeadersFromMetadata(Object headers, M } public static String valToString(Object value) { - switch (Types.getType(value.getClass())) { - case ENUM: - try { - Field field = value.getClass().getDeclaredField("value"); - field.setAccessible(true); - return String.valueOf(field.get(value)); - } catch (Exception e) { - return "ERROR_UNKNOWN_VALUE"; - } - default: - return String.valueOf(resolveOptionals(value)); + if (value.getClass().isEnum()) { + try { + Field field = value.getClass().getDeclaredField("value"); + field.setAccessible(true); + return String.valueOf(field.get(value)); + } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) { + return "ERROR_UNKNOWN_VALUE"; + } + } else { + return String.valueOf(resolveOptionals(value)); } } @@ -464,16 +484,15 @@ public static Object populateGlobal(Object value, String fieldName, String param private static Map<String, String> parseSerializedParams(PathParamsMetadata pathParamsMetadata, Object value) throws JsonProcessingException { Map<String, String> params = new HashMap<>(); - switch (pathParamsMetadata.serialization) { case "json": ObjectMapper mapper = JSON.getMapper(); String json = mapper.writeValueAsString(value); - - params.put(pathParamsMetadata.name, URLEncoder.encode(json, StandardCharsets.UTF_8)); + params.put(pathParamsMetadata.name, pathEncode(json, pathParamsMetadata.allowReserved)); + break; + default: break; } - return params; } @@ -804,11 +823,13 @@ private void load() { }; } - private static <T> T rethrow(Throwable e) { + static <T> T rethrow(Throwable e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } else if (e instanceof Error) { throw (Error) e; + } else if (e instanceof IOException) { + throw new UncheckedIOException((IOException) e); } else { throw new RuntimeException(e); } @@ -961,7 +982,7 @@ public static final class HttpResponseCached implements HttpResponse<InputStream public HttpResponseCached(HttpResponse<InputStream> response) throws IOException { this.response = response; - this.bytes = Utils.toByteArrayAndClose(response.body()); + this.bytes = toByteArrayAndClose(response.body()); } public String bodyAsUtf8() { @@ -1018,11 +1039,53 @@ public String toString() { } } - private static final char[] HEX_ARRAY = "0123456789abcdef".toCharArray(); + private static final char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray(); + + public static byte[] readBytes(String filename) { + return readBytes(new File(filename)); + } + + public static byte[] readBytes(File file) { + try { + return readBytesAndClose(new FileInputStream(file)); + } catch (FileNotFoundException e) { + throw new UncheckedIOException(e); + } + } + + public static byte[] readBytesAndClose(InputStream in) { + try { + return readBytes(in); + } finally { + try { + in.close(); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + } - public static String bytesToLowerCaseHex(byte[] bytes) { - char[] hexChars = new char[bytes.length * 2]; - for (int j = 0; j < bytes.length; j++) { + public static byte[] readBytes(InputStream in) { + ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + byte[] buffer = new byte[8192]; + int n; + try { + while ((n = in.read(buffer))!= -1) { + bytes.write(buffer, 0, n); + } + } catch (IOException e) { + throw new UncheckedIOException(e); + } + return bytes.toByteArray(); + } + + public static String toHex(byte[] bytes) { + return toHex(bytes, bytes.length); + } + + private static String toHex(byte[] bytes, int length) { + char[] hexChars = new char[length * 2]; + for (int j = 0; j < length; j++) { int v = bytes[j] & 0xFF; hexChars[j * 2] = HEX_ARRAY[v >>> 4]; hexChars[j * 2 + 1] = HEX_ARRAY[v & 0x0F]; @@ -1050,4 +1113,287 @@ public static String discriminatorToString(Object o) { return (String) o; } } + + public static void recordTest(String id) { + try { + new File("build").mkdir(); + Files.writeString(Paths.get("build/test-javav2-record.txt"), id + "\n", StandardOpenOption.CREATE, + StandardOpenOption.APPEND); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + /** + * Returns an equivalent url with query parameters sorted by name. Sort is + * stable in that parameters with the same name will not be reordered. + * + * @param url input + * @return url with query parameters sorted by name + */ + public static String sortQueryParameters(String url) { + if (url == null || url.isBlank()) { + return ""; + } + String[] parts = url.split("\\?"); + if (parts.length == 1) { + return url; + } + String query = parts[1]; + String[] params = query.split("&"); + sortByDelimitedKey(params, "="); + return parts[0] + "?" + Arrays.stream(params).collect(Collectors.joining("&")); + } + + public static Object sortSerializedMaps(Object input, String regex, String delim) { + if (input == null) { + return input; + } else if (input instanceof String) { + return sortMapString((String) input, regex, delim); + } else if (input.getClass().isArray()) { + Object[] a = (Object[]) input; + String[] b = new String[a.length]; + for (int i = 0; i < a.length; i++) { + if (!(a[i] instanceof String)) { + throw new IllegalArgumentException("expected array item type of String, found " + a[i]); + } + b[i] = sortMapString((String) a[i], regex, delim); + } + return b; + } else if (input instanceof Map) { + @SuppressWarnings("unchecked") + Map<Object, Object> a = (Map<Object, Object>) input; + Map<String, String> b = new LinkedHashMap<>(); + for (Entry<Object, Object> entry: a.entrySet()) { + if (!(entry.getKey() instanceof String)) { + throw new IllegalArgumentException("expected map key type of String, found " + entry.getKey()); + } + if (!(entry.getValue() instanceof String)) { + throw new IllegalArgumentException("expected map value type of String, found " + entry.getValue()); + } + b.put((String) entry.getKey(), sortMapString((String) entry.getValue(), regex, delim)); + } + return b; + } else { + throw new IllegalArgumentException("unexpected type: " + input.getClass()); + } + } + + private static String sortMapString(String input, String regex, String delim) { + return Pattern.compile(regex).matcher(input).replaceAll(m -> { + String escapedDelim = Pattern.quote(delim); + String result = m.group(); + for (int i = 1; i <= m.groupCount(); i++) { + final String match = m.group(i); + String[] pairs; + if (match.contains("=")) { + pairs = match.split(escapedDelim); + sortByDelimitedKey(pairs, "="); + } else { + String[] values = match.split(escapedDelim); + if (values.length == 1) { + pairs = values; + } else { + pairs = new String[values.length / 2]; + for (int j = 0; j < values.length; j += 2) { + pairs[j / 2] = values[j] + delim + values[j + 1]; + } + } + sortByDelimitedKey(pairs, delim); + } + String joined = Arrays.stream(pairs).collect(Collectors.joining(delim)); + result = result.replace(m.group(i), joined); + } + return result; + }); + } + + private static void sortByDelimitedKey(String[] array, String delim) { + Arrays.sort(array, (a, b) -> { + String escapedDelim = Pattern.quote(delim); + String aKey = a.split(escapedDelim)[0]; + String bKey = b.split(escapedDelim)[0]; + return aKey.compareTo(bKey); + }); + } + + public static boolean isPresentAndNotNull(Optional<?> x) { + return x.isPresent(); + } + + public static boolean isPresentAndNotNull(JsonNullable<?> x) { + return x.isPresent() && x.get() != null; + } + + public static void setSseSentinel(Object o, String value) { + if (o == null || value.isBlank()) { + return; + } else { + try { + Field field = o.getClass().getDeclaredField("_eventSentinel"); + field.setAccessible(true); + field.set(o, Optional.of(value)); + } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { + // ignore + } + } + } + + public static String sessionKey(String... items) { + try { + MessageDigest md = MessageDigest.getInstance("MD5"); + String input = Arrays.stream(items).collect(Collectors.joining(":")); + byte[] bytes = md.digest(input.getBytes(StandardCharsets.UTF_8)); + return Utils.toHex(bytes).toLowerCase(Locale.ENGLISH); + } catch (NoSuchAlgorithmException e) { + // not expected, MD5 always available + throw new RuntimeException(e); + } + } + + // internal API + public static HTTPClient createTestHTTPClient(String testName) { + return createTestHTTPClient(new SpeakeasyHTTPClient(), testName); + } + + // internal API + public static HTTPClient createTestHTTPClient(SpeakeasyHTTPClient client, String testName) { + return new TestHTTPClient(client, testName, randomLetters(16)); + } + + private static final class TestHTTPClient implements HTTPClient { + + private final HTTPClient client; + private final String testName; + private final String testInstanceId; + + TestHTTPClient(HTTPClient client, String testName, String testInstanceId) { + checkNotNull(client, "client"); + checkNotNull(testName, "name"); + checkNotNull(testInstanceId, "instanceId"); + this.client = client; + this.testName = testName; + this.testInstanceId = testInstanceId; + } + + @Override + public HttpResponse<InputStream> send(HttpRequest request) + throws IOException, InterruptedException, URISyntaxException { + HttpRequest r = Utils.copy(request) // + .header("x-speakeasy-test-name", testName) // + .header("x-speakeasy-test-instance-id", testInstanceId) // + .build(); + return client.send(r); + } + } + + private static final Random RANDOM = new Random(); + + private static String randomLetters(int length) { + return RANDOM.ints(length).mapToObj(x -> (char) (Math.abs(x) % 26 + 'a') + "").collect(Collectors.joining()); + } + + /** + * Internal use. Returns the system property with {@code key = "env." + name} + * and if doesn't exist returns the value of the environment variable with the + * given name of if it doesn't exist returns {@code defaultValue}. + * + * @param name variable name + * @param defaultValue default value if system property and environment variable + * don't exist + * @return system property with name prepended with ".env" or environment + * variable of given name or default value + */ + public static String environmentVariable(String name, String defaultValue) { + String value = System.getProperty("env." + name); + if (value != null) { + return value; + } + value = System.getenv(name); + if (value != null) { + return value; + } else { + return defaultValue; + } + } + + // internal use + public static <T> Optional<T> toOptional(JsonNullable<T> a) { + if (a.isPresent() && a.get() != null) { + return Optional.of(a.get()); + } else { + return Optional.empty(); + } + } + + // internal use + public static String sortJSONObjectKeys(String json, String... fields) { + var fieldList = List.of(fields); + var m = new ObjectMapper(); + try { + JsonNode tree = m.readTree(json); + if (!tree.isObject()) { + return json; + } else if (fieldList.isEmpty()) { + return m.writeValueAsString(sortKeys(m, tree)); + } else { + var node = (ObjectNode) tree; + var list = toList(node.fields()); + list.stream() // + .filter(entry -> fieldList.contains(entry.getKey())) // + .forEach(entry -> node.set(entry.getKey(), sortKeys(m, entry.getValue()))); + return m.writeValueAsString(node); + } + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } + } + + private static JsonNode sortKeys(ObjectMapper m, JsonNode node) { + if (!node.isObject()) { + return node; + } else { + var list = toList(node.fields()); + list.sort((a, b) -> a.getKey().compareTo(b.getKey())); + var map = new LinkedHashMap<String, JsonNode>(); + list.forEach(x -> map.put(x.getKey(), x.getValue())); + return new ObjectNode(m.getNodeFactory(), map); + } + } + + private static <T> List<T> toList(Iterator<T> it) { + var list = new ArrayList<T>(); + while (it.hasNext()) { + list.add(it.next()); + } + return list; + } + + public static <T> T valueOrElse(T value, T valueIfNotPresent) { + return value != null ? value : valueIfNotPresent; + } + + public static <T> T valueOrElse(Optional<T> value, T valueIfNotPresent) { + return value.orElse(valueIfNotPresent); + } + + public static <T> T valueOrElse(JsonNullable<T> value, T valueIfNotPresent) { + if (value.isPresent()) { + return value.get(); + } else { + return valueIfNotPresent; + } + } + + public static <T> T valueOrNull(T value) { + return valueOrElse(value, null); + } + + public static <T> T valueOrNull(Optional<T> value) { + return valueOrElse(value, null); + } + + public static <T> T valueOrNull(JsonNullable<T> value) { + return valueOrElse(value, null); + } }