/* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package answer_sdk import ( "encoding/json" ) // checks if the SchemaSearchObjectUser type satisfies the MappedNullable interface at compile time var _ MappedNullable = &SchemaSearchObjectUser{} // SchemaSearchObjectUser struct for SchemaSearchObjectUser type SchemaSearchObjectUser struct { DisplayName *string `json:"display_name,omitempty"` Id *string `json:"id,omitempty"` Rank *int32 `json:"rank,omitempty"` Status *string `json:"status,omitempty"` Username *string `json:"username,omitempty"` } // NewSchemaSearchObjectUser instantiates a new SchemaSearchObjectUser 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 NewSchemaSearchObjectUser() *SchemaSearchObjectUser { this := SchemaSearchObjectUser{} return &this } // NewSchemaSearchObjectUserWithDefaults instantiates a new SchemaSearchObjectUser 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 NewSchemaSearchObjectUserWithDefaults() *SchemaSearchObjectUser { this := SchemaSearchObjectUser{} return &this } // GetDisplayName returns the DisplayName field value if set, zero value otherwise. func (o *SchemaSearchObjectUser) 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 *SchemaSearchObjectUser) 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 *SchemaSearchObjectUser) 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 *SchemaSearchObjectUser) SetDisplayName(v string) { o.DisplayName = &v } // GetId returns the Id field value if set, zero value otherwise. func (o *SchemaSearchObjectUser) 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 *SchemaSearchObjectUser) 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 *SchemaSearchObjectUser) 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 *SchemaSearchObjectUser) SetId(v string) { o.Id = &v } // GetRank returns the Rank field value if set, zero value otherwise. func (o *SchemaSearchObjectUser) GetRank() int32 { if o == nil || IsNil(o.Rank) { var ret int32 return ret } return *o.Rank } // GetRankOk returns a tuple with the Rank field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaSearchObjectUser) GetRankOk() (*int32, bool) { if o == nil || IsNil(o.Rank) { return nil, false } return o.Rank, true } // HasRank returns a boolean if a field has been set. func (o *SchemaSearchObjectUser) HasRank() bool { if o != nil && !IsNil(o.Rank) { return true } return false } // SetRank gets a reference to the given int32 and assigns it to the Rank field. func (o *SchemaSearchObjectUser) SetRank(v int32) { o.Rank = &v } // GetStatus returns the Status field value if set, zero value otherwise. func (o *SchemaSearchObjectUser) GetStatus() string { if o == nil || IsNil(o.Status) { var ret string return ret } return *o.Status } // GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaSearchObjectUser) GetStatusOk() (*string, bool) { if o == nil || IsNil(o.Status) { return nil, false } return o.Status, true } // HasStatus returns a boolean if a field has been set. func (o *SchemaSearchObjectUser) HasStatus() bool { if o != nil && !IsNil(o.Status) { return true } return false } // SetStatus gets a reference to the given string and assigns it to the Status field. func (o *SchemaSearchObjectUser) SetStatus(v string) { o.Status = &v } // GetUsername returns the Username field value if set, zero value otherwise. func (o *SchemaSearchObjectUser) GetUsername() string { if o == nil || IsNil(o.Username) { var ret string return ret } return *o.Username } // GetUsernameOk returns a tuple with the Username field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaSearchObjectUser) GetUsernameOk() (*string, bool) { if o == nil || IsNil(o.Username) { return nil, false } return o.Username, true } // HasUsername returns a boolean if a field has been set. func (o *SchemaSearchObjectUser) HasUsername() bool { if o != nil && !IsNil(o.Username) { return true } return false } // SetUsername gets a reference to the given string and assigns it to the Username field. func (o *SchemaSearchObjectUser) SetUsername(v string) { o.Username = &v } func (o SchemaSearchObjectUser) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o SchemaSearchObjectUser) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.DisplayName) { toSerialize["display_name"] = o.DisplayName } if !IsNil(o.Id) { toSerialize["id"] = o.Id } if !IsNil(o.Rank) { toSerialize["rank"] = o.Rank } if !IsNil(o.Status) { toSerialize["status"] = o.Status } if !IsNil(o.Username) { toSerialize["username"] = o.Username } return toSerialize, nil } type NullableSchemaSearchObjectUser struct { value *SchemaSearchObjectUser isSet bool } func (v NullableSchemaSearchObjectUser) Get() *SchemaSearchObjectUser { return v.value } func (v *NullableSchemaSearchObjectUser) Set(val *SchemaSearchObjectUser) { v.value = val v.isSet = true } func (v NullableSchemaSearchObjectUser) IsSet() bool { return v.isSet } func (v *NullableSchemaSearchObjectUser) Unset() { v.value = nil v.isSet = false } func NewNullableSchemaSearchObjectUser(val *SchemaSearchObjectUser) *NullableSchemaSearchObjectUser { return &NullableSchemaSearchObjectUser{value: val, isSet: true} } func (v NullableSchemaSearchObjectUser) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableSchemaSearchObjectUser) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }