-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathencoding_manifests_dash_periods_adaptationsets_representations_chunked_text_api.go
99 lines (83 loc) · 5.56 KB
/
encoding_manifests_dash_periods_adaptationsets_representations_chunked_text_api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package api
import (
"github.com/bitmovin/bitmovin-api-sdk-go/apiclient"
"github.com/bitmovin/bitmovin-api-sdk-go/model"
"github.com/bitmovin/bitmovin-api-sdk-go/pagination"
)
// EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI communicates with '/encoding/manifests/dash/{manifest_id}/periods/{period_id}/adaptationsets/{adaptationset_id}/representations/chunked-text' endpoints
type EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI struct {
apiClient *apiclient.APIClient
}
// NewEncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI constructor for EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI that takes options as argument
func NewEncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI(options ...apiclient.APIClientOption) (*EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI, error) {
apiClient, err := apiclient.NewAPIClient(options...)
if err != nil {
return nil, err
}
return NewEncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPIWithClient(apiClient), nil
}
// NewEncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPIWithClient constructor for EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI that takes an APIClient as argument
func NewEncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPIWithClient(apiClient *apiclient.APIClient) *EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI {
a := &EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI{apiClient: apiClient}
return a
}
// Create Add Chunked Text Representation
func (api *EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI) Create(manifestId string, periodId string, adaptationsetId string, dashChunkedTextRepresentation model.DashChunkedTextRepresentation) (*model.DashChunkedTextRepresentation, error) {
reqParams := func(params *apiclient.RequestParams) {
params.PathParams["manifest_id"] = manifestId
params.PathParams["period_id"] = periodId
params.PathParams["adaptationset_id"] = adaptationsetId
}
var responseModel model.DashChunkedTextRepresentation
err := api.apiClient.Post("/encoding/manifests/dash/{manifest_id}/periods/{period_id}/adaptationsets/{adaptationset_id}/representations/chunked-text", &dashChunkedTextRepresentation, &responseModel, reqParams)
return &responseModel, err
}
// Delete Chunked Text Representation
func (api *EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI) Delete(manifestId string, periodId string, adaptationsetId string, representationId string) (*model.BitmovinResponse, error) {
reqParams := func(params *apiclient.RequestParams) {
params.PathParams["manifest_id"] = manifestId
params.PathParams["period_id"] = periodId
params.PathParams["adaptationset_id"] = adaptationsetId
params.PathParams["representation_id"] = representationId
}
var responseModel model.BitmovinResponse
err := api.apiClient.Delete("/encoding/manifests/dash/{manifest_id}/periods/{period_id}/adaptationsets/{adaptationset_id}/representations/chunked-text/{representation_id}", nil, &responseModel, reqParams)
return &responseModel, err
}
// Get Chunked Text Representation Details
func (api *EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI) Get(manifestId string, periodId string, adaptationsetId string, representationId string) (*model.DashChunkedTextRepresentation, error) {
reqParams := func(params *apiclient.RequestParams) {
params.PathParams["manifest_id"] = manifestId
params.PathParams["period_id"] = periodId
params.PathParams["adaptationset_id"] = adaptationsetId
params.PathParams["representation_id"] = representationId
}
var responseModel model.DashChunkedTextRepresentation
err := api.apiClient.Get("/encoding/manifests/dash/{manifest_id}/periods/{period_id}/adaptationsets/{adaptationset_id}/representations/chunked-text/{representation_id}", nil, &responseModel, reqParams)
return &responseModel, err
}
// List all Chunked Text Representations
func (api *EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPI) List(manifestId string, periodId string, adaptationsetId string, queryParams ...func(*EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPIListQueryParams)) (*pagination.DashChunkedTextRepresentationsListPagination, error) {
queryParameters := &EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPIListQueryParams{}
for _, queryParam := range queryParams {
queryParam(queryParameters)
}
reqParams := func(params *apiclient.RequestParams) {
params.PathParams["manifest_id"] = manifestId
params.PathParams["period_id"] = periodId
params.PathParams["adaptationset_id"] = adaptationsetId
params.QueryParams = queryParameters
}
var responseModel pagination.DashChunkedTextRepresentationsListPagination
err := api.apiClient.Get("/encoding/manifests/dash/{manifest_id}/periods/{period_id}/adaptationsets/{adaptationset_id}/representations/chunked-text", nil, &responseModel, reqParams)
return &responseModel, err
}
// EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPIListQueryParams contains all query parameters for the List endpoint
type EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPIListQueryParams struct {
Offset int32 `query:"offset"`
Limit int32 `query:"limit"`
}
// Params will return a map of query parameters
func (q *EncodingManifestsDashPeriodsAdaptationsetsRepresentationsChunkedTextAPIListQueryParams) Params() map[string]string {
return apiclient.GetParamsMap(q)
}