model_similar_games_response.go•3.44 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 SimilarGamesResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SimilarGamesResponse{}
// SimilarGamesResponse struct for SimilarGamesResponse
type SimilarGamesResponse struct {
Results []SearchResponseResultsInner `json:"results,omitempty"`
}
// NewSimilarGamesResponse instantiates a new SimilarGamesResponse 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 NewSimilarGamesResponse() *SimilarGamesResponse {
this := SimilarGamesResponse{}
return &this
}
// NewSimilarGamesResponseWithDefaults instantiates a new SimilarGamesResponse 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 NewSimilarGamesResponseWithDefaults() *SimilarGamesResponse {
this := SimilarGamesResponse{}
return &this
}
// GetResults returns the Results field value if set, zero value otherwise.
func (o *SimilarGamesResponse) GetResults() []SearchResponseResultsInner {
if o == nil || IsNil(o.Results) {
var ret []SearchResponseResultsInner
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 *SimilarGamesResponse) GetResultsOk() ([]SearchResponseResultsInner, 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 *SimilarGamesResponse) HasResults() bool {
if o != nil && !IsNil(o.Results) {
return true
}
return false
}
// SetResults gets a reference to the given []SearchResponseResultsInner and assigns it to the Results field.
func (o *SimilarGamesResponse) SetResults(v []SearchResponseResultsInner) {
o.Results = v
}
func (o SimilarGamesResponse) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SimilarGamesResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Results) {
toSerialize["results"] = o.Results
}
return toSerialize, nil
}
type NullableSimilarGamesResponse struct {
value *SimilarGamesResponse
isSet bool
}
func (v NullableSimilarGamesResponse) Get() *SimilarGamesResponse {
return v.value
}
func (v *NullableSimilarGamesResponse) Set(val *SimilarGamesResponse) {
v.value = val
v.isSet = true
}
func (v NullableSimilarGamesResponse) IsSet() bool {
return v.isSet
}
func (v *NullableSimilarGamesResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSimilarGamesResponse(val *SimilarGamesResponse) *NullableSimilarGamesResponse {
return &NullableSimilarGamesResponse{value: val, isSet: true}
}
func (v NullableSimilarGamesResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSimilarGamesResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}