mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-09-14 06:39:07 -04:00
202 lines
6.0 KiB
Go
202 lines
6.0 KiB
Go
/*
|
|
Libre Graph API
|
|
|
|
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
|
|
|
|
API version: v1.0.8
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package libregraph
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the MotionPhoto type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &MotionPhoto{}
|
|
|
|
// MotionPhoto Motion Photo metadata. A Motion Photo is a still image with a short video clip appended to the end of the file. The presence of this facet on a driveItem indicates that the item is a Motion Photo; absence indicates it is not. Based on the Google Motion Photo format v1.0 specification: https://developer.android.com/media/platform/motion-photo-format
|
|
type MotionPhoto struct {
|
|
// The file format version of the Motion Photo. Currently always 1. Read-only.
|
|
Version *int32 `json:"version,omitempty"`
|
|
// Presentation timestamp in microseconds of the video frame that corresponds to the still image. A value of -1 indicates unspecified. If absent, readers should use a timestamp near the middle of the video track. Read-only.
|
|
PresentationTimestampUs *int64 `json:"presentationTimestampUs,omitempty"`
|
|
// Size in bytes of the embedded video portion of the file. The video is appended at the end of the file, so clients can fetch it with a Range request: `Range: bytes=<fileSize - videoSize>-`. Read-only.
|
|
VideoSize *int64 `json:"videoSize,omitempty"`
|
|
}
|
|
|
|
// NewMotionPhoto instantiates a new MotionPhoto 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 NewMotionPhoto() *MotionPhoto {
|
|
this := MotionPhoto{}
|
|
return &this
|
|
}
|
|
|
|
// NewMotionPhotoWithDefaults instantiates a new MotionPhoto 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 NewMotionPhotoWithDefaults() *MotionPhoto {
|
|
this := MotionPhoto{}
|
|
return &this
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *MotionPhoto) GetVersion() int32 {
|
|
if o == nil || IsNil(o.Version) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Version
|
|
}
|
|
|
|
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MotionPhoto) GetVersionOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.Version) {
|
|
return nil, false
|
|
}
|
|
return o.Version, true
|
|
}
|
|
|
|
// HasVersion returns a boolean if a field has been set.
|
|
func (o *MotionPhoto) HasVersion() bool {
|
|
if o != nil && !IsNil(o.Version) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVersion gets a reference to the given int32 and assigns it to the Version field.
|
|
func (o *MotionPhoto) SetVersion(v int32) {
|
|
o.Version = &v
|
|
}
|
|
|
|
// GetPresentationTimestampUs returns the PresentationTimestampUs field value if set, zero value otherwise.
|
|
func (o *MotionPhoto) GetPresentationTimestampUs() int64 {
|
|
if o == nil || IsNil(o.PresentationTimestampUs) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.PresentationTimestampUs
|
|
}
|
|
|
|
// GetPresentationTimestampUsOk returns a tuple with the PresentationTimestampUs field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MotionPhoto) GetPresentationTimestampUsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.PresentationTimestampUs) {
|
|
return nil, false
|
|
}
|
|
return o.PresentationTimestampUs, true
|
|
}
|
|
|
|
// HasPresentationTimestampUs returns a boolean if a field has been set.
|
|
func (o *MotionPhoto) HasPresentationTimestampUs() bool {
|
|
if o != nil && !IsNil(o.PresentationTimestampUs) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPresentationTimestampUs gets a reference to the given int64 and assigns it to the PresentationTimestampUs field.
|
|
func (o *MotionPhoto) SetPresentationTimestampUs(v int64) {
|
|
o.PresentationTimestampUs = &v
|
|
}
|
|
|
|
// GetVideoSize returns the VideoSize field value if set, zero value otherwise.
|
|
func (o *MotionPhoto) GetVideoSize() int64 {
|
|
if o == nil || IsNil(o.VideoSize) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.VideoSize
|
|
}
|
|
|
|
// GetVideoSizeOk returns a tuple with the VideoSize field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MotionPhoto) GetVideoSizeOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.VideoSize) {
|
|
return nil, false
|
|
}
|
|
return o.VideoSize, true
|
|
}
|
|
|
|
// HasVideoSize returns a boolean if a field has been set.
|
|
func (o *MotionPhoto) HasVideoSize() bool {
|
|
if o != nil && !IsNil(o.VideoSize) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVideoSize gets a reference to the given int64 and assigns it to the VideoSize field.
|
|
func (o *MotionPhoto) SetVideoSize(v int64) {
|
|
o.VideoSize = &v
|
|
}
|
|
|
|
func (o MotionPhoto) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o MotionPhoto) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
if !IsNil(o.PresentationTimestampUs) {
|
|
toSerialize["presentationTimestampUs"] = o.PresentationTimestampUs
|
|
}
|
|
if !IsNil(o.VideoSize) {
|
|
toSerialize["videoSize"] = o.VideoSize
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableMotionPhoto struct {
|
|
value *MotionPhoto
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableMotionPhoto) Get() *MotionPhoto {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableMotionPhoto) Set(val *MotionPhoto) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableMotionPhoto) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableMotionPhoto) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableMotionPhoto(val *MotionPhoto) *NullableMotionPhoto {
|
|
return &NullableMotionPhoto{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableMotionPhoto) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableMotionPhoto) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|