/* answer answer api API version: v0.0.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package openapi import ( "encoding/json" ) // checks if the SchemaQuestionPageRespOperator type satisfies the MappedNullable interface at compile time var _ MappedNullable = &SchemaQuestionPageRespOperator{} // SchemaQuestionPageRespOperator struct for SchemaQuestionPageRespOperator type SchemaQuestionPageRespOperator struct { DisplayName *string `json:"display_name,omitempty"` Id *string `json:"id,omitempty"` Rank *int32 `json:"rank,omitempty"` Username *string `json:"username,omitempty"` } // NewSchemaQuestionPageRespOperator instantiates a new SchemaQuestionPageRespOperator 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 NewSchemaQuestionPageRespOperator() *SchemaQuestionPageRespOperator { this := SchemaQuestionPageRespOperator{} return &this } // NewSchemaQuestionPageRespOperatorWithDefaults instantiates a new SchemaQuestionPageRespOperator 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 NewSchemaQuestionPageRespOperatorWithDefaults() *SchemaQuestionPageRespOperator { this := SchemaQuestionPageRespOperator{} return &this } // GetDisplayName returns the DisplayName field value if set, zero value otherwise. func (o *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) SetDisplayName(v string) { o.DisplayName = &v } // GetId returns the Id field value if set, zero value otherwise. func (o *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) SetId(v string) { o.Id = &v } // GetRank returns the Rank field value if set, zero value otherwise. func (o *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) SetRank(v int32) { o.Rank = &v } // GetUsername returns the Username field value if set, zero value otherwise. func (o *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) 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 *SchemaQuestionPageRespOperator) SetUsername(v string) { o.Username = &v } func (o SchemaQuestionPageRespOperator) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o SchemaQuestionPageRespOperator) 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.Username) { toSerialize["username"] = o.Username } return toSerialize, nil } type NullableSchemaQuestionPageRespOperator struct { value *SchemaQuestionPageRespOperator isSet bool } func (v NullableSchemaQuestionPageRespOperator) Get() *SchemaQuestionPageRespOperator { return v.value } func (v *NullableSchemaQuestionPageRespOperator) Set(val *SchemaQuestionPageRespOperator) { v.value = val v.isSet = true } func (v NullableSchemaQuestionPageRespOperator) IsSet() bool { return v.isSet } func (v *NullableSchemaQuestionPageRespOperator) Unset() { v.value = nil v.isSet = false } func NewNullableSchemaQuestionPageRespOperator(val *SchemaQuestionPageRespOperator) *NullableSchemaQuestionPageRespOperator { return &NullableSchemaQuestionPageRespOperator{value: val, isSet: true} } func (v NullableSchemaQuestionPageRespOperator) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableSchemaQuestionPageRespOperator) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }