model_search_response_results_inner.go•14.5 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 SearchResponseResultsInner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SearchResponseResultsInner{}
// SearchResponseResultsInner struct for SearchResponseResultsInner
type SearchResponseResultsInner struct {
Id *int32 `json:"id,omitempty"`
Year *float32 `json:"year,omitempty"`
Name *string `json:"name,omitempty"`
Genre *string `json:"genre,omitempty"`
Image *string `json:"image,omitempty"`
Link *string `json:"link,omitempty"`
Rating *SearchResponseResultsInnerRating `json:"rating,omitempty"`
AdultOnly *bool `json:"adult_only,omitempty"`
Screenshots []string `json:"screenshots,omitempty"`
MicroTrailer *string `json:"micro_trailer,omitempty"`
Gameplay *string `json:"gameplay,omitempty"`
ShortDescription *string `json:"short_description,omitempty"`
}
// NewSearchResponseResultsInner instantiates a new SearchResponseResultsInner 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 NewSearchResponseResultsInner() *SearchResponseResultsInner {
this := SearchResponseResultsInner{}
return &this
}
// NewSearchResponseResultsInnerWithDefaults instantiates a new SearchResponseResultsInner 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 NewSearchResponseResultsInnerWithDefaults() *SearchResponseResultsInner {
this := SearchResponseResultsInner{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetId() int32 {
if o == nil || IsNil(o.Id) {
var ret int32
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 *SearchResponseResultsInner) GetIdOk() (*int32, 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 *SearchResponseResultsInner) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given int32 and assigns it to the Id field.
func (o *SearchResponseResultsInner) SetId(v int32) {
o.Id = &v
}
// GetYear returns the Year field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetYear() float32 {
if o == nil || IsNil(o.Year) {
var ret float32
return ret
}
return *o.Year
}
// GetYearOk returns a tuple with the Year field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponseResultsInner) GetYearOk() (*float32, bool) {
if o == nil || IsNil(o.Year) {
return nil, false
}
return o.Year, true
}
// HasYear returns a boolean if a field has been set.
func (o *SearchResponseResultsInner) HasYear() bool {
if o != nil && !IsNil(o.Year) {
return true
}
return false
}
// SetYear gets a reference to the given float32 and assigns it to the Year field.
func (o *SearchResponseResultsInner) SetYear(v float32) {
o.Year = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponseResultsInner) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *SearchResponseResultsInner) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *SearchResponseResultsInner) SetName(v string) {
o.Name = &v
}
// GetGenre returns the Genre field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetGenre() string {
if o == nil || IsNil(o.Genre) {
var ret string
return ret
}
return *o.Genre
}
// GetGenreOk returns a tuple with the Genre field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponseResultsInner) GetGenreOk() (*string, bool) {
if o == nil || IsNil(o.Genre) {
return nil, false
}
return o.Genre, true
}
// HasGenre returns a boolean if a field has been set.
func (o *SearchResponseResultsInner) HasGenre() bool {
if o != nil && !IsNil(o.Genre) {
return true
}
return false
}
// SetGenre gets a reference to the given string and assigns it to the Genre field.
func (o *SearchResponseResultsInner) SetGenre(v string) {
o.Genre = &v
}
// GetImage returns the Image field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetImage() string {
if o == nil || IsNil(o.Image) {
var ret string
return ret
}
return *o.Image
}
// GetImageOk returns a tuple with the Image field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponseResultsInner) GetImageOk() (*string, bool) {
if o == nil || IsNil(o.Image) {
return nil, false
}
return o.Image, true
}
// HasImage returns a boolean if a field has been set.
func (o *SearchResponseResultsInner) HasImage() bool {
if o != nil && !IsNil(o.Image) {
return true
}
return false
}
// SetImage gets a reference to the given string and assigns it to the Image field.
func (o *SearchResponseResultsInner) SetImage(v string) {
o.Image = &v
}
// GetLink returns the Link field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetLink() string {
if o == nil || IsNil(o.Link) {
var ret string
return ret
}
return *o.Link
}
// GetLinkOk returns a tuple with the Link field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponseResultsInner) GetLinkOk() (*string, bool) {
if o == nil || IsNil(o.Link) {
return nil, false
}
return o.Link, true
}
// HasLink returns a boolean if a field has been set.
func (o *SearchResponseResultsInner) HasLink() bool {
if o != nil && !IsNil(o.Link) {
return true
}
return false
}
// SetLink gets a reference to the given string and assigns it to the Link field.
func (o *SearchResponseResultsInner) SetLink(v string) {
o.Link = &v
}
// GetRating returns the Rating field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetRating() SearchResponseResultsInnerRating {
if o == nil || IsNil(o.Rating) {
var ret SearchResponseResultsInnerRating
return ret
}
return *o.Rating
}
// GetRatingOk returns a tuple with the Rating field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponseResultsInner) GetRatingOk() (*SearchResponseResultsInnerRating, bool) {
if o == nil || IsNil(o.Rating) {
return nil, false
}
return o.Rating, true
}
// HasRating returns a boolean if a field has been set.
func (o *SearchResponseResultsInner) HasRating() bool {
if o != nil && !IsNil(o.Rating) {
return true
}
return false
}
// SetRating gets a reference to the given SearchResponseResultsInnerRating and assigns it to the Rating field.
func (o *SearchResponseResultsInner) SetRating(v SearchResponseResultsInnerRating) {
o.Rating = &v
}
// GetAdultOnly returns the AdultOnly field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetAdultOnly() bool {
if o == nil || IsNil(o.AdultOnly) {
var ret bool
return ret
}
return *o.AdultOnly
}
// GetAdultOnlyOk returns a tuple with the AdultOnly field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponseResultsInner) GetAdultOnlyOk() (*bool, bool) {
if o == nil || IsNil(o.AdultOnly) {
return nil, false
}
return o.AdultOnly, true
}
// HasAdultOnly returns a boolean if a field has been set.
func (o *SearchResponseResultsInner) HasAdultOnly() bool {
if o != nil && !IsNil(o.AdultOnly) {
return true
}
return false
}
// SetAdultOnly gets a reference to the given bool and assigns it to the AdultOnly field.
func (o *SearchResponseResultsInner) SetAdultOnly(v bool) {
o.AdultOnly = &v
}
// GetScreenshots returns the Screenshots field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetScreenshots() []string {
if o == nil || IsNil(o.Screenshots) {
var ret []string
return ret
}
return o.Screenshots
}
// GetScreenshotsOk returns a tuple with the Screenshots field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponseResultsInner) GetScreenshotsOk() ([]string, bool) {
if o == nil || IsNil(o.Screenshots) {
return nil, false
}
return o.Screenshots, true
}
// HasScreenshots returns a boolean if a field has been set.
func (o *SearchResponseResultsInner) HasScreenshots() bool {
if o != nil && !IsNil(o.Screenshots) {
return true
}
return false
}
// SetScreenshots gets a reference to the given []string and assigns it to the Screenshots field.
func (o *SearchResponseResultsInner) SetScreenshots(v []string) {
o.Screenshots = v
}
// GetMicroTrailer returns the MicroTrailer field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetMicroTrailer() string {
if o == nil || IsNil(o.MicroTrailer) {
var ret string
return ret
}
return *o.MicroTrailer
}
// GetMicroTrailerOk returns a tuple with the MicroTrailer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponseResultsInner) GetMicroTrailerOk() (*string, bool) {
if o == nil || IsNil(o.MicroTrailer) {
return nil, false
}
return o.MicroTrailer, true
}
// HasMicroTrailer returns a boolean if a field has been set.
func (o *SearchResponseResultsInner) HasMicroTrailer() bool {
if o != nil && !IsNil(o.MicroTrailer) {
return true
}
return false
}
// SetMicroTrailer gets a reference to the given string and assigns it to the MicroTrailer field.
func (o *SearchResponseResultsInner) SetMicroTrailer(v string) {
o.MicroTrailer = &v
}
// GetGameplay returns the Gameplay field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetGameplay() string {
if o == nil || IsNil(o.Gameplay) {
var ret string
return ret
}
return *o.Gameplay
}
// GetGameplayOk returns a tuple with the Gameplay field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponseResultsInner) GetGameplayOk() (*string, bool) {
if o == nil || IsNil(o.Gameplay) {
return nil, false
}
return o.Gameplay, true
}
// HasGameplay returns a boolean if a field has been set.
func (o *SearchResponseResultsInner) HasGameplay() bool {
if o != nil && !IsNil(o.Gameplay) {
return true
}
return false
}
// SetGameplay gets a reference to the given string and assigns it to the Gameplay field.
func (o *SearchResponseResultsInner) SetGameplay(v string) {
o.Gameplay = &v
}
// GetShortDescription returns the ShortDescription field value if set, zero value otherwise.
func (o *SearchResponseResultsInner) GetShortDescription() string {
if o == nil || IsNil(o.ShortDescription) {
var ret string
return ret
}
return *o.ShortDescription
}
// GetShortDescriptionOk returns a tuple with the ShortDescription field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SearchResponseResultsInner) GetShortDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.ShortDescription) {
return nil, false
}
return o.ShortDescription, true
}
// HasShortDescription returns a boolean if a field has been set.
func (o *SearchResponseResultsInner) HasShortDescription() bool {
if o != nil && !IsNil(o.ShortDescription) {
return true
}
return false
}
// SetShortDescription gets a reference to the given string and assigns it to the ShortDescription field.
func (o *SearchResponseResultsInner) SetShortDescription(v string) {
o.ShortDescription = &v
}
func (o SearchResponseResultsInner) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SearchResponseResultsInner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Year) {
toSerialize["year"] = o.Year
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Genre) {
toSerialize["genre"] = o.Genre
}
if !IsNil(o.Image) {
toSerialize["image"] = o.Image
}
if !IsNil(o.Link) {
toSerialize["link"] = o.Link
}
if !IsNil(o.Rating) {
toSerialize["rating"] = o.Rating
}
if !IsNil(o.AdultOnly) {
toSerialize["adult_only"] = o.AdultOnly
}
if !IsNil(o.Screenshots) {
toSerialize["screenshots"] = o.Screenshots
}
if !IsNil(o.MicroTrailer) {
toSerialize["micro_trailer"] = o.MicroTrailer
}
if !IsNil(o.Gameplay) {
toSerialize["gameplay"] = o.Gameplay
}
if !IsNil(o.ShortDescription) {
toSerialize["short_description"] = o.ShortDescription
}
return toSerialize, nil
}
type NullableSearchResponseResultsInner struct {
value *SearchResponseResultsInner
isSet bool
}
func (v NullableSearchResponseResultsInner) Get() *SearchResponseResultsInner {
return v.value
}
func (v *NullableSearchResponseResultsInner) Set(val *SearchResponseResultsInner) {
v.value = val
v.isSet = true
}
func (v NullableSearchResponseResultsInner) IsSet() bool {
return v.isSet
}
func (v *NullableSearchResponseResultsInner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSearchResponseResultsInner(val *SearchResponseResultsInner) *NullableSearchResponseResultsInner {
return &NullableSearchResponseResultsInner{value: val, isSet: true}
}
func (v NullableSearchResponseResultsInner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSearchResponseResultsInner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}