diff --git a/CHANGELOG.md b/CHANGELOG.md index 82fe425..4b13d23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All changes to this project will be documented in this file. +## [1.4.7] - 2024-11-06 +- AI summary updates + ## [1.4.6] - 2024-11-04 - Analytics updates (ccv, views, ...) diff --git a/README.md b/README.md index 98ca37e..309e970 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Add this dependency to your project's POM: video.api java-api-client - 1.4.6 + 1.4.7 compile ``` @@ -80,7 +80,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -implementation "video.api:java-api-client:1.4.6" +implementation "video.api:java-api-client:1.4.7" ``` #### Others @@ -93,7 +93,7 @@ mvn clean package Then manually install the following JARs: -* `target/java-api-client-1.4.6.jar` +* `target/java-api-client-1.4.7.jar` * `target/lib/*.jar` ### Code sample diff --git a/api/openapi.yaml b/api/openapi.yaml index 2f4c60c..887003c 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1339,7 +1339,7 @@ paths: x-client-paginated: true x-accepts: application/json post: - description: Generate a title, abstract, and key takeaways for a video. + description: Generate an abstract and key takeaways for a video. operationId: POST_summaries requestBody: content: @@ -1427,7 +1427,7 @@ paths: - Summaries x-client-action: create x-client-description: - default: Generate a title, abstract, and key takeaways for a video. + default: Generate an abstract and key takeaways for a video. x-contentType: application/json x-accepts: application/json /summaries/{summaryId}: @@ -1563,8 +1563,7 @@ paths: default: Get all details for a summary. x-accepts: application/json patch: - description: Update details for a summary. Note that this operation is only - allowed for summary objects where `sourceStatus` is `missing`. + description: Update details for a summary. operationId: PATCH_summaries-summaryId-source parameters: - description: The unique identifier of the summary source you want to update. @@ -1614,7 +1613,7 @@ paths: content: application/json: examples: - Summary already exists: + Summary generation still in progress: value: type: https://docs.api.video/reference/summary-already-exists title: A summary already exists or is being created on this video. @@ -1650,8 +1649,7 @@ paths: - Summaries x-client-action: update x-client-description: - default: Update details for a summary. Note that this operation is only allowed - for summary objects where `sourceStatus` is `missing`. + default: Update details for a summary. x-contentType: application/json x-accepts: application/json /videos/{videoId}/source: @@ -16648,6 +16646,10 @@ components: playerId: pl45KFKdlddgk654dspkze language: en transcript: true + transcriptSummary: true + transcriptSummaryAttributes: + - abstract + - takeaways tags: - maths - string theory @@ -16776,6 +16778,16 @@ components: - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. type: boolean + transcriptSummaryAttributes: + description: Use this parameter to define the elements of a summary that + you want to generate. If you do not define this parameter, the API generates + a full summary with all attributes. + items: + enum: + - abstract + - takeaways + type: string + type: array required: - title title: VideoCreationPayload @@ -16797,15 +16809,21 @@ components: - auto example: auto type: string + attributes: + description: Use this parameter to define the elements of a summary that + you want to generate. If you do not define this parameter, the API generates + a full summary with all attributes. + items: + enum: + - abstract + - takeaways + type: string + type: array required: - videoId type: object summary-update-payload: properties: - title: - description: A video title, based on the contents of the video. - example: A short lecture on quantum theory - type: string abstract: description: A short outline of the contents of the video. example: In this lecture, we discuss how complicated quantum theory is, @@ -16850,12 +16868,7 @@ components: abstract: In this lecture, we discuss how complicated quantum theory is, using the famous example of Schrödingers cat. We also discuss practical applications like quantum computing. - title: A short lecture on quantum theory properties: - title: - description: A video title, based on the contents of the video. - example: A short lecture on quantum theory - type: string abstract: description: A short outline of the contents of the video. The length of an `abstract` depends on the amount of content in a video that can be @@ -17028,6 +17041,9 @@ components: language: en transcript: true transcriptSummary: true + transcriptSummaryAttributes: + - abstract + - takeaways panoramic: false mp4Support: true tags: @@ -17140,6 +17156,16 @@ components: \ video. If you do not define a language, the API detects it based on\ \ the video." type: boolean + transcriptSummaryAttributes: + description: Use this parameter to define the elements of a summary that + you want to generate. If you do not define this parameter, the API generates + a full summary with all attributes. + items: + enum: + - abstract + - takeaways + type: string + type: array title: VideoUpdatePayload type: object discarded-video-update-payload: diff --git a/build.gradle b/build.gradle index 8fe721e..b2e8a5f 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'com.diffplug.spotless' apply plugin: 'maven-publish' group = 'video.api' -version = '1.4.6' +version = '1.4.7' buildscript { repositories { diff --git a/docs/SummariesApi.md b/docs/SummariesApi.md index 2a8c671..01d2bf2 100644 --- a/docs/SummariesApi.md +++ b/docs/SummariesApi.md @@ -19,7 +19,7 @@ Method | HTTP request | Description Generate video summary -Generate a title, abstract, and key takeaways for a video. +Generate an abstract and key takeaways for a video. ### Example ```java @@ -45,6 +45,7 @@ public class Example { If you do not set this parameter, **the API will not generate a summary automatically**. In this case, `sourceStatus` will return `missing`, and you have to manually add a summary using the `PATCH /summaries/{summaryId}/source` endpoint operation. + summaryCreationPayload.setAttributes(); // Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. try { @@ -95,7 +96,7 @@ Name | Type | Description | Notes Update summary details -Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`. +Update details for a summary. ### Example ```java @@ -116,7 +117,6 @@ public class Example { String summaryId = "summary_1CGHWuXjhxmeH4WiZ51234"; // The unique identifier of the summary source you want to update. SummaryUpdatePayload summaryUpdatePayload = new SummaryUpdatePayload(); // - summaryUpdatePayload.setTitle("A short lecture on quantum theory"); // A video title, based on the contents of the video. summaryUpdatePayload.setAbstract("In this lecture, we discuss how complicated quantum theory is, using the famous example of Schrödingers cat. We also discuss practical applications like quantum computing."); // A short outline of the contents of the video. summaryUpdatePayload.setTakeaways(Arrays.asList("Quantum theory is complicated.","Schrödinger's cat is neither dead, nor alive.","Quantum computers are super cool.")); // A list of 3 key points from the video, in chronological order. diff --git a/docs/SummaryCreationPayload.md b/docs/SummaryCreationPayload.md index 67a2388..e372c24 100644 --- a/docs/SummaryCreationPayload.md +++ b/docs/SummaryCreationPayload.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **videoId** | **String** | Create a summary of a video using the video ID. | **origin** | [**OriginEnum**](#OriginEnum) | Use this parameter to define how the API generates the summary. The only allowed value is `auto`, which means that the API generates a summary automatically. If you do not set this parameter, **the API will not generate a summary automatically**. In this case, `sourceStatus` will return `missing`, and you have to manually add a summary using the `PATCH /summaries/{summaryId}/source` endpoint operation. | [optional] +**attributes** | [**List<AttributesEnum>**](#List<AttributesEnum>) | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional] @@ -18,6 +19,15 @@ Name | Value AUTO | "auto" + +## Enum: List<AttributesEnum> + +Name | Value +---- | ----- +ABSTRACT | "abstract" +TAKEAWAYS | "takeaways" + + ## Implemented Interfaces * Serializable diff --git a/docs/SummarySource.md b/docs/SummarySource.md index 1163faa..40d2380 100644 --- a/docs/SummarySource.md +++ b/docs/SummarySource.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **String** | A video title, based on the contents of the video. | [optional] **_abstract** | **String** | A short outline of the contents of the video. The length of an `abstract` depends on the amount of content in a video that can be transcribed. The API condenses the contents into minimum 20, maximum 300 words. | [optional] **takeaways** | **List<String>** | A list of 3 key points from the video, in chronological order. | [optional] diff --git a/docs/SummaryUpdatePayload.md b/docs/SummaryUpdatePayload.md index 859dc29..c6b60cb 100644 --- a/docs/SummaryUpdatePayload.md +++ b/docs/SummaryUpdatePayload.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **String** | A video title, based on the contents of the video. | [optional] **_abstract** | **String** | A short outline of the contents of the video. | [optional] **takeaways** | **List<String>** | A list of 3 key points from the video, in chronological order. | [optional] diff --git a/docs/VideoCreationPayload.md b/docs/VideoCreationPayload.md index 24d8f07..57318ab 100644 --- a/docs/VideoCreationPayload.md +++ b/docs/VideoCreationPayload.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **language** | [**LanguageEnum**](#LanguageEnum) | Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language. | [optional] **transcript** | **Boolean** | Use this parameter to enable transcription. - When `true`, the API generates a transcript for the video. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. | [optional] **transcriptSummary** | **Boolean** | Use this parameter to enable summarization. We recommend using this parameter together with `transcript: true`. - When `true`, the API generates a summary for the video, based on the transcription. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. | [optional] +**transcriptSummaryAttributes** | [**List<TranscriptSummaryAttributesEnum>**](#List<TranscriptSummaryAttributesEnum>) | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional] @@ -62,6 +63,15 @@ VI | "vi" ZH | "zh" + +## Enum: List<TranscriptSummaryAttributesEnum> + +Name | Value +---- | ----- +ABSTRACT | "abstract" +TAKEAWAYS | "takeaways" + + ## Implemented Interfaces * Serializable diff --git a/docs/VideoUpdatePayload.md b/docs/VideoUpdatePayload.md index 3ed276d..7b2b000 100644 --- a/docs/VideoUpdatePayload.md +++ b/docs/VideoUpdatePayload.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **language** | [**LanguageEnum**](#LanguageEnum) | Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language. | [optional] **transcript** | **Boolean** | Use this parameter to enable transcription. - When `true`, the API generates a transcript for the video. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. - When the API generates a transcript, it will be available as a caption for the video. | [optional] **transcriptSummary** | **Boolean** | Use this parameter to enable summarization. - When `true`, the API generates a summary for the video, based on the transcription. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. | [optional] +**transcriptSummaryAttributes** | [**List<TranscriptSummaryAttributesEnum>**](#List<TranscriptSummaryAttributesEnum>) | Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. | [optional] @@ -59,6 +60,15 @@ VI | "vi" ZH | "zh" + +## Enum: List<TranscriptSummaryAttributesEnum> + +Name | Value +---- | ----- +ABSTRACT | "abstract" +TAKEAWAYS | "takeaways" + + ## Implemented Interfaces * Serializable diff --git a/docs/VideosApi.md b/docs/VideosApi.md index b238fdf..67fb982 100644 --- a/docs/VideosApi.md +++ b/docs/VideosApi.md @@ -72,6 +72,7 @@ public class Example { - When `true`, the API generates a summary for the video, based on the transcription. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. + videoCreationPayload.setTranscriptSummaryAttributes(); // Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. try { @@ -458,6 +459,7 @@ public class Example { - When `true`, the API generates a summary for the video, based on the transcription. - The default value is `false`. - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video. + videoUpdatePayload.setTranscriptSummaryAttributes(); // Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. try { diff --git a/pom.xml b/pom.xml index 9bc00a5..5ff4367 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ java-api-client jar ${project.groupId}:${project.artifactId} - 1.4.6 + 1.4.7 https://github.com/apivideo/api.video-java-client api.video Java API client diff --git a/src/main/java/video/api/client/api/ApiClient.java b/src/main/java/video/api/client/api/ApiClient.java index e22cd36..611b397 100644 --- a/src/main/java/video/api/client/api/ApiClient.java +++ b/src/main/java/video/api/client/api/ApiClient.java @@ -120,7 +120,7 @@ private OkHttpClient initHttpClient(List interceptors) { private void init() { verifyingSsl = true; json = new JSON(); - addDefaultHeader("AV-Origin-Client", "java:1.4.6"); + addDefaultHeader("AV-Origin-Client", "java:1.4.7"); } private boolean isValid(String regex, String field) { diff --git a/src/main/java/video/api/client/api/clients/SummariesApi.java b/src/main/java/video/api/client/api/clients/SummariesApi.java index ae8c1b1..4b45b30 100644 --- a/src/main/java/video/api/client/api/clients/SummariesApi.java +++ b/src/main/java/video/api/client/api/clients/SummariesApi.java @@ -189,7 +189,7 @@ private okhttp3.Call createValidateBeforeCall(SummaryCreationPayload summaryCrea /** * Generate video summary * - * Generate a title, abstract, and key takeaways for a video. + * Generate an abstract and key takeaways for a video. * * @param summaryCreationPayload * (required) @@ -236,7 +236,7 @@ public Summary create(SummaryCreationPayload summaryCreationPayload) throws ApiE /** * Generate video summary * - * Generate a title, abstract, and key takeaways for a video. + * Generate an abstract and key takeaways for a video. * * @param summaryCreationPayload * (required) @@ -283,7 +283,7 @@ public ApiResponse createWithHttpInfo(SummaryCreationPayload summaryCre } /** - * Generate video summary (asynchronously) Generate a title, abstract, and key takeaways for a video. + * Generate video summary (asynchronously) Generate an abstract and key takeaways for a video. * * @param summaryCreationPayload * (required) @@ -426,8 +426,7 @@ private okhttp3.Call updateValidateBeforeCall(String summaryId, SummaryUpdatePay /** * Update summary details * - * Update details for a summary. Note that this operation is only allowed for summary objects where - * `sourceStatus` is `missing`. + * Update details for a summary. * * @param summaryId * The unique identifier of the summary source you want to update. (required) @@ -476,8 +475,7 @@ public SummarySource update(String summaryId, SummaryUpdatePayload summaryUpdate /** * Update summary details * - * Update details for a summary. Note that this operation is only allowed for summary objects where - * `sourceStatus` is `missing`. + * Update details for a summary. * * @param summaryId * The unique identifier of the summary source you want to update. (required) @@ -527,8 +525,7 @@ public ApiResponse updateWithHttpInfo(String summaryId, SummaryUp } /** - * Update summary details (asynchronously) Update details for a summary. Note that this operation is only allowed - * for summary objects where `sourceStatus` is `missing`. + * Update summary details (asynchronously) Update details for a summary. * * @param summaryId * The unique identifier of the summary source you want to update. (required) diff --git a/src/main/java/video/api/client/api/models/SummaryCreationPayload.java b/src/main/java/video/api/client/api/models/SummaryCreationPayload.java index 6db9195..9078cd2 100644 --- a/src/main/java/video/api/client/api/models/SummaryCreationPayload.java +++ b/src/main/java/video/api/client/api/models/SummaryCreationPayload.java @@ -21,6 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import java.io.Serializable; /** @@ -86,6 +88,57 @@ public OriginEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_ORIGIN) private OriginEnum origin; + /** + * Gets or Sets attributes + */ + @JsonAdapter(AttributesEnum.Adapter.class) + public enum AttributesEnum { + ABSTRACT("abstract"), + + TAKEAWAYS("takeaways"); + + private String value; + + AttributesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AttributesEnum fromValue(String value) { + for (AttributesEnum b : AttributesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AttributesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AttributesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AttributesEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private List attributes = null; + public SummaryCreationPayload videoId(String videoId) { this.videoId = videoId; return this; @@ -130,6 +183,36 @@ public void setOrigin(OriginEnum origin) { this.origin = origin; } + public SummaryCreationPayload attributes(List attributes) { + this.attributes = attributes; + return this; + } + + public SummaryCreationPayload addAttributesItem(AttributesEnum attributesItem) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.add(attributesItem); + return this; + } + + /** + * Use this parameter to define the elements of a summary that you want to generate. If you do not define this + * parameter, the API generates a full summary with all attributes. + * + * @return attributes + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes.") + + public List getAttributes() { + return attributes; + } + + public void setAttributes(List attributes) { + this.attributes = attributes; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -140,12 +223,13 @@ public boolean equals(Object o) { } SummaryCreationPayload summaryCreationPayload = (SummaryCreationPayload) o; return Objects.equals(this.videoId, summaryCreationPayload.videoId) - && Objects.equals(this.origin, summaryCreationPayload.origin); + && Objects.equals(this.origin, summaryCreationPayload.origin) + && Objects.equals(this.attributes, summaryCreationPayload.attributes); } @Override public int hashCode() { - return Objects.hash(videoId, origin); + return Objects.hash(videoId, origin, attributes); } @Override @@ -154,6 +238,7 @@ public String toString() { sb.append("class SummaryCreationPayload {\n"); sb.append(" videoId: ").append(toIndentedString(videoId)).append("\n"); sb.append(" origin: ").append(toIndentedString(origin)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/video/api/client/api/models/SummarySource.java b/src/main/java/video/api/client/api/models/SummarySource.java index 0b8a042..b42c858 100644 --- a/src/main/java/video/api/client/api/models/SummarySource.java +++ b/src/main/java/video/api/client/api/models/SummarySource.java @@ -32,10 +32,6 @@ public class SummarySource implements Serializable, DeepObject { private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private String title; - public static final String SERIALIZED_NAME_ABSTRACT = "abstract"; @SerializedName(SERIALIZED_NAME_ABSTRACT) private String _abstract; @@ -44,27 +40,6 @@ public class SummarySource implements Serializable, DeepObject { @SerializedName(SERIALIZED_NAME_TAKEAWAYS) private List takeaways = null; - public SummarySource title(String title) { - this.title = title; - return this; - } - - /** - * A video title, based on the contents of the video. - * - * @return title - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "A short lecture on quantum theory", value = "A video title, based on the contents of the video.") - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - public SummarySource _abstract(String _abstract) { this._abstract = _abstract; return this; @@ -125,21 +100,19 @@ public boolean equals(Object o) { return false; } SummarySource summarySource = (SummarySource) o; - return Objects.equals(this.title, summarySource.title) - && Objects.equals(this._abstract, summarySource._abstract) + return Objects.equals(this._abstract, summarySource._abstract) && Objects.equals(this.takeaways, summarySource.takeaways); } @Override public int hashCode() { - return Objects.hash(title, _abstract, takeaways); + return Objects.hash(_abstract, takeaways); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SummarySource {\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" _abstract: ").append(toIndentedString(_abstract)).append("\n"); sb.append(" takeaways: ").append(toIndentedString(takeaways)).append("\n"); sb.append("}"); diff --git a/src/main/java/video/api/client/api/models/SummaryUpdatePayload.java b/src/main/java/video/api/client/api/models/SummaryUpdatePayload.java index 1de2400..1a36334 100644 --- a/src/main/java/video/api/client/api/models/SummaryUpdatePayload.java +++ b/src/main/java/video/api/client/api/models/SummaryUpdatePayload.java @@ -32,10 +32,6 @@ public class SummaryUpdatePayload implements Serializable, DeepObject { private static final long serialVersionUID = 1L; - public static final String SERIALIZED_NAME_TITLE = "title"; - @SerializedName(SERIALIZED_NAME_TITLE) - private String title; - public static final String SERIALIZED_NAME_ABSTRACT = "abstract"; @SerializedName(SERIALIZED_NAME_ABSTRACT) private String _abstract; @@ -44,27 +40,6 @@ public class SummaryUpdatePayload implements Serializable, DeepObject { @SerializedName(SERIALIZED_NAME_TAKEAWAYS) private List takeaways = null; - public SummaryUpdatePayload title(String title) { - this.title = title; - return this; - } - - /** - * A video title, based on the contents of the video. - * - * @return title - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "A short lecture on quantum theory", value = "A video title, based on the contents of the video.") - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - public SummaryUpdatePayload _abstract(String _abstract) { this._abstract = _abstract; return this; @@ -124,21 +99,19 @@ public boolean equals(Object o) { return false; } SummaryUpdatePayload summaryUpdatePayload = (SummaryUpdatePayload) o; - return Objects.equals(this.title, summaryUpdatePayload.title) - && Objects.equals(this._abstract, summaryUpdatePayload._abstract) + return Objects.equals(this._abstract, summaryUpdatePayload._abstract) && Objects.equals(this.takeaways, summaryUpdatePayload.takeaways); } @Override public int hashCode() { - return Objects.hash(title, _abstract, takeaways); + return Objects.hash(_abstract, takeaways); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SummaryUpdatePayload {\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" _abstract: ").append(toIndentedString(_abstract)).append("\n"); sb.append(" takeaways: ").append(toIndentedString(takeaways)).append("\n"); sb.append("}"); diff --git a/src/main/java/video/api/client/api/models/VideoCreationPayload.java b/src/main/java/video/api/client/api/models/VideoCreationPayload.java index 5176c24..731c146 100644 --- a/src/main/java/video/api/client/api/models/VideoCreationPayload.java +++ b/src/main/java/video/api/client/api/models/VideoCreationPayload.java @@ -205,6 +205,58 @@ public LanguageEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_TRANSCRIPT_SUMMARY) private Boolean transcriptSummary; + /** + * Gets or Sets transcriptSummaryAttributes + */ + @JsonAdapter(TranscriptSummaryAttributesEnum.Adapter.class) + public enum TranscriptSummaryAttributesEnum { + ABSTRACT("abstract"), + + TAKEAWAYS("takeaways"); + + private String value; + + TranscriptSummaryAttributesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TranscriptSummaryAttributesEnum fromValue(String value) { + for (TranscriptSummaryAttributesEnum b : TranscriptSummaryAttributesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TranscriptSummaryAttributesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TranscriptSummaryAttributesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TranscriptSummaryAttributesEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TRANSCRIPT_SUMMARY_ATTRIBUTES = "transcriptSummaryAttributes"; + @SerializedName(SERIALIZED_NAME_TRANSCRIPT_SUMMARY_ATTRIBUTES) + private List transcriptSummaryAttributes = null; + public VideoCreationPayload title(String title) { this.title = title; return this; @@ -530,6 +582,38 @@ public void setTranscriptSummary(Boolean transcriptSummary) { this.transcriptSummary = transcriptSummary; } + public VideoCreationPayload transcriptSummaryAttributes( + List transcriptSummaryAttributes) { + this.transcriptSummaryAttributes = transcriptSummaryAttributes; + return this; + } + + public VideoCreationPayload addTranscriptSummaryAttributesItem( + TranscriptSummaryAttributesEnum transcriptSummaryAttributesItem) { + if (this.transcriptSummaryAttributes == null) { + this.transcriptSummaryAttributes = new ArrayList<>(); + } + this.transcriptSummaryAttributes.add(transcriptSummaryAttributesItem); + return this; + } + + /** + * Use this parameter to define the elements of a summary that you want to generate. If you do not define this + * parameter, the API generates a full summary with all attributes. + * + * @return transcriptSummaryAttributes + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes.") + + public List getTranscriptSummaryAttributes() { + return transcriptSummaryAttributes; + } + + public void setTranscriptSummaryAttributes(List transcriptSummaryAttributes) { + this.transcriptSummaryAttributes = transcriptSummaryAttributes; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -552,13 +636,14 @@ public boolean equals(Object o) { && Objects.equals(this.watermark, videoCreationPayload.watermark) && Objects.equals(this.language, videoCreationPayload.language) && Objects.equals(this.transcript, videoCreationPayload.transcript) - && Objects.equals(this.transcriptSummary, videoCreationPayload.transcriptSummary); + && Objects.equals(this.transcriptSummary, videoCreationPayload.transcriptSummary) + && Objects.equals(this.transcriptSummaryAttributes, videoCreationPayload.transcriptSummaryAttributes); } @Override public int hashCode() { return Objects.hash(title, description, source, _public, panoramic, mp4Support, playerId, tags, metadata, clip, - watermark, language, transcript, transcriptSummary); + watermark, language, transcript, transcriptSummary, transcriptSummaryAttributes); } @Override @@ -579,6 +664,8 @@ public String toString() { sb.append(" language: ").append(toIndentedString(language)).append("\n"); sb.append(" transcript: ").append(toIndentedString(transcript)).append("\n"); sb.append(" transcriptSummary: ").append(toIndentedString(transcriptSummary)).append("\n"); + sb.append(" transcriptSummaryAttributes: ").append(toIndentedString(transcriptSummaryAttributes)) + .append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/video/api/client/api/models/VideoUpdatePayload.java b/src/main/java/video/api/client/api/models/VideoUpdatePayload.java index 3734e04..4fd3165 100644 --- a/src/main/java/video/api/client/api/models/VideoUpdatePayload.java +++ b/src/main/java/video/api/client/api/models/VideoUpdatePayload.java @@ -191,6 +191,58 @@ public LanguageEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_TRANSCRIPT_SUMMARY) private Boolean transcriptSummary; + /** + * Gets or Sets transcriptSummaryAttributes + */ + @JsonAdapter(TranscriptSummaryAttributesEnum.Adapter.class) + public enum TranscriptSummaryAttributesEnum { + ABSTRACT("abstract"), + + TAKEAWAYS("takeaways"); + + private String value; + + TranscriptSummaryAttributesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TranscriptSummaryAttributesEnum fromValue(String value) { + for (TranscriptSummaryAttributesEnum b : TranscriptSummaryAttributesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TranscriptSummaryAttributesEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TranscriptSummaryAttributesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TranscriptSummaryAttributesEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TRANSCRIPT_SUMMARY_ATTRIBUTES = "transcriptSummaryAttributes"; + @SerializedName(SERIALIZED_NAME_TRANSCRIPT_SUMMARY_ATTRIBUTES) + private List transcriptSummaryAttributes = null; + public VideoUpdatePayload playerId(String playerId) { this.playerId = new Nullable(playerId); @@ -459,6 +511,38 @@ public void setTranscriptSummary(Boolean transcriptSummary) { this.transcriptSummary = transcriptSummary; } + public VideoUpdatePayload transcriptSummaryAttributes( + List transcriptSummaryAttributes) { + this.transcriptSummaryAttributes = transcriptSummaryAttributes; + return this; + } + + public VideoUpdatePayload addTranscriptSummaryAttributesItem( + TranscriptSummaryAttributesEnum transcriptSummaryAttributesItem) { + if (this.transcriptSummaryAttributes == null) { + this.transcriptSummaryAttributes = new ArrayList<>(); + } + this.transcriptSummaryAttributes.add(transcriptSummaryAttributesItem); + return this; + } + + /** + * Use this parameter to define the elements of a summary that you want to generate. If you do not define this + * parameter, the API generates a full summary with all attributes. + * + * @return transcriptSummaryAttributes + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes.") + + public List getTranscriptSummaryAttributes() { + return transcriptSummaryAttributes; + } + + public void setTranscriptSummaryAttributes(List transcriptSummaryAttributes) { + this.transcriptSummaryAttributes = transcriptSummaryAttributes; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -478,13 +562,14 @@ public boolean equals(Object o) { && Objects.equals(this.metadata, videoUpdatePayload.metadata) && Objects.equals(this.language, videoUpdatePayload.language) && Objects.equals(this.transcript, videoUpdatePayload.transcript) - && Objects.equals(this.transcriptSummary, videoUpdatePayload.transcriptSummary); + && Objects.equals(this.transcriptSummary, videoUpdatePayload.transcriptSummary) + && Objects.equals(this.transcriptSummaryAttributes, videoUpdatePayload.transcriptSummaryAttributes); } @Override public int hashCode() { return Objects.hash(playerId, title, description, _public, panoramic, mp4Support, tags, metadata, language, - transcript, transcriptSummary); + transcript, transcriptSummary, transcriptSummaryAttributes); } @Override @@ -502,6 +587,8 @@ public String toString() { sb.append(" language: ").append(toIndentedString(language)).append("\n"); sb.append(" transcript: ").append(toIndentedString(transcript)).append("\n"); sb.append(" transcriptSummary: ").append(toIndentedString(transcriptSummary)).append("\n"); + sb.append(" transcriptSummaryAttributes: ").append(toIndentedString(transcriptSummaryAttributes)) + .append("\n"); sb.append("}"); return sb.toString(); }