mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-11-27 02:24:09 -05:00
313 lines
8.2 KiB
Go
313 lines
8.2 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 Thumbnail type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Thumbnail{}
|
|
|
|
// Thumbnail The thumbnail resource type represents a thumbnail for an image, video, document, or any item that has a bitmap representation.
|
|
type Thumbnail struct {
|
|
// The content stream for the thumbnail.
|
|
Content *string `json:"content,omitempty"`
|
|
// The height of the thumbnail, in pixels.
|
|
Height *int32 `json:"height,omitempty"`
|
|
// The unique identifier of the item that provided the thumbnail. This is only available when a folder thumbnail is requested.
|
|
SourceItemId *string `json:"sourceItemId,omitempty"`
|
|
// The URL used to fetch the thumbnail content.
|
|
Url *string `json:"url,omitempty"`
|
|
// The width of the thumbnail, in pixels.
|
|
Width *int32 `json:"width,omitempty"`
|
|
// The mime type the thumbnail is served in, e.g. `image/png`. It can differ from the mime type of the item the thumbnail belongs to, for example when the thumbnail is an image taken from inside the item, such as the cover art of an audio file.
|
|
LibreGraphMimeType *string `json:"@libre.graph.mimeType,omitempty"`
|
|
}
|
|
|
|
// NewThumbnail instantiates a new Thumbnail 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 NewThumbnail() *Thumbnail {
|
|
this := Thumbnail{}
|
|
return &this
|
|
}
|
|
|
|
// NewThumbnailWithDefaults instantiates a new Thumbnail 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 NewThumbnailWithDefaults() *Thumbnail {
|
|
this := Thumbnail{}
|
|
return &this
|
|
}
|
|
|
|
// GetContent returns the Content field value if set, zero value otherwise.
|
|
func (o *Thumbnail) GetContent() string {
|
|
if o == nil || IsNil(o.Content) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Content
|
|
}
|
|
|
|
// GetContentOk returns a tuple with the Content field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Thumbnail) GetContentOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Content) {
|
|
return nil, false
|
|
}
|
|
return o.Content, true
|
|
}
|
|
|
|
// HasContent returns a boolean if a field has been set.
|
|
func (o *Thumbnail) HasContent() bool {
|
|
if o != nil && !IsNil(o.Content) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetContent gets a reference to the given string and assigns it to the Content field.
|
|
func (o *Thumbnail) SetContent(v string) {
|
|
o.Content = &v
|
|
}
|
|
|
|
// GetHeight returns the Height field value if set, zero value otherwise.
|
|
func (o *Thumbnail) GetHeight() int32 {
|
|
if o == nil || IsNil(o.Height) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Height
|
|
}
|
|
|
|
// GetHeightOk returns a tuple with the Height field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Thumbnail) GetHeightOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.Height) {
|
|
return nil, false
|
|
}
|
|
return o.Height, true
|
|
}
|
|
|
|
// HasHeight returns a boolean if a field has been set.
|
|
func (o *Thumbnail) HasHeight() bool {
|
|
if o != nil && !IsNil(o.Height) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHeight gets a reference to the given int32 and assigns it to the Height field.
|
|
func (o *Thumbnail) SetHeight(v int32) {
|
|
o.Height = &v
|
|
}
|
|
|
|
// GetSourceItemId returns the SourceItemId field value if set, zero value otherwise.
|
|
func (o *Thumbnail) GetSourceItemId() string {
|
|
if o == nil || IsNil(o.SourceItemId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SourceItemId
|
|
}
|
|
|
|
// GetSourceItemIdOk returns a tuple with the SourceItemId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Thumbnail) GetSourceItemIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SourceItemId) {
|
|
return nil, false
|
|
}
|
|
return o.SourceItemId, true
|
|
}
|
|
|
|
// HasSourceItemId returns a boolean if a field has been set.
|
|
func (o *Thumbnail) HasSourceItemId() bool {
|
|
if o != nil && !IsNil(o.SourceItemId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSourceItemId gets a reference to the given string and assigns it to the SourceItemId field.
|
|
func (o *Thumbnail) SetSourceItemId(v string) {
|
|
o.SourceItemId = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *Thumbnail) GetUrl() string {
|
|
if o == nil || IsNil(o.Url) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Url
|
|
}
|
|
|
|
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Thumbnail) GetUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Url) {
|
|
return nil, false
|
|
}
|
|
return o.Url, true
|
|
}
|
|
|
|
// HasUrl returns a boolean if a field has been set.
|
|
func (o *Thumbnail) HasUrl() bool {
|
|
if o != nil && !IsNil(o.Url) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
|
func (o *Thumbnail) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
// GetWidth returns the Width field value if set, zero value otherwise.
|
|
func (o *Thumbnail) GetWidth() int32 {
|
|
if o == nil || IsNil(o.Width) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Width
|
|
}
|
|
|
|
// GetWidthOk returns a tuple with the Width field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Thumbnail) GetWidthOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.Width) {
|
|
return nil, false
|
|
}
|
|
return o.Width, true
|
|
}
|
|
|
|
// HasWidth returns a boolean if a field has been set.
|
|
func (o *Thumbnail) HasWidth() bool {
|
|
if o != nil && !IsNil(o.Width) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWidth gets a reference to the given int32 and assigns it to the Width field.
|
|
func (o *Thumbnail) SetWidth(v int32) {
|
|
o.Width = &v
|
|
}
|
|
|
|
// GetLibreGraphMimeType returns the LibreGraphMimeType field value if set, zero value otherwise.
|
|
func (o *Thumbnail) GetLibreGraphMimeType() string {
|
|
if o == nil || IsNil(o.LibreGraphMimeType) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.LibreGraphMimeType
|
|
}
|
|
|
|
// GetLibreGraphMimeTypeOk returns a tuple with the LibreGraphMimeType field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Thumbnail) GetLibreGraphMimeTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.LibreGraphMimeType) {
|
|
return nil, false
|
|
}
|
|
return o.LibreGraphMimeType, true
|
|
}
|
|
|
|
// HasLibreGraphMimeType returns a boolean if a field has been set.
|
|
func (o *Thumbnail) HasLibreGraphMimeType() bool {
|
|
if o != nil && !IsNil(o.LibreGraphMimeType) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLibreGraphMimeType gets a reference to the given string and assigns it to the LibreGraphMimeType field.
|
|
func (o *Thumbnail) SetLibreGraphMimeType(v string) {
|
|
o.LibreGraphMimeType = &v
|
|
}
|
|
|
|
func (o Thumbnail) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Thumbnail) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Content) {
|
|
toSerialize["content"] = o.Content
|
|
}
|
|
if !IsNil(o.Height) {
|
|
toSerialize["height"] = o.Height
|
|
}
|
|
if !IsNil(o.SourceItemId) {
|
|
toSerialize["sourceItemId"] = o.SourceItemId
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
if !IsNil(o.Width) {
|
|
toSerialize["width"] = o.Width
|
|
}
|
|
if !IsNil(o.LibreGraphMimeType) {
|
|
toSerialize["@libre.graph.mimeType"] = o.LibreGraphMimeType
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableThumbnail struct {
|
|
value *Thumbnail
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableThumbnail) Get() *Thumbnail {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableThumbnail) Set(val *Thumbnail) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableThumbnail) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableThumbnail) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableThumbnail(val *Thumbnail) *NullableThumbnail {
|
|
return &NullableThumbnail{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableThumbnail) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableThumbnail) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|