* 429 |
* Too Many Requests |
* * X-RateLimit-Limit - The request limit per minute.
diff --git a/src/main/java/video/api/client/api/models/ConflictError.java b/src/main/java/video/api/client/api/models/ConflictError.java
new file mode 100644
index 0000000..9522ad8
--- /dev/null
+++ b/src/main/java/video/api/client/api/models/ConflictError.java
@@ -0,0 +1,200 @@
+/*
+ * api.video Java API client
+ * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
+ *
+ * The version of the OpenAPI document: 1
+ * Contact: ecosystem@api.video
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+package video.api.client.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * ConflictError
+ */
+
+public class ConflictError implements Serializable, DeepObject {
+ private static final long serialVersionUID = 1L;
+
+ public static final String SERIALIZED_NAME_TYPE = "type";
+ @SerializedName(SERIALIZED_NAME_TYPE)
+ private String type;
+
+ public static final String SERIALIZED_NAME_TITLE = "title";
+ @SerializedName(SERIALIZED_NAME_TITLE)
+ private String title;
+
+ public static final String SERIALIZED_NAME_NAME = "name";
+ @SerializedName(SERIALIZED_NAME_NAME)
+ private String name;
+
+ public static final String SERIALIZED_NAME_STATUS = "status";
+ @SerializedName(SERIALIZED_NAME_STATUS)
+ private Integer status;
+
+ public static final String SERIALIZED_NAME_DETAIL = "detail";
+ @SerializedName(SERIALIZED_NAME_DETAIL)
+ private String detail;
+
+ public ConflictError type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * A link to the error documentation.
+ *
+ * @return type
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "A link to the error documentation.")
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public ConflictError title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * A description of the error that occurred.
+ *
+ * @return title
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "A description of the error that occurred.")
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public ConflictError name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the parameter that caused the error.
+ *
+ * @return name
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "The name of the parameter that caused the error.")
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ConflictError status(Integer status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * The HTTP status code.
+ *
+ * @return status
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "The HTTP status code.")
+
+ public Integer getStatus() {
+ return status;
+ }
+
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ public ConflictError detail(String detail) {
+ this.detail = detail;
+ return this;
+ }
+
+ /**
+ * A solution for the error.
+ *
+ * @return detail
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "A solution for the error.")
+
+ public String getDetail() {
+ return detail;
+ }
+
+ public void setDetail(String detail) {
+ this.detail = detail;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ConflictError conflictError = (ConflictError) o;
+ return Objects.equals(this.type, conflictError.type) && Objects.equals(this.title, conflictError.title)
+ && Objects.equals(this.name, conflictError.name) && Objects.equals(this.status, conflictError.status)
+ && Objects.equals(this.detail, conflictError.detail);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(type, title, name, status, detail);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ConflictError {\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" title: ").append(toIndentedString(title)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" detail: ").append(toIndentedString(detail)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
diff --git a/src/main/java/video/api/client/api/models/NotFound.java b/src/main/java/video/api/client/api/models/NotFound.java
index 85ec491..e316f79 100644
--- a/src/main/java/video/api/client/api/models/NotFound.java
+++ b/src/main/java/video/api/client/api/models/NotFound.java
@@ -52,12 +52,12 @@ public NotFound type(String type) {
}
/**
- * Get type
+ * A link to the error documentation.
*
* @return type
**/
@javax.annotation.Nullable
- @ApiModelProperty(value = "")
+ @ApiModelProperty(value = "A link to the error documentation.")
public String getType() {
return type;
@@ -73,12 +73,12 @@ public NotFound title(String title) {
}
/**
- * Get title
+ * A description of the error that occurred.
*
* @return title
**/
@javax.annotation.Nullable
- @ApiModelProperty(value = "")
+ @ApiModelProperty(value = "A description of the error that occurred.")
public String getTitle() {
return title;
@@ -94,12 +94,12 @@ public NotFound name(String name) {
}
/**
- * Get name
+ * The name of the parameter that caused the error.
*
* @return name
**/
@javax.annotation.Nullable
- @ApiModelProperty(value = "")
+ @ApiModelProperty(value = "The name of the parameter that caused the error.")
public String getName() {
return name;
@@ -115,12 +115,12 @@ public NotFound status(Integer status) {
}
/**
- * Get status
+ * The HTTP status code.
*
* @return status
**/
@javax.annotation.Nullable
- @ApiModelProperty(value = "")
+ @ApiModelProperty(value = "The HTTP status code.")
public Integer getStatus() {
return status;
diff --git a/src/main/java/video/api/client/api/models/SummariesListResponse.java b/src/main/java/video/api/client/api/models/SummariesListResponse.java
new file mode 100644
index 0000000..f283a3c
--- /dev/null
+++ b/src/main/java/video/api/client/api/models/SummariesListResponse.java
@@ -0,0 +1,128 @@
+/*
+ * api.video Java API client
+ * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
+ *
+ * The version of the OpenAPI document: 1
+ * Contact: ecosystem@api.video
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+package video.api.client.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import video.api.client.api.models.Pagination;
+import video.api.client.api.models.Summary;
+import java.io.Serializable;
+
+/**
+ * SummariesListResponse
+ */
+
+public class SummariesListResponse implements Serializable, DeepObject {
+ private static final long serialVersionUID = 1L;
+
+ public static final String SERIALIZED_NAME_DATA = "data";
+ @SerializedName(SERIALIZED_NAME_DATA)
+ private List data = new ArrayList<>();
+
+ public static final String SERIALIZED_NAME_PAGINATION = "pagination";
+ @SerializedName(SERIALIZED_NAME_PAGINATION)
+ private Pagination pagination;
+
+ public SummariesListResponse data(List data) {
+ this.data = data;
+ return this;
+ }
+
+ public SummariesListResponse addDataItem(Summary dataItem) {
+ this.data.add(dataItem);
+ return this;
+ }
+
+ /**
+ * An array of summary objects.
+ *
+ * @return data
+ **/
+ @ApiModelProperty(required = true, value = "An array of summary objects.")
+
+ public List getData() {
+ return data;
+ }
+
+ public void setData(List data) {
+ this.data = data;
+ }
+
+ public SummariesListResponse pagination(Pagination pagination) {
+ this.pagination = pagination;
+ return this;
+ }
+
+ /**
+ * Get pagination
+ *
+ * @return pagination
+ **/
+ @ApiModelProperty(required = true, value = "")
+
+ public Pagination getPagination() {
+ return pagination;
+ }
+
+ public void setPagination(Pagination pagination) {
+ this.pagination = pagination;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SummariesListResponse summariesListResponse = (SummariesListResponse) o;
+ return Objects.equals(this.data, summariesListResponse.data)
+ && Objects.equals(this.pagination, summariesListResponse.pagination);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, pagination);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class SummariesListResponse {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
diff --git a/src/main/java/video/api/client/api/models/Summary.java b/src/main/java/video/api/client/api/models/Summary.java
new file mode 100644
index 0000000..0e9b7fc
--- /dev/null
+++ b/src/main/java/video/api/client/api/models/Summary.java
@@ -0,0 +1,342 @@
+/*
+ * api.video Java API client
+ * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
+ *
+ * The version of the OpenAPI document: 1
+ * Contact: ecosystem@api.video
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+package video.api.client.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.io.Serializable;
+
+/**
+ * Summary
+ */
+
+public class Summary implements Serializable, DeepObject {
+ private static final long serialVersionUID = 1L;
+
+ public static final String SERIALIZED_NAME_SUMMARY_ID = "summaryId";
+ @SerializedName(SERIALIZED_NAME_SUMMARY_ID)
+ private String summaryId;
+
+ public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
+ @SerializedName(SERIALIZED_NAME_CREATED_AT)
+ private OffsetDateTime createdAt;
+
+ public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt";
+ @SerializedName(SERIALIZED_NAME_UPDATED_AT)
+ private OffsetDateTime updatedAt;
+
+ public static final String SERIALIZED_NAME_VIDEO_ID = "videoId";
+ @SerializedName(SERIALIZED_NAME_VIDEO_ID)
+ private String videoId;
+
+ /**
+ * Returns the origin of how the summary was created. - `api` means that no summary was generated
+ * automatically. You can add summary manually using the `PATCH /summaries/{summaryId}/source` endpoint
+ * operation. Until this happens, `sourceStatus` returns `missing`. - `auto` means
+ * that the API generated the summary automatically.
+ */
+ @JsonAdapter(OriginEnum.Adapter.class)
+ public enum OriginEnum {
+ API("api"),
+
+ AUTO("auto");
+
+ private String value;
+
+ OriginEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static OriginEnum fromValue(String value) {
+ for (OriginEnum b : OriginEnum.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 OriginEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public OriginEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return OriginEnum.fromValue(value);
+ }
+ }
+ }
+
+ public static final String SERIALIZED_NAME_ORIGIN = "origin";
+ @SerializedName(SERIALIZED_NAME_ORIGIN)
+ private OriginEnum origin;
+
+ /**
+ * Returns the current status of summary generation. `missing`: the input for a summary is not present.
+ * `waiting` : the input video is being processed and a summary will be generated. `failed`: a
+ * technical issue prevented summary generation. `completed`: the summary is generated.
+ * `unprocessable`: the API rules the source video to be unsuitable for summary generation. An example for
+ * this is an input video that has no audio.
+ */
+ @JsonAdapter(SourceStatusEnum.Adapter.class)
+ public enum SourceStatusEnum {
+ MISSING("missing"),
+
+ WAITING("waiting"),
+
+ FAILED("failed"),
+
+ COMPLETED("completed"),
+
+ UNPROCESSABLE("unprocessable");
+
+ private String value;
+
+ SourceStatusEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static SourceStatusEnum fromValue(String value) {
+ for (SourceStatusEnum b : SourceStatusEnum.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 SourceStatusEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public SourceStatusEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return SourceStatusEnum.fromValue(value);
+ }
+ }
+ }
+
+ public static final String SERIALIZED_NAME_SOURCE_STATUS = "sourceStatus";
+ @SerializedName(SERIALIZED_NAME_SOURCE_STATUS)
+ private SourceStatusEnum sourceStatus;
+
+ public Summary summaryId(String summaryId) {
+ this.summaryId = summaryId;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the summary object.
+ *
+ * @return summaryId
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(example = "summary_1CGHWuXjhxmeH4WiZ51234", value = "The unique identifier of the summary object.")
+
+ public String getSummaryId() {
+ return summaryId;
+ }
+
+ public void setSummaryId(String summaryId) {
+ this.summaryId = summaryId;
+ }
+
+ public Summary createdAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * Returns the date and time when the summary was created in ATOM date-time format.
+ *
+ * @return createdAt
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(example = "2024-05-28T11:15:07Z", value = "Returns the date and time when the summary was created in ATOM date-time format.")
+
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(OffsetDateTime createdAt) {
+ this.createdAt = createdAt;
+ }
+
+ public Summary updatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ /**
+ * Returns the date and time when the summary was last updated in ATOM date-time format.
+ *
+ * @return updatedAt
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(example = "2024-05-28T11:15:07Z", value = "Returns the date and time when the summary was last updated in ATOM date-time format.")
+
+ public OffsetDateTime getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(OffsetDateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+
+ public Summary videoId(String videoId) {
+ this.videoId = videoId;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the video object.
+ *
+ * @return videoId
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(example = "vi4k0jvEUuaTdRAEjQ4Prklg", value = "The unique identifier of the video object.")
+
+ public String getVideoId() {
+ return videoId;
+ }
+
+ public void setVideoId(String videoId) {
+ this.videoId = videoId;
+ }
+
+ public Summary origin(OriginEnum origin) {
+ this.origin = origin;
+ return this;
+ }
+
+ /**
+ * Returns the origin of how the summary was created. - `api` means that no summary was generated
+ * automatically. You can add summary manually using the `PATCH /summaries/{summaryId}/source` endpoint
+ * operation. Until this happens, `sourceStatus` returns `missing`. - `auto` means
+ * that the API generated the summary automatically.
+ *
+ * @return origin
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "Returns the origin of how the summary was created. - `api` means that no summary was generated automatically. You can add summary manually using the `PATCH /summaries/{summaryId}/source` endpoint operation. Until this happens, `sourceStatus` returns `missing`. - `auto` means that the API generated the summary automatically.")
+
+ public OriginEnum getOrigin() {
+ return origin;
+ }
+
+ public void setOrigin(OriginEnum origin) {
+ this.origin = origin;
+ }
+
+ public Summary sourceStatus(SourceStatusEnum sourceStatus) {
+ this.sourceStatus = sourceStatus;
+ return this;
+ }
+
+ /**
+ * Returns the current status of summary generation. `missing`: the input for a summary is not present.
+ * `waiting` : the input video is being processed and a summary will be generated. `failed`: a
+ * technical issue prevented summary generation. `completed`: the summary is generated.
+ * `unprocessable`: the API rules the source video to be unsuitable for summary generation. An example for
+ * this is an input video that has no audio.
+ *
+ * @return sourceStatus
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "Returns the current status of summary generation. `missing`: the input for a summary is not present. `waiting` : the input video is being processed and a summary will be generated. `failed`: a technical issue prevented summary generation. `completed`: the summary is generated. `unprocessable`: the API rules the source video to be unsuitable for summary generation. An example for this is an input video that has no audio.")
+
+ public SourceStatusEnum getSourceStatus() {
+ return sourceStatus;
+ }
+
+ public void setSourceStatus(SourceStatusEnum sourceStatus) {
+ this.sourceStatus = sourceStatus;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Summary summary = (Summary) o;
+ return Objects.equals(this.summaryId, summary.summaryId) && Objects.equals(this.createdAt, summary.createdAt)
+ && Objects.equals(this.updatedAt, summary.updatedAt) && Objects.equals(this.videoId, summary.videoId)
+ && Objects.equals(this.origin, summary.origin)
+ && Objects.equals(this.sourceStatus, summary.sourceStatus);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(summaryId, createdAt, updatedAt, videoId, origin, sourceStatus);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Summary {\n");
+ sb.append(" summaryId: ").append(toIndentedString(summaryId)).append("\n");
+ sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
+ sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
+ sb.append(" videoId: ").append(toIndentedString(videoId)).append("\n");
+ sb.append(" origin: ").append(toIndentedString(origin)).append("\n");
+ sb.append(" sourceStatus: ").append(toIndentedString(sourceStatus)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
diff --git a/src/main/java/video/api/client/api/models/SummaryCreationPayload.java b/src/main/java/video/api/client/api/models/SummaryCreationPayload.java
new file mode 100644
index 0000000..6db9195
--- /dev/null
+++ b/src/main/java/video/api/client/api/models/SummaryCreationPayload.java
@@ -0,0 +1,171 @@
+/*
+ * api.video Java API client
+ * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
+ *
+ * The version of the OpenAPI document: 1
+ * Contact: ecosystem@api.video
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+package video.api.client.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * SummaryCreationPayload
+ */
+
+public class SummaryCreationPayload implements Serializable, DeepObject {
+ private static final long serialVersionUID = 1L;
+
+ public static final String SERIALIZED_NAME_VIDEO_ID = "videoId";
+ @SerializedName(SERIALIZED_NAME_VIDEO_ID)
+ private String videoId;
+
+ /**
+ * 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.
+ */
+ @JsonAdapter(OriginEnum.Adapter.class)
+ public enum OriginEnum {
+ AUTO("auto");
+
+ private String value;
+
+ OriginEnum(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ public static OriginEnum fromValue(String value) {
+ for (OriginEnum b : OriginEnum.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 OriginEnum enumeration) throws IOException {
+ jsonWriter.value(enumeration.getValue());
+ }
+
+ @Override
+ public OriginEnum read(final JsonReader jsonReader) throws IOException {
+ String value = jsonReader.nextString();
+ return OriginEnum.fromValue(value);
+ }
+ }
+ }
+
+ public static final String SERIALIZED_NAME_ORIGIN = "origin";
+ @SerializedName(SERIALIZED_NAME_ORIGIN)
+ private OriginEnum origin;
+
+ public SummaryCreationPayload videoId(String videoId) {
+ this.videoId = videoId;
+ return this;
+ }
+
+ /**
+ * Create a summary of a video using the video ID.
+ *
+ * @return videoId
+ **/
+ @ApiModelProperty(example = "vi4k0jvEUuaTdRAEjQ4Jfrgz", required = true, value = "Create a summary of a video using the video ID.")
+
+ public String getVideoId() {
+ return videoId;
+ }
+
+ public void setVideoId(String videoId) {
+ this.videoId = videoId;
+ }
+
+ public SummaryCreationPayload origin(OriginEnum origin) {
+ this.origin = origin;
+ return this;
+ }
+
+ /**
+ * 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.
+ *
+ * @return origin
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(example = "auto", value = "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.")
+
+ public OriginEnum getOrigin() {
+ return origin;
+ }
+
+ public void setOrigin(OriginEnum origin) {
+ this.origin = origin;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SummaryCreationPayload summaryCreationPayload = (SummaryCreationPayload) o;
+ return Objects.equals(this.videoId, summaryCreationPayload.videoId)
+ && Objects.equals(this.origin, summaryCreationPayload.origin);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(videoId, origin);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class SummaryCreationPayload {\n");
+ sb.append(" videoId: ").append(toIndentedString(videoId)).append("\n");
+ sb.append(" origin: ").append(toIndentedString(origin)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
diff --git a/src/main/java/video/api/client/api/models/SummarySource.java b/src/main/java/video/api/client/api/models/SummarySource.java
new file mode 100644
index 0000000..0b8a042
--- /dev/null
+++ b/src/main/java/video/api/client/api/models/SummarySource.java
@@ -0,0 +1,159 @@
+/*
+ * api.video Java API client
+ * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
+ *
+ * The version of the OpenAPI document: 1
+ * Contact: ecosystem@api.video
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+package video.api.client.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+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;
+
+/**
+ * SummarySource
+ */
+
+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;
+
+ public static final String SERIALIZED_NAME_TAKEAWAYS = "takeaways";
+ @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;
+ }
+
+ /**
+ * 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.
+ *
+ * @return _abstract
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(example = "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.", value = "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.")
+
+ public String getAbstract() {
+ return _abstract;
+ }
+
+ public void setAbstract(String _abstract) {
+ this._abstract = _abstract;
+ }
+
+ public SummarySource takeaways(List takeaways) {
+ this.takeaways = takeaways;
+ return this;
+ }
+
+ public SummarySource addTakeawaysItem(String takeawaysItem) {
+ if (this.takeaways == null) {
+ this.takeaways = new ArrayList<>();
+ }
+ this.takeaways.add(takeawaysItem);
+ return this;
+ }
+
+ /**
+ * A list of 3 key points from the video, in chronological order.
+ *
+ * @return takeaways
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(example = "[\"Quantum theory is complicated.\",\"Schrödinger's cat is neither dead, nor alive.\",\"Quantum computers are super cool.\"]", value = "A list of 3 key points from the video, in chronological order.")
+
+ public List getTakeaways() {
+ return takeaways;
+ }
+
+ public void setTakeaways(List takeaways) {
+ this.takeaways = takeaways;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SummarySource summarySource = (SummarySource) o;
+ return Objects.equals(this.title, summarySource.title)
+ && Objects.equals(this._abstract, summarySource._abstract)
+ && Objects.equals(this.takeaways, summarySource.takeaways);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(title, _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("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
diff --git a/src/main/java/video/api/client/api/models/SummaryUpdatePayload.java b/src/main/java/video/api/client/api/models/SummaryUpdatePayload.java
new file mode 100644
index 0000000..1de2400
--- /dev/null
+++ b/src/main/java/video/api/client/api/models/SummaryUpdatePayload.java
@@ -0,0 +1,158 @@
+/*
+ * api.video Java API client
+ * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
+ *
+ * The version of the OpenAPI document: 1
+ * Contact: ecosystem@api.video
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+package video.api.client.api.models;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+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;
+
+/**
+ * SummaryUpdatePayload
+ */
+
+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;
+
+ public static final String SERIALIZED_NAME_TAKEAWAYS = "takeaways";
+ @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;
+ }
+
+ /**
+ * A short outline of the contents of the video.
+ *
+ * @return _abstract
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(example = "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.", value = "A short outline of the contents of the video.")
+
+ public String getAbstract() {
+ return _abstract;
+ }
+
+ public void setAbstract(String _abstract) {
+ this._abstract = _abstract;
+ }
+
+ public SummaryUpdatePayload takeaways(List takeaways) {
+ this.takeaways = takeaways;
+ return this;
+ }
+
+ public SummaryUpdatePayload addTakeawaysItem(String takeawaysItem) {
+ if (this.takeaways == null) {
+ this.takeaways = new ArrayList<>();
+ }
+ this.takeaways.add(takeawaysItem);
+ return this;
+ }
+
+ /**
+ * A list of 3 key points from the video, in chronological order.
+ *
+ * @return takeaways
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(example = "[\"Quantum theory is complicated.\",\"Schrödinger's cat is neither dead, nor alive.\",\"Quantum computers are super cool.\"]", value = "A list of 3 key points from the video, in chronological order.")
+
+ public List getTakeaways() {
+ return takeaways;
+ }
+
+ public void setTakeaways(List takeaways) {
+ this.takeaways = takeaways;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SummaryUpdatePayload summaryUpdatePayload = (SummaryUpdatePayload) o;
+ return Objects.equals(this.title, summaryUpdatePayload.title)
+ && Objects.equals(this._abstract, summaryUpdatePayload._abstract)
+ && Objects.equals(this.takeaways, summaryUpdatePayload.takeaways);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(title, _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("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
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 b19be81..5176c24 100644
--- a/src/main/java/video/api/client/api/models/VideoCreationPayload.java
+++ b/src/main/java/video/api/client/api/models/VideoCreationPayload.java
@@ -201,6 +201,10 @@ public LanguageEnum read(final JsonReader jsonReader) throws IOException {
@SerializedName(SERIALIZED_NAME_TRANSCRIPT)
private Boolean transcript;
+ public static final String SERIALIZED_NAME_TRANSCRIPT_SUMMARY = "transcriptSummary";
+ @SerializedName(SERIALIZED_NAME_TRANSCRIPT_SUMMARY)
+ private Boolean transcriptSummary;
+
public VideoCreationPayload title(String title) {
this.title = title;
return this;
@@ -501,6 +505,31 @@ public void setTranscript(Boolean transcript) {
this.transcript = transcript;
}
+ public VideoCreationPayload transcriptSummary(Boolean transcriptSummary) {
+ this.transcriptSummary = transcriptSummary;
+ return this;
+ }
+
+ /**
+ * 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.
+ *
+ * @return transcriptSummary
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "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.")
+
+ public Boolean getTranscriptSummary() {
+ return transcriptSummary;
+ }
+
+ public void setTranscriptSummary(Boolean transcriptSummary) {
+ this.transcriptSummary = transcriptSummary;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -522,13 +551,14 @@ public boolean equals(Object o) {
&& Objects.equals(this.clip, videoCreationPayload.clip)
&& Objects.equals(this.watermark, videoCreationPayload.watermark)
&& Objects.equals(this.language, videoCreationPayload.language)
- && Objects.equals(this.transcript, videoCreationPayload.transcript);
+ && Objects.equals(this.transcript, videoCreationPayload.transcript)
+ && Objects.equals(this.transcriptSummary, videoCreationPayload.transcriptSummary);
}
@Override
public int hashCode() {
return Objects.hash(title, description, source, _public, panoramic, mp4Support, playerId, tags, metadata, clip,
- watermark, language, transcript);
+ watermark, language, transcript, transcriptSummary);
}
@Override
@@ -548,6 +578,7 @@ public String toString() {
sb.append(" watermark: ").append(toIndentedString(watermark)).append("\n");
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("}");
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 ced93f8..3734e04 100644
--- a/src/main/java/video/api/client/api/models/VideoUpdatePayload.java
+++ b/src/main/java/video/api/client/api/models/VideoUpdatePayload.java
@@ -187,6 +187,10 @@ public LanguageEnum read(final JsonReader jsonReader) throws IOException {
@SerializedName(SERIALIZED_NAME_TRANSCRIPT)
private Boolean transcript;
+ public static final String SERIALIZED_NAME_TRANSCRIPT_SUMMARY = "transcriptSummary";
+ @SerializedName(SERIALIZED_NAME_TRANSCRIPT_SUMMARY)
+ private Boolean transcriptSummary;
+
public VideoUpdatePayload playerId(String playerId) {
this.playerId = new Nullable(playerId);
@@ -431,6 +435,30 @@ public void setTranscript(Boolean transcript) {
this.transcript = transcript;
}
+ public VideoUpdatePayload transcriptSummary(Boolean transcriptSummary) {
+ this.transcriptSummary = transcriptSummary;
+ return this;
+ }
+
+ /**
+ * 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.
+ *
+ * @return transcriptSummary
+ **/
+ @javax.annotation.Nullable
+ @ApiModelProperty(value = "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.")
+
+ public Boolean getTranscriptSummary() {
+ return transcriptSummary;
+ }
+
+ public void setTranscriptSummary(Boolean transcriptSummary) {
+ this.transcriptSummary = transcriptSummary;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -449,13 +477,14 @@ public boolean equals(Object o) {
&& Objects.equals(this.tags, videoUpdatePayload.tags)
&& Objects.equals(this.metadata, videoUpdatePayload.metadata)
&& Objects.equals(this.language, videoUpdatePayload.language)
- && Objects.equals(this.transcript, videoUpdatePayload.transcript);
+ && Objects.equals(this.transcript, videoUpdatePayload.transcript)
+ && Objects.equals(this.transcriptSummary, videoUpdatePayload.transcriptSummary);
}
@Override
public int hashCode() {
return Objects.hash(playerId, title, description, _public, panoramic, mp4Support, tags, metadata, language,
- transcript);
+ transcript, transcriptSummary);
}
@Override
@@ -472,6 +501,7 @@ public String toString() {
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
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("}");
return sb.toString();
}
diff --git a/src/test/java/video/api/client/api/clients/SummariesApiTest.java b/src/test/java/video/api/client/api/clients/SummariesApiTest.java
new file mode 100644
index 0000000..505dee6
--- /dev/null
+++ b/src/test/java/video/api/client/api/clients/SummariesApiTest.java
@@ -0,0 +1,163 @@
+/*
+ * api.video Java API client
+ * api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
+ *
+ * The version of the OpenAPI document: 1
+ * Contact: ecosystem@api.video
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+package video.api.client.api.clients;
+
+import video.api.client.api.ApiException;
+import video.api.client.api.models.*;
+
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatNoException;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+/**
+ * API tests for SummariesApi
+ */
+@DisplayName("SummariesApi")
+public class SummariesApiTest extends AbstractApiTest {
+
+ private final SummariesApi api = apiClientMock.summaries();
+
+ @Nested
+ @DisplayName("create")
+ class create {
+ private static final String PAYLOADS_PATH = "/payloads/summaries/create/";
+
+ @Test
+ @DisplayName("required parameters")
+ public void requiredParametersTest() {
+ answerOnAnyRequest(201, "{}");
+
+ assertThatThrownBy(() -> api.create(new SummaryCreationPayload()))
+ .hasMessage("Missing the required parameter 'summaryCreationPayload.videoId' when calling create");
+
+ assertThatThrownBy(() -> api.create(null))
+ .hasMessage("Missing the required parameter 'summaryCreationPayload' when calling create");
+
+ assertThatNoException().isThrownBy(() -> api.create(new SummaryCreationPayload().videoId("123")));
+ }
+
+ @Test
+ @DisplayName("409 response")
+ public void responseWithStatus409Test() throws ApiException {
+ answerOnAnyRequest(409, readResourceFile(PAYLOADS_PATH + "responses/409.json"));
+
+ assertThatThrownBy(() -> api.create(new SummaryCreationPayload().videoId("123")))
+ .isInstanceOf(ApiException.class)
+ .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(409))
+ .hasMessage("A summary already exists or is being created on this video.");
+
+ }
+ }
+
+ @Nested
+ @DisplayName("get")
+ class get {
+ private static final String PAYLOADS_PATH = "/payloads/summaries/getSummarySource/";
+
+ @Test
+ @DisplayName("required parameters")
+ public void requiredParametersTest() {
+ answerOnAnyRequest(201, "{}");
+
+ assertThatNoException().isThrownBy(() -> api.getSummarySource("summary_1CGHWuXjhxmeH4WiZ51234"));
+
+ assertThatThrownBy(() -> api.getSummarySource(null))
+ .hasMessage("Missing the required parameter 'summaryId' when calling getSummarySource");
+ }
+
+ @Test
+ @DisplayName("404 response")
+ public void responseWithStatus404Test() throws ApiException {
+ answerOnAnyRequest(404, readResourceFile(PAYLOADS_PATH + "responses/404.json"));
+
+ assertThatThrownBy(() -> api.getSummarySource("summary_1CGHWuXjhxmeH4WiZ51234"))
+ .isInstanceOf(ApiException.class)
+ .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(404))
+ .hasMessage("The requested resource was not found.");
+
+ }
+ }
+
+ @Nested
+ @DisplayName("update")
+ class update {
+ private static final String PAYLOADS_PATH = "/payloads/summaries/update/";
+
+ @Test
+ @DisplayName("required parameters")
+ public void requiredParametersTest() {
+ answerOnAnyRequest(201, "{}");
+
+ assertThatNoException()
+ .isThrownBy(() -> api.update("summary_1CGHWuXjhxmeH4WiZ51234", new SummaryUpdatePayload()));
+ assertThatThrownBy(() -> api.update(null, null))
+ .hasMessage("Missing the required parameter 'summaryId' when calling update");
+ }
+
+ @Test
+ @DisplayName("409 response")
+ public void responseWithStatus409Test() throws ApiException {
+ answerOnAnyRequest(409, readResourceFile(PAYLOADS_PATH + "responses/409.json"));
+
+ assertThatThrownBy(() -> api.update("summary_1CGHWuXjhxmeH4WiZ51234", new SummaryUpdatePayload()))
+ .isInstanceOf(ApiException.class)
+ .satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(409))
+ .hasMessage("A summary already exists or is being created on this video.");
+ }
+ }
+
+ @Nested
+ @DisplayName("delete")
+ class delete {
+ private static final String PAYLOADS_PATH = "/payloads/summaries/delete/";
+
+ @Test
+ @DisplayName("required parameters")
+ public void requiredParametersTest() {
+ answerOnAnyRequest(201, "{}");
+
+ assertThatNoException().isThrownBy(() -> api.delete("summary_1CGHWuXjhxmeH4WiZ51234"));
+ assertThatThrownBy(() -> api.delete(null))
+ .hasMessage("Missing the required parameter 'summaryId' when calling delete");
+ }
+ }
+
+ @Nested
+ @DisplayName("list")
+ class list {
+ private static final String PAYLOADS_PATH = "/payloads/summaries/list/";
+
+ @Test
+ @DisplayName("required parameters")
+ public void requiredParametersTest() {
+ answerOnAnyRequest(201, "{}");
+
+ assertThatNoException().isThrownBy(() -> api.list());
+ assertThatNoException().isThrownBy(() -> api.list());
+ //
+ }
+
+ @Test
+ @DisplayName("200 response")
+ public void responseWithStatus200Test() throws ApiException {
+ answerOnAnyRequest(200, readResourceFile(PAYLOADS_PATH + "responses/200.json"));
+
+ Page execute = api.list().execute();
+
+ }
+ }
+
+}
diff --git a/src/test/resources/payloads/summaries/create/responses/201.json b/src/test/resources/payloads/summaries/create/responses/201.json
new file mode 100644
index 0000000..4144fc4
--- /dev/null
+++ b/src/test/resources/payloads/summaries/create/responses/201.json
@@ -0,0 +1,8 @@
+{
+ "summaryId" : "summary_1CGHWuXjhxmeH4WiZ51234",
+ "createdAt" : "2024-07-14T23:36:07+00:00",
+ "updatedAt" : "2024-07-14T23:36:07+00:00",
+ "videoId" : "vilkR8K3N7yrRcxcMt91234",
+ "origin" : "auto",
+ "sourceStatus" : "completed"
+}
\ No newline at end of file
diff --git a/src/test/resources/payloads/summaries/create/responses/409.json b/src/test/resources/payloads/summaries/create/responses/409.json
new file mode 100644
index 0000000..8d8965e
--- /dev/null
+++ b/src/test/resources/payloads/summaries/create/responses/409.json
@@ -0,0 +1,7 @@
+{
+ "type" : "https://docs.api.video/reference/summary-already-exists",
+ "title" : "A summary already exists or is being created on this video.",
+ "status" : 409,
+ "detail" : "You can delete the existing summary and generate a new one.",
+ "name" : "videoId"
+}
\ No newline at end of file
diff --git a/src/test/resources/payloads/summaries/getSummarySource/responses/404.json b/src/test/resources/payloads/summaries/getSummarySource/responses/404.json
new file mode 100644
index 0000000..01e6e6d
--- /dev/null
+++ b/src/test/resources/payloads/summaries/getSummarySource/responses/404.json
@@ -0,0 +1,6 @@
+{
+ "type" : "https://docs.api.video/reference/resource-not-found",
+ "title" : "The requested resource was not found.",
+ "name" : "summaryId",
+ "status" : 404
+}
\ No newline at end of file
diff --git a/src/test/resources/payloads/summaries/list/responses/200.json b/src/test/resources/payloads/summaries/list/responses/200.json
new file mode 100644
index 0000000..e057a94
--- /dev/null
+++ b/src/test/resources/payloads/summaries/list/responses/200.json
@@ -0,0 +1,34 @@
+{
+ "data" : [ {
+ "summaryId" : "summary_1CGHWuXjhxmeH4WiZ51234",
+ "createdAt" : "2024-07-14T23:36:07+00:00",
+ "updatedAt" : "2024-07-14T23:36:07+00:00",
+ "videoId" : "vilkR8K3N7yrRcxcMt91234",
+ "origin" : "auto",
+ "sourceStatus" : "completed"
+ }, {
+ "summaryId" : "summary_123HWuXjhxmeH4WiZ55678",
+ "createdAt" : "2024-07-15T23:36:07+00:00",
+ "updatedAt" : "2024-07-15T23:36:07+00:00",
+ "videoId" : "vibaBXK3N7yrRcxcMt95678",
+ "origin" : "auto",
+ "sourceStatus" : "waiting"
+ } ],
+ "pagination" : {
+ "currentPage" : 1,
+ "pageSize" : 25,
+ "pagesTotal" : 1,
+ "itemsTotal" : 11,
+ "currentPageItems" : 11,
+ "links" : [ {
+ "rel" : "self",
+ "uri" : "https://ws.api.video/summaries?currentPage=1"
+ }, {
+ "rel" : "first",
+ "uri" : "https://ws.api.video/summaries?currentPage=1"
+ }, {
+ "rel" : "last",
+ "uri" : "https://ws.api.video/summaries?currentPage=1"
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/payloads/summaries/update/responses/409.json b/src/test/resources/payloads/summaries/update/responses/409.json
new file mode 100644
index 0000000..5ad057e
--- /dev/null
+++ b/src/test/resources/payloads/summaries/update/responses/409.json
@@ -0,0 +1,6 @@
+{
+ "type" : "https://docs.api.video/reference/summary-already-exists",
+ "title" : "A summary already exists or is being created on this video.",
+ "status" : 409,
+ "detail" : "You can delete the existing summary and generate a new one."
+}
\ No newline at end of file
diff --git a/src/test/resources/payloads/videos/update/responses/409.json b/src/test/resources/payloads/videos/update/responses/409.json
new file mode 100644
index 0000000..93fe9b8
--- /dev/null
+++ b/src/test/resources/payloads/videos/update/responses/409.json
@@ -0,0 +1,7 @@
+{
+ "type" : "https://docs.api.video/reference/summary-already-exists",
+ "title" : "A summary already exists or is being created on this video.",
+ "status" : 409,
+ "detail" : "You can delete the existing summary and generate a new one.",
+ "name" : "transcriptSummary"
+}
\ No newline at end of file
|