Files
sdk/model_library_library_item.go

1007 lines
26 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 LibraryLibraryItem type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LibraryLibraryItem{}
// LibraryLibraryItem struct for LibraryLibraryItem
type LibraryLibraryItem struct {
// By is the owner as a reader names them: the name, else the address, the identity boundary carried when the item was made.
By *string `json:"by,omitempty"`
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"`
Project *string `json:"project,omitempty"`
Ref *string `json:"ref,omitempty"`
Seconds *float64 `json:"seconds,omitempty"`
Shared *bool `json:"shared,omitempty"`
Source *string `json:"source,omitempty"`
Updated *string `json:"updated,omitempty"`
// Upload is where a reserved item's bytes go, on the reservation response before it is committed.
Upload *LibraryLibraryUpload `json:"upload,omitempty"`
Url *string `json:"url,omitempty"`
Width *int64 `json:"width,omitempty"`
AdditionalProperties map[string]interface{}
}
type _LibraryLibraryItem LibraryLibraryItem
// NewLibraryLibraryItem instantiates a new LibraryLibraryItem 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 NewLibraryLibraryItem() *LibraryLibraryItem {
this := LibraryLibraryItem{}
return &this
}
// NewLibraryLibraryItemWithDefaults instantiates a new LibraryLibraryItem 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 NewLibraryLibraryItemWithDefaults() *LibraryLibraryItem {
this := LibraryLibraryItem{}
return &this
}
// GetBy returns the By field value if set, zero value otherwise.
func (o *LibraryLibraryItem) GetBy() string {
if o == nil || IsNil(o.By) {
var ret string
return ret
}
return *o.By
}
// GetByOk returns a tuple with the By field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LibraryLibraryItem) GetByOk() (*string, bool) {
if o == nil || IsNil(o.By) {
return nil, false
}
return o.By, true
}
// HasBy returns a boolean if a field has been set.
func (o *LibraryLibraryItem) HasBy() bool {
if o != nil && !IsNil(o.By) {
return true
}
return false
}
// SetBy gets a reference to the given string and assigns it to the By field.
func (o *LibraryLibraryItem) SetBy(v string) {
o.By = &v
}
// GetBytes returns the Bytes field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetBytes(v int64) {
o.Bytes = &v
}
// GetCreated returns the Created field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetCreated(v string) {
o.Created = &v
}
// GetDownload returns the Download field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetDownload(v string) {
o.Download = &v
}
// GetExpires returns the Expires field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetExpires(v string) {
o.Expires = &v
}
// GetHeight returns the Height field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetHeight(v int64) {
o.Height = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetId(v string) {
o.Id = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetKind(v string) {
o.Kind = &v
}
// GetMime returns the Mime field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetMime(v string) {
o.Mime = &v
}
// GetMine returns the Mine field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetMine(v bool) {
o.Mine = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetName(v string) {
o.Name = &v
}
// GetOrigin returns the Origin field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetOrigin(v string) {
o.Origin = &v
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetOwner(v string) {
o.Owner = &v
}
// GetPages returns the Pages field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetPages(v int64) {
o.Pages = &v
}
// GetPreview returns the Preview field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetPreview(v string) {
o.Preview = &v
}
// GetProject returns the Project field value if set, zero value otherwise.
func (o *LibraryLibraryItem) GetProject() string {
if o == nil || IsNil(o.Project) {
var ret string
return ret
}
return *o.Project
}
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LibraryLibraryItem) GetProjectOk() (*string, bool) {
if o == nil || IsNil(o.Project) {
return nil, false
}
return o.Project, true
}
// HasProject returns a boolean if a field has been set.
func (o *LibraryLibraryItem) HasProject() bool {
if o != nil && !IsNil(o.Project) {
return true
}
return false
}
// SetProject gets a reference to the given string and assigns it to the Project field.
func (o *LibraryLibraryItem) SetProject(v string) {
o.Project = &v
}
// GetRef returns the Ref field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetRef(v string) {
o.Ref = &v
}
// GetSeconds returns the Seconds field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetSeconds(v float64) {
o.Seconds = &v
}
// GetShared returns the Shared field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetShared(v bool) {
o.Shared = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetSource(v string) {
o.Source = &v
}
// GetUpdated returns the Updated field value if set, zero value otherwise.
func (o *LibraryLibraryItem) GetUpdated() string {
if o == nil || IsNil(o.Updated) {
var ret string
return ret
}
return *o.Updated
}
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LibraryLibraryItem) GetUpdatedOk() (*string, bool) {
if o == nil || IsNil(o.Updated) {
return nil, false
}
return o.Updated, true
}
// HasUpdated returns a boolean if a field has been set.
func (o *LibraryLibraryItem) HasUpdated() bool {
if o != nil && !IsNil(o.Updated) {
return true
}
return false
}
// SetUpdated gets a reference to the given string and assigns it to the Updated field.
func (o *LibraryLibraryItem) SetUpdated(v string) {
o.Updated = &v
}
// GetUpload returns the Upload field value if set, zero value otherwise.
func (o *LibraryLibraryItem) GetUpload() LibraryLibraryUpload {
if o == nil || IsNil(o.Upload) {
var ret LibraryLibraryUpload
return ret
}
return *o.Upload
}
// GetUploadOk returns a tuple with the Upload field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LibraryLibraryItem) GetUploadOk() (*LibraryLibraryUpload, bool) {
if o == nil || IsNil(o.Upload) {
return nil, false
}
return o.Upload, true
}
// HasUpload returns a boolean if a field has been set.
func (o *LibraryLibraryItem) HasUpload() bool {
if o != nil && !IsNil(o.Upload) {
return true
}
return false
}
// SetUpload gets a reference to the given LibraryLibraryUpload and assigns it to the Upload field.
func (o *LibraryLibraryItem) SetUpload(v LibraryLibraryUpload) {
o.Upload = &v
}
// GetUrl returns the Url field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetUrl(v string) {
o.Url = &v
}
// GetWidth returns the Width field value if set, zero value otherwise.
func (o *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) 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 *LibraryLibraryItem) SetWidth(v int64) {
o.Width = &v
}
func (o LibraryLibraryItem) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LibraryLibraryItem) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.By) {
toSerialize["by"] = o.By
}
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.Project) {
toSerialize["project"] = o.Project
}
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.Updated) {
toSerialize["updated"] = o.Updated
}
if !IsNil(o.Upload) {
toSerialize["upload"] = o.Upload
}
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 *LibraryLibraryItem) UnmarshalJSON(data []byte) (err error) {
varLibraryLibraryItem := _LibraryLibraryItem{}
err = json.Unmarshal(data, &varLibraryLibraryItem)
if err != nil {
return err
}
*o = LibraryLibraryItem(varLibraryLibraryItem)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "by")
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, "project")
delete(additionalProperties, "ref")
delete(additionalProperties, "seconds")
delete(additionalProperties, "shared")
delete(additionalProperties, "source")
delete(additionalProperties, "updated")
delete(additionalProperties, "upload")
delete(additionalProperties, "url")
delete(additionalProperties, "width")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableLibraryLibraryItem struct {
value *LibraryLibraryItem
isSet bool
}
func (v NullableLibraryLibraryItem) Get() *LibraryLibraryItem {
return v.value
}
func (v *NullableLibraryLibraryItem) Set(val *LibraryLibraryItem) {
v.value = val
v.isSet = true
}
func (v NullableLibraryLibraryItem) IsSet() bool {
return v.isSet
}
func (v *NullableLibraryLibraryItem) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLibraryLibraryItem(val *LibraryLibraryItem) *NullableLibraryLibraryItem {
return &NullableLibraryLibraryItem{value: val, isSet: true}
}
func (v NullableLibraryLibraryItem) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLibraryLibraryItem) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}