/* AutoGlue API API for managing K3s clusters across cloud providers API version: 1.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package autoglue import ( "encoding/json" "time" ) // checks if the ModelsUser type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ModelsUser{} // ModelsUser struct for ModelsUser type ModelsUser struct { AvatarUrl *string `json:"avatar_url,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` DisplayName *string `json:"display_name,omitempty"` // example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 Id *string `json:"id,omitempty"` IsAdmin *bool `json:"is_admin,omitempty"` IsDisabled *bool `json:"is_disabled,omitempty"` PrimaryEmail *string `json:"primary_email,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` } // NewModelsUser instantiates a new ModelsUser 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 NewModelsUser() *ModelsUser { this := ModelsUser{} return &this } // NewModelsUserWithDefaults instantiates a new ModelsUser 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 NewModelsUserWithDefaults() *ModelsUser { this := ModelsUser{} return &this } // GetAvatarUrl returns the AvatarUrl field value if set, zero value otherwise. func (o *ModelsUser) GetAvatarUrl() string { if o == nil || IsNil(o.AvatarUrl) { var ret string return ret } return *o.AvatarUrl } // GetAvatarUrlOk returns a tuple with the AvatarUrl field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ModelsUser) GetAvatarUrlOk() (*string, bool) { if o == nil || IsNil(o.AvatarUrl) { return nil, false } return o.AvatarUrl, true } // HasAvatarUrl returns a boolean if a field has been set. func (o *ModelsUser) HasAvatarUrl() bool { if o != nil && !IsNil(o.AvatarUrl) { return true } return false } // SetAvatarUrl gets a reference to the given string and assigns it to the AvatarUrl field. func (o *ModelsUser) SetAvatarUrl(v string) { o.AvatarUrl = &v } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *ModelsUser) GetCreatedAt() time.Time { if o == nil || IsNil(o.CreatedAt) { var ret time.Time return ret } return *o.CreatedAt } // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ModelsUser) GetCreatedAtOk() (*time.Time, bool) { if o == nil || IsNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true } // HasCreatedAt returns a boolean if a field has been set. func (o *ModelsUser) HasCreatedAt() bool { if o != nil && !IsNil(o.CreatedAt) { return true } return false } // SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. func (o *ModelsUser) SetCreatedAt(v time.Time) { o.CreatedAt = &v } // GetDisplayName returns the DisplayName field value if set, zero value otherwise. func (o *ModelsUser) GetDisplayName() string { if o == nil || IsNil(o.DisplayName) { var ret string return ret } return *o.DisplayName } // GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ModelsUser) GetDisplayNameOk() (*string, bool) { if o == nil || IsNil(o.DisplayName) { return nil, false } return o.DisplayName, true } // HasDisplayName returns a boolean if a field has been set. func (o *ModelsUser) HasDisplayName() bool { if o != nil && !IsNil(o.DisplayName) { return true } return false } // SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. func (o *ModelsUser) SetDisplayName(v string) { o.DisplayName = &v } // GetId returns the Id field value if set, zero value otherwise. func (o *ModelsUser) 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 *ModelsUser) 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 *ModelsUser) 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 *ModelsUser) SetId(v string) { o.Id = &v } // GetIsAdmin returns the IsAdmin field value if set, zero value otherwise. func (o *ModelsUser) GetIsAdmin() bool { if o == nil || IsNil(o.IsAdmin) { var ret bool return ret } return *o.IsAdmin } // GetIsAdminOk returns a tuple with the IsAdmin field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ModelsUser) GetIsAdminOk() (*bool, bool) { if o == nil || IsNil(o.IsAdmin) { return nil, false } return o.IsAdmin, true } // HasIsAdmin returns a boolean if a field has been set. func (o *ModelsUser) HasIsAdmin() bool { if o != nil && !IsNil(o.IsAdmin) { return true } return false } // SetIsAdmin gets a reference to the given bool and assigns it to the IsAdmin field. func (o *ModelsUser) SetIsAdmin(v bool) { o.IsAdmin = &v } // GetIsDisabled returns the IsDisabled field value if set, zero value otherwise. func (o *ModelsUser) GetIsDisabled() bool { if o == nil || IsNil(o.IsDisabled) { var ret bool return ret } return *o.IsDisabled } // GetIsDisabledOk returns a tuple with the IsDisabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ModelsUser) GetIsDisabledOk() (*bool, bool) { if o == nil || IsNil(o.IsDisabled) { return nil, false } return o.IsDisabled, true } // HasIsDisabled returns a boolean if a field has been set. func (o *ModelsUser) HasIsDisabled() bool { if o != nil && !IsNil(o.IsDisabled) { return true } return false } // SetIsDisabled gets a reference to the given bool and assigns it to the IsDisabled field. func (o *ModelsUser) SetIsDisabled(v bool) { o.IsDisabled = &v } // GetPrimaryEmail returns the PrimaryEmail field value if set, zero value otherwise. func (o *ModelsUser) GetPrimaryEmail() string { if o == nil || IsNil(o.PrimaryEmail) { var ret string return ret } return *o.PrimaryEmail } // GetPrimaryEmailOk returns a tuple with the PrimaryEmail field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ModelsUser) GetPrimaryEmailOk() (*string, bool) { if o == nil || IsNil(o.PrimaryEmail) { return nil, false } return o.PrimaryEmail, true } // HasPrimaryEmail returns a boolean if a field has been set. func (o *ModelsUser) HasPrimaryEmail() bool { if o != nil && !IsNil(o.PrimaryEmail) { return true } return false } // SetPrimaryEmail gets a reference to the given string and assigns it to the PrimaryEmail field. func (o *ModelsUser) SetPrimaryEmail(v string) { o.PrimaryEmail = &v } // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *ModelsUser) GetUpdatedAt() time.Time { if o == nil || IsNil(o.UpdatedAt) { var ret time.Time return ret } return *o.UpdatedAt } // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ModelsUser) GetUpdatedAtOk() (*time.Time, bool) { if o == nil || IsNil(o.UpdatedAt) { return nil, false } return o.UpdatedAt, true } // HasUpdatedAt returns a boolean if a field has been set. func (o *ModelsUser) HasUpdatedAt() bool { if o != nil && !IsNil(o.UpdatedAt) { return true } return false } // SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. func (o *ModelsUser) SetUpdatedAt(v time.Time) { o.UpdatedAt = &v } func (o ModelsUser) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o ModelsUser) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.AvatarUrl) { toSerialize["avatar_url"] = o.AvatarUrl } if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } if !IsNil(o.DisplayName) { toSerialize["display_name"] = o.DisplayName } if !IsNil(o.Id) { toSerialize["id"] = o.Id } if !IsNil(o.IsAdmin) { toSerialize["is_admin"] = o.IsAdmin } if !IsNil(o.IsDisabled) { toSerialize["is_disabled"] = o.IsDisabled } if !IsNil(o.PrimaryEmail) { toSerialize["primary_email"] = o.PrimaryEmail } if !IsNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } return toSerialize, nil } type NullableModelsUser struct { value *ModelsUser isSet bool } func (v NullableModelsUser) Get() *ModelsUser { return v.value } func (v *NullableModelsUser) Set(val *ModelsUser) { v.value = val v.isSet = true } func (v NullableModelsUser) IsSet() bool { return v.isSet } func (v *NullableModelsUser) Unset() { v.value = nil v.isSet = false } func NewNullableModelsUser(val *ModelsUser) *NullableModelsUser { return &NullableModelsUser{value: val, isSet: true} } func (v NullableModelsUser) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableModelsUser) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }