-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathencoding_encodings_muxings_progressive_ts_drm_aes_api.go
100 lines (82 loc) · 4.7 KB
/
encoding_encodings_muxings_progressive_ts_drm_aes_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
100
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"
)
// EncodingEncodingsMuxingsProgressiveTsDrmAesAPI communicates with '/encoding/encodings/{encoding_id}/muxings/progressive-ts/{muxing_id}/drm/aes' endpoints
type EncodingEncodingsMuxingsProgressiveTsDrmAesAPI struct {
apiClient *apiclient.APIClient
// Customdata communicates with '/encoding/encodings/{encoding_id}/muxings/progressive-ts/{muxing_id}/drm/aes/{drm_id}/customData' endpoints
Customdata *EncodingEncodingsMuxingsProgressiveTsDrmAesCustomdataAPI
}
// NewEncodingEncodingsMuxingsProgressiveTsDrmAesAPI constructor for EncodingEncodingsMuxingsProgressiveTsDrmAesAPI that takes options as argument
func NewEncodingEncodingsMuxingsProgressiveTsDrmAesAPI(options ...apiclient.APIClientOption) (*EncodingEncodingsMuxingsProgressiveTsDrmAesAPI, error) {
apiClient, err := apiclient.NewAPIClient(options...)
if err != nil {
return nil, err
}
return NewEncodingEncodingsMuxingsProgressiveTsDrmAesAPIWithClient(apiClient), nil
}
// NewEncodingEncodingsMuxingsProgressiveTsDrmAesAPIWithClient constructor for EncodingEncodingsMuxingsProgressiveTsDrmAesAPI that takes an APIClient as argument
func NewEncodingEncodingsMuxingsProgressiveTsDrmAesAPIWithClient(apiClient *apiclient.APIClient) *EncodingEncodingsMuxingsProgressiveTsDrmAesAPI {
a := &EncodingEncodingsMuxingsProgressiveTsDrmAesAPI{apiClient: apiClient}
a.Customdata = NewEncodingEncodingsMuxingsProgressiveTsDrmAesCustomdataAPIWithClient(apiClient)
return a
}
// Create Add AES encryption configuration to a Progressive TS muxing
func (api *EncodingEncodingsMuxingsProgressiveTsDrmAesAPI) Create(encodingId string, muxingId string, aesEncryptionDrm model.AesEncryptionDrm) (*model.AesEncryptionDrm, error) {
reqParams := func(params *apiclient.RequestParams) {
params.PathParams["encoding_id"] = encodingId
params.PathParams["muxing_id"] = muxingId
}
var responseModel model.AesEncryptionDrm
err := api.apiClient.Post("/encoding/encodings/{encoding_id}/muxings/progressive-ts/{muxing_id}/drm/aes", &aesEncryptionDrm, &responseModel, reqParams)
return &responseModel, err
}
// Delete AES encryption configuration from a Progressive TS muxing
func (api *EncodingEncodingsMuxingsProgressiveTsDrmAesAPI) Delete(encodingId string, muxingId string, drmId string) (*model.BitmovinResponse, error) {
reqParams := func(params *apiclient.RequestParams) {
params.PathParams["encoding_id"] = encodingId
params.PathParams["muxing_id"] = muxingId
params.PathParams["drm_id"] = drmId
}
var responseModel model.BitmovinResponse
err := api.apiClient.Delete("/encoding/encodings/{encoding_id}/muxings/progressive-ts/{muxing_id}/drm/aes/{drm_id}", nil, &responseModel, reqParams)
return &responseModel, err
}
// Get AES encryption Details of a Progressive TS muxing
func (api *EncodingEncodingsMuxingsProgressiveTsDrmAesAPI) Get(encodingId string, muxingId string, drmId string) (*model.AesEncryptionDrm, error) {
reqParams := func(params *apiclient.RequestParams) {
params.PathParams["encoding_id"] = encodingId
params.PathParams["muxing_id"] = muxingId
params.PathParams["drm_id"] = drmId
}
var responseModel model.AesEncryptionDrm
err := api.apiClient.Get("/encoding/encodings/{encoding_id}/muxings/progressive-ts/{muxing_id}/drm/aes/{drm_id}", nil, &responseModel, reqParams)
return &responseModel, err
}
// List AES encryption configurations of a Progressive TS muxing
func (api *EncodingEncodingsMuxingsProgressiveTsDrmAesAPI) List(encodingId string, muxingId string, queryParams ...func(*EncodingEncodingsMuxingsProgressiveTsDrmAesAPIListQueryParams)) (*pagination.AesEncryptionDrmsListPagination, error) {
queryParameters := &EncodingEncodingsMuxingsProgressiveTsDrmAesAPIListQueryParams{}
for _, queryParam := range queryParams {
queryParam(queryParameters)
}
reqParams := func(params *apiclient.RequestParams) {
params.PathParams["encoding_id"] = encodingId
params.PathParams["muxing_id"] = muxingId
params.QueryParams = queryParameters
}
var responseModel pagination.AesEncryptionDrmsListPagination
err := api.apiClient.Get("/encoding/encodings/{encoding_id}/muxings/progressive-ts/{muxing_id}/drm/aes", nil, &responseModel, reqParams)
return &responseModel, err
}
// EncodingEncodingsMuxingsProgressiveTsDrmAesAPIListQueryParams contains all query parameters for the List endpoint
type EncodingEncodingsMuxingsProgressiveTsDrmAesAPIListQueryParams struct {
Offset int32 `query:"offset"`
Limit int32 `query:"limit"`
}
// Params will return a map of query parameters
func (q *EncodingEncodingsMuxingsProgressiveTsDrmAesAPIListQueryParams) Params() map[string]string {
return apiclient.GetParamsMap(q)
}