From 5e4a618e6fffdda40924bc59fac226382eedb4dd Mon Sep 17 00:00:00 2001 From: olivierapivideo Date: Mon, 21 Oct 2024 13:19:12 +0000 Subject: [PATCH] Add summary feature --- CHANGELOG.md | 3 + README.md | 27 ++ api/openapi.yaml | 737 ++++++++++++++++++++++++++++++ api_summaries.go | 407 +++++++++++++++++ client.go | 6 +- docs/ConflictError.md | 160 +++++++ docs/NotFound.md | 8 +- docs/Summaries.md | 339 ++++++++++++++ docs/SummariesListResponse.md | 72 +++ docs/Summary.md | 186 ++++++++ docs/SummaryCreationPayload.md | 77 ++++ docs/SummarySource.md | 108 +++++ docs/SummaryUpdatePayload.md | 108 +++++ docs/VideoCreationPayload.md | 26 ++ docs/VideoUpdatePayload.md | 26 ++ model_conflict_error.go | 233 ++++++++++ model_not_found.go | 12 +- model_summaries_list_response.go | 116 +++++ model_summary.go | 267 +++++++++++ model_summary_creation_payload.go | 124 +++++ model_summary_source.go | 165 +++++++ model_summary_update_payload.go | 165 +++++++ model_video_creation_payload.go | 34 ++ model_video_update_payload.go | 34 ++ 24 files changed, 3430 insertions(+), 10 deletions(-) create mode 100644 api_summaries.go create mode 100644 docs/ConflictError.md create mode 100644 docs/Summaries.md create mode 100644 docs/SummariesListResponse.md create mode 100644 docs/Summary.md create mode 100644 docs/SummaryCreationPayload.md create mode 100644 docs/SummarySource.md create mode 100644 docs/SummaryUpdatePayload.md create mode 100644 model_conflict_error.go create mode 100644 model_summaries_list_response.go create mode 100644 model_summary.go create mode 100644 model_summary_creation_payload.go create mode 100644 model_summary_source.go create mode 100644 model_summary_update_payload.go diff --git a/CHANGELOG.md b/CHANGELOG.md index bc522a3..b024b44 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.5] - 2024-10-21 +- Add summary feature + ## [1.4.4] - 2024-10-08 - Add transcript feature diff --git a/README.md b/README.md index 9aca834..fd39a05 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ - [Chapters](#chapters) - [LiveStreams](#livestreams) - [PlayerThemes](#playerthemes) + - [Summaries](#summaries) - [Tags](#tags) - [UploadTokens](#uploadtokens) - [Videos](#videos) @@ -231,6 +232,26 @@ Method | HTTP request | Description [**DeleteLogo**](https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemes.md#DeleteLogo) | **Delete** `/players/{playerId}/logo` | Delete logo +#### Summaries + + +##### Retrieve an instance of the Summaries API: +```golang +client := apivideosdk.ClientBuilder("API_VIDEO_KEY").Build() +summariesApi := client.Summaries +``` + +##### Endpoints + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Create**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Summaries.md#Create) | **Post** `/summaries` | Generate video summary +[**Update**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Summaries.md#Update) | **Patch** `/summaries/{summaryId}/source` | Update summary details +[**Delete**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Summaries.md#Delete) | **Delete** `/summaries/{summaryId}` | Delete video summary +[**List**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Summaries.md#List) | **Get** `/summaries` | List summaries +[**GetSummarySource**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Summaries.md#GetSummarySource) | **Get** `/summaries/{summaryId}/source` | Get summary details + + #### Tags @@ -357,6 +378,7 @@ Method | HTTP request | Description - [CaptionsUpdatePayload](https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsUpdatePayload.md) - [Chapter](https://github.com/apivideo/api.video-go-client/blob/main/docs/Chapter.md) - [ChaptersListResponse](https://github.com/apivideo/api.video-go-client/blob/main/docs/ChaptersListResponse.md) + - [ConflictError](https://github.com/apivideo/api.video-go-client/blob/main/docs/ConflictError.md) - [DiscardedVideoUpdatePayload](https://github.com/apivideo/api.video-go-client/blob/main/docs/DiscardedVideoUpdatePayload.md) - [FilterBy](https://github.com/apivideo/api.video-go-client/blob/main/docs/FilterBy.md) - [FilterBy1](https://github.com/apivideo/api.video-go-client/blob/main/docs/FilterBy1.md) @@ -384,6 +406,11 @@ Method | HTTP request | Description - [RefreshTokenPayload](https://github.com/apivideo/api.video-go-client/blob/main/docs/RefreshTokenPayload.md) - [RestreamsRequestObject](https://github.com/apivideo/api.video-go-client/blob/main/docs/RestreamsRequestObject.md) - [RestreamsResponseObject](https://github.com/apivideo/api.video-go-client/blob/main/docs/RestreamsResponseObject.md) + - [SummariesListResponse](https://github.com/apivideo/api.video-go-client/blob/main/docs/SummariesListResponse.md) + - [Summary](https://github.com/apivideo/api.video-go-client/blob/main/docs/Summary.md) + - [SummaryCreationPayload](https://github.com/apivideo/api.video-go-client/blob/main/docs/SummaryCreationPayload.md) + - [SummarySource](https://github.com/apivideo/api.video-go-client/blob/main/docs/SummarySource.md) + - [SummaryUpdatePayload](https://github.com/apivideo/api.video-go-client/blob/main/docs/SummaryUpdatePayload.md) - [TokenCreationPayload](https://github.com/apivideo/api.video-go-client/blob/main/docs/TokenCreationPayload.md) - [TokenListResponse](https://github.com/apivideo/api.video-go-client/blob/main/docs/TokenListResponse.md) - [TooManyRequests](https://github.com/apivideo/api.video-go-client/blob/main/docs/TooManyRequests.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 90c5b49..8ca88a2 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1158,6 +1158,487 @@ paths: x-client-action: list x-group-parameters: true x-client-paginated: true + /summaries: + get: + description: List all summarries for your videos in a project. + operationId: GET_summaries + parameters: + - description: Use this parameter to filter for a summary that belongs to a + specific video. + example: vilkR8K3N7yrRcxcMt91234 + explode: true + in: query + name: videoId + required: false + schema: + type: string + style: form + - description: 'Use this parameter to filter for summaries based on the way + they were created: automatically or manually via the API.' + example: auto + explode: true + in: query + name: origin + required: false + schema: + enum: + - auto + - api + type: string + style: form + - description: | + Use this parameter to filter for summaries based on the current status of the summary source. + + These are the available statuses: + + `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. + example: auto + explode: true + in: query + name: sourceStatus + required: false + schema: + enum: + - missing + - waiting + - failed + - completed + - unprocessable + type: string + style: form + - description: | + Use this parameter to choose which field the API will use to sort the response data. The default is `value`. + + These are the available fields to sort by: + + - `createdAt`: Sorts the results based on date and timestamps when summaries were created. + - `updatedAt`: Sorts the results based on date and timestamps when summaries were last updated. + - `videoId`: Sorts the results based on video IDs. + example: createdAt + explode: true + in: query + name: sortBy + required: false + schema: + enum: + - createdAt + - updatedAt + - videoId + type: string + style: form + - description: Use this parameter to sort results. `asc` is ascending and sorts + from A to Z. `desc` is descending and sorts from Z to A. + example: asc + explode: true + in: query + name: sortOrder + required: false + schema: + enum: + - asc + - desc + type: string + style: form + - description: 'Choose the number of search results to return per page. Minimum + value: 1' + example: 2 + explode: true + in: query + name: currentPage + required: false + schema: + default: 1 + type: integer + style: form + - description: Results per page. Allowed values 1-100, default is 25. + example: 30 + explode: true + in: query + name: pageSize + required: false + schema: + default: 25 + type: integer + style: form + responses: + "200": + content: + application/json: + examples: + List all summaries: + value: + 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 + schema: + $ref: '#/components/schemas/summaries-list-response' + description: Created + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + summary: List summaries + tags: + - Summaries + x-client-action: list + x-client-description: + default: List all summarries for your videos in a project. + x-group-parameters: true + x-client-paginated: true + post: + description: Generate a title, abstract, and key takeaways for a video. + operationId: POST_summaries + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/summary-creation-payload' + required: true + responses: + "201": + content: + application/json: + examples: + Summary created: + value: + 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 + schema: + $ref: '#/components/schemas/summary' + description: Created + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "409": + content: + application/json: + examples: + Summary already exists: + value: + 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 + schema: + $ref: '#/components/schemas/conflict-error' + description: Conflict + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Generate video summary + tags: + - Summaries + x-client-action: create + x-client-description: + default: Generate a title, abstract, and key takeaways for a video. + /summaries/{summaryId}: + delete: + description: Delete a summary tied to a video. + operationId: DELETE_summaries-summaryId + parameters: + - description: The unique identifier of the summary you want to delete. + example: summary_1CGHWuXjhxmeH4WiZ51234 + explode: false + in: path + name: summaryId + required: true + schema: + type: string + style: simple + responses: + "204": + description: No Content + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Delete video summary + tags: + - Summaries + x-client-action: delete + x-client-description: + default: Delete a summary tied to a video. + /summaries/{summaryId}/source: + get: + description: Get all details for a summary + operationId: GET_summaries-summaryId-source + parameters: + - description: The unique identifier of the summary source you want to retrieve. + example: summary_1CGHWuXjhxmeH4WiZ51234 + explode: false + in: path + name: summaryId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/summary-source' + description: Success + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "404": + content: + application/json: + examples: + response: + value: + type: https://docs.api.video/reference/resource-not-found + title: The requested resource was not found. + name: summaryId + status: 404 + schema: + $ref: '#/components/schemas/not-found' + description: Not Found + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Get summary details + tags: + - Summaries + x-client-action: getSummarySource + x-client-description: + default: Get all details for a summary. + patch: + description: Update details for a summary. Note that this operation is only + allowed for summary objects where `sourceStatus` is `missing`. + operationId: PATCH_summaries-summaryId-source + parameters: + - description: The unique identifier of the summary source you want to update. + example: summary_1CGHWuXjhxmeH4WiZ51234 + explode: false + in: path + name: summaryId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/summary-update-payload' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/summary-source' + description: Created + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "409": + content: + application/json: + examples: + Summary already exists: + value: + 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. + schema: + $ref: '#/components/schemas/conflict-error' + description: Conflict + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + summary: Update summary details + tags: + - 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`. /videos/{videoId}/source: post: description: Ingest a video from a source or file. @@ -3390,6 +3871,42 @@ paths: schema: type: integer style: simple + "409": + content: + application/json: + examples: + Summary already exists: + value: + 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 + schema: + $ref: '#/components/schemas/conflict-error' + description: Conflict + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple "429": content: application/json: @@ -14818,12 +15335,16 @@ components: not-found: properties: type: + description: A link to the error documentation. type: string title: + description: A description of the error that occurred. type: string name: + description: The name of the parameter that caused the error. type: string status: + description: The HTTP status code. type: integer title: NotFound type: object @@ -15897,10 +16418,217 @@ components: \ a language, the API detects it based on the video. \n- When the API\ \ generates a transcript, it will be available as a caption for the video." type: boolean + transcriptSummary: + description: |- + 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. + type: boolean required: - title title: VideoCreationPayload type: object + summary-creation-payload: + properties: + videoId: + description: Create a summary of a video using the video ID. + example: vi4k0jvEUuaTdRAEjQ4Jfrgz + type: string + origin: + description: |- + 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. + enum: + - auto + example: auto + type: string + 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, + using the famous example of Schrödingers cat. We also discuss practical + applications like quantum computing. + type: string + takeaways: + description: A list of 3 key points from the video, in chronological order. + example: + - Quantum theory is complicated. + - Schrödinger's cat is neither dead, nor alive. + - Quantum computers are super cool. + items: + type: string + maxItems: 3 + type: array + type: object + conflict-error: + properties: + type: + description: A link to the error documentation. + type: string + title: + description: A description of the error that occurred. + type: string + name: + description: The name of the parameter that caused the error. + type: string + status: + description: The HTTP status code. + type: integer + detail: + description: A solution for the error. + type: string + type: object + summary-source: + example: + takeaways: + - Quantum theory is complicated. + - Schrödinger's cat is neither dead, nor alive. + - Quantum computers are super cool. + 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 + transcribed. The API condenses the contents into minimum 20, maximum 300 + words. + 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. + type: string + takeaways: + description: A list of 3 key points from the video, in chronological order. + example: + - Quantum theory is complicated. + - Schrödinger's cat is neither dead, nor alive. + - Quantum computers are super cool. + items: + type: string + maxItems: 3 + type: array + type: object + summaries-list-response: + example: + pagination: + itemsTotal: 123 + pagesTotal: 7 + pageSize: 20 + currentPage: 3 + currentPageItems: 20 + links: + first: + rel: first + uri: /videos/search?currentPage=1&pageSize=20 + previous: + rel: previous + uri: /videos/search?currentPage=2&pageSize=20 + next: + rel: next + uri: /videos/search?currentPage=4&pageSize=20 + last: + rel: last + uri: /videos/search?currentPage=6&pageSize=20 + data: + - sourceStatus: missing + createdAt: 2024-05-28T11:15:07Z + origin: api + summaryId: summary_1CGHWuXjhxmeH4WiZ51234 + videoId: vi4k0jvEUuaTdRAEjQ4Prklg + updatedAt: 2024-05-28T11:15:07Z + - sourceStatus: missing + createdAt: 2024-05-28T11:15:07Z + origin: api + summaryId: summary_1CGHWuXjhxmeH4WiZ51234 + videoId: vi4k0jvEUuaTdRAEjQ4Prklg + updatedAt: 2024-05-28T11:15:07Z + properties: + data: + description: An array of summary objects. + items: + $ref: '#/components/schemas/summary' + type: array + pagination: + $ref: '#/components/schemas/pagination' + required: + - data + - pagination + title: Summaries + type: object + summary: + example: + sourceStatus: missing + createdAt: 2024-05-28T11:15:07Z + origin: api + summaryId: summary_1CGHWuXjhxmeH4WiZ51234 + videoId: vi4k0jvEUuaTdRAEjQ4Prklg + updatedAt: 2024-05-28T11:15:07Z + properties: + summaryId: + description: The unique identifier of the summary object. + example: summary_1CGHWuXjhxmeH4WiZ51234 + type: string + createdAt: + description: Returns the date and time when the summary was created in ATOM + date-time format. + example: 2024-05-28T11:15:07Z + format: date-time + type: string + updatedAt: + description: Returns the date and time when the summary was last updated + in ATOM date-time format. + example: 2024-05-28T11:15:07Z + format: date-time + type: string + videoId: + description: The unique identifier of the video object. + example: vi4k0jvEUuaTdRAEjQ4Prklg + type: string + origin: + description: |- + 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. + enum: + - api + - auto + type: string + sourceStatus: + description: |- + 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. + enum: + - missing + - waiting + - failed + - completed + - unprocessable + type: string + type: object video-upload-payload: properties: file: @@ -15949,6 +16677,7 @@ components: public: false language: en transcript: true + transcriptSummary: true panoramic: false mp4Support: true tags: @@ -16053,6 +16782,14 @@ components: \ a language, the API detects it based on the video. \n- When the API\ \ generates a transcript, it will be available as a caption for the video." type: boolean + transcriptSummary: + description: "Use this parameter to enable summarization. \n\n- When `true`,\ + \ the API generates a summary for the video, based on the transcription.\n\ + - The default value is `false`.\n- 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 title: VideoUpdatePayload type: object discarded-video-update-payload: diff --git a/api_summaries.go b/api_summaries.go new file mode 100644 index 0000000..17830f2 --- /dev/null +++ b/api_summaries.go @@ -0,0 +1,407 @@ +/* + * api.video + * + * 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. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( + "context" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type SummariesApiListRequest struct { + videoId *string + origin *string + sourceStatus *string + sortBy *string + sortOrder *string + currentPage *int32 + pageSize *int32 +} + +func (r SummariesApiListRequest) VideoId(videoId string) SummariesApiListRequest { + r.videoId = &videoId + return r +} +func (r SummariesApiListRequest) Origin(origin string) SummariesApiListRequest { + r.origin = &origin + return r +} +func (r SummariesApiListRequest) SourceStatus(sourceStatus string) SummariesApiListRequest { + r.sourceStatus = &sourceStatus + return r +} +func (r SummariesApiListRequest) SortBy(sortBy string) SummariesApiListRequest { + r.sortBy = &sortBy + return r +} +func (r SummariesApiListRequest) SortOrder(sortOrder string) SummariesApiListRequest { + r.sortOrder = &sortOrder + return r +} +func (r SummariesApiListRequest) CurrentPage(currentPage int32) SummariesApiListRequest { + r.currentPage = ¤tPage + return r +} +func (r SummariesApiListRequest) PageSize(pageSize int32) SummariesApiListRequest { + r.pageSize = &pageSize + return r +} + +type SummariesServiceI interface { + /* + * Create Generate video summary + * @return SummariesApiCreateRequest + */ + + Create(summaryCreationPayload SummaryCreationPayload) (*Summary, error) + + /* + * Create Generate video summary + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return SummariesApiCreateRequest + */ + + CreateWithContext(ctx context.Context, summaryCreationPayload SummaryCreationPayload) (*Summary, error) + + /* + * Update Update summary details + * @param summaryId The unique identifier of the summary source you want to update. + * @return SummariesApiUpdateRequest + */ + + Update(summaryId string, summaryUpdatePayload SummaryUpdatePayload) (*SummarySource, error) + + /* + * Update Update summary details + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param summaryId The unique identifier of the summary source you want to update. + * @return SummariesApiUpdateRequest + */ + + UpdateWithContext(ctx context.Context, summaryId string, summaryUpdatePayload SummaryUpdatePayload) (*SummarySource, error) + + /* + * Delete Delete video summary + * @param summaryId The unique identifier of the summary you want to delete. + * @return SummariesApiDeleteRequest + */ + + Delete(summaryId string) error + + /* + * Delete Delete video summary + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param summaryId The unique identifier of the summary you want to delete. + * @return SummariesApiDeleteRequest + */ + + DeleteWithContext(ctx context.Context, summaryId string) error + + /* + * List List summaries + * @return SummariesApiListRequest + */ + + List(r SummariesApiListRequest) (*SummariesListResponse, error) + + /* + * List List summaries + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return SummariesApiListRequest + */ + + ListWithContext(ctx context.Context, r SummariesApiListRequest) (*SummariesListResponse, error) + + /* + * GetSummarySource Get summary details + * @param summaryId The unique identifier of the summary source you want to retrieve. + * @return SummariesApiGetSummarySourceRequest + */ + + GetSummarySource(summaryId string) (*SummarySource, error) + + /* + * GetSummarySource Get summary details + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param summaryId The unique identifier of the summary source you want to retrieve. + * @return SummariesApiGetSummarySourceRequest + */ + + GetSummarySourceWithContext(ctx context.Context, summaryId string) (*SummarySource, error) +} + +// SummariesService communicating with the Summaries +// endpoints of the api.video API +type SummariesService struct { + client *Client +} + +/* + * Create Generate video summary + * Generate a title, abstract, and key takeaways for a video. + + * @return SummariesApiCreateRequest + */ + +func (s *SummariesService) Create(summaryCreationPayload SummaryCreationPayload) (*Summary, error) { + + return s.CreateWithContext(context.Background(), summaryCreationPayload) + +} + +/* + * Create Generate video summary + * Generate a title, abstract, and key takeaways for a video. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return SummariesApiCreateRequest + */ + +func (s *SummariesService) CreateWithContext(ctx context.Context, summaryCreationPayload SummaryCreationPayload) (*Summary, error) { + var localVarPostBody interface{} + + localVarPath := "/summaries" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + // body params + localVarPostBody = summaryCreationPayload + + req, err := s.client.prepareRequest(ctx, http.MethodPost, localVarPath, localVarPostBody, localVarHeaderParams, localVarQueryParams) + if err != nil { + return nil, err + } + + res := new(Summary) + _, err = s.client.do(req, res) + + if err != nil { + return nil, err + } + + return res, nil + +} + +/* + * Update Update summary details + * Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`. + + * @param summaryId The unique identifier of the summary source you want to update. + * @return SummariesApiUpdateRequest + */ + +func (s *SummariesService) Update(summaryId string, summaryUpdatePayload SummaryUpdatePayload) (*SummarySource, error) { + + return s.UpdateWithContext(context.Background(), summaryId, summaryUpdatePayload) + +} + +/* + * Update Update summary details + * Update details for a summary. Note that this operation is only allowed for summary objects where `sourceStatus` is `missing`. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param summaryId The unique identifier of the summary source you want to update. + * @return SummariesApiUpdateRequest + */ + +func (s *SummariesService) UpdateWithContext(ctx context.Context, summaryId string, summaryUpdatePayload SummaryUpdatePayload) (*SummarySource, error) { + var localVarPostBody interface{} + + localVarPath := "/summaries/{summaryId}/source" + localVarPath = strings.Replace(localVarPath, "{"+"summaryId"+"}", url.PathEscape(parameterToString(summaryId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + // body params + localVarPostBody = summaryUpdatePayload + + req, err := s.client.prepareRequest(ctx, http.MethodPatch, localVarPath, localVarPostBody, localVarHeaderParams, localVarQueryParams) + if err != nil { + return nil, err + } + + res := new(SummarySource) + _, err = s.client.do(req, res) + + if err != nil { + return nil, err + } + + return res, nil + +} + +/* + * Delete Delete video summary + * Delete a summary tied to a video. + + * @param summaryId The unique identifier of the summary you want to delete. + * @return SummariesApiDeleteRequest + */ + +func (s *SummariesService) Delete(summaryId string) error { + + return s.DeleteWithContext(context.Background(), summaryId) + +} + +/* + * Delete Delete video summary + * Delete a summary tied to a video. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param summaryId The unique identifier of the summary you want to delete. + * @return SummariesApiDeleteRequest + */ + +func (s *SummariesService) DeleteWithContext(ctx context.Context, summaryId string) error { + var localVarPostBody interface{} + + localVarPath := "/summaries/{summaryId}" + localVarPath = strings.Replace(localVarPath, "{"+"summaryId"+"}", url.PathEscape(parameterToString(summaryId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + req, err := s.client.prepareRequest(ctx, http.MethodDelete, localVarPath, localVarPostBody, localVarHeaderParams, localVarQueryParams) + if err != nil { + return err + } + + _, err = s.client.do(req, nil) + + if err != nil { + return err + } + + return nil + +} + +/* + * List List summaries + * List all summarries for your videos in a project. + + * @return SummariesApiListRequest + */ + +func (s *SummariesService) List(r SummariesApiListRequest) (*SummariesListResponse, error) { + + return s.ListWithContext(context.Background(), r) + +} + +/* + * List List summaries + * List all summarries for your videos in a project. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return SummariesApiListRequest + */ + +func (s *SummariesService) ListWithContext(ctx context.Context, r SummariesApiListRequest) (*SummariesListResponse, error) { + var localVarPostBody interface{} + + localVarPath := "/summaries" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + if r.videoId != nil { + localVarQueryParams.Add("videoId", parameterToString(*r.videoId, "")) + } + if r.origin != nil { + localVarQueryParams.Add("origin", parameterToString(*r.origin, "")) + } + if r.sourceStatus != nil { + localVarQueryParams.Add("sourceStatus", parameterToString(*r.sourceStatus, "")) + } + if r.sortBy != nil { + localVarQueryParams.Add("sortBy", parameterToString(*r.sortBy, "")) + } + if r.sortOrder != nil { + localVarQueryParams.Add("sortOrder", parameterToString(*r.sortOrder, "")) + } + if r.currentPage != nil { + localVarQueryParams.Add("currentPage", parameterToString(*r.currentPage, "")) + } + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + + req, err := s.client.prepareRequest(ctx, http.MethodGet, localVarPath, localVarPostBody, localVarHeaderParams, localVarQueryParams) + if err != nil { + return nil, err + } + + res := new(SummariesListResponse) + _, err = s.client.do(req, res) + + if err != nil { + return nil, err + } + + return res, nil + +} + +/* + * GetSummarySource Get summary details + * Get all details for a summary. + + * @param summaryId The unique identifier of the summary source you want to retrieve. + * @return SummariesApiGetSummarySourceRequest + */ + +func (s *SummariesService) GetSummarySource(summaryId string) (*SummarySource, error) { + + return s.GetSummarySourceWithContext(context.Background(), summaryId) + +} + +/* + * GetSummarySource Get summary details + * Get all details for a summary. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param summaryId The unique identifier of the summary source you want to retrieve. + * @return SummariesApiGetSummarySourceRequest + */ + +func (s *SummariesService) GetSummarySourceWithContext(ctx context.Context, summaryId string) (*SummarySource, error) { + var localVarPostBody interface{} + + localVarPath := "/summaries/{summaryId}/source" + localVarPath = strings.Replace(localVarPath, "{"+"summaryId"+"}", url.PathEscape(parameterToString(summaryId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + req, err := s.client.prepareRequest(ctx, http.MethodGet, localVarPath, localVarPostBody, localVarHeaderParams, localVarQueryParams) + if err != nil { + return nil, err + } + + res := new(SummarySource) + _, err = s.client.do(req, res) + + if err != nil { + return nil, err + } + + return res, nil + +} diff --git a/client.go b/client.go index 978cb7f..f2c9d28 100644 --- a/client.go +++ b/client.go @@ -36,6 +36,7 @@ type Client struct { Chapters ChaptersServiceI LiveStreams LiveStreamsServiceI PlayerThemes PlayerThemesServiceI + Summaries SummariesServiceI Tags TagsServiceI UploadTokens UploadTokensServiceI Videos VideosServiceI @@ -184,6 +185,7 @@ func (cb *Builder) Build() *Client { c.Chapters = &ChaptersService{client: c} c.LiveStreams = &LiveStreamsService{client: c} c.PlayerThemes = &PlayerThemesService{client: c} + c.Summaries = &SummariesService{client: c} c.Tags = &TagsService{client: c} c.UploadTokens = &UploadTokensService{client: c} c.Videos = &VideosService{client: c} @@ -257,7 +259,7 @@ func (c *Client) prepareRequest( req.Header.Set("AV-Origin-Sdk", originSdkHeaderValue) } - req.Header.Set("AV-Origin-Client", "go:1.4.4") + req.Header.Set("AV-Origin-Client", "go:1.4.5") for headerName := range headerParams { req.Header.Set(headerName, headerParams[headerName]) @@ -532,7 +534,7 @@ func (c *Client) auth(req *http.Request) (*http.Request, error) { req.Header.Set("AV-Origin-Sdk", originSdkHeaderValue) } - req.Header.Set("AV-Origin-Client", "go:1.4.4") + req.Header.Set("AV-Origin-Client", "go:1.4.5") resp, err := c.httpClient.Do(req) diff --git a/docs/ConflictError.md b/docs/ConflictError.md new file mode 100644 index 0000000..87a7e60 --- /dev/null +++ b/docs/ConflictError.md @@ -0,0 +1,160 @@ +# ConflictError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | A link to the error documentation. | [optional] +**Title** | Pointer to **string** | A description of the error that occurred. | [optional] +**Name** | Pointer to **string** | The name of the parameter that caused the error. | [optional] +**Status** | Pointer to **int32** | The HTTP status code. | [optional] +**Detail** | Pointer to **string** | A solution for the error. | [optional] + +## Methods + +### NewConflictError + +`func NewConflictError() *ConflictError` + +NewConflictError instantiates a new ConflictError object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConflictErrorWithDefaults + +`func NewConflictErrorWithDefaults() *ConflictError` + +NewConflictErrorWithDefaults instantiates a new ConflictError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *ConflictError) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ConflictError) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ConflictError) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *ConflictError) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetTitle + +`func (o *ConflictError) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *ConflictError) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *ConflictError) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *ConflictError) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetName + +`func (o *ConflictError) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConflictError) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConflictError) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ConflictError) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetStatus + +`func (o *ConflictError) GetStatus() int32` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ConflictError) GetStatusOk() (*int32, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *ConflictError) SetStatus(v int32)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *ConflictError) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetDetail + +`func (o *ConflictError) GetDetail() string` + +GetDetail returns the Detail field if non-nil, zero value otherwise. + +### GetDetailOk + +`func (o *ConflictError) GetDetailOk() (*string, bool)` + +GetDetailOk returns a tuple with the Detail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetail + +`func (o *ConflictError) SetDetail(v string)` + +SetDetail sets Detail field to given value. + +### HasDetail + +`func (o *ConflictError) HasDetail() bool` + +HasDetail returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotFound.md b/docs/NotFound.md index 3d384e7..14aabb1 100644 --- a/docs/NotFound.md +++ b/docs/NotFound.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | Pointer to **string** | | [optional] -**Title** | Pointer to **string** | | [optional] -**Name** | Pointer to **string** | | [optional] -**Status** | Pointer to **int32** | | [optional] +**Type** | Pointer to **string** | A link to the error documentation. | [optional] +**Title** | Pointer to **string** | A description of the error that occurred. | [optional] +**Name** | Pointer to **string** | The name of the parameter that caused the error. | [optional] +**Status** | Pointer to **int32** | The HTTP status code. | [optional] ## Methods diff --git a/docs/Summaries.md b/docs/Summaries.md new file mode 100644 index 0000000..1bd83bf --- /dev/null +++ b/docs/Summaries.md @@ -0,0 +1,339 @@ +# \Summaries + +All URIs are relative to *https://ws.api.video* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Create**](Summaries.md#Create) | **Post** /summaries | Generate video summary +[**Update**](Summaries.md#Update) | **Patch** /summaries/{summaryId}/source | Update summary details +[**Delete**](Summaries.md#Delete) | **Delete** /summaries/{summaryId} | Delete video summary +[**List**](Summaries.md#List) | **Get** /summaries | List summaries +[**GetSummarySource**](Summaries.md#GetSummarySource) | **Get** /summaries/{summaryId}/source | Get summary details + + + +## Create + +> Create(summaryCreationPayload SummaryCreationPayload) (*Summary, error) + +> CreateWithContext(ctx context.Context, summaryCreationPayload SummaryCreationPayload) (*Summary, error) + + +Generate video summary + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + apivideosdk "github.com/apivideo/api.video-go-client" +) + +func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() + + summaryCreationPayload := *apivideosdk.NewSummaryCreationPayload("vi4k0jvEUuaTdRAEjQ4Jfrgz") // SummaryCreationPayload | + + + res, err := client.Summaries.Create(summaryCreationPayload) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Summaries.Create``: %v\n", err) + } + // response from `Create`: Summary + fmt.Fprintf(os.Stdout, "Response from `Summaries.Create`: %v\n", res) +} +``` +### Path Parameters + + + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**summaryCreationPayload** | [**SummaryCreationPayload**](SummaryCreationPayload.md) | | + +### Return type + +[**Summary**](Summary.md) + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Update + +> Update(summaryId string, summaryUpdatePayload SummaryUpdatePayload) (*SummarySource, error) + +> UpdateWithContext(ctx context.Context, summaryId string, summaryUpdatePayload SummaryUpdatePayload) (*SummarySource, error) + + +Update summary details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + apivideosdk "github.com/apivideo/api.video-go-client" +) + +func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() + + summaryId := "summary_1CGHWuXjhxmeH4WiZ51234" // string | The unique identifier of the summary source you want to update. + summaryUpdatePayload := *apivideosdk.NewSummaryUpdatePayload() // SummaryUpdatePayload | + + + res, err := client.Summaries.Update(summaryId, summaryUpdatePayload) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Summaries.Update``: %v\n", err) + } + // response from `Update`: SummarySource + fmt.Fprintf(os.Stdout, "Response from `Summaries.Update`: %v\n", res) +} +``` +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**summaryId** | **string** | The unique identifier of the summary source you want to update. | + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**summaryUpdatePayload** | [**SummaryUpdatePayload**](SummaryUpdatePayload.md) | | + +### Return type + +[**SummarySource**](SummarySource.md) + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## Delete + +> Delete(summaryId string) (error) + +> DeleteWithContext(ctx context.Context, summaryId string) (error) + + +Delete video summary + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + apivideosdk "github.com/apivideo/api.video-go-client" +) + +func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() + + summaryId := "summary_1CGHWuXjhxmeH4WiZ51234" // string | The unique identifier of the summary you want to delete. + + + err := client.Summaries.Delete(summaryId) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Summaries.Delete``: %v\n", err) + } +} +``` +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**summaryId** | **string** | The unique identifier of the summary you want to delete. | + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + +### Return type + + (empty response body) + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## List + +> List(r SummariesApiListRequest) (*SummariesListResponse, error) + + +> ListWithContext(ctx context.Context, r SummariesApiListRequest) (*SummariesListResponse, error) + + + +List summaries + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + apivideosdk "github.com/apivideo/api.video-go-client" +) + +func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() + req := apivideosdk.SummariesApiListRequest{} + + req.VideoId("vilkR8K3N7yrRcxcMt91234") // string | Use this parameter to filter for a summary that belongs to a specific video. + req.Origin("auto") // string | Use this parameter to filter for summaries based on the way they were created: automatically or manually via the API. + req.SourceStatus("auto") // string | Use this parameter to filter for summaries based on the current status of the summary source. These are the available statuses: `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. + req.SortBy("createdAt") // string | Use this parameter to choose which field the API will use to sort the response data. The default is `value`. These are the available fields to sort by: - `createdAt`: Sorts the results based on date and timestamps when summaries were created. - `updatedAt`: Sorts the results based on date and timestamps when summaries were last updated. - `videoId`: Sorts the results based on video IDs. + req.SortOrder("asc") // string | Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. + req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1) + req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25) + + res, err := client.Summaries.List(req) + + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Summaries.List``: %v\n", err) + } + // response from `List`: SummariesListResponse + fmt.Fprintf(os.Stdout, "Response from `Summaries.List`: %v\n", res) +} +``` +### Path Parameters + + + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**videoId** | **string** | Use this parameter to filter for a summary that belongs to a specific video. | +**origin** | **string** | Use this parameter to filter for summaries based on the way they were created: automatically or manually via the API. | +**sourceStatus** | **string** | Use this parameter to filter for summaries based on the current status of the summary source. These are the available statuses: `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. | +**sortBy** | **string** | Use this parameter to choose which field the API will use to sort the response data. The default is `value`. These are the available fields to sort by: - `createdAt`: Sorts the results based on date and timestamps when summaries were created. - `updatedAt`: Sorts the results based on date and timestamps when summaries were last updated. - `videoId`: Sorts the results based on video IDs. | +**sortOrder** | **string** | Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A. | +**currentPage** | **int32** | Choose the number of search results to return per page. Minimum value: 1 | [default to 1] +**pageSize** | **int32** | Results per page. Allowed values 1-100, default is 25. | [default to 25] + +### Return type + +[**SummariesListResponse**](SummariesListResponse.md) + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetSummarySource + +> GetSummarySource(summaryId string) (*SummarySource, error) + +> GetSummarySourceWithContext(ctx context.Context, summaryId string) (*SummarySource, error) + + +Get summary details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + apivideosdk "github.com/apivideo/api.video-go-client" +) + +func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOU_SANDBOX_API_KEY").Build() + + summaryId := "summary_1CGHWuXjhxmeH4WiZ51234" // string | The unique identifier of the summary source you want to retrieve. + + + res, err := client.Summaries.GetSummarySource(summaryId) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Summaries.GetSummarySource``: %v\n", err) + } + // response from `GetSummarySource`: SummarySource + fmt.Fprintf(os.Stdout, "Response from `Summaries.GetSummarySource`: %v\n", res) +} +``` +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**summaryId** | **string** | The unique identifier of the summary source you want to retrieve. | + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + +### Return type + +[**SummarySource**](SummarySource.md) + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/SummariesListResponse.md b/docs/SummariesListResponse.md new file mode 100644 index 0000000..299bbb3 --- /dev/null +++ b/docs/SummariesListResponse.md @@ -0,0 +1,72 @@ +# SummariesListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]Summary**](Summary.md) | An array of summary objects. | +**Pagination** | [**Pagination**](Pagination.md) | | + +## Methods + +### NewSummariesListResponse + +`func NewSummariesListResponse(data []Summary, pagination Pagination, ) *SummariesListResponse` + +NewSummariesListResponse instantiates a new SummariesListResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSummariesListResponseWithDefaults + +`func NewSummariesListResponseWithDefaults() *SummariesListResponse` + +NewSummariesListResponseWithDefaults instantiates a new SummariesListResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *SummariesListResponse) GetData() []Summary` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SummariesListResponse) GetDataOk() (*[]Summary, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *SummariesListResponse) SetData(v []Summary)` + +SetData sets Data field to given value. + + +### GetPagination + +`func (o *SummariesListResponse) GetPagination() Pagination` + +GetPagination returns the Pagination field if non-nil, zero value otherwise. + +### GetPaginationOk + +`func (o *SummariesListResponse) GetPaginationOk() (*Pagination, bool)` + +GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPagination + +`func (o *SummariesListResponse) SetPagination(v Pagination)` + +SetPagination sets Pagination field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Summary.md b/docs/Summary.md new file mode 100644 index 0000000..4a969b3 --- /dev/null +++ b/docs/Summary.md @@ -0,0 +1,186 @@ +# Summary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SummaryId** | Pointer to **string** | The unique identifier of the summary object. | [optional] +**CreatedAt** | Pointer to **string** | Returns the date and time when the summary was created in ATOM date-time format. | [optional] +**UpdatedAt** | Pointer to **string** | Returns the date and time when the summary was last updated in ATOM date-time format. | [optional] +**VideoId** | Pointer to **string** | The unique identifier of the video object. | [optional] +**Origin** | Pointer to **string** | 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. | [optional] +**SourceStatus** | Pointer to **string** | 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. | [optional] + +## Methods + +### NewSummary + +`func NewSummary() *Summary` + +NewSummary instantiates a new Summary object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSummaryWithDefaults + +`func NewSummaryWithDefaults() *Summary` + +NewSummaryWithDefaults instantiates a new Summary object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSummaryId + +`func (o *Summary) GetSummaryId() string` + +GetSummaryId returns the SummaryId field if non-nil, zero value otherwise. + +### GetSummaryIdOk + +`func (o *Summary) GetSummaryIdOk() (*string, bool)` + +GetSummaryIdOk returns a tuple with the SummaryId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSummaryId + +`func (o *Summary) SetSummaryId(v string)` + +SetSummaryId sets SummaryId field to given value. + +### HasSummaryId + +`func (o *Summary) HasSummaryId() bool` + +HasSummaryId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Summary) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Summary) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Summary) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Summary) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *Summary) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Summary) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *Summary) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Summary) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetVideoId + +`func (o *Summary) GetVideoId() string` + +GetVideoId returns the VideoId field if non-nil, zero value otherwise. + +### GetVideoIdOk + +`func (o *Summary) GetVideoIdOk() (*string, bool)` + +GetVideoIdOk returns a tuple with the VideoId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoId + +`func (o *Summary) SetVideoId(v string)` + +SetVideoId sets VideoId field to given value. + +### HasVideoId + +`func (o *Summary) HasVideoId() bool` + +HasVideoId returns a boolean if a field has been set. + +### GetOrigin + +`func (o *Summary) GetOrigin() string` + +GetOrigin returns the Origin field if non-nil, zero value otherwise. + +### GetOriginOk + +`func (o *Summary) GetOriginOk() (*string, bool)` + +GetOriginOk returns a tuple with the Origin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrigin + +`func (o *Summary) SetOrigin(v string)` + +SetOrigin sets Origin field to given value. + +### HasOrigin + +`func (o *Summary) HasOrigin() bool` + +HasOrigin returns a boolean if a field has been set. + +### GetSourceStatus + +`func (o *Summary) GetSourceStatus() string` + +GetSourceStatus returns the SourceStatus field if non-nil, zero value otherwise. + +### GetSourceStatusOk + +`func (o *Summary) GetSourceStatusOk() (*string, bool)` + +GetSourceStatusOk returns a tuple with the SourceStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceStatus + +`func (o *Summary) SetSourceStatus(v string)` + +SetSourceStatus sets SourceStatus field to given value. + +### HasSourceStatus + +`func (o *Summary) HasSourceStatus() bool` + +HasSourceStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SummaryCreationPayload.md b/docs/SummaryCreationPayload.md new file mode 100644 index 0000000..a4197e7 --- /dev/null +++ b/docs/SummaryCreationPayload.md @@ -0,0 +1,77 @@ +# SummaryCreationPayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VideoId** | **string** | Create a summary of a video using the video ID. | +**Origin** | Pointer to **string** | 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] + +## Methods + +### NewSummaryCreationPayload + +`func NewSummaryCreationPayload(videoId string, ) *SummaryCreationPayload` + +NewSummaryCreationPayload instantiates a new SummaryCreationPayload object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSummaryCreationPayloadWithDefaults + +`func NewSummaryCreationPayloadWithDefaults() *SummaryCreationPayload` + +NewSummaryCreationPayloadWithDefaults instantiates a new SummaryCreationPayload object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVideoId + +`func (o *SummaryCreationPayload) GetVideoId() string` + +GetVideoId returns the VideoId field if non-nil, zero value otherwise. + +### GetVideoIdOk + +`func (o *SummaryCreationPayload) GetVideoIdOk() (*string, bool)` + +GetVideoIdOk returns a tuple with the VideoId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoId + +`func (o *SummaryCreationPayload) SetVideoId(v string)` + +SetVideoId sets VideoId field to given value. + + +### GetOrigin + +`func (o *SummaryCreationPayload) GetOrigin() string` + +GetOrigin returns the Origin field if non-nil, zero value otherwise. + +### GetOriginOk + +`func (o *SummaryCreationPayload) GetOriginOk() (*string, bool)` + +GetOriginOk returns a tuple with the Origin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrigin + +`func (o *SummaryCreationPayload) SetOrigin(v string)` + +SetOrigin sets Origin field to given value. + +### HasOrigin + +`func (o *SummaryCreationPayload) HasOrigin() bool` + +HasOrigin returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SummarySource.md b/docs/SummarySource.md new file mode 100644 index 0000000..843eaa2 --- /dev/null +++ b/docs/SummarySource.md @@ -0,0 +1,108 @@ +# SummarySource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | A video title, based on the contents of the video. | [optional] +**Abstract** | Pointer to **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** | Pointer to **[]string** | A list of 3 key points from the video, in chronological order. | [optional] + +## Methods + +### NewSummarySource + +`func NewSummarySource() *SummarySource` + +NewSummarySource instantiates a new SummarySource object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSummarySourceWithDefaults + +`func NewSummarySourceWithDefaults() *SummarySource` + +NewSummarySourceWithDefaults instantiates a new SummarySource object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *SummarySource) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *SummarySource) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *SummarySource) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *SummarySource) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetAbstract + +`func (o *SummarySource) GetAbstract() string` + +GetAbstract returns the Abstract field if non-nil, zero value otherwise. + +### GetAbstractOk + +`func (o *SummarySource) GetAbstractOk() (*string, bool)` + +GetAbstractOk returns a tuple with the Abstract field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAbstract + +`func (o *SummarySource) SetAbstract(v string)` + +SetAbstract sets Abstract field to given value. + +### HasAbstract + +`func (o *SummarySource) HasAbstract() bool` + +HasAbstract returns a boolean if a field has been set. + +### GetTakeaways + +`func (o *SummarySource) GetTakeaways() []string` + +GetTakeaways returns the Takeaways field if non-nil, zero value otherwise. + +### GetTakeawaysOk + +`func (o *SummarySource) GetTakeawaysOk() (*[]string, bool)` + +GetTakeawaysOk returns a tuple with the Takeaways field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTakeaways + +`func (o *SummarySource) SetTakeaways(v []string)` + +SetTakeaways sets Takeaways field to given value. + +### HasTakeaways + +`func (o *SummarySource) HasTakeaways() bool` + +HasTakeaways returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SummaryUpdatePayload.md b/docs/SummaryUpdatePayload.md new file mode 100644 index 0000000..60f446f --- /dev/null +++ b/docs/SummaryUpdatePayload.md @@ -0,0 +1,108 @@ +# SummaryUpdatePayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | Pointer to **string** | A video title, based on the contents of the video. | [optional] +**Abstract** | Pointer to **string** | A short outline of the contents of the video. | [optional] +**Takeaways** | Pointer to **[]string** | A list of 3 key points from the video, in chronological order. | [optional] + +## Methods + +### NewSummaryUpdatePayload + +`func NewSummaryUpdatePayload() *SummaryUpdatePayload` + +NewSummaryUpdatePayload instantiates a new SummaryUpdatePayload object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSummaryUpdatePayloadWithDefaults + +`func NewSummaryUpdatePayloadWithDefaults() *SummaryUpdatePayload` + +NewSummaryUpdatePayloadWithDefaults instantiates a new SummaryUpdatePayload object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *SummaryUpdatePayload) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *SummaryUpdatePayload) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *SummaryUpdatePayload) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *SummaryUpdatePayload) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetAbstract + +`func (o *SummaryUpdatePayload) GetAbstract() string` + +GetAbstract returns the Abstract field if non-nil, zero value otherwise. + +### GetAbstractOk + +`func (o *SummaryUpdatePayload) GetAbstractOk() (*string, bool)` + +GetAbstractOk returns a tuple with the Abstract field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAbstract + +`func (o *SummaryUpdatePayload) SetAbstract(v string)` + +SetAbstract sets Abstract field to given value. + +### HasAbstract + +`func (o *SummaryUpdatePayload) HasAbstract() bool` + +HasAbstract returns a boolean if a field has been set. + +### GetTakeaways + +`func (o *SummaryUpdatePayload) GetTakeaways() []string` + +GetTakeaways returns the Takeaways field if non-nil, zero value otherwise. + +### GetTakeawaysOk + +`func (o *SummaryUpdatePayload) GetTakeawaysOk() (*[]string, bool)` + +GetTakeawaysOk returns a tuple with the Takeaways field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTakeaways + +`func (o *SummaryUpdatePayload) SetTakeaways(v []string)` + +SetTakeaways sets Takeaways field to given value. + +### HasTakeaways + +`func (o *SummaryUpdatePayload) HasTakeaways() bool` + +HasTakeaways returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VideoCreationPayload.md b/docs/VideoCreationPayload.md index 6b26626..f7acb16 100644 --- a/docs/VideoCreationPayload.md +++ b/docs/VideoCreationPayload.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **Watermark** | Pointer to [**VideoWatermark**](VideoWatermark.md) | | [optional] **Language** | Pointer to **NullableString** | 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** | Pointer to **bool** | 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** | Pointer to **bool** | 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] ## Methods @@ -367,6 +368,31 @@ SetTranscript sets Transcript field to given value. HasTranscript returns a boolean if a field has been set. +### GetTranscriptSummary + +`func (o *VideoCreationPayload) GetTranscriptSummary() bool` + +GetTranscriptSummary returns the TranscriptSummary field if non-nil, zero value otherwise. + +### GetTranscriptSummaryOk + +`func (o *VideoCreationPayload) GetTranscriptSummaryOk() (*bool, bool)` + +GetTranscriptSummaryOk returns a tuple with the TranscriptSummary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTranscriptSummary + +`func (o *VideoCreationPayload) SetTranscriptSummary(v bool)` + +SetTranscriptSummary sets TranscriptSummary field to given value. + +### HasTranscriptSummary + +`func (o *VideoCreationPayload) HasTranscriptSummary() bool` + +HasTranscriptSummary returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VideoUpdatePayload.md b/docs/VideoUpdatePayload.md index c3c2ec2..cdecd47 100644 --- a/docs/VideoUpdatePayload.md +++ b/docs/VideoUpdatePayload.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **Metadata** | Pointer to [**[]Metadata**](Metadata.md) | A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video. | [optional] **Language** | Pointer to **NullableString** | 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** | Pointer to **bool** | 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** | Pointer to **bool** | 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] ## Methods @@ -304,6 +305,31 @@ SetTranscript sets Transcript field to given value. HasTranscript returns a boolean if a field has been set. +### GetTranscriptSummary + +`func (o *VideoUpdatePayload) GetTranscriptSummary() bool` + +GetTranscriptSummary returns the TranscriptSummary field if non-nil, zero value otherwise. + +### GetTranscriptSummaryOk + +`func (o *VideoUpdatePayload) GetTranscriptSummaryOk() (*bool, bool)` + +GetTranscriptSummaryOk returns a tuple with the TranscriptSummary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTranscriptSummary + +`func (o *VideoUpdatePayload) SetTranscriptSummary(v bool)` + +SetTranscriptSummary sets TranscriptSummary field to given value. + +### HasTranscriptSummary + +`func (o *VideoUpdatePayload) HasTranscriptSummary() bool` + +HasTranscriptSummary returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/model_conflict_error.go b/model_conflict_error.go new file mode 100644 index 0000000..83cda48 --- /dev/null +++ b/model_conflict_error.go @@ -0,0 +1,233 @@ +/* + * api.video + * + * 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. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// ConflictError struct for ConflictError +type ConflictError struct { + // A link to the error documentation. + Type *string `json:"type,omitempty"` + // A description of the error that occurred. + Title *string `json:"title,omitempty"` + // The name of the parameter that caused the error. + Name *string `json:"name,omitempty"` + // The HTTP status code. + Status *int32 `json:"status,omitempty"` + // A solution for the error. + Detail *string `json:"detail,omitempty"` +} + +// NewConflictError instantiates a new ConflictError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConflictError() *ConflictError { + this := ConflictError{} + return &this +} + +// NewConflictErrorWithDefaults instantiates a new ConflictError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConflictErrorWithDefaults() *ConflictError { + this := ConflictError{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ConflictError) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConflictError) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ConflictError) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ConflictError) SetType(v string) { + o.Type = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *ConflictError) GetTitle() string { + if o == nil || o.Title == nil { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConflictError) GetTitleOk() (*string, bool) { + if o == nil || o.Title == nil { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *ConflictError) HasTitle() bool { + if o != nil && o.Title != nil { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *ConflictError) SetTitle(v string) { + o.Title = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ConflictError) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConflictError) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ConflictError) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ConflictError) SetName(v string) { + o.Name = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ConflictError) GetStatus() int32 { + if o == nil || o.Status == nil { + var ret int32 + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConflictError) GetStatusOk() (*int32, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ConflictError) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given int32 and assigns it to the Status field. +func (o *ConflictError) SetStatus(v int32) { + o.Status = &v +} + +// GetDetail returns the Detail field value if set, zero value otherwise. +func (o *ConflictError) GetDetail() string { + if o == nil || o.Detail == nil { + var ret string + return ret + } + return *o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConflictError) GetDetailOk() (*string, bool) { + if o == nil || o.Detail == nil { + return nil, false + } + return o.Detail, true +} + +// HasDetail returns a boolean if a field has been set. +func (o *ConflictError) HasDetail() bool { + if o != nil && o.Detail != nil { + return true + } + + return false +} + +// SetDetail gets a reference to the given string and assigns it to the Detail field. +func (o *ConflictError) SetDetail(v string) { + o.Detail = &v +} + +type NullableConflictError struct { + value *ConflictError + isSet bool +} + +func (v NullableConflictError) Get() *ConflictError { + return v.value +} + +func (v *NullableConflictError) Set(val *ConflictError) { + v.value = val + v.isSet = true +} + +func (v NullableConflictError) IsSet() bool { + return v.isSet +} + +func (v *NullableConflictError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConflictError(val *ConflictError) *NullableConflictError { + return &NullableConflictError{value: val, isSet: true} +} diff --git a/model_not_found.go b/model_not_found.go index c8d29ae..0da7bf9 100644 --- a/model_not_found.go +++ b/model_not_found.go @@ -16,10 +16,14 @@ import ( // NotFound struct for NotFound type NotFound struct { - Type *string `json:"type,omitempty"` - Title *string `json:"title,omitempty"` - Name *string `json:"name,omitempty"` - Status *int32 `json:"status,omitempty"` + // A link to the error documentation. + Type *string `json:"type,omitempty"` + // A description of the error that occurred. + Title *string `json:"title,omitempty"` + // The name of the parameter that caused the error. + Name *string `json:"name,omitempty"` + // The HTTP status code. + Status *int32 `json:"status,omitempty"` } // NewNotFound instantiates a new NotFound object diff --git a/model_summaries_list_response.go b/model_summaries_list_response.go new file mode 100644 index 0000000..a048a3f --- /dev/null +++ b/model_summaries_list_response.go @@ -0,0 +1,116 @@ +/* + * api.video + * + * 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. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// SummariesListResponse struct for SummariesListResponse +type SummariesListResponse struct { + // An array of summary objects. + Data []Summary `json:"data"` + Pagination Pagination `json:"pagination"` +} + +// NewSummariesListResponse instantiates a new SummariesListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSummariesListResponse(data []Summary, pagination Pagination) *SummariesListResponse { + this := SummariesListResponse{} + this.Data = data + this.Pagination = pagination + return &this +} + +// NewSummariesListResponseWithDefaults instantiates a new SummariesListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSummariesListResponseWithDefaults() *SummariesListResponse { + this := SummariesListResponse{} + return &this +} + +// GetData returns the Data field value +func (o *SummariesListResponse) GetData() []Summary { + if o == nil { + var ret []Summary + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *SummariesListResponse) GetDataOk() (*[]Summary, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *SummariesListResponse) SetData(v []Summary) { + o.Data = v +} + +// GetPagination returns the Pagination field value +func (o *SummariesListResponse) GetPagination() Pagination { + if o == nil { + var ret Pagination + return ret + } + + return o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *SummariesListResponse) GetPaginationOk() (*Pagination, bool) { + if o == nil { + return nil, false + } + return &o.Pagination, true +} + +// SetPagination sets field value +func (o *SummariesListResponse) SetPagination(v Pagination) { + o.Pagination = v +} + +type NullableSummariesListResponse struct { + value *SummariesListResponse + isSet bool +} + +func (v NullableSummariesListResponse) Get() *SummariesListResponse { + return v.value +} + +func (v *NullableSummariesListResponse) Set(val *SummariesListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSummariesListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSummariesListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSummariesListResponse(val *SummariesListResponse) *NullableSummariesListResponse { + return &NullableSummariesListResponse{value: val, isSet: true} +} diff --git a/model_summary.go b/model_summary.go new file mode 100644 index 0000000..32c503e --- /dev/null +++ b/model_summary.go @@ -0,0 +1,267 @@ +/* + * api.video + * + * 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. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// Summary struct for Summary +type Summary struct { + // The unique identifier of the summary object. + SummaryId *string `json:"summaryId,omitempty"` + // Returns the date and time when the summary was created in ATOM date-time format. + CreatedAt *string `json:"createdAt,omitempty"` + // Returns the date and time when the summary was last updated in ATOM date-time format. + UpdatedAt *string `json:"updatedAt,omitempty"` + // The unique identifier of the video object. + VideoId *string `json:"videoId,omitempty"` + // 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. + Origin *string `json:"origin,omitempty"` + // 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. + SourceStatus *string `json:"sourceStatus,omitempty"` +} + +// NewSummary instantiates a new Summary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSummary() *Summary { + this := Summary{} + return &this +} + +// NewSummaryWithDefaults instantiates a new Summary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSummaryWithDefaults() *Summary { + this := Summary{} + return &this +} + +// GetSummaryId returns the SummaryId field value if set, zero value otherwise. +func (o *Summary) GetSummaryId() string { + if o == nil || o.SummaryId == nil { + var ret string + return ret + } + return *o.SummaryId +} + +// GetSummaryIdOk returns a tuple with the SummaryId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Summary) GetSummaryIdOk() (*string, bool) { + if o == nil || o.SummaryId == nil { + return nil, false + } + return o.SummaryId, true +} + +// HasSummaryId returns a boolean if a field has been set. +func (o *Summary) HasSummaryId() bool { + if o != nil && o.SummaryId != nil { + return true + } + + return false +} + +// SetSummaryId gets a reference to the given string and assigns it to the SummaryId field. +func (o *Summary) SetSummaryId(v string) { + o.SummaryId = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Summary) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Summary) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Summary) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *Summary) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Summary) GetUpdatedAt() string { + if o == nil || o.UpdatedAt == nil { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Summary) GetUpdatedAtOk() (*string, bool) { + if o == nil || o.UpdatedAt == nil { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Summary) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt != nil { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *Summary) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +// GetVideoId returns the VideoId field value if set, zero value otherwise. +func (o *Summary) GetVideoId() string { + if o == nil || o.VideoId == nil { + var ret string + return ret + } + return *o.VideoId +} + +// GetVideoIdOk returns a tuple with the VideoId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Summary) GetVideoIdOk() (*string, bool) { + if o == nil || o.VideoId == nil { + return nil, false + } + return o.VideoId, true +} + +// HasVideoId returns a boolean if a field has been set. +func (o *Summary) HasVideoId() bool { + if o != nil && o.VideoId != nil { + return true + } + + return false +} + +// SetVideoId gets a reference to the given string and assigns it to the VideoId field. +func (o *Summary) SetVideoId(v string) { + o.VideoId = &v +} + +// GetOrigin returns the Origin field value if set, zero value otherwise. +func (o *Summary) GetOrigin() string { + if o == nil || o.Origin == nil { + var ret string + return ret + } + return *o.Origin +} + +// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Summary) GetOriginOk() (*string, bool) { + if o == nil || o.Origin == nil { + return nil, false + } + return o.Origin, true +} + +// HasOrigin returns a boolean if a field has been set. +func (o *Summary) HasOrigin() bool { + if o != nil && o.Origin != nil { + return true + } + + return false +} + +// SetOrigin gets a reference to the given string and assigns it to the Origin field. +func (o *Summary) SetOrigin(v string) { + o.Origin = &v +} + +// GetSourceStatus returns the SourceStatus field value if set, zero value otherwise. +func (o *Summary) GetSourceStatus() string { + if o == nil || o.SourceStatus == nil { + var ret string + return ret + } + return *o.SourceStatus +} + +// GetSourceStatusOk returns a tuple with the SourceStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Summary) GetSourceStatusOk() (*string, bool) { + if o == nil || o.SourceStatus == nil { + return nil, false + } + return o.SourceStatus, true +} + +// HasSourceStatus returns a boolean if a field has been set. +func (o *Summary) HasSourceStatus() bool { + if o != nil && o.SourceStatus != nil { + return true + } + + return false +} + +// SetSourceStatus gets a reference to the given string and assigns it to the SourceStatus field. +func (o *Summary) SetSourceStatus(v string) { + o.SourceStatus = &v +} + +type NullableSummary struct { + value *Summary + isSet bool +} + +func (v NullableSummary) Get() *Summary { + return v.value +} + +func (v *NullableSummary) Set(val *Summary) { + v.value = val + v.isSet = true +} + +func (v NullableSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSummary(val *Summary) *NullableSummary { + return &NullableSummary{value: val, isSet: true} +} diff --git a/model_summary_creation_payload.go b/model_summary_creation_payload.go new file mode 100644 index 0000000..e3d3c6f --- /dev/null +++ b/model_summary_creation_payload.go @@ -0,0 +1,124 @@ +/* + * api.video + * + * 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. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// SummaryCreationPayload struct for SummaryCreationPayload +type SummaryCreationPayload struct { + // Create a summary of a video using the video ID. + VideoId string `json:"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. + Origin *string `json:"origin,omitempty"` +} + +// NewSummaryCreationPayload instantiates a new SummaryCreationPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSummaryCreationPayload(videoId string) *SummaryCreationPayload { + this := SummaryCreationPayload{} + this.VideoId = videoId + return &this +} + +// NewSummaryCreationPayloadWithDefaults instantiates a new SummaryCreationPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSummaryCreationPayloadWithDefaults() *SummaryCreationPayload { + this := SummaryCreationPayload{} + return &this +} + +// GetVideoId returns the VideoId field value +func (o *SummaryCreationPayload) GetVideoId() string { + if o == nil { + var ret string + return ret + } + + return o.VideoId +} + +// GetVideoIdOk returns a tuple with the VideoId field value +// and a boolean to check if the value has been set. +func (o *SummaryCreationPayload) GetVideoIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.VideoId, true +} + +// SetVideoId sets field value +func (o *SummaryCreationPayload) SetVideoId(v string) { + o.VideoId = v +} + +// GetOrigin returns the Origin field value if set, zero value otherwise. +func (o *SummaryCreationPayload) GetOrigin() string { + if o == nil || o.Origin == nil { + var ret string + return ret + } + return *o.Origin +} + +// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SummaryCreationPayload) GetOriginOk() (*string, bool) { + if o == nil || o.Origin == nil { + return nil, false + } + return o.Origin, true +} + +// HasOrigin returns a boolean if a field has been set. +func (o *SummaryCreationPayload) HasOrigin() bool { + if o != nil && o.Origin != nil { + return true + } + + return false +} + +// SetOrigin gets a reference to the given string and assigns it to the Origin field. +func (o *SummaryCreationPayload) SetOrigin(v string) { + o.Origin = &v +} + +type NullableSummaryCreationPayload struct { + value *SummaryCreationPayload + isSet bool +} + +func (v NullableSummaryCreationPayload) Get() *SummaryCreationPayload { + return v.value +} + +func (v *NullableSummaryCreationPayload) Set(val *SummaryCreationPayload) { + v.value = val + v.isSet = true +} + +func (v NullableSummaryCreationPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableSummaryCreationPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSummaryCreationPayload(val *SummaryCreationPayload) *NullableSummaryCreationPayload { + return &NullableSummaryCreationPayload{value: val, isSet: true} +} diff --git a/model_summary_source.go b/model_summary_source.go new file mode 100644 index 0000000..5eec76b --- /dev/null +++ b/model_summary_source.go @@ -0,0 +1,165 @@ +/* + * api.video + * + * 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. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// SummarySource struct for SummarySource +type SummarySource struct { + // A video title, based on the contents of the video. + Title *string `json:"title,omitempty"` + // 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. + Abstract *string `json:"abstract,omitempty"` + // A list of 3 key points from the video, in chronological order. + Takeaways *[]string `json:"takeaways,omitempty"` +} + +// NewSummarySource instantiates a new SummarySource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSummarySource() *SummarySource { + this := SummarySource{} + return &this +} + +// NewSummarySourceWithDefaults instantiates a new SummarySource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSummarySourceWithDefaults() *SummarySource { + this := SummarySource{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *SummarySource) GetTitle() string { + if o == nil || o.Title == nil { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SummarySource) GetTitleOk() (*string, bool) { + if o == nil || o.Title == nil { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *SummarySource) HasTitle() bool { + if o != nil && o.Title != nil { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *SummarySource) SetTitle(v string) { + o.Title = &v +} + +// GetAbstract returns the Abstract field value if set, zero value otherwise. +func (o *SummarySource) GetAbstract() string { + if o == nil || o.Abstract == nil { + var ret string + return ret + } + return *o.Abstract +} + +// GetAbstractOk returns a tuple with the Abstract field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SummarySource) GetAbstractOk() (*string, bool) { + if o == nil || o.Abstract == nil { + return nil, false + } + return o.Abstract, true +} + +// HasAbstract returns a boolean if a field has been set. +func (o *SummarySource) HasAbstract() bool { + if o != nil && o.Abstract != nil { + return true + } + + return false +} + +// SetAbstract gets a reference to the given string and assigns it to the Abstract field. +func (o *SummarySource) SetAbstract(v string) { + o.Abstract = &v +} + +// GetTakeaways returns the Takeaways field value if set, zero value otherwise. +func (o *SummarySource) GetTakeaways() []string { + if o == nil || o.Takeaways == nil { + var ret []string + return ret + } + return *o.Takeaways +} + +// GetTakeawaysOk returns a tuple with the Takeaways field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SummarySource) GetTakeawaysOk() (*[]string, bool) { + if o == nil || o.Takeaways == nil { + return nil, false + } + return o.Takeaways, true +} + +// HasTakeaways returns a boolean if a field has been set. +func (o *SummarySource) HasTakeaways() bool { + if o != nil && o.Takeaways != nil { + return true + } + + return false +} + +// SetTakeaways gets a reference to the given []string and assigns it to the Takeaways field. +func (o *SummarySource) SetTakeaways(v []string) { + o.Takeaways = &v +} + +type NullableSummarySource struct { + value *SummarySource + isSet bool +} + +func (v NullableSummarySource) Get() *SummarySource { + return v.value +} + +func (v *NullableSummarySource) Set(val *SummarySource) { + v.value = val + v.isSet = true +} + +func (v NullableSummarySource) IsSet() bool { + return v.isSet +} + +func (v *NullableSummarySource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSummarySource(val *SummarySource) *NullableSummarySource { + return &NullableSummarySource{value: val, isSet: true} +} diff --git a/model_summary_update_payload.go b/model_summary_update_payload.go new file mode 100644 index 0000000..9355e53 --- /dev/null +++ b/model_summary_update_payload.go @@ -0,0 +1,165 @@ +/* + * api.video + * + * 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. + * + * API version: 1 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package apivideosdk + +import ( +//"encoding/json" +) + +// SummaryUpdatePayload struct for SummaryUpdatePayload +type SummaryUpdatePayload struct { + // A video title, based on the contents of the video. + Title *string `json:"title,omitempty"` + // A short outline of the contents of the video. + Abstract *string `json:"abstract,omitempty"` + // A list of 3 key points from the video, in chronological order. + Takeaways *[]string `json:"takeaways,omitempty"` +} + +// NewSummaryUpdatePayload instantiates a new SummaryUpdatePayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSummaryUpdatePayload() *SummaryUpdatePayload { + this := SummaryUpdatePayload{} + return &this +} + +// NewSummaryUpdatePayloadWithDefaults instantiates a new SummaryUpdatePayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSummaryUpdatePayloadWithDefaults() *SummaryUpdatePayload { + this := SummaryUpdatePayload{} + return &this +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *SummaryUpdatePayload) GetTitle() string { + if o == nil || o.Title == nil { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SummaryUpdatePayload) GetTitleOk() (*string, bool) { + if o == nil || o.Title == nil { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *SummaryUpdatePayload) HasTitle() bool { + if o != nil && o.Title != nil { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *SummaryUpdatePayload) SetTitle(v string) { + o.Title = &v +} + +// GetAbstract returns the Abstract field value if set, zero value otherwise. +func (o *SummaryUpdatePayload) GetAbstract() string { + if o == nil || o.Abstract == nil { + var ret string + return ret + } + return *o.Abstract +} + +// GetAbstractOk returns a tuple with the Abstract field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SummaryUpdatePayload) GetAbstractOk() (*string, bool) { + if o == nil || o.Abstract == nil { + return nil, false + } + return o.Abstract, true +} + +// HasAbstract returns a boolean if a field has been set. +func (o *SummaryUpdatePayload) HasAbstract() bool { + if o != nil && o.Abstract != nil { + return true + } + + return false +} + +// SetAbstract gets a reference to the given string and assigns it to the Abstract field. +func (o *SummaryUpdatePayload) SetAbstract(v string) { + o.Abstract = &v +} + +// GetTakeaways returns the Takeaways field value if set, zero value otherwise. +func (o *SummaryUpdatePayload) GetTakeaways() []string { + if o == nil || o.Takeaways == nil { + var ret []string + return ret + } + return *o.Takeaways +} + +// GetTakeawaysOk returns a tuple with the Takeaways field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SummaryUpdatePayload) GetTakeawaysOk() (*[]string, bool) { + if o == nil || o.Takeaways == nil { + return nil, false + } + return o.Takeaways, true +} + +// HasTakeaways returns a boolean if a field has been set. +func (o *SummaryUpdatePayload) HasTakeaways() bool { + if o != nil && o.Takeaways != nil { + return true + } + + return false +} + +// SetTakeaways gets a reference to the given []string and assigns it to the Takeaways field. +func (o *SummaryUpdatePayload) SetTakeaways(v []string) { + o.Takeaways = &v +} + +type NullableSummaryUpdatePayload struct { + value *SummaryUpdatePayload + isSet bool +} + +func (v NullableSummaryUpdatePayload) Get() *SummaryUpdatePayload { + return v.value +} + +func (v *NullableSummaryUpdatePayload) Set(val *SummaryUpdatePayload) { + v.value = val + v.isSet = true +} + +func (v NullableSummaryUpdatePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableSummaryUpdatePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSummaryUpdatePayload(val *SummaryUpdatePayload) *NullableSummaryUpdatePayload { + return &NullableSummaryUpdatePayload{value: val, isSet: true} +} diff --git a/model_video_creation_payload.go b/model_video_creation_payload.go index 98dc33a..6b223a8 100644 --- a/model_video_creation_payload.go +++ b/model_video_creation_payload.go @@ -40,6 +40,8 @@ type VideoCreationPayload struct { Language *NullableString `json:"language,omitempty"` // 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. Transcript *bool `json:"transcript,omitempty"` + // 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. + TranscriptSummary *bool `json:"transcriptSummary,omitempty"` } // NewVideoCreationPayload instantiates a new VideoCreationPayload object @@ -491,6 +493,38 @@ func (o *VideoCreationPayload) SetTranscript(v bool) { o.Transcript = &v } +// GetTranscriptSummary returns the TranscriptSummary field value if set, zero value otherwise. +func (o *VideoCreationPayload) GetTranscriptSummary() bool { + if o == nil || o.TranscriptSummary == nil { + var ret bool + return ret + } + return *o.TranscriptSummary +} + +// GetTranscriptSummaryOk returns a tuple with the TranscriptSummary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoCreationPayload) GetTranscriptSummaryOk() (*bool, bool) { + if o == nil || o.TranscriptSummary == nil { + return nil, false + } + return o.TranscriptSummary, true +} + +// HasTranscriptSummary returns a boolean if a field has been set. +func (o *VideoCreationPayload) HasTranscriptSummary() bool { + if o != nil && o.TranscriptSummary != nil { + return true + } + + return false +} + +// SetTranscriptSummary gets a reference to the given bool and assigns it to the TranscriptSummary field. +func (o *VideoCreationPayload) SetTranscriptSummary(v bool) { + o.TranscriptSummary = &v +} + type NullableVideoCreationPayload struct { value *VideoCreationPayload isSet bool diff --git a/model_video_update_payload.go b/model_video_update_payload.go index cf074e1..a066568 100644 --- a/model_video_update_payload.go +++ b/model_video_update_payload.go @@ -36,6 +36,8 @@ type VideoUpdatePayload struct { Language *NullableString `json:"language,omitempty"` // 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. Transcript *bool `json:"transcript,omitempty"` + // 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. + TranscriptSummary *bool `json:"transcriptSummary,omitempty"` } // NewVideoUpdatePayload instantiates a new VideoUpdatePayload object @@ -397,6 +399,38 @@ func (o *VideoUpdatePayload) SetTranscript(v bool) { o.Transcript = &v } +// GetTranscriptSummary returns the TranscriptSummary field value if set, zero value otherwise. +func (o *VideoUpdatePayload) GetTranscriptSummary() bool { + if o == nil || o.TranscriptSummary == nil { + var ret bool + return ret + } + return *o.TranscriptSummary +} + +// GetTranscriptSummaryOk returns a tuple with the TranscriptSummary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VideoUpdatePayload) GetTranscriptSummaryOk() (*bool, bool) { + if o == nil || o.TranscriptSummary == nil { + return nil, false + } + return o.TranscriptSummary, true +} + +// HasTranscriptSummary returns a boolean if a field has been set. +func (o *VideoUpdatePayload) HasTranscriptSummary() bool { + if o != nil && o.TranscriptSummary != nil { + return true + } + + return false +} + +// SetTranscriptSummary gets a reference to the given bool and assigns it to the TranscriptSummary field. +func (o *VideoUpdatePayload) SetTranscriptSummary(v bool) { + o.TranscriptSummary = &v +} + type NullableVideoUpdatePayload struct { value *VideoUpdatePayload isSet bool