/*
Libre Graph API

Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.

API version: v1.0.4
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package libregraph

import (
	"encoding/json"
	"time"
)

// checks if the DriveItem type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DriveItem{}

// DriveItem Represents a resource inside a drive. Read-only.
type DriveItem struct {
	// Read-only.
	Id        *string      `json:"id,omitempty"`
	CreatedBy *IdentitySet `json:"createdBy,omitempty"`
	// Date and time of item creation. Read-only.
	CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
	// Provides a user-visible description of the item. Optional.
	Description *string `json:"description,omitempty"`
	// ETag for the item. Read-only.
	ETag           *string      `json:"eTag,omitempty"`
	LastModifiedBy *IdentitySet `json:"lastModifiedBy,omitempty"`
	// Date and time the item was last modified. Read-only.
	LastModifiedDateTime *time.Time `json:"lastModifiedDateTime,omitempty"`
	// The name of the item. Read-write.
	Name            *string        `json:"name,omitempty"`
	ParentReference *ItemReference `json:"parentReference,omitempty"`
	// URL that displays the resource in the browser. Read-only.
	WebUrl *string `json:"webUrl,omitempty"`
	// The content stream, if the item represents a file.
	Content *string `json:"content,omitempty"`
	// An eTag for the content of the item. This eTag is not changed if only the metadata is changed. Note This property is not returned if the item is a folder. Read-only.
	CTag           *string         `json:"cTag,omitempty"`
	Deleted        *Deleted        `json:"deleted,omitempty"`
	File           *OpenGraphFile  `json:"file,omitempty"`
	FileSystemInfo *FileSystemInfo `json:"fileSystemInfo,omitempty"`
	Folder         *Folder         `json:"folder,omitempty"`
	Image          *Image          `json:"image,omitempty"`
	Photo          *Photo          `json:"photo,omitempty"`
	Location       *GeoCoordinates `json:"location,omitempty"`
	// If this property is non-null, it indicates that the driveItem is the top-most driveItem in the drive.
	Root          map[string]interface{} `json:"root,omitempty"`
	Trash         *Trash                 `json:"trash,omitempty"`
	SpecialFolder *SpecialFolder         `json:"specialFolder,omitempty"`
	RemoteItem    *RemoteItem            `json:"remoteItem,omitempty"`
	// Size of the item in bytes. Read-only.
	Size *int64 `json:"size,omitempty"`
	// WebDAV compatible URL for the item. Read-only.
	WebDavUrl *string `json:"webDavUrl,omitempty"`
	// Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable.
	Children []DriveItem `json:"children,omitempty"`
	// The set of permissions for the item. Read-only. Nullable.
	Permissions []Permission `json:"permissions,omitempty"`
	Audio       *Audio       `json:"audio,omitempty"`
}

// NewDriveItem instantiates a new DriveItem 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 NewDriveItem() *DriveItem {
	this := DriveItem{}
	return &this
}

// NewDriveItemWithDefaults instantiates a new DriveItem 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 NewDriveItemWithDefaults() *DriveItem {
	this := DriveItem{}
	return &this
}

// GetId returns the Id field value if set, zero value otherwise.
func (o *DriveItem) 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 *DriveItem) 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 *DriveItem) 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 *DriveItem) SetId(v string) {
	o.Id = &v
}

// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise.
func (o *DriveItem) GetCreatedBy() IdentitySet {
	if o == nil || IsNil(o.CreatedBy) {
		var ret IdentitySet
		return ret
	}
	return *o.CreatedBy
}

// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetCreatedByOk() (*IdentitySet, bool) {
	if o == nil || IsNil(o.CreatedBy) {
		return nil, false
	}
	return o.CreatedBy, true
}

// HasCreatedBy returns a boolean if a field has been set.
func (o *DriveItem) HasCreatedBy() bool {
	if o != nil && !IsNil(o.CreatedBy) {
		return true
	}

	return false
}

// SetCreatedBy gets a reference to the given IdentitySet and assigns it to the CreatedBy field.
func (o *DriveItem) SetCreatedBy(v IdentitySet) {
	o.CreatedBy = &v
}

// GetCreatedDateTime returns the CreatedDateTime field value if set, zero value otherwise.
func (o *DriveItem) GetCreatedDateTime() time.Time {
	if o == nil || IsNil(o.CreatedDateTime) {
		var ret time.Time
		return ret
	}
	return *o.CreatedDateTime
}

// GetCreatedDateTimeOk returns a tuple with the CreatedDateTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetCreatedDateTimeOk() (*time.Time, bool) {
	if o == nil || IsNil(o.CreatedDateTime) {
		return nil, false
	}
	return o.CreatedDateTime, true
}

// HasCreatedDateTime returns a boolean if a field has been set.
func (o *DriveItem) HasCreatedDateTime() bool {
	if o != nil && !IsNil(o.CreatedDateTime) {
		return true
	}

	return false
}

// SetCreatedDateTime gets a reference to the given time.Time and assigns it to the CreatedDateTime field.
func (o *DriveItem) SetCreatedDateTime(v time.Time) {
	o.CreatedDateTime = &v
}

// GetDescription returns the Description field value if set, zero value otherwise.
func (o *DriveItem) GetDescription() string {
	if o == nil || IsNil(o.Description) {
		var ret string
		return ret
	}
	return *o.Description
}

// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetDescriptionOk() (*string, bool) {
	if o == nil || IsNil(o.Description) {
		return nil, false
	}
	return o.Description, true
}

// HasDescription returns a boolean if a field has been set.
func (o *DriveItem) HasDescription() bool {
	if o != nil && !IsNil(o.Description) {
		return true
	}

	return false
}

// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *DriveItem) SetDescription(v string) {
	o.Description = &v
}

// GetETag returns the ETag field value if set, zero value otherwise.
func (o *DriveItem) GetETag() string {
	if o == nil || IsNil(o.ETag) {
		var ret string
		return ret
	}
	return *o.ETag
}

// GetETagOk returns a tuple with the ETag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetETagOk() (*string, bool) {
	if o == nil || IsNil(o.ETag) {
		return nil, false
	}
	return o.ETag, true
}

// HasETag returns a boolean if a field has been set.
func (o *DriveItem) HasETag() bool {
	if o != nil && !IsNil(o.ETag) {
		return true
	}

	return false
}

// SetETag gets a reference to the given string and assigns it to the ETag field.
func (o *DriveItem) SetETag(v string) {
	o.ETag = &v
}

// GetLastModifiedBy returns the LastModifiedBy field value if set, zero value otherwise.
func (o *DriveItem) GetLastModifiedBy() IdentitySet {
	if o == nil || IsNil(o.LastModifiedBy) {
		var ret IdentitySet
		return ret
	}
	return *o.LastModifiedBy
}

// GetLastModifiedByOk returns a tuple with the LastModifiedBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetLastModifiedByOk() (*IdentitySet, bool) {
	if o == nil || IsNil(o.LastModifiedBy) {
		return nil, false
	}
	return o.LastModifiedBy, true
}

// HasLastModifiedBy returns a boolean if a field has been set.
func (o *DriveItem) HasLastModifiedBy() bool {
	if o != nil && !IsNil(o.LastModifiedBy) {
		return true
	}

	return false
}

// SetLastModifiedBy gets a reference to the given IdentitySet and assigns it to the LastModifiedBy field.
func (o *DriveItem) SetLastModifiedBy(v IdentitySet) {
	o.LastModifiedBy = &v
}

// GetLastModifiedDateTime returns the LastModifiedDateTime field value if set, zero value otherwise.
func (o *DriveItem) GetLastModifiedDateTime() time.Time {
	if o == nil || IsNil(o.LastModifiedDateTime) {
		var ret time.Time
		return ret
	}
	return *o.LastModifiedDateTime
}

// GetLastModifiedDateTimeOk returns a tuple with the LastModifiedDateTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetLastModifiedDateTimeOk() (*time.Time, bool) {
	if o == nil || IsNil(o.LastModifiedDateTime) {
		return nil, false
	}
	return o.LastModifiedDateTime, true
}

// HasLastModifiedDateTime returns a boolean if a field has been set.
func (o *DriveItem) HasLastModifiedDateTime() bool {
	if o != nil && !IsNil(o.LastModifiedDateTime) {
		return true
	}

	return false
}

// SetLastModifiedDateTime gets a reference to the given time.Time and assigns it to the LastModifiedDateTime field.
func (o *DriveItem) SetLastModifiedDateTime(v time.Time) {
	o.LastModifiedDateTime = &v
}

// GetName returns the Name field value if set, zero value otherwise.
func (o *DriveItem) 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 *DriveItem) 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 *DriveItem) 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 *DriveItem) SetName(v string) {
	o.Name = &v
}

// GetParentReference returns the ParentReference field value if set, zero value otherwise.
func (o *DriveItem) GetParentReference() ItemReference {
	if o == nil || IsNil(o.ParentReference) {
		var ret ItemReference
		return ret
	}
	return *o.ParentReference
}

// GetParentReferenceOk returns a tuple with the ParentReference field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetParentReferenceOk() (*ItemReference, bool) {
	if o == nil || IsNil(o.ParentReference) {
		return nil, false
	}
	return o.ParentReference, true
}

// HasParentReference returns a boolean if a field has been set.
func (o *DriveItem) HasParentReference() bool {
	if o != nil && !IsNil(o.ParentReference) {
		return true
	}

	return false
}

// SetParentReference gets a reference to the given ItemReference and assigns it to the ParentReference field.
func (o *DriveItem) SetParentReference(v ItemReference) {
	o.ParentReference = &v
}

// GetWebUrl returns the WebUrl field value if set, zero value otherwise.
func (o *DriveItem) GetWebUrl() string {
	if o == nil || IsNil(o.WebUrl) {
		var ret string
		return ret
	}
	return *o.WebUrl
}

// GetWebUrlOk returns a tuple with the WebUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetWebUrlOk() (*string, bool) {
	if o == nil || IsNil(o.WebUrl) {
		return nil, false
	}
	return o.WebUrl, true
}

// HasWebUrl returns a boolean if a field has been set.
func (o *DriveItem) HasWebUrl() bool {
	if o != nil && !IsNil(o.WebUrl) {
		return true
	}

	return false
}

// SetWebUrl gets a reference to the given string and assigns it to the WebUrl field.
func (o *DriveItem) SetWebUrl(v string) {
	o.WebUrl = &v
}

// GetContent returns the Content field value if set, zero value otherwise.
func (o *DriveItem) 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 *DriveItem) 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 *DriveItem) 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 *DriveItem) SetContent(v string) {
	o.Content = &v
}

// GetCTag returns the CTag field value if set, zero value otherwise.
func (o *DriveItem) GetCTag() string {
	if o == nil || IsNil(o.CTag) {
		var ret string
		return ret
	}
	return *o.CTag
}

// GetCTagOk returns a tuple with the CTag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetCTagOk() (*string, bool) {
	if o == nil || IsNil(o.CTag) {
		return nil, false
	}
	return o.CTag, true
}

// HasCTag returns a boolean if a field has been set.
func (o *DriveItem) HasCTag() bool {
	if o != nil && !IsNil(o.CTag) {
		return true
	}

	return false
}

// SetCTag gets a reference to the given string and assigns it to the CTag field.
func (o *DriveItem) SetCTag(v string) {
	o.CTag = &v
}

// GetDeleted returns the Deleted field value if set, zero value otherwise.
func (o *DriveItem) GetDeleted() Deleted {
	if o == nil || IsNil(o.Deleted) {
		var ret Deleted
		return ret
	}
	return *o.Deleted
}

// GetDeletedOk returns a tuple with the Deleted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetDeletedOk() (*Deleted, bool) {
	if o == nil || IsNil(o.Deleted) {
		return nil, false
	}
	return o.Deleted, true
}

// HasDeleted returns a boolean if a field has been set.
func (o *DriveItem) HasDeleted() bool {
	if o != nil && !IsNil(o.Deleted) {
		return true
	}

	return false
}

// SetDeleted gets a reference to the given Deleted and assigns it to the Deleted field.
func (o *DriveItem) SetDeleted(v Deleted) {
	o.Deleted = &v
}

// GetFile returns the File field value if set, zero value otherwise.
func (o *DriveItem) GetFile() OpenGraphFile {
	if o == nil || IsNil(o.File) {
		var ret OpenGraphFile
		return ret
	}
	return *o.File
}

// GetFileOk returns a tuple with the File field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetFileOk() (*OpenGraphFile, bool) {
	if o == nil || IsNil(o.File) {
		return nil, false
	}
	return o.File, true
}

// HasFile returns a boolean if a field has been set.
func (o *DriveItem) HasFile() bool {
	if o != nil && !IsNil(o.File) {
		return true
	}

	return false
}

// SetFile gets a reference to the given OpenGraphFile and assigns it to the File field.
func (o *DriveItem) SetFile(v OpenGraphFile) {
	o.File = &v
}

// GetFileSystemInfo returns the FileSystemInfo field value if set, zero value otherwise.
func (o *DriveItem) GetFileSystemInfo() FileSystemInfo {
	if o == nil || IsNil(o.FileSystemInfo) {
		var ret FileSystemInfo
		return ret
	}
	return *o.FileSystemInfo
}

// GetFileSystemInfoOk returns a tuple with the FileSystemInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetFileSystemInfoOk() (*FileSystemInfo, bool) {
	if o == nil || IsNil(o.FileSystemInfo) {
		return nil, false
	}
	return o.FileSystemInfo, true
}

// HasFileSystemInfo returns a boolean if a field has been set.
func (o *DriveItem) HasFileSystemInfo() bool {
	if o != nil && !IsNil(o.FileSystemInfo) {
		return true
	}

	return false
}

// SetFileSystemInfo gets a reference to the given FileSystemInfo and assigns it to the FileSystemInfo field.
func (o *DriveItem) SetFileSystemInfo(v FileSystemInfo) {
	o.FileSystemInfo = &v
}

// GetFolder returns the Folder field value if set, zero value otherwise.
func (o *DriveItem) GetFolder() Folder {
	if o == nil || IsNil(o.Folder) {
		var ret Folder
		return ret
	}
	return *o.Folder
}

// GetFolderOk returns a tuple with the Folder field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetFolderOk() (*Folder, bool) {
	if o == nil || IsNil(o.Folder) {
		return nil, false
	}
	return o.Folder, true
}

// HasFolder returns a boolean if a field has been set.
func (o *DriveItem) HasFolder() bool {
	if o != nil && !IsNil(o.Folder) {
		return true
	}

	return false
}

// SetFolder gets a reference to the given Folder and assigns it to the Folder field.
func (o *DriveItem) SetFolder(v Folder) {
	o.Folder = &v
}

// GetImage returns the Image field value if set, zero value otherwise.
func (o *DriveItem) GetImage() Image {
	if o == nil || IsNil(o.Image) {
		var ret Image
		return ret
	}
	return *o.Image
}

// GetImageOk returns a tuple with the Image field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetImageOk() (*Image, bool) {
	if o == nil || IsNil(o.Image) {
		return nil, false
	}
	return o.Image, true
}

// HasImage returns a boolean if a field has been set.
func (o *DriveItem) HasImage() bool {
	if o != nil && !IsNil(o.Image) {
		return true
	}

	return false
}

// SetImage gets a reference to the given Image and assigns it to the Image field.
func (o *DriveItem) SetImage(v Image) {
	o.Image = &v
}

// GetPhoto returns the Photo field value if set, zero value otherwise.
func (o *DriveItem) GetPhoto() Photo {
	if o == nil || IsNil(o.Photo) {
		var ret Photo
		return ret
	}
	return *o.Photo
}

// GetPhotoOk returns a tuple with the Photo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetPhotoOk() (*Photo, bool) {
	if o == nil || IsNil(o.Photo) {
		return nil, false
	}
	return o.Photo, true
}

// HasPhoto returns a boolean if a field has been set.
func (o *DriveItem) HasPhoto() bool {
	if o != nil && !IsNil(o.Photo) {
		return true
	}

	return false
}

// SetPhoto gets a reference to the given Photo and assigns it to the Photo field.
func (o *DriveItem) SetPhoto(v Photo) {
	o.Photo = &v
}

// GetLocation returns the Location field value if set, zero value otherwise.
func (o *DriveItem) GetLocation() GeoCoordinates {
	if o == nil || IsNil(o.Location) {
		var ret GeoCoordinates
		return ret
	}
	return *o.Location
}

// GetLocationOk returns a tuple with the Location field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetLocationOk() (*GeoCoordinates, bool) {
	if o == nil || IsNil(o.Location) {
		return nil, false
	}
	return o.Location, true
}

// HasLocation returns a boolean if a field has been set.
func (o *DriveItem) HasLocation() bool {
	if o != nil && !IsNil(o.Location) {
		return true
	}

	return false
}

// SetLocation gets a reference to the given GeoCoordinates and assigns it to the Location field.
func (o *DriveItem) SetLocation(v GeoCoordinates) {
	o.Location = &v
}

// GetRoot returns the Root field value if set, zero value otherwise.
func (o *DriveItem) GetRoot() map[string]interface{} {
	if o == nil || IsNil(o.Root) {
		var ret map[string]interface{}
		return ret
	}
	return o.Root
}

// GetRootOk returns a tuple with the Root field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetRootOk() (map[string]interface{}, bool) {
	if o == nil || IsNil(o.Root) {
		return map[string]interface{}{}, false
	}
	return o.Root, true
}

// HasRoot returns a boolean if a field has been set.
func (o *DriveItem) HasRoot() bool {
	if o != nil && !IsNil(o.Root) {
		return true
	}

	return false
}

// SetRoot gets a reference to the given map[string]interface{} and assigns it to the Root field.
func (o *DriveItem) SetRoot(v map[string]interface{}) {
	o.Root = v
}

// GetTrash returns the Trash field value if set, zero value otherwise.
func (o *DriveItem) GetTrash() Trash {
	if o == nil || IsNil(o.Trash) {
		var ret Trash
		return ret
	}
	return *o.Trash
}

// GetTrashOk returns a tuple with the Trash field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetTrashOk() (*Trash, bool) {
	if o == nil || IsNil(o.Trash) {
		return nil, false
	}
	return o.Trash, true
}

// HasTrash returns a boolean if a field has been set.
func (o *DriveItem) HasTrash() bool {
	if o != nil && !IsNil(o.Trash) {
		return true
	}

	return false
}

// SetTrash gets a reference to the given Trash and assigns it to the Trash field.
func (o *DriveItem) SetTrash(v Trash) {
	o.Trash = &v
}

// GetSpecialFolder returns the SpecialFolder field value if set, zero value otherwise.
func (o *DriveItem) GetSpecialFolder() SpecialFolder {
	if o == nil || IsNil(o.SpecialFolder) {
		var ret SpecialFolder
		return ret
	}
	return *o.SpecialFolder
}

// GetSpecialFolderOk returns a tuple with the SpecialFolder field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetSpecialFolderOk() (*SpecialFolder, bool) {
	if o == nil || IsNil(o.SpecialFolder) {
		return nil, false
	}
	return o.SpecialFolder, true
}

// HasSpecialFolder returns a boolean if a field has been set.
func (o *DriveItem) HasSpecialFolder() bool {
	if o != nil && !IsNil(o.SpecialFolder) {
		return true
	}

	return false
}

// SetSpecialFolder gets a reference to the given SpecialFolder and assigns it to the SpecialFolder field.
func (o *DriveItem) SetSpecialFolder(v SpecialFolder) {
	o.SpecialFolder = &v
}

// GetRemoteItem returns the RemoteItem field value if set, zero value otherwise.
func (o *DriveItem) GetRemoteItem() RemoteItem {
	if o == nil || IsNil(o.RemoteItem) {
		var ret RemoteItem
		return ret
	}
	return *o.RemoteItem
}

// GetRemoteItemOk returns a tuple with the RemoteItem field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetRemoteItemOk() (*RemoteItem, bool) {
	if o == nil || IsNil(o.RemoteItem) {
		return nil, false
	}
	return o.RemoteItem, true
}

// HasRemoteItem returns a boolean if a field has been set.
func (o *DriveItem) HasRemoteItem() bool {
	if o != nil && !IsNil(o.RemoteItem) {
		return true
	}

	return false
}

// SetRemoteItem gets a reference to the given RemoteItem and assigns it to the RemoteItem field.
func (o *DriveItem) SetRemoteItem(v RemoteItem) {
	o.RemoteItem = &v
}

// GetSize returns the Size field value if set, zero value otherwise.
func (o *DriveItem) GetSize() int64 {
	if o == nil || IsNil(o.Size) {
		var ret int64
		return ret
	}
	return *o.Size
}

// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetSizeOk() (*int64, bool) {
	if o == nil || IsNil(o.Size) {
		return nil, false
	}
	return o.Size, true
}

// HasSize returns a boolean if a field has been set.
func (o *DriveItem) HasSize() bool {
	if o != nil && !IsNil(o.Size) {
		return true
	}

	return false
}

// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *DriveItem) SetSize(v int64) {
	o.Size = &v
}

// GetWebDavUrl returns the WebDavUrl field value if set, zero value otherwise.
func (o *DriveItem) GetWebDavUrl() string {
	if o == nil || IsNil(o.WebDavUrl) {
		var ret string
		return ret
	}
	return *o.WebDavUrl
}

// GetWebDavUrlOk returns a tuple with the WebDavUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetWebDavUrlOk() (*string, bool) {
	if o == nil || IsNil(o.WebDavUrl) {
		return nil, false
	}
	return o.WebDavUrl, true
}

// HasWebDavUrl returns a boolean if a field has been set.
func (o *DriveItem) HasWebDavUrl() bool {
	if o != nil && !IsNil(o.WebDavUrl) {
		return true
	}

	return false
}

// SetWebDavUrl gets a reference to the given string and assigns it to the WebDavUrl field.
func (o *DriveItem) SetWebDavUrl(v string) {
	o.WebDavUrl = &v
}

// GetChildren returns the Children field value if set, zero value otherwise.
func (o *DriveItem) GetChildren() []DriveItem {
	if o == nil || IsNil(o.Children) {
		var ret []DriveItem
		return ret
	}
	return o.Children
}

// GetChildrenOk returns a tuple with the Children field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetChildrenOk() ([]DriveItem, bool) {
	if o == nil || IsNil(o.Children) {
		return nil, false
	}
	return o.Children, true
}

// HasChildren returns a boolean if a field has been set.
func (o *DriveItem) HasChildren() bool {
	if o != nil && !IsNil(o.Children) {
		return true
	}

	return false
}

// SetChildren gets a reference to the given []DriveItem and assigns it to the Children field.
func (o *DriveItem) SetChildren(v []DriveItem) {
	o.Children = v
}

// GetPermissions returns the Permissions field value if set, zero value otherwise.
func (o *DriveItem) GetPermissions() []Permission {
	if o == nil || IsNil(o.Permissions) {
		var ret []Permission
		return ret
	}
	return o.Permissions
}

// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetPermissionsOk() ([]Permission, bool) {
	if o == nil || IsNil(o.Permissions) {
		return nil, false
	}
	return o.Permissions, true
}

// HasPermissions returns a boolean if a field has been set.
func (o *DriveItem) HasPermissions() bool {
	if o != nil && !IsNil(o.Permissions) {
		return true
	}

	return false
}

// SetPermissions gets a reference to the given []Permission and assigns it to the Permissions field.
func (o *DriveItem) SetPermissions(v []Permission) {
	o.Permissions = v
}

// GetAudio returns the Audio field value if set, zero value otherwise.
func (o *DriveItem) GetAudio() Audio {
	if o == nil || IsNil(o.Audio) {
		var ret Audio
		return ret
	}
	return *o.Audio
}

// GetAudioOk returns a tuple with the Audio field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DriveItem) GetAudioOk() (*Audio, bool) {
	if o == nil || IsNil(o.Audio) {
		return nil, false
	}
	return o.Audio, true
}

// HasAudio returns a boolean if a field has been set.
func (o *DriveItem) HasAudio() bool {
	if o != nil && !IsNil(o.Audio) {
		return true
	}

	return false
}

// SetAudio gets a reference to the given Audio and assigns it to the Audio field.
func (o *DriveItem) SetAudio(v Audio) {
	o.Audio = &v
}

func (o DriveItem) MarshalJSON() ([]byte, error) {
	toSerialize, err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o DriveItem) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	if !IsNil(o.CreatedBy) {
		toSerialize["createdBy"] = o.CreatedBy
	}
	if !IsNil(o.CreatedDateTime) {
		toSerialize["createdDateTime"] = o.CreatedDateTime
	}
	if !IsNil(o.Description) {
		toSerialize["description"] = o.Description
	}
	if !IsNil(o.ETag) {
		toSerialize["eTag"] = o.ETag
	}
	if !IsNil(o.LastModifiedBy) {
		toSerialize["lastModifiedBy"] = o.LastModifiedBy
	}
	if !IsNil(o.LastModifiedDateTime) {
		toSerialize["lastModifiedDateTime"] = o.LastModifiedDateTime
	}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !IsNil(o.ParentReference) {
		toSerialize["parentReference"] = o.ParentReference
	}
	if !IsNil(o.WebUrl) {
		toSerialize["webUrl"] = o.WebUrl
	}
	if !IsNil(o.Content) {
		toSerialize["content"] = o.Content
	}
	if !IsNil(o.CTag) {
		toSerialize["cTag"] = o.CTag
	}
	if !IsNil(o.Deleted) {
		toSerialize["deleted"] = o.Deleted
	}
	if !IsNil(o.File) {
		toSerialize["file"] = o.File
	}
	if !IsNil(o.FileSystemInfo) {
		toSerialize["fileSystemInfo"] = o.FileSystemInfo
	}
	if !IsNil(o.Folder) {
		toSerialize["folder"] = o.Folder
	}
	if !IsNil(o.Image) {
		toSerialize["image"] = o.Image
	}
	if !IsNil(o.Photo) {
		toSerialize["photo"] = o.Photo
	}
	if !IsNil(o.Location) {
		toSerialize["location"] = o.Location
	}
	if !IsNil(o.Root) {
		toSerialize["root"] = o.Root
	}
	if !IsNil(o.Trash) {
		toSerialize["trash"] = o.Trash
	}
	if !IsNil(o.SpecialFolder) {
		toSerialize["specialFolder"] = o.SpecialFolder
	}
	if !IsNil(o.RemoteItem) {
		toSerialize["remoteItem"] = o.RemoteItem
	}
	if !IsNil(o.Size) {
		toSerialize["size"] = o.Size
	}
	if !IsNil(o.WebDavUrl) {
		toSerialize["webDavUrl"] = o.WebDavUrl
	}
	if !IsNil(o.Children) {
		toSerialize["children"] = o.Children
	}
	if !IsNil(o.Permissions) {
		toSerialize["permissions"] = o.Permissions
	}
	if !IsNil(o.Audio) {
		toSerialize["audio"] = o.Audio
	}
	return toSerialize, nil
}

type NullableDriveItem struct {
	value *DriveItem
	isSet bool
}

func (v NullableDriveItem) Get() *DriveItem {
	return v.value
}

func (v *NullableDriveItem) Set(val *DriveItem) {
	v.value = val
	v.isSet = true
}

func (v NullableDriveItem) IsSet() bool {
	return v.isSet
}

func (v *NullableDriveItem) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableDriveItem(val *DriveItem) *NullableDriveItem {
	return &NullableDriveItem{value: val, isSet: true}
}

func (v NullableDriveItem) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableDriveItem) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}
