diff --git a/isp/.openapi-generator/FILES b/isp/.openapi-generator/FILES index c73377f..e1afeb9 100644 --- a/isp/.openapi-generator/FILES +++ b/isp/.openapi-generator/FILES @@ -7,6 +7,7 @@ api_deprecated_live2_vod.go api_live2_vod_for_organization.go api_organizations.go api_source_previews.go +api_transcoder_telemetry.go configuration.go model_archive_fer_request.go model_archive_fer_request_notification.go @@ -161,6 +162,10 @@ model_list_clips_response.go model_list_products_response.go model_list_programs_response.go model_list_programs_response_programs_inner.go +model_list_raw_scte_history_by_channel_response.go +model_list_raw_scte_history_by_channel_response_raw_scte35_inner.go +model_list_raw_scte_history_by_channel_response_raw_scte35_inner_header.go +model_list_raw_scte_history_response.go model_list_tasks_response.go model_list_tasks_response_tasks_inner.go model_list_vods_response.go @@ -230,4 +235,5 @@ test/api_deprecated_live2_vod_test.go test/api_live2_vod_for_organization_test.go test/api_organizations_test.go test/api_source_previews_test.go +test/api_transcoder_telemetry_test.go utils.go diff --git a/isp/api_transcoder_telemetry.go b/isp/api_transcoder_telemetry.go new file mode 100644 index 0000000..2794aa2 --- /dev/null +++ b/isp/api_transcoder_telemetry.go @@ -0,0 +1,432 @@ +/* + * WBD Aventus Channels API + * + * API version: 0.0.0 + * Contact: live-control-plane-devs@wbd.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package isp + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + "time" +) + + +type TranscoderTelemetryApi interface { + + /* + ListRawScteHistory Get SCTE-35 History + + Returns SCTE-35 history for all channels. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListRawScteHistoryRequest + */ + ListRawScteHistory(ctx context.Context) ApiListRawScteHistoryRequest + + // ListRawScteHistoryExecute executes the request + // @return ListRawSCTEHistoryResponse + ListRawScteHistoryExecute(r ApiListRawScteHistoryRequest) (*ListRawSCTEHistoryResponse, *http.Response, error) + + /* + ListRawScteHistoryByChannel Get Channel SCTE-35 History + + Returns SCTE history for a channel. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param org Organization name + @param channelId Unique channel identifier + @return ApiListRawScteHistoryByChannelRequest + */ + ListRawScteHistoryByChannel(ctx context.Context, org string, channelId string) ApiListRawScteHistoryByChannelRequest + + // ListRawScteHistoryByChannelExecute executes the request + // @return ListRawSCTEHistoryByChannelResponse + ListRawScteHistoryByChannelExecute(r ApiListRawScteHistoryByChannelRequest) (*ListRawSCTEHistoryByChannelResponse, *http.Response, error) +} + +// TranscoderTelemetryApiService TranscoderTelemetryApi service +type TranscoderTelemetryApiService service + +type ApiListRawScteHistoryRequest struct { + ctx context.Context + ApiService TranscoderTelemetryApi + from *time.Time +} + +// ISO 8601 UTC timestamp for start range of date filtering +func (r ApiListRawScteHistoryRequest) From(from time.Time) ApiListRawScteHistoryRequest { + r.from = &from + return r +} + +func (r ApiListRawScteHistoryRequest) Execute() (*ListRawSCTEHistoryResponse, *http.Response, error) { + return r.ApiService.ListRawScteHistoryExecute(r) +} + +/* +ListRawScteHistory Get SCTE-35 History + +Returns SCTE-35 history for all channels. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListRawScteHistoryRequest +*/ +func (a *TranscoderTelemetryApiService) ListRawScteHistory(ctx context.Context) ApiListRawScteHistoryRequest { + return ApiListRawScteHistoryRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListRawSCTEHistoryResponse +func (a *TranscoderTelemetryApiService) ListRawScteHistoryExecute(r ApiListRawScteHistoryRequest) (*ListRawSCTEHistoryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListRawSCTEHistoryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TranscoderTelemetryApiService.ListRawScteHistory") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v2/scte-history" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.from != nil { + localVarQueryParams.Add("from", parameterToString(*r.from, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + if disablePaging := r.ctx.Value(ContextDisablePaging); disablePaging == nil { + if uri := GetLink(localVarHTTPResponse, RelNext); uri != nil { + // This response is paginated. Read all the pages and append the items. + items, resp, err := getAllPages(a.client, localVarReturnValue, localVarHTTPResponse) + if err.Error() != "" { + return localVarReturnValue, localVarHTTPResponse, err + } + localVarReturnValue = items.(*ListRawSCTEHistoryResponse) + localVarHTTPResponse = resp + } + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRawScteHistoryByChannelRequest struct { + ctx context.Context + ApiService TranscoderTelemetryApi + org string + channelId string + from *time.Time +} + +// ISO 8601 UTC timestamp for start range of date filtering +func (r ApiListRawScteHistoryByChannelRequest) From(from time.Time) ApiListRawScteHistoryByChannelRequest { + r.from = &from + return r +} + +func (r ApiListRawScteHistoryByChannelRequest) Execute() (*ListRawSCTEHistoryByChannelResponse, *http.Response, error) { + return r.ApiService.ListRawScteHistoryByChannelExecute(r) +} + +/* +ListRawScteHistoryByChannel Get Channel SCTE-35 History + +Returns SCTE history for a channel. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param org Organization name + @param channelId Unique channel identifier + @return ApiListRawScteHistoryByChannelRequest +*/ +func (a *TranscoderTelemetryApiService) ListRawScteHistoryByChannel(ctx context.Context, org string, channelId string) ApiListRawScteHistoryByChannelRequest { + return ApiListRawScteHistoryByChannelRequest{ + ApiService: a, + ctx: ctx, + org: org, + channelId: channelId, + } +} + +// Execute executes the request +// @return ListRawSCTEHistoryByChannelResponse +func (a *TranscoderTelemetryApiService) ListRawScteHistoryByChannelExecute(r ApiListRawScteHistoryByChannelRequest) (*ListRawSCTEHistoryByChannelResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListRawSCTEHistoryByChannelResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TranscoderTelemetryApiService.ListRawScteHistoryByChannel") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v2/{org}/channels/{channel-id}/scte-history" + localVarPath = strings.Replace(localVarPath, "{"+"org"+"}", url.PathEscape(parameterToString(r.org, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"channel-id"+"}", url.PathEscape(parameterToString(r.channelId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if strlen(r.channelId) > 60 { + return localVarReturnValue, nil, reportError("channelId must have less than 60 elements") + } + + if r.from != nil { + localVarQueryParams.Add("from", parameterToString(*r.from, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + if disablePaging := r.ctx.Value(ContextDisablePaging); disablePaging == nil { + if uri := GetLink(localVarHTTPResponse, RelNext); uri != nil { + // This response is paginated. Read all the pages and append the items. + items, resp, err := getAllPages(a.client, localVarReturnValue, localVarHTTPResponse) + if err.Error() != "" { + return localVarReturnValue, localVarHTTPResponse, err + } + localVarReturnValue = items.(*ListRawSCTEHistoryByChannelResponse) + localVarHTTPResponse = resp + } + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/isp/model_list_raw_scte_history_by_channel_response.go b/isp/model_list_raw_scte_history_by_channel_response.go new file mode 100644 index 0000000..3846663 --- /dev/null +++ b/isp/model_list_raw_scte_history_by_channel_response.go @@ -0,0 +1,162 @@ +/* + * WBD Aventus Channels API + * + * API version: 0.0.0 + * Contact: live-control-plane-devs@wbd.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package isp + +import ( + "encoding/json" +) + +// checks if the ListRawSCTEHistoryByChannelResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListRawSCTEHistoryByChannelResponse{} + +// ListRawSCTEHistoryByChannelResponse struct for ListRawSCTEHistoryByChannelResponse +type ListRawSCTEHistoryByChannelResponse struct { + // An optional URL to a JSON Schema document describing this resource + Schema *string `json:"$schema,omitempty" format:"uri" doc:"An optional URL to a JSON Schema document describing this resource"` + RawScte35 []ListRawSCTEHistoryByChannelResponseRawScte35Inner `json:"raw_scte35,omitempty"` +} + +// NewListRawSCTEHistoryByChannelResponse instantiates a new ListRawSCTEHistoryByChannelResponse 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 NewListRawSCTEHistoryByChannelResponse() *ListRawSCTEHistoryByChannelResponse { + this := ListRawSCTEHistoryByChannelResponse{} + return &this +} + +// NewListRawSCTEHistoryByChannelResponseWithDefaults instantiates a new ListRawSCTEHistoryByChannelResponse 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 NewListRawSCTEHistoryByChannelResponseWithDefaults() *ListRawSCTEHistoryByChannelResponse { + this := ListRawSCTEHistoryByChannelResponse{} + return &this +} + +// GetSchema returns the Schema field value if set, zero value otherwise. +func (o *ListRawSCTEHistoryByChannelResponse) GetSchema() string { + if o == nil || IsNil(o.Schema) { + var ret string + return ret + } + return *o.Schema +} + +// GetSchemaOk returns a tuple with the Schema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRawSCTEHistoryByChannelResponse) GetSchemaOk() (*string, bool) { + if o == nil || IsNil(o.Schema) { + return nil, false + } + return o.Schema, true +} + +// HasSchema returns a boolean if a field has been set. +func (o *ListRawSCTEHistoryByChannelResponse) HasSchema() bool { + if o != nil && !IsNil(o.Schema) { + return true + } + + return false +} + +// SetSchema gets a reference to the given string and assigns it to the Schema field. +func (o *ListRawSCTEHistoryByChannelResponse) SetSchema(v string) { + o.Schema = &v +} + +// GetRawScte35 returns the RawScte35 field value if set, zero value otherwise. +func (o *ListRawSCTEHistoryByChannelResponse) GetRawScte35() []ListRawSCTEHistoryByChannelResponseRawScte35Inner { + if o == nil || IsNil(o.RawScte35) { + var ret []ListRawSCTEHistoryByChannelResponseRawScte35Inner + return ret + } + return o.RawScte35 +} + +// GetRawScte35Ok returns a tuple with the RawScte35 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRawSCTEHistoryByChannelResponse) GetRawScte35Ok() ([]ListRawSCTEHistoryByChannelResponseRawScte35Inner, bool) { + if o == nil || IsNil(o.RawScte35) { + return nil, false + } + return o.RawScte35, true +} + +// HasRawScte35 returns a boolean if a field has been set. +func (o *ListRawSCTEHistoryByChannelResponse) HasRawScte35() bool { + if o != nil && !IsNil(o.RawScte35) { + return true + } + + return false +} + +// SetRawScte35 gets a reference to the given []ListRawSCTEHistoryByChannelResponseRawScte35Inner and assigns it to the RawScte35 field. +func (o *ListRawSCTEHistoryByChannelResponse) SetRawScte35(v []ListRawSCTEHistoryByChannelResponseRawScte35Inner) { + o.RawScte35 = v +} + +func (o ListRawSCTEHistoryByChannelResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListRawSCTEHistoryByChannelResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Schema) { + toSerialize["$schema"] = o.Schema + } + if !IsNil(o.RawScte35) { + toSerialize["raw_scte35"] = o.RawScte35 + } + return toSerialize, nil +} + +type NullableListRawSCTEHistoryByChannelResponse struct { + value *ListRawSCTEHistoryByChannelResponse + isSet bool +} + +func (v NullableListRawSCTEHistoryByChannelResponse) Get() *ListRawSCTEHistoryByChannelResponse { + return v.value +} + +func (v *NullableListRawSCTEHistoryByChannelResponse) Set(val *ListRawSCTEHistoryByChannelResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListRawSCTEHistoryByChannelResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListRawSCTEHistoryByChannelResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRawSCTEHistoryByChannelResponse(val *ListRawSCTEHistoryByChannelResponse) *NullableListRawSCTEHistoryByChannelResponse { + return &NullableListRawSCTEHistoryByChannelResponse{value: val, isSet: true} +} + +func (v NullableListRawSCTEHistoryByChannelResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRawSCTEHistoryByChannelResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/isp/model_list_raw_scte_history_by_channel_response_raw_scte35_inner.go b/isp/model_list_raw_scte_history_by_channel_response_raw_scte35_inner.go new file mode 100644 index 0000000..7f770b6 --- /dev/null +++ b/isp/model_list_raw_scte_history_by_channel_response_raw_scte35_inner.go @@ -0,0 +1,309 @@ +/* + * WBD Aventus Channels API + * + * API version: 0.0.0 + * Contact: live-control-plane-devs@wbd.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package isp + +import ( + "encoding/json" + "time" +) + +// checks if the ListRawSCTEHistoryByChannelResponseRawScte35Inner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListRawSCTEHistoryByChannelResponseRawScte35Inner{} + +// ListRawSCTEHistoryByChannelResponseRawScte35Inner struct for ListRawSCTEHistoryByChannelResponseRawScte35Inner +type ListRawSCTEHistoryByChannelResponseRawScte35Inner struct { + Header *ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader `json:"header,omitempty"` + // id is a unique scte id assigned by the transcoder per run_id + Id *int32 `json:"id,omitempty" format:"int32" minimum:"0" doc:"id is a unique scte id assigned by the transcoder per run_id"` + // in_band denotes whether the SCTE-35 message was received in the source consumed by the transcoder (In-Band) or signaled via Transcoder API (Out-of-Band). + InBand *bool `json:"in_band,omitempty" doc:"in_band denotes whether the SCTE-35 message was received in the source consumed by the transcoder (In-Band) or signaled via Transcoder API (Out-of-Band)."` + Scte35 *string `json:"scte35,omitempty"` + Source *string `json:"source,omitempty" enum:"SOURCE_UNDEFINED,PRIMARY,SECONDARY"` + // time is the time at which the SCTE was received by the transcoder. + Time *time.Time `json:"time,omitempty" format:"date-time" doc:"time is the time at which the SCTE was received by the transcoder."` +} + +// NewListRawSCTEHistoryByChannelResponseRawScte35Inner instantiates a new ListRawSCTEHistoryByChannelResponseRawScte35Inner 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 NewListRawSCTEHistoryByChannelResponseRawScte35Inner() *ListRawSCTEHistoryByChannelResponseRawScte35Inner { + this := ListRawSCTEHistoryByChannelResponseRawScte35Inner{} + return &this +} + +// NewListRawSCTEHistoryByChannelResponseRawScte35InnerWithDefaults instantiates a new ListRawSCTEHistoryByChannelResponseRawScte35Inner 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 NewListRawSCTEHistoryByChannelResponseRawScte35InnerWithDefaults() *ListRawSCTEHistoryByChannelResponseRawScte35Inner { + this := ListRawSCTEHistoryByChannelResponseRawScte35Inner{} + return &this +} + +// GetHeader returns the Header field value if set, zero value otherwise. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetHeader() ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader { + if o == nil || IsNil(o.Header) { + var ret ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader + return ret + } + return *o.Header +} + +// GetHeaderOk returns a tuple with the Header field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetHeaderOk() (*ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader, bool) { + if o == nil || IsNil(o.Header) { + return nil, false + } + return o.Header, true +} + +// HasHeader returns a boolean if a field has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) HasHeader() bool { + if o != nil && !IsNil(o.Header) { + return true + } + + return false +} + +// SetHeader gets a reference to the given ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader and assigns it to the Header field. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) SetHeader(v ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) { + o.Header = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetId() int32 { + if o == nil || IsNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetIdOk() (*int32, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) SetId(v int32) { + o.Id = &v +} + +// GetInBand returns the InBand field value if set, zero value otherwise. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetInBand() bool { + if o == nil || IsNil(o.InBand) { + var ret bool + return ret + } + return *o.InBand +} + +// GetInBandOk returns a tuple with the InBand field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetInBandOk() (*bool, bool) { + if o == nil || IsNil(o.InBand) { + return nil, false + } + return o.InBand, true +} + +// HasInBand returns a boolean if a field has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) HasInBand() bool { + if o != nil && !IsNil(o.InBand) { + return true + } + + return false +} + +// SetInBand gets a reference to the given bool and assigns it to the InBand field. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) SetInBand(v bool) { + o.InBand = &v +} + +// GetScte35 returns the Scte35 field value if set, zero value otherwise. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetScte35() string { + if o == nil || IsNil(o.Scte35) { + var ret string + return ret + } + return *o.Scte35 +} + +// GetScte35Ok returns a tuple with the Scte35 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetScte35Ok() (*string, bool) { + if o == nil || IsNil(o.Scte35) { + return nil, false + } + return o.Scte35, true +} + +// HasScte35 returns a boolean if a field has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) HasScte35() bool { + if o != nil && !IsNil(o.Scte35) { + return true + } + + return false +} + +// SetScte35 gets a reference to the given string and assigns it to the Scte35 field. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) SetScte35(v string) { + o.Scte35 = &v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) SetSource(v string) { + o.Source = &v +} + +// GetTime returns the Time field value if set, zero value otherwise. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetTime() time.Time { + if o == nil || IsNil(o.Time) { + var ret time.Time + return ret + } + return *o.Time +} + +// GetTimeOk returns a tuple with the Time field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) GetTimeOk() (*time.Time, bool) { + if o == nil || IsNil(o.Time) { + return nil, false + } + return o.Time, true +} + +// HasTime returns a boolean if a field has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) HasTime() bool { + if o != nil && !IsNil(o.Time) { + return true + } + + return false +} + +// SetTime gets a reference to the given time.Time and assigns it to the Time field. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35Inner) SetTime(v time.Time) { + o.Time = &v +} + +func (o ListRawSCTEHistoryByChannelResponseRawScte35Inner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListRawSCTEHistoryByChannelResponseRawScte35Inner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Header) { + toSerialize["header"] = o.Header + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.InBand) { + toSerialize["in_band"] = o.InBand + } + if !IsNil(o.Scte35) { + toSerialize["scte35"] = o.Scte35 + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.Time) { + toSerialize["time"] = o.Time + } + return toSerialize, nil +} + +type NullableListRawSCTEHistoryByChannelResponseRawScte35Inner struct { + value *ListRawSCTEHistoryByChannelResponseRawScte35Inner + isSet bool +} + +func (v NullableListRawSCTEHistoryByChannelResponseRawScte35Inner) Get() *ListRawSCTEHistoryByChannelResponseRawScte35Inner { + return v.value +} + +func (v *NullableListRawSCTEHistoryByChannelResponseRawScte35Inner) Set(val *ListRawSCTEHistoryByChannelResponseRawScte35Inner) { + v.value = val + v.isSet = true +} + +func (v NullableListRawSCTEHistoryByChannelResponseRawScte35Inner) IsSet() bool { + return v.isSet +} + +func (v *NullableListRawSCTEHistoryByChannelResponseRawScte35Inner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRawSCTEHistoryByChannelResponseRawScte35Inner(val *ListRawSCTEHistoryByChannelResponseRawScte35Inner) *NullableListRawSCTEHistoryByChannelResponseRawScte35Inner { + return &NullableListRawSCTEHistoryByChannelResponseRawScte35Inner{value: val, isSet: true} +} + +func (v NullableListRawSCTEHistoryByChannelResponseRawScte35Inner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRawSCTEHistoryByChannelResponseRawScte35Inner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/isp/model_list_raw_scte_history_by_channel_response_raw_scte35_inner_header.go b/isp/model_list_raw_scte_history_by_channel_response_raw_scte35_inner_header.go new file mode 100644 index 0000000..09aeead --- /dev/null +++ b/isp/model_list_raw_scte_history_by_channel_response_raw_scte35_inner_header.go @@ -0,0 +1,125 @@ +/* + * WBD Aventus Channels API + * + * API version: 0.0.0 + * Contact: live-control-plane-devs@wbd.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package isp + +import ( + "encoding/json" +) + +// checks if the ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader{} + +// ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader struct for ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader +type ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader struct { + RunId *int64 `json:"run_id,omitempty" format:"int64" minimum:"0"` +} + +// NewListRawSCTEHistoryByChannelResponseRawScte35InnerHeader instantiates a new ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader 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 NewListRawSCTEHistoryByChannelResponseRawScte35InnerHeader() *ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader { + this := ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader{} + return &this +} + +// NewListRawSCTEHistoryByChannelResponseRawScte35InnerHeaderWithDefaults instantiates a new ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader 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 NewListRawSCTEHistoryByChannelResponseRawScte35InnerHeaderWithDefaults() *ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader { + this := ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader{} + return &this +} + +// GetRunId returns the RunId field value if set, zero value otherwise. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) GetRunId() int64 { + if o == nil || IsNil(o.RunId) { + var ret int64 + return ret + } + return *o.RunId +} + +// GetRunIdOk returns a tuple with the RunId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) GetRunIdOk() (*int64, bool) { + if o == nil || IsNil(o.RunId) { + return nil, false + } + return o.RunId, true +} + +// HasRunId returns a boolean if a field has been set. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) HasRunId() bool { + if o != nil && !IsNil(o.RunId) { + return true + } + + return false +} + +// SetRunId gets a reference to the given int64 and assigns it to the RunId field. +func (o *ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) SetRunId(v int64) { + o.RunId = &v +} + +func (o ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RunId) { + toSerialize["run_id"] = o.RunId + } + return toSerialize, nil +} + +type NullableListRawSCTEHistoryByChannelResponseRawScte35InnerHeader struct { + value *ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader + isSet bool +} + +func (v NullableListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) Get() *ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader { + return v.value +} + +func (v *NullableListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) Set(val *ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) { + v.value = val + v.isSet = true +} + +func (v NullableListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) IsSet() bool { + return v.isSet +} + +func (v *NullableListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRawSCTEHistoryByChannelResponseRawScte35InnerHeader(val *ListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) *NullableListRawSCTEHistoryByChannelResponseRawScte35InnerHeader { + return &NullableListRawSCTEHistoryByChannelResponseRawScte35InnerHeader{value: val, isSet: true} +} + +func (v NullableListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRawSCTEHistoryByChannelResponseRawScte35InnerHeader) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/isp/model_list_raw_scte_history_response.go b/isp/model_list_raw_scte_history_response.go new file mode 100644 index 0000000..d359b96 --- /dev/null +++ b/isp/model_list_raw_scte_history_response.go @@ -0,0 +1,162 @@ +/* + * WBD Aventus Channels API + * + * API version: 0.0.0 + * Contact: live-control-plane-devs@wbd.com + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package isp + +import ( + "encoding/json" +) + +// checks if the ListRawSCTEHistoryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListRawSCTEHistoryResponse{} + +// ListRawSCTEHistoryResponse struct for ListRawSCTEHistoryResponse +type ListRawSCTEHistoryResponse struct { + // An optional URL to a JSON Schema document describing this resource + Schema *string `json:"$schema,omitempty" format:"uri" doc:"An optional URL to a JSON Schema document describing this resource"` + RawScte35 []ListRawSCTEHistoryByChannelResponseRawScte35Inner `json:"raw_scte35,omitempty"` +} + +// NewListRawSCTEHistoryResponse instantiates a new ListRawSCTEHistoryResponse 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 NewListRawSCTEHistoryResponse() *ListRawSCTEHistoryResponse { + this := ListRawSCTEHistoryResponse{} + return &this +} + +// NewListRawSCTEHistoryResponseWithDefaults instantiates a new ListRawSCTEHistoryResponse 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 NewListRawSCTEHistoryResponseWithDefaults() *ListRawSCTEHistoryResponse { + this := ListRawSCTEHistoryResponse{} + return &this +} + +// GetSchema returns the Schema field value if set, zero value otherwise. +func (o *ListRawSCTEHistoryResponse) GetSchema() string { + if o == nil || IsNil(o.Schema) { + var ret string + return ret + } + return *o.Schema +} + +// GetSchemaOk returns a tuple with the Schema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRawSCTEHistoryResponse) GetSchemaOk() (*string, bool) { + if o == nil || IsNil(o.Schema) { + return nil, false + } + return o.Schema, true +} + +// HasSchema returns a boolean if a field has been set. +func (o *ListRawSCTEHistoryResponse) HasSchema() bool { + if o != nil && !IsNil(o.Schema) { + return true + } + + return false +} + +// SetSchema gets a reference to the given string and assigns it to the Schema field. +func (o *ListRawSCTEHistoryResponse) SetSchema(v string) { + o.Schema = &v +} + +// GetRawScte35 returns the RawScte35 field value if set, zero value otherwise. +func (o *ListRawSCTEHistoryResponse) GetRawScte35() []ListRawSCTEHistoryByChannelResponseRawScte35Inner { + if o == nil || IsNil(o.RawScte35) { + var ret []ListRawSCTEHistoryByChannelResponseRawScte35Inner + return ret + } + return o.RawScte35 +} + +// GetRawScte35Ok returns a tuple with the RawScte35 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRawSCTEHistoryResponse) GetRawScte35Ok() ([]ListRawSCTEHistoryByChannelResponseRawScte35Inner, bool) { + if o == nil || IsNil(o.RawScte35) { + return nil, false + } + return o.RawScte35, true +} + +// HasRawScte35 returns a boolean if a field has been set. +func (o *ListRawSCTEHistoryResponse) HasRawScte35() bool { + if o != nil && !IsNil(o.RawScte35) { + return true + } + + return false +} + +// SetRawScte35 gets a reference to the given []ListRawSCTEHistoryByChannelResponseRawScte35Inner and assigns it to the RawScte35 field. +func (o *ListRawSCTEHistoryResponse) SetRawScte35(v []ListRawSCTEHistoryByChannelResponseRawScte35Inner) { + o.RawScte35 = v +} + +func (o ListRawSCTEHistoryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListRawSCTEHistoryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Schema) { + toSerialize["$schema"] = o.Schema + } + if !IsNil(o.RawScte35) { + toSerialize["raw_scte35"] = o.RawScte35 + } + return toSerialize, nil +} + +type NullableListRawSCTEHistoryResponse struct { + value *ListRawSCTEHistoryResponse + isSet bool +} + +func (v NullableListRawSCTEHistoryResponse) Get() *ListRawSCTEHistoryResponse { + return v.value +} + +func (v *NullableListRawSCTEHistoryResponse) Set(val *ListRawSCTEHistoryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListRawSCTEHistoryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListRawSCTEHistoryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRawSCTEHistoryResponse(val *ListRawSCTEHistoryResponse) *NullableListRawSCTEHistoryResponse { + return &NullableListRawSCTEHistoryResponse{value: val, isSet: true} +} + +func (v NullableListRawSCTEHistoryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRawSCTEHistoryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/isp/test/api_transcoder_telemetry_test.go b/isp/test/api_transcoder_telemetry_test.go new file mode 100644 index 0000000..cab1dbd --- /dev/null +++ b/isp/test/api_transcoder_telemetry_test.go @@ -0,0 +1,52 @@ +/* +WBD Aventus Channels API + +Testing TranscoderTelemetryApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package isp + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/istreamlabs/go-sdk/isp" +) + +func Test_isp_TranscoderTelemetryApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TranscoderTelemetryApiService ListRawScteHistory", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.TranscoderTelemetryApi.ListRawScteHistory(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TranscoderTelemetryApiService ListRawScteHistoryByChannel", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var org string + var channelId string + + resp, httpRes, err := apiClient.TranscoderTelemetryApi.ListRawScteHistoryByChannel(context.Background(), org, channelId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/spec/isp.yaml b/spec/isp.yaml index ff9f2d9..b0e3f93 100644 --- a/spec/isp.yaml +++ b/spec/isp.yaml @@ -4615,6 +4615,90 @@ components: required: - programs - errors + ListRawSCTEHistoryByChannelResponse: + type: object + properties: + $schema: + type: string + description: An optional URL to a JSON Schema document describing this resource + format: uri + raw_scte35: + type: array + items: + type: object + properties: + header: + type: object + properties: + run_id: + type: integer + format: int64 + minimum: 0 + additionalProperties: false + id: + type: integer + description: id is a unique scte id assigned by the transcoder per run_id + format: int32 + minimum: 0 + in_band: + type: boolean + description: in_band denotes whether the SCTE-35 message was received in the source consumed by the transcoder (In-Band) or signaled via Transcoder API (Out-of-Band). + scte35: + type: string + source: + type: string + enum: + - SOURCE_UNDEFINED + - PRIMARY + - SECONDARY + time: + type: string + description: time is the time at which the SCTE was received by the transcoder. + format: date-time + additionalProperties: false + additionalProperties: false + ListRawSCTEHistoryResponse: + type: object + properties: + $schema: + type: string + description: An optional URL to a JSON Schema document describing this resource + format: uri + raw_scte35: + type: array + items: + type: object + properties: + header: + type: object + properties: + run_id: + type: integer + format: int64 + minimum: 0 + additionalProperties: false + id: + type: integer + description: id is a unique scte id assigned by the transcoder per run_id + format: int32 + minimum: 0 + in_band: + type: boolean + description: in_band denotes whether the SCTE-35 message was received in the source consumed by the transcoder (In-Band) or signaled via Transcoder API (Out-of-Band). + scte35: + type: string + source: + type: string + enum: + - SOURCE_UNDEFINED + - PRIMARY + - SECONDARY + time: + type: string + description: time is the time at which the SCTE was received by the transcoder. + format: date-time + additionalProperties: false + additionalProperties: false ListTasksResponse: type: object properties: @@ -12167,6 +12251,129 @@ paths: summary: List organizations tags: - Organizations + /v2/scte-history: + get: + description: | + Returns SCTE-35 history for all channels. + operationId: list-raw-scte-history + parameters: + - name: from + description: ISO 8601 UTC timestamp for start range of date filtering + in: query + schema: + type: string + description: ISO 8601 UTC timestamp for start range of date filtering + format: date-time + explode: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListRawSCTEHistoryResponse' + description: OK + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Bad Request + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Not Found + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "422": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Unprocessable Entity + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Internal Server Error + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "501": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Not Implemented + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Service Unavailable + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + summary: Get SCTE-35 History + tags: + - Transcoder Telemetry /v2/tasks: get: description: List all L2V tasks. @@ -16025,6 +16232,145 @@ paths: summary: Get Preview Streams tags: - Channel Operations for Organization + /v2/{org}/channels/{channel-id}/scte-history: + get: + description: | + Returns SCTE history for a channel. + operationId: list-raw-scte-history-by-channel + parameters: + - name: org + description: Organization name + in: path + required: true + schema: + type: string + description: Organization name + - name: channel-id + description: Unique channel identifier + in: path + required: true + schema: + type: string + description: Unique channel identifier + maxLength: 60 + pattern: ^([a-z0-9]+(-*[a-z0-9]+)*)$ + - name: from + description: ISO 8601 UTC timestamp for start range of date filtering + in: query + schema: + type: string + description: ISO 8601 UTC timestamp for start range of date filtering + format: date-time + explode: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListRawSCTEHistoryByChannelResponse' + description: OK + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "400": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Bad Request + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "404": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Not Found + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "422": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Unprocessable Entity + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "500": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Internal Server Error + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "501": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Not Implemented + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + "503": + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorModel' + description: Service Unavailable + headers: + Content-Type: + description: Content-Type + schema: + type: string + Link: + description: Link + schema: + type: string + summary: Get Channel SCTE-35 History + tags: + - Transcoder Telemetry /v2/{org}/channels/{channel-id}/scte35: post: description: Inserts a SCTE-35 formatted binary payload into the channel.