model_search_suggestion_response.go•3.64 kB
/*
GameBrain API
GameBrain API
API version: 1.0.1
Contact: mail@gamebrain.co
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package gamebrain
import (
"encoding/json"
)
// checks if the SearchSuggestionResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SearchSuggestionResponse{}
// SearchSuggestionResponse struct for SearchSuggestionResponse
type SearchSuggestionResponse struct {
Results []SearchSuggestionResponseResultsInner `json:"results,omitempty"`
}
// NewSearchSuggestionResponse instantiates a new SearchSuggestionResponse 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 NewSearchSuggestionResponse() *SearchSuggestionResponse {
this := SearchSuggestionResponse{}
return &this
}
// NewSearchSuggestionResponseWithDefaults instantiates a new SearchSuggestionResponse 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 NewSearchSuggestionResponseWithDefaults() *SearchSuggestionResponse {
this := SearchSuggestionResponse{}
return &this
}
// GetResults returns the Results field value if set, zero value otherwise.
func (o *SearchSuggestionResponse) GetResults() []SearchSuggestionResponseResultsInner {
if o == nil || IsNil(o.Results) {
var ret []SearchSuggestionResponseResultsInner
return ret
}
return o.Results
}
// GetResultsOk returns a tuple with the Results field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchSuggestionResponse) GetResultsOk() ([]SearchSuggestionResponseResultsInner, bool) {
if o == nil || IsNil(o.Results) {
return nil, false
}
return o.Results, true
}
// HasResults returns a boolean if a field has been set.
func (o *SearchSuggestionResponse) HasResults() bool {
if o != nil && !IsNil(o.Results) {
return true
}
return false
}
// SetResults gets a reference to the given []SearchSuggestionResponseResultsInner and assigns it to the Results field.
func (o *SearchSuggestionResponse) SetResults(v []SearchSuggestionResponseResultsInner) {
o.Results = v
}
func (o SearchSuggestionResponse) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SearchSuggestionResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Results) {
toSerialize["results"] = o.Results
}
return toSerialize, nil
}
type NullableSearchSuggestionResponse struct {
value *SearchSuggestionResponse
isSet bool
}
func (v NullableSearchSuggestionResponse) Get() *SearchSuggestionResponse {
return v.value
}
func (v *NullableSearchSuggestionResponse) Set(val *SearchSuggestionResponse) {
v.value = val
v.isSet = true
}
func (v NullableSearchSuggestionResponse) IsSet() bool {
return v.isSet
}
func (v *NullableSearchSuggestionResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSearchSuggestionResponse(val *SearchSuggestionResponse) *NullableSearchSuggestionResponse {
return &NullableSearchSuggestionResponse{value: val, isSet: true}
}
func (v NullableSearchSuggestionResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSearchSuggestionResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}