mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
858 lines
21 KiB
Go
858 lines
21 KiB
Go
/*
|
|
Hanzo Cloud API
|
|
|
|
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
|
|
API version: v1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hanzoai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the StudioItem type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &StudioItem{}
|
|
|
|
// StudioItem struct for StudioItem
|
|
type StudioItem struct {
|
|
Bytes *int64 `json:"bytes,omitempty"`
|
|
Created *string `json:"created,omitempty"`
|
|
Download *string `json:"download,omitempty"`
|
|
Expires *string `json:"expires,omitempty"`
|
|
Height *int64 `json:"height,omitempty"`
|
|
Id *string `json:"id,omitempty"`
|
|
Kind *string `json:"kind,omitempty"`
|
|
Mime *string `json:"mime,omitempty"`
|
|
Mine *bool `json:"mine,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Origin *string `json:"origin,omitempty"`
|
|
Owner *string `json:"owner,omitempty"`
|
|
Pages *int64 `json:"pages,omitempty"`
|
|
Preview *string `json:"preview,omitempty"`
|
|
Ref *string `json:"ref,omitempty"`
|
|
Seconds *float64 `json:"seconds,omitempty"`
|
|
Shared *bool `json:"shared,omitempty"`
|
|
Source *string `json:"source,omitempty"`
|
|
// URL opens the file inline; Download saves it; Preview is its still.
|
|
Url *string `json:"url,omitempty"`
|
|
Width *int64 `json:"width,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _StudioItem StudioItem
|
|
|
|
// NewStudioItem instantiates a new StudioItem 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 NewStudioItem() *StudioItem {
|
|
this := StudioItem{}
|
|
return &this
|
|
}
|
|
|
|
// NewStudioItemWithDefaults instantiates a new StudioItem 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 NewStudioItemWithDefaults() *StudioItem {
|
|
this := StudioItem{}
|
|
return &this
|
|
}
|
|
|
|
// GetBytes returns the Bytes field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetBytes() int64 {
|
|
if o == nil || IsNil(o.Bytes) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Bytes
|
|
}
|
|
|
|
// GetBytesOk returns a tuple with the Bytes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetBytesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Bytes) {
|
|
return nil, false
|
|
}
|
|
return o.Bytes, true
|
|
}
|
|
|
|
// HasBytes returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasBytes() bool {
|
|
if o != nil && !IsNil(o.Bytes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBytes gets a reference to the given int64 and assigns it to the Bytes field.
|
|
func (o *StudioItem) SetBytes(v int64) {
|
|
o.Bytes = &v
|
|
}
|
|
|
|
// GetCreated returns the Created field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetCreated() string {
|
|
if o == nil || IsNil(o.Created) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Created
|
|
}
|
|
|
|
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetCreatedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Created) {
|
|
return nil, false
|
|
}
|
|
return o.Created, true
|
|
}
|
|
|
|
// HasCreated returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasCreated() bool {
|
|
if o != nil && !IsNil(o.Created) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreated gets a reference to the given string and assigns it to the Created field.
|
|
func (o *StudioItem) SetCreated(v string) {
|
|
o.Created = &v
|
|
}
|
|
|
|
// GetDownload returns the Download field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetDownload() string {
|
|
if o == nil || IsNil(o.Download) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Download
|
|
}
|
|
|
|
// GetDownloadOk returns a tuple with the Download field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetDownloadOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Download) {
|
|
return nil, false
|
|
}
|
|
return o.Download, true
|
|
}
|
|
|
|
// HasDownload returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasDownload() bool {
|
|
if o != nil && !IsNil(o.Download) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDownload gets a reference to the given string and assigns it to the Download field.
|
|
func (o *StudioItem) SetDownload(v string) {
|
|
o.Download = &v
|
|
}
|
|
|
|
// GetExpires returns the Expires field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetExpires() string {
|
|
if o == nil || IsNil(o.Expires) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Expires
|
|
}
|
|
|
|
// GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetExpiresOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Expires) {
|
|
return nil, false
|
|
}
|
|
return o.Expires, true
|
|
}
|
|
|
|
// HasExpires returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasExpires() bool {
|
|
if o != nil && !IsNil(o.Expires) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExpires gets a reference to the given string and assigns it to the Expires field.
|
|
func (o *StudioItem) SetExpires(v string) {
|
|
o.Expires = &v
|
|
}
|
|
|
|
// GetHeight returns the Height field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetHeight() int64 {
|
|
if o == nil || IsNil(o.Height) {
|
|
var ret int64
|
|
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 *StudioItem) GetHeightOk() (*int64, 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 *StudioItem) HasHeight() bool {
|
|
if o != nil && !IsNil(o.Height) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHeight gets a reference to the given int64 and assigns it to the Height field.
|
|
func (o *StudioItem) SetHeight(v int64) {
|
|
o.Height = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
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 *StudioItem) GetIdOk() (*string, 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 *StudioItem) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *StudioItem) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *StudioItem) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetMime returns the Mime field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetMime() string {
|
|
if o == nil || IsNil(o.Mime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Mime
|
|
}
|
|
|
|
// GetMimeOk returns a tuple with the Mime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetMimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Mime) {
|
|
return nil, false
|
|
}
|
|
return o.Mime, true
|
|
}
|
|
|
|
// HasMime returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasMime() bool {
|
|
if o != nil && !IsNil(o.Mime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMime gets a reference to the given string and assigns it to the Mime field.
|
|
func (o *StudioItem) SetMime(v string) {
|
|
o.Mime = &v
|
|
}
|
|
|
|
// GetMine returns the Mine field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetMine() bool {
|
|
if o == nil || IsNil(o.Mine) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Mine
|
|
}
|
|
|
|
// GetMineOk returns a tuple with the Mine field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetMineOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Mine) {
|
|
return nil, false
|
|
}
|
|
return o.Mine, true
|
|
}
|
|
|
|
// HasMine returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasMine() bool {
|
|
if o != nil && !IsNil(o.Mine) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMine gets a reference to the given bool and assigns it to the Mine field.
|
|
func (o *StudioItem) SetMine(v bool) {
|
|
o.Mine = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *StudioItem) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetOrigin returns the Origin field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetOrigin() string {
|
|
if o == nil || IsNil(o.Origin) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Origin
|
|
}
|
|
|
|
// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetOriginOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Origin) {
|
|
return nil, false
|
|
}
|
|
return o.Origin, true
|
|
}
|
|
|
|
// HasOrigin returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasOrigin() bool {
|
|
if o != nil && !IsNil(o.Origin) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrigin gets a reference to the given string and assigns it to the Origin field.
|
|
func (o *StudioItem) SetOrigin(v string) {
|
|
o.Origin = &v
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetOwner() string {
|
|
if o == nil || IsNil(o.Owner) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Owner
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetOwnerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Owner) {
|
|
return nil, false
|
|
}
|
|
return o.Owner, true
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasOwner() bool {
|
|
if o != nil && !IsNil(o.Owner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
|
func (o *StudioItem) SetOwner(v string) {
|
|
o.Owner = &v
|
|
}
|
|
|
|
// GetPages returns the Pages field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetPages() int64 {
|
|
if o == nil || IsNil(o.Pages) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Pages
|
|
}
|
|
|
|
// GetPagesOk returns a tuple with the Pages field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetPagesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Pages) {
|
|
return nil, false
|
|
}
|
|
return o.Pages, true
|
|
}
|
|
|
|
// HasPages returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasPages() bool {
|
|
if o != nil && !IsNil(o.Pages) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPages gets a reference to the given int64 and assigns it to the Pages field.
|
|
func (o *StudioItem) SetPages(v int64) {
|
|
o.Pages = &v
|
|
}
|
|
|
|
// GetPreview returns the Preview field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetPreview() string {
|
|
if o == nil || IsNil(o.Preview) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Preview
|
|
}
|
|
|
|
// GetPreviewOk returns a tuple with the Preview field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetPreviewOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Preview) {
|
|
return nil, false
|
|
}
|
|
return o.Preview, true
|
|
}
|
|
|
|
// HasPreview returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasPreview() bool {
|
|
if o != nil && !IsNil(o.Preview) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPreview gets a reference to the given string and assigns it to the Preview field.
|
|
func (o *StudioItem) SetPreview(v string) {
|
|
o.Preview = &v
|
|
}
|
|
|
|
// GetRef returns the Ref field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetRef() string {
|
|
if o == nil || IsNil(o.Ref) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Ref
|
|
}
|
|
|
|
// GetRefOk returns a tuple with the Ref field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetRefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Ref) {
|
|
return nil, false
|
|
}
|
|
return o.Ref, true
|
|
}
|
|
|
|
// HasRef returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasRef() bool {
|
|
if o != nil && !IsNil(o.Ref) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRef gets a reference to the given string and assigns it to the Ref field.
|
|
func (o *StudioItem) SetRef(v string) {
|
|
o.Ref = &v
|
|
}
|
|
|
|
// GetSeconds returns the Seconds field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetSeconds() float64 {
|
|
if o == nil || IsNil(o.Seconds) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Seconds
|
|
}
|
|
|
|
// GetSecondsOk returns a tuple with the Seconds field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetSecondsOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Seconds) {
|
|
return nil, false
|
|
}
|
|
return o.Seconds, true
|
|
}
|
|
|
|
// HasSeconds returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasSeconds() bool {
|
|
if o != nil && !IsNil(o.Seconds) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSeconds gets a reference to the given float64 and assigns it to the Seconds field.
|
|
func (o *StudioItem) SetSeconds(v float64) {
|
|
o.Seconds = &v
|
|
}
|
|
|
|
// GetShared returns the Shared field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetShared() bool {
|
|
if o == nil || IsNil(o.Shared) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Shared
|
|
}
|
|
|
|
// GetSharedOk returns a tuple with the Shared field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioItem) GetSharedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Shared) {
|
|
return nil, false
|
|
}
|
|
return o.Shared, true
|
|
}
|
|
|
|
// HasShared returns a boolean if a field has been set.
|
|
func (o *StudioItem) HasShared() bool {
|
|
if o != nil && !IsNil(o.Shared) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetShared gets a reference to the given bool and assigns it to the Shared field.
|
|
func (o *StudioItem) SetShared(v bool) {
|
|
o.Shared = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *StudioItem) 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 *StudioItem) 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 *StudioItem) 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 *StudioItem) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *StudioItem) 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 *StudioItem) 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 *StudioItem) 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 *StudioItem) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
// GetWidth returns the Width field value if set, zero value otherwise.
|
|
func (o *StudioItem) GetWidth() int64 {
|
|
if o == nil || IsNil(o.Width) {
|
|
var ret int64
|
|
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 *StudioItem) GetWidthOk() (*int64, 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 *StudioItem) HasWidth() bool {
|
|
if o != nil && !IsNil(o.Width) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWidth gets a reference to the given int64 and assigns it to the Width field.
|
|
func (o *StudioItem) SetWidth(v int64) {
|
|
o.Width = &v
|
|
}
|
|
|
|
func (o StudioItem) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o StudioItem) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Bytes) {
|
|
toSerialize["bytes"] = o.Bytes
|
|
}
|
|
if !IsNil(o.Created) {
|
|
toSerialize["created"] = o.Created
|
|
}
|
|
if !IsNil(o.Download) {
|
|
toSerialize["download"] = o.Download
|
|
}
|
|
if !IsNil(o.Expires) {
|
|
toSerialize["expires"] = o.Expires
|
|
}
|
|
if !IsNil(o.Height) {
|
|
toSerialize["height"] = o.Height
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Mime) {
|
|
toSerialize["mime"] = o.Mime
|
|
}
|
|
if !IsNil(o.Mine) {
|
|
toSerialize["mine"] = o.Mine
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Origin) {
|
|
toSerialize["origin"] = o.Origin
|
|
}
|
|
if !IsNil(o.Owner) {
|
|
toSerialize["owner"] = o.Owner
|
|
}
|
|
if !IsNil(o.Pages) {
|
|
toSerialize["pages"] = o.Pages
|
|
}
|
|
if !IsNil(o.Preview) {
|
|
toSerialize["preview"] = o.Preview
|
|
}
|
|
if !IsNil(o.Ref) {
|
|
toSerialize["ref"] = o.Ref
|
|
}
|
|
if !IsNil(o.Seconds) {
|
|
toSerialize["seconds"] = o.Seconds
|
|
}
|
|
if !IsNil(o.Shared) {
|
|
toSerialize["shared"] = o.Shared
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
if !IsNil(o.Width) {
|
|
toSerialize["width"] = o.Width
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *StudioItem) UnmarshalJSON(data []byte) (err error) {
|
|
varStudioItem := _StudioItem{}
|
|
|
|
err = json.Unmarshal(data, &varStudioItem)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = StudioItem(varStudioItem)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "bytes")
|
|
delete(additionalProperties, "created")
|
|
delete(additionalProperties, "download")
|
|
delete(additionalProperties, "expires")
|
|
delete(additionalProperties, "height")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "mime")
|
|
delete(additionalProperties, "mine")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "origin")
|
|
delete(additionalProperties, "owner")
|
|
delete(additionalProperties, "pages")
|
|
delete(additionalProperties, "preview")
|
|
delete(additionalProperties, "ref")
|
|
delete(additionalProperties, "seconds")
|
|
delete(additionalProperties, "shared")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "url")
|
|
delete(additionalProperties, "width")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableStudioItem struct {
|
|
value *StudioItem
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableStudioItem) Get() *StudioItem {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableStudioItem) Set(val *StudioItem) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableStudioItem) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableStudioItem) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableStudioItem(val *StudioItem) *NullableStudioItem {
|
|
return &NullableStudioItem{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableStudioItem) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableStudioItem) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|