All checks were successful
continuous-integration/drone/push Build is passing
82 lines
2.0 KiB
Go
82 lines
2.0 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package models
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/go-openapi/strfmt"
|
|
"github.com/go-openapi/swag"
|
|
)
|
|
|
|
// MediaDimensions MediaDimensions models detailed properties of a piece of media.
|
|
//
|
|
// swagger:model MediaDimensions
|
|
type MediaDimensions struct {
|
|
|
|
// Aspect ratio of the media.
|
|
// Equal to width / height.
|
|
// Example: 1.777777778
|
|
Aspect float32 `json:"aspect,omitempty"`
|
|
|
|
// Bitrate of the media in bits per second.
|
|
// Example: 1000000
|
|
Bitrate int64 `json:"bitrate,omitempty"`
|
|
|
|
// Duration of the media in seconds.
|
|
// Only set for video and audio.
|
|
// Example: 5.43
|
|
Duration float32 `json:"duration,omitempty"`
|
|
|
|
// Framerate of the media.
|
|
// Only set for video and gifs.
|
|
// Example: 30
|
|
FrameRate string `json:"frame_rate,omitempty"`
|
|
|
|
// Height of the media in pixels.
|
|
// Not set for audio.
|
|
// Example: 1080
|
|
Height int64 `json:"height,omitempty"`
|
|
|
|
// Size of the media, in the format `[width]x[height]`.
|
|
// Not set for audio.
|
|
// Example: 1920x1080
|
|
Size string `json:"size,omitempty"`
|
|
|
|
// Width of the media in pixels.
|
|
// Not set for audio.
|
|
// Example: 1920
|
|
Width int64 `json:"width,omitempty"`
|
|
}
|
|
|
|
// Validate validates this media dimensions
|
|
func (m *MediaDimensions) Validate(formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// ContextValidate validates this media dimensions based on context it is used
|
|
func (m *MediaDimensions) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (m *MediaDimensions) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *MediaDimensions) UnmarshalBinary(b []byte) error {
|
|
var res MediaDimensions
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|