/* 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" ) // Trash Metadata for trashed drive Items type Trash struct { TrashedBy *IdentitySet `json:"trashedBy,omitempty"` // The UTC date and time the folder was marked as trashed. TrashedDateTime *time.Time `json:"trashedDateTime,omitempty"` } // NewTrash instantiates a new Trash 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 NewTrash() *Trash { this := Trash{} return &this } // NewTrashWithDefaults instantiates a new Trash 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 NewTrashWithDefaults() *Trash { this := Trash{} return &this } // GetTrashedBy returns the TrashedBy field value if set, zero value otherwise. func (o *Trash) GetTrashedBy() IdentitySet { if o == nil || o.TrashedBy == nil { var ret IdentitySet return ret } return *o.TrashedBy } // GetTrashedByOk returns a tuple with the TrashedBy field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Trash) GetTrashedByOk() (*IdentitySet, bool) { if o == nil || o.TrashedBy == nil { return nil, false } return o.TrashedBy, true } // HasTrashedBy returns a boolean if a field has been set. func (o *Trash) HasTrashedBy() bool { if o != nil && o.TrashedBy != nil { return true } return false } // SetTrashedBy gets a reference to the given IdentitySet and assigns it to the TrashedBy field. func (o *Trash) SetTrashedBy(v IdentitySet) { o.TrashedBy = &v } // GetTrashedDateTime returns the TrashedDateTime field value if set, zero value otherwise. func (o *Trash) GetTrashedDateTime() time.Time { if o == nil || o.TrashedDateTime == nil { var ret time.Time return ret } return *o.TrashedDateTime } // GetTrashedDateTimeOk returns a tuple with the TrashedDateTime field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Trash) GetTrashedDateTimeOk() (*time.Time, bool) { if o == nil || o.TrashedDateTime == nil { return nil, false } return o.TrashedDateTime, true } // HasTrashedDateTime returns a boolean if a field has been set. func (o *Trash) HasTrashedDateTime() bool { if o != nil && o.TrashedDateTime != nil { return true } return false } // SetTrashedDateTime gets a reference to the given time.Time and assigns it to the TrashedDateTime field. func (o *Trash) SetTrashedDateTime(v time.Time) { o.TrashedDateTime = &v } func (o Trash) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.TrashedBy != nil { toSerialize["trashedBy"] = o.TrashedBy } if o.TrashedDateTime != nil { toSerialize["trashedDateTime"] = o.TrashedDateTime } return json.Marshal(toSerialize) } type NullableTrash struct { value *Trash isSet bool } func (v NullableTrash) Get() *Trash { return v.value } func (v *NullableTrash) Set(val *Trash) { v.value = val v.isSet = true } func (v NullableTrash) IsSet() bool { return v.isSet } func (v *NullableTrash) Unset() { v.value = nil v.isSet = false } func NewNullableTrash(val *Trash) *NullableTrash { return &NullableTrash{value: val, isSet: true} } func (v NullableTrash) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTrash) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }