diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c49e27..6bb7526 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.3] - 2024-09-30 +- Add /tags API endpoint + ## [1.4.2] - 2024-09-16 - Add discarded video endpoints diff --git a/README.md b/README.md index 2935b5c..9aca834 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ - [Chapters](#chapters) - [LiveStreams](#livestreams) - [PlayerThemes](#playerthemes) + - [Tags](#tags) - [UploadTokens](#uploadtokens) - [Videos](#videos) - [Watermarks](#watermarks) @@ -230,6 +231,22 @@ 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 +#### Tags + + +##### Retrieve an instance of the Tags API: +```golang +client := apivideosdk.ClientBuilder("API_VIDEO_KEY").Build() +tagsApi := client.Tags +``` + +##### Endpoints + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**List**](https://github.com/apivideo/api.video-go-client/blob/main/docs/Tags.md#List) | **Get** `/tags` | List all video tags + + #### UploadTokens @@ -345,6 +362,8 @@ Method | HTTP request | Description - [FilterBy1](https://github.com/apivideo/api.video-go-client/blob/main/docs/FilterBy1.md) - [FilterBy2](https://github.com/apivideo/api.video-go-client/blob/main/docs/FilterBy2.md) - [Link](https://github.com/apivideo/api.video-go-client/blob/main/docs/Link.md) + - [ListTagsResponse](https://github.com/apivideo/api.video-go-client/blob/main/docs/ListTagsResponse.md) + - [ListTagsResponseData](https://github.com/apivideo/api.video-go-client/blob/main/docs/ListTagsResponseData.md) - [LiveStream](https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStream.md) - [LiveStreamAssets](https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamAssets.md) - [LiveStreamCreationPayload](https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamCreationPayload.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 3642844..0a16b49 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -974,6 +974,163 @@ paths: code: | // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#create + /tags: + get: + description: This endpoint enables you to search for video tags in a project + and see how many videos are tagged with them. If you do not define any query + parameters, the endpoint lists all video tags and the numbers of times they + are used in a project. + operationId: LIST-tags + parameters: + - description: | + Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. + explode: true + in: query + name: value + required: false + schema: + 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: + + - `value`: Sorts the results based on tag values in alphabetic order. + - `videoCount`: Sorts the results based on the number of times a video tag is used. + example: value + explode: true + in: query + name: sortBy + required: false + schema: + enum: + - value + - videoCount + 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: + response: + value: + data: + - value: maths + videoCount: "33" + - value: tutorials + videoCount: "10" + pagination: + currentPage: 1 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 2 + currentPageItems: 2 + links: + - rel: self + uri: https://ws.api.video/watermarks?currentPage=1 + - rel: first + uri: https://ws.api.video/watermarks?currentPage=1 + - rel: last + uri: https://ws.api.video/watermarks?currentPage=1 + schema: + $ref: '#/components/schemas/list-tags-response' + 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 + "429": + content: + application/json: + examples: + Too many requests: + value: + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 + schema: + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests + 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 all video tags + tags: + - Tags + x-client-action: list + x-group-parameters: true + x-client-paginated: true /videos/{videoId}/source: post: description: Ingest a video from a source or file. @@ -14765,6 +14922,41 @@ components: - videoId title: Video type: object + list-tags-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: + - videoCount: 0 + value: value + - videoCount: 0 + value: value + properties: + data: + items: + $ref: '#/components/schemas/list_tags_response_data' + type: array + pagination: + $ref: '#/components/schemas/pagination' + title: Tags + type: object watermark: example: watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i @@ -16903,6 +17095,18 @@ components: type: string type: object x-is-deep-object: true + list_tags_response_data: + example: + videoCount: 0 + value: value + properties: + value: + description: Returns the value of a video tag used in your project. + type: string + videoCount: + description: Returns the number of times a video tag is used. + type: integer + type: object player_theme_assets: example: link: path/to/my/logo/mylogo.jpg diff --git a/api_tags.go b/api_tags.go new file mode 100644 index 0000000..12f0a84 --- /dev/null +++ b/api_tags.go @@ -0,0 +1,134 @@ +/* + * 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" +) + +// Linger please +var ( + _ context.Context +) + +type TagsApiListRequest struct { + value *string + sortBy *string + sortOrder *string + currentPage *int32 + pageSize *int32 +} + +func (r TagsApiListRequest) Value(value string) TagsApiListRequest { + r.value = &value + return r +} +func (r TagsApiListRequest) SortBy(sortBy string) TagsApiListRequest { + r.sortBy = &sortBy + return r +} +func (r TagsApiListRequest) SortOrder(sortOrder string) TagsApiListRequest { + r.sortOrder = &sortOrder + return r +} +func (r TagsApiListRequest) CurrentPage(currentPage int32) TagsApiListRequest { + r.currentPage = ¤tPage + return r +} +func (r TagsApiListRequest) PageSize(pageSize int32) TagsApiListRequest { + r.pageSize = &pageSize + return r +} + +type TagsServiceI interface { + /* + * List List all video tags + * @return TagsApiListRequest + */ + + List(r TagsApiListRequest) (*ListTagsResponse, error) + + /* + * List List all video tags + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return TagsApiListRequest + */ + + ListWithContext(ctx context.Context, r TagsApiListRequest) (*ListTagsResponse, error) +} + +// TagsService communicating with the Tags +// endpoints of the api.video API +type TagsService struct { + client *Client +} + +/* + * List List all video tags + * This endpoint enables you to search for video tags in a project and see how many videos are tagged with them. If you do not define any query parameters, the endpoint lists all video tags and the numbers of times they are used in a project. + + * @return TagsApiListRequest + */ + +func (s *TagsService) List(r TagsApiListRequest) (*ListTagsResponse, error) { + + return s.ListWithContext(context.Background(), r) + +} + +/* + * List List all video tags + * This endpoint enables you to search for video tags in a project and see how many videos are tagged with them. If you do not define any query parameters, the endpoint lists all video tags and the numbers of times they are used in a project. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return TagsApiListRequest + */ + +func (s *TagsService) ListWithContext(ctx context.Context, r TagsApiListRequest) (*ListTagsResponse, error) { + var localVarPostBody interface{} + + localVarPath := "/tags" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + + if r.value != nil { + localVarQueryParams.Add("value", parameterToString(*r.value, "")) + } + 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(ListTagsResponse) + _, err = s.client.do(req, res) + + if err != nil { + return nil, err + } + + return res, nil + +} diff --git a/client.go b/client.go index 7436733..707b21b 100644 --- a/client.go +++ b/client.go @@ -36,6 +36,7 @@ type Client struct { Chapters ChaptersServiceI LiveStreams LiveStreamsServiceI PlayerThemes PlayerThemesServiceI + Tags TagsServiceI UploadTokens UploadTokensServiceI Videos VideosServiceI Watermarks WatermarksServiceI @@ -183,6 +184,7 @@ func (cb *Builder) Build() *Client { c.Chapters = &ChaptersService{client: c} c.LiveStreams = &LiveStreamsService{client: c} c.PlayerThemes = &PlayerThemesService{client: c} + c.Tags = &TagsService{client: c} c.UploadTokens = &UploadTokensService{client: c} c.Videos = &VideosService{client: c} c.Watermarks = &WatermarksService{client: c} @@ -255,7 +257,7 @@ func (c *Client) prepareRequest( req.Header.Set("AV-Origin-Sdk", originSdkHeaderValue) } - req.Header.Set("AV-Origin-Client", "go:1.4.2") + req.Header.Set("AV-Origin-Client", "go:1.4.3") for headerName := range headerParams { req.Header.Set(headerName, headerParams[headerName]) @@ -530,7 +532,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.2") + req.Header.Set("AV-Origin-Client", "go:1.4.3") resp, err := c.httpClient.Do(req) diff --git a/docs/ListTagsResponse.md b/docs/ListTagsResponse.md new file mode 100644 index 0000000..fa82046 --- /dev/null +++ b/docs/ListTagsResponse.md @@ -0,0 +1,82 @@ +# ListTagsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to [**[]ListTagsResponseData**](ListTagsResponseData.md) | | [optional] +**Pagination** | Pointer to [**Pagination**](Pagination.md) | | [optional] + +## Methods + +### NewListTagsResponse + +`func NewListTagsResponse() *ListTagsResponse` + +NewListTagsResponse instantiates a new ListTagsResponse 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 + +### NewListTagsResponseWithDefaults + +`func NewListTagsResponseWithDefaults() *ListTagsResponse` + +NewListTagsResponseWithDefaults instantiates a new ListTagsResponse 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 *ListTagsResponse) GetData() []ListTagsResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ListTagsResponse) GetDataOk() (*[]ListTagsResponseData, 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 *ListTagsResponse) SetData(v []ListTagsResponseData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *ListTagsResponse) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetPagination + +`func (o *ListTagsResponse) GetPagination() Pagination` + +GetPagination returns the Pagination field if non-nil, zero value otherwise. + +### GetPaginationOk + +`func (o *ListTagsResponse) 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 *ListTagsResponse) SetPagination(v Pagination)` + +SetPagination sets Pagination field to given value. + +### HasPagination + +`func (o *ListTagsResponse) HasPagination() bool` + +HasPagination 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/ListTagsResponseData.md b/docs/ListTagsResponseData.md new file mode 100644 index 0000000..dbbaa30 --- /dev/null +++ b/docs/ListTagsResponseData.md @@ -0,0 +1,82 @@ +# ListTagsResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to **string** | Returns the value of a video tag used in your project. | [optional] +**VideoCount** | Pointer to **int32** | Returns the number of times a video tag is used. | [optional] + +## Methods + +### NewListTagsResponseData + +`func NewListTagsResponseData() *ListTagsResponseData` + +NewListTagsResponseData instantiates a new ListTagsResponseData 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 + +### NewListTagsResponseDataWithDefaults + +`func NewListTagsResponseDataWithDefaults() *ListTagsResponseData` + +NewListTagsResponseDataWithDefaults instantiates a new ListTagsResponseData 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 + +### GetValue + +`func (o *ListTagsResponseData) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ListTagsResponseData) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ListTagsResponseData) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ListTagsResponseData) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetVideoCount + +`func (o *ListTagsResponseData) GetVideoCount() int32` + +GetVideoCount returns the VideoCount field if non-nil, zero value otherwise. + +### GetVideoCountOk + +`func (o *ListTagsResponseData) GetVideoCountOk() (*int32, bool)` + +GetVideoCountOk returns a tuple with the VideoCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVideoCount + +`func (o *ListTagsResponseData) SetVideoCount(v int32)` + +SetVideoCount sets VideoCount field to given value. + +### HasVideoCount + +`func (o *ListTagsResponseData) HasVideoCount() bool` + +HasVideoCount 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/Tags.md b/docs/Tags.md new file mode 100644 index 0000000..23cf4e7 --- /dev/null +++ b/docs/Tags.md @@ -0,0 +1,81 @@ +# \Tags + +All URIs are relative to *https://ws.api.video* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**List**](Tags.md#List) | **Get** /tags | List all video tags + + + +## List + +> List(r TagsApiListRequest) (*ListTagsResponse, error) + + +> ListWithContext(ctx context.Context, r TagsApiListRequest) (*ListTagsResponse, error) + + + +List all video tags + + + +### 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.TagsApiListRequest{} + + req.Value("value_example") // string | Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. + req.SortBy("value") // 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: - `value`: Sorts the results based on tag values in alphabetic order. - `videoCount`: Sorts the results based on the number of times a video tag is used. + 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.Tags.List(req) + + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Tags.List``: %v\n", err) + } + // response from `List`: ListTagsResponse + fmt.Fprintf(os.Stdout, "Response from `Tags.List`: %v\n", res) +} +``` +### Path Parameters + + + +### Other Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**value** | **string** | Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase. | +**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: - `value`: Sorts the results based on tag values in alphabetic order. - `videoCount`: Sorts the results based on the number of times a video tag is used. | +**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 + +[**ListTagsResponse**](ListTagsResponse.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/model_list_tags_response.go b/model_list_tags_response.go new file mode 100644 index 0000000..e3f455d --- /dev/null +++ b/model_list_tags_response.go @@ -0,0 +1,129 @@ +/* + * 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" +) + +// ListTagsResponse struct for ListTagsResponse +type ListTagsResponse struct { + Data *[]ListTagsResponseData `json:"data,omitempty"` + Pagination *Pagination `json:"pagination,omitempty"` +} + +// NewListTagsResponse instantiates a new ListTagsResponse 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 NewListTagsResponse() *ListTagsResponse { + this := ListTagsResponse{} + return &this +} + +// NewListTagsResponseWithDefaults instantiates a new ListTagsResponse 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 NewListTagsResponseWithDefaults() *ListTagsResponse { + this := ListTagsResponse{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListTagsResponse) GetData() []ListTagsResponseData { + if o == nil || o.Data == nil { + var ret []ListTagsResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListTagsResponse) GetDataOk() (*[]ListTagsResponseData, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *ListTagsResponse) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given []ListTagsResponseData and assigns it to the Data field. +func (o *ListTagsResponse) SetData(v []ListTagsResponseData) { + o.Data = &v +} + +// GetPagination returns the Pagination field value if set, zero value otherwise. +func (o *ListTagsResponse) GetPagination() Pagination { + if o == nil || o.Pagination == nil { + var ret Pagination + return ret + } + return *o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListTagsResponse) GetPaginationOk() (*Pagination, bool) { + if o == nil || o.Pagination == nil { + return nil, false + } + return o.Pagination, true +} + +// HasPagination returns a boolean if a field has been set. +func (o *ListTagsResponse) HasPagination() bool { + if o != nil && o.Pagination != nil { + return true + } + + return false +} + +// SetPagination gets a reference to the given Pagination and assigns it to the Pagination field. +func (o *ListTagsResponse) SetPagination(v Pagination) { + o.Pagination = &v +} + +type NullableListTagsResponse struct { + value *ListTagsResponse + isSet bool +} + +func (v NullableListTagsResponse) Get() *ListTagsResponse { + return v.value +} + +func (v *NullableListTagsResponse) Set(val *ListTagsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListTagsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListTagsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListTagsResponse(val *ListTagsResponse) *NullableListTagsResponse { + return &NullableListTagsResponse{value: val, isSet: true} +} diff --git a/model_list_tags_response_data.go b/model_list_tags_response_data.go new file mode 100644 index 0000000..0f36ffb --- /dev/null +++ b/model_list_tags_response_data.go @@ -0,0 +1,131 @@ +/* + * 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" +) + +// ListTagsResponseData struct for ListTagsResponseData +type ListTagsResponseData struct { + // Returns the value of a video tag used in your project. + Value *string `json:"value,omitempty"` + // Returns the number of times a video tag is used. + VideoCount *int32 `json:"videoCount,omitempty"` +} + +// NewListTagsResponseData instantiates a new ListTagsResponseData 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 NewListTagsResponseData() *ListTagsResponseData { + this := ListTagsResponseData{} + return &this +} + +// NewListTagsResponseDataWithDefaults instantiates a new ListTagsResponseData 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 NewListTagsResponseDataWithDefaults() *ListTagsResponseData { + this := ListTagsResponseData{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListTagsResponseData) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListTagsResponseData) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListTagsResponseData) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ListTagsResponseData) SetValue(v string) { + o.Value = &v +} + +// GetVideoCount returns the VideoCount field value if set, zero value otherwise. +func (o *ListTagsResponseData) GetVideoCount() int32 { + if o == nil || o.VideoCount == nil { + var ret int32 + return ret + } + return *o.VideoCount +} + +// GetVideoCountOk returns a tuple with the VideoCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListTagsResponseData) GetVideoCountOk() (*int32, bool) { + if o == nil || o.VideoCount == nil { + return nil, false + } + return o.VideoCount, true +} + +// HasVideoCount returns a boolean if a field has been set. +func (o *ListTagsResponseData) HasVideoCount() bool { + if o != nil && o.VideoCount != nil { + return true + } + + return false +} + +// SetVideoCount gets a reference to the given int32 and assigns it to the VideoCount field. +func (o *ListTagsResponseData) SetVideoCount(v int32) { + o.VideoCount = &v +} + +type NullableListTagsResponseData struct { + value *ListTagsResponseData + isSet bool +} + +func (v NullableListTagsResponseData) Get() *ListTagsResponseData { + return v.value +} + +func (v *NullableListTagsResponseData) Set(val *ListTagsResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableListTagsResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableListTagsResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListTagsResponseData(val *ListTagsResponseData) *NullableListTagsResponseData { + return &NullableListTagsResponseData{value: val, isSet: true} +}