-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Go client to v1.58.0-alpha.0
- Loading branch information
Bitmovin OpenApi Bot
committed
Feb 2, 2021
1 parent
f453761
commit 92d2bfc
Showing
14 changed files
with
298 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package api | ||
|
||
import ( | ||
"github.com/bitmovin/bitmovin-api-sdk-go/apiclient" | ||
) | ||
|
||
// EncodingEncodingsStreamsWatermarkingAPI intermediary API object with no endpoints | ||
type EncodingEncodingsStreamsWatermarkingAPI struct { | ||
apiClient *apiclient.APIClient | ||
|
||
// NexguardFileMarker communicates with '/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker' endpoints | ||
NexguardFileMarker *EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI | ||
} | ||
|
||
// NewEncodingEncodingsStreamsWatermarkingAPI constructor for EncodingEncodingsStreamsWatermarkingAPI that takes options as argument | ||
func NewEncodingEncodingsStreamsWatermarkingAPI(options ...apiclient.APIClientOption) (*EncodingEncodingsStreamsWatermarkingAPI, error) { | ||
apiClient, err := apiclient.NewAPIClient(options...) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return NewEncodingEncodingsStreamsWatermarkingAPIWithClient(apiClient), nil | ||
} | ||
|
||
// NewEncodingEncodingsStreamsWatermarkingAPIWithClient constructor for EncodingEncodingsStreamsWatermarkingAPI that takes an APIClient as argument | ||
func NewEncodingEncodingsStreamsWatermarkingAPIWithClient(apiClient *apiclient.APIClient) *EncodingEncodingsStreamsWatermarkingAPI { | ||
a := &EncodingEncodingsStreamsWatermarkingAPI{apiClient: apiClient} | ||
a.NexguardFileMarker = NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPIWithClient(apiClient) | ||
|
||
return a | ||
} |
101 changes: 101 additions & 0 deletions
101
api/encoding_encodings_streams_watermarking_nexguard_file_marker_api.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
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" | ||
) | ||
|
||
// EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI communicates with '/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker' endpoints | ||
type EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI struct { | ||
apiClient *apiclient.APIClient | ||
|
||
// Customdata communicates with '/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker/{nexguard_id}/customData' endpoints | ||
Customdata *EncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPI | ||
} | ||
|
||
// NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI constructor for EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI that takes options as argument | ||
func NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI(options ...apiclient.APIClientOption) (*EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI, error) { | ||
apiClient, err := apiclient.NewAPIClient(options...) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPIWithClient(apiClient), nil | ||
} | ||
|
||
// NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPIWithClient constructor for EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI that takes an APIClient as argument | ||
func NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPIWithClient(apiClient *apiclient.APIClient) *EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI { | ||
a := &EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI{apiClient: apiClient} | ||
a.Customdata = NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPIWithClient(apiClient) | ||
|
||
return a | ||
} | ||
|
||
// Create Add a nexguard file marker watermarking configurations | ||
// Nexguard FileMarker watermarking has several restrictions on the shape of your streams and muxings. The supported muxings are currently fMP4, TS and WebM; segment naming must follow `<filename>_<number>.<extension>`; init segment naming must follow `<filename>_init.<extension>` Supported framerates: * 23.976 * 24.000 * 25.000 * 29.970 * 30.000 * 48.000 * 50.000 * 59.940 * 60.000 Resolution: * 320 <= width <= 5120 * 240 <= height <= 3200 And the GOP size has to be 2 or 2.002 seconds. Please note that our api requires the gop size to be in frames. | ||
func (api *EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI) Create(encodingId string, streamId string, nexGuardFileMarker model.NexGuardFileMarker) (*model.NexGuardFileMarker, error) { | ||
reqParams := func(params *apiclient.RequestParams) { | ||
params.PathParams["encoding_id"] = encodingId | ||
params.PathParams["stream_id"] = streamId | ||
} | ||
|
||
var responseModel model.NexGuardFileMarker | ||
err := api.apiClient.Post("/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker", &nexGuardFileMarker, &responseModel, reqParams) | ||
return &responseModel, err | ||
} | ||
|
||
// Delete nexguard file marker watermarking configurations | ||
func (api *EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI) Delete(encodingId string, streamId string, nexguardId string) (*model.BitmovinResponse, error) { | ||
reqParams := func(params *apiclient.RequestParams) { | ||
params.PathParams["encoding_id"] = encodingId | ||
params.PathParams["stream_id"] = streamId | ||
params.PathParams["nexguard_id"] = nexguardId | ||
} | ||
|
||
var responseModel model.BitmovinResponse | ||
err := api.apiClient.Delete("/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker/{nexguard_id}", nil, &responseModel, reqParams) | ||
return &responseModel, err | ||
} | ||
|
||
// Get Nexguard file marker watermarking configurations details | ||
func (api *EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI) Get(encodingId string, streamId string, nexguardId string) (*model.NexGuardFileMarker, error) { | ||
reqParams := func(params *apiclient.RequestParams) { | ||
params.PathParams["encoding_id"] = encodingId | ||
params.PathParams["stream_id"] = streamId | ||
params.PathParams["nexguard_id"] = nexguardId | ||
} | ||
|
||
var responseModel model.NexGuardFileMarker | ||
err := api.apiClient.Get("/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker/{nexguard_id}", nil, &responseModel, reqParams) | ||
return &responseModel, err | ||
} | ||
|
||
// List nexguard file marker watermarking configurations | ||
func (api *EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPI) List(encodingId string, streamId string, queryParams ...func(*EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPIListQueryParams)) (*pagination.NexGuardFileMarkersListPagination, error) { | ||
queryParameters := &EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPIListQueryParams{} | ||
for _, queryParam := range queryParams { | ||
queryParam(queryParameters) | ||
} | ||
|
||
reqParams := func(params *apiclient.RequestParams) { | ||
params.PathParams["encoding_id"] = encodingId | ||
params.PathParams["stream_id"] = streamId | ||
params.QueryParams = queryParameters | ||
} | ||
|
||
var responseModel pagination.NexGuardFileMarkersListPagination | ||
err := api.apiClient.Get("/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker", nil, &responseModel, reqParams) | ||
return &responseModel, err | ||
} | ||
|
||
// EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPIListQueryParams contains all query parameters for the List endpoint | ||
type EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPIListQueryParams struct { | ||
Offset int32 `query:"offset"` | ||
Limit int32 `query:"limit"` | ||
} | ||
|
||
// Params will return a map of query parameters | ||
func (q *EncodingEncodingsStreamsWatermarkingNexguardFileMarkerAPIListQueryParams) Params() map[string]string { | ||
return apiclient.GetParamsMap(q) | ||
} |
40 changes: 40 additions & 0 deletions
40
api/encoding_encodings_streams_watermarking_nexguard_file_marker_customdata_api.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package api | ||
|
||
import ( | ||
"github.com/bitmovin/bitmovin-api-sdk-go/apiclient" | ||
"github.com/bitmovin/bitmovin-api-sdk-go/model" | ||
) | ||
|
||
// EncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPI communicates with '/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker/{nexguard_id}/customData' endpoints | ||
type EncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPI struct { | ||
apiClient *apiclient.APIClient | ||
} | ||
|
||
// NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPI constructor for EncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPI that takes options as argument | ||
func NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPI(options ...apiclient.APIClientOption) (*EncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPI, error) { | ||
apiClient, err := apiclient.NewAPIClient(options...) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPIWithClient(apiClient), nil | ||
} | ||
|
||
// NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPIWithClient constructor for EncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPI that takes an APIClient as argument | ||
func NewEncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPIWithClient(apiClient *apiclient.APIClient) *EncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPI { | ||
a := &EncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPI{apiClient: apiClient} | ||
return a | ||
} | ||
|
||
// Get Nexguard file marker watermarking configuration Custom Data | ||
func (api *EncodingEncodingsStreamsWatermarkingNexguardFileMarkerCustomdataAPI) Get(encodingId string, streamId string, nexguardId string) (*model.CustomData, error) { | ||
reqParams := func(params *apiclient.RequestParams) { | ||
params.PathParams["encoding_id"] = encodingId | ||
params.PathParams["stream_id"] = streamId | ||
params.PathParams["nexguard_id"] = nexguardId | ||
} | ||
|
||
var responseModel model.CustomData | ||
err := api.apiClient.Get("/encoding/encodings/{encoding_id}/streams/{stream_id}/watermarking/nexguard-file-marker/{nexguard_id}/customData", nil, &responseModel, reqParams) | ||
return &responseModel, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package model | ||
|
||
// NexGuardAbWatermarkingFeature : NexGuardAbWatermarkingFeature model | ||
type NexGuardAbWatermarkingFeature string | ||
|
||
// List of possible NexGuardABWatermarkingFeature values | ||
const ( | ||
NexGuardAbWatermarkingFeature_OTT NexGuardAbWatermarkingFeature = "OTT" | ||
NexGuardAbWatermarkingFeature_DUPLICATED NexGuardAbWatermarkingFeature = "DUPLICATED" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package model | ||
|
||
// NexGuardFileMarker model | ||
type NexGuardFileMarker struct { | ||
// Name of the resource. Can be freely chosen by the user. | ||
Name *string `json:"name,omitempty"` | ||
// Description of the resource. Can be freely chosen by the user. | ||
Description *string `json:"description,omitempty"` | ||
// Creation timestamp, returned as UTC expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ | ||
CreatedAt *DateTime `json:"createdAt,omitempty"` | ||
// Modified timestamp, returned as UTC expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ | ||
ModifiedAt *DateTime `json:"modifiedAt,omitempty"` | ||
// User-specific meta data. This can hold anything. | ||
CustomData *map[string]interface{} `json:"customData,omitempty"` | ||
// Id of the resource (required) | ||
Id *string `json:"id,omitempty"` | ||
// Use the base64 license string that Nagra provides you. (required) | ||
License *string `json:"license,omitempty"` | ||
// The type of watermarking to be used. Usually, OTT is the one recommended in production. | ||
WatermarkType NexGuardWatermarkingType `json:"watermarkType,omitempty"` | ||
// Specify the payload ID that you want to be associated with this output. Valid values vary depending on your Nagra NexGuard forensic watermarking workflow. For PreRelease Content (NGPR), specify an integer from 1 through 4,194,303. You must generate a unique ID for each asset you watermark, and keep a record of th ID. Neither Nagra nor Bitmovin keep track of this for you. | ||
Payload *int32 `json:"payload,omitempty"` | ||
// Enter one of the watermarking preset strings that Nagra provides you. | ||
Preset *string `json:"preset,omitempty"` | ||
// Optional. Ignore this setting unless Nagra support directs you to specify a value. When you don't specify a value here, the Nagra NexGuard library uses its default value. | ||
Strength NexGuardWatermarkingStrength `json:"strength,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package model | ||
|
||
// NexGuardWatermarkingStrength : NexGuardWatermarkingStrength model | ||
type NexGuardWatermarkingStrength string | ||
|
||
// List of possible NexGuardWatermarkingStrength values | ||
const ( | ||
NexGuardWatermarkingStrength_LIGHTEST NexGuardWatermarkingStrength = "LIGHTEST" | ||
NexGuardWatermarkingStrength_LIGHTER NexGuardWatermarkingStrength = "LIGHTER" | ||
NexGuardWatermarkingStrength_DEFAULT NexGuardWatermarkingStrength = "DEFAULT" | ||
NexGuardWatermarkingStrength_STRONGER NexGuardWatermarkingStrength = "STRONGER" | ||
NexGuardWatermarkingStrength_STRONGEST NexGuardWatermarkingStrength = "STRONGEST" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package model | ||
|
||
// NexGuardWatermarkingType : NexGuardWatermarkingType model | ||
type NexGuardWatermarkingType string | ||
|
||
// List of possible NexGuardWatermarkingType values | ||
const ( | ||
NexGuardWatermarkingType_OTT NexGuardWatermarkingType = "OTT" | ||
NexGuardWatermarkingType_DUPLICATED NexGuardWatermarkingType = "DUPLICATED" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package model | ||
|
||
// WebVttCueIdentifierPolicy : WebVttCueIdentifierPolicy model | ||
type WebVttCueIdentifierPolicy string | ||
|
||
// List of possible WebVttCueIdentifierPolicy values | ||
const ( | ||
WebVttCueIdentifierPolicy_INCLUDE_IDENTIFIERS WebVttCueIdentifierPolicy = "INCLUDE_IDENTIFIERS" | ||
WebVttCueIdentifierPolicy_OMIT_IDENTIFIERS WebVttCueIdentifierPolicy = "OMIT_IDENTIFIERS" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package pagination | ||
|
||
import ( | ||
"encoding/json" | ||
"github.com/bitmovin/bitmovin-api-sdk-go/bitutils" | ||
"github.com/bitmovin/bitmovin-api-sdk-go/model" | ||
) | ||
|
||
// NexGuardFileMarkersListPagination model | ||
type NexGuardFileMarkersListPagination struct { | ||
TotalCount int64 `json:"totalCount,omitempty"` | ||
Offset int32 `json:"offset,omitempty"` | ||
Limit int32 `json:"limit,omitempty"` | ||
Previous string `json:"previous,omitempty"` | ||
Next string `json:"next,omitempty"` | ||
Items []model.NexGuardFileMarker `json:"items,omitempty"` | ||
} | ||
|
||
// UnmarshalJSON unmarshals pagination model NexGuardFileMarkersListPagination from a JSON structure | ||
func (m *NexGuardFileMarkersListPagination) UnmarshalJSON(b []byte) error { | ||
var pageResp model.PaginationResponse | ||
if err := json.Unmarshal(b, &pageResp); err != nil { | ||
return err | ||
} | ||
|
||
var items []model.NexGuardFileMarker | ||
if err := json.Unmarshal(pageResp.Items, &items); err != nil { | ||
return err | ||
} | ||
var result NexGuardFileMarkersListPagination | ||
|
||
result.TotalCount = bitutils.Int64Value(pageResp.TotalCount) | ||
result.Offset = bitutils.Int32Value(pageResp.Offset) | ||
result.Limit = bitutils.Int32Value(pageResp.Limit) | ||
result.Previous = bitutils.StringValue(pageResp.Previous) | ||
result.Next = bitutils.StringValue(pageResp.Next) | ||
result.Items = items | ||
|
||
*m = result | ||
|
||
return nil | ||
} |