...

Source file src/go.formulabun.club/replays/ingest/client/model_player_entry.go

Documentation: go.formulabun.club/replays/ingest/client

     1  /*
     2  GoBun File Info
     3  
     4  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
     5  
     6  API version: 0.0.1
     7  */
     8  
     9  // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
    10  
    11  package openapi
    12  
    13  import (
    14  	"encoding/json"
    15  )
    16  
    17  // PlayerEntry struct for PlayerEntry
    18  type PlayerEntry struct {
    19  	Name *string `json:"Name,omitempty"`
    20  	Skin *string `json:"Skin,omitempty"`
    21  	Color *string `json:"Color,omitempty"`
    22  	Score *float32 `json:"Score,omitempty"`
    23  	Speed *float32 `json:"Speed,omitempty"`
    24  	Weight *float32 `json:"Weight,omitempty"`
    25  }
    26  
    27  // NewPlayerEntry instantiates a new PlayerEntry object
    28  // This constructor will assign default values to properties that have it defined,
    29  // and makes sure properties required by API are set, but the set of arguments
    30  // will change when the set of required properties is changed
    31  func NewPlayerEntry() *PlayerEntry {
    32  	this := PlayerEntry{}
    33  	return &this
    34  }
    35  
    36  // NewPlayerEntryWithDefaults instantiates a new PlayerEntry object
    37  // This constructor will only assign default values to properties that have it defined,
    38  // but it doesn't guarantee that properties required by API are set
    39  func NewPlayerEntryWithDefaults() *PlayerEntry {
    40  	this := PlayerEntry{}
    41  	return &this
    42  }
    43  
    44  // GetName returns the Name field value if set, zero value otherwise.
    45  func (o *PlayerEntry) GetName() string {
    46  	if o == nil || o.Name == nil {
    47  		var ret string
    48  		return ret
    49  	}
    50  	return *o.Name
    51  }
    52  
    53  // GetNameOk returns a tuple with the Name field value if set, nil otherwise
    54  // and a boolean to check if the value has been set.
    55  func (o *PlayerEntry) GetNameOk() (*string, bool) {
    56  	if o == nil || o.Name == nil {
    57  		return nil, false
    58  	}
    59  	return o.Name, true
    60  }
    61  
    62  // HasName returns a boolean if a field has been set.
    63  func (o *PlayerEntry) HasName() bool {
    64  	if o != nil && o.Name != nil {
    65  		return true
    66  	}
    67  
    68  	return false
    69  }
    70  
    71  // SetName gets a reference to the given string and assigns it to the Name field.
    72  func (o *PlayerEntry) SetName(v string) {
    73  	o.Name = &v
    74  }
    75  
    76  // GetSkin returns the Skin field value if set, zero value otherwise.
    77  func (o *PlayerEntry) GetSkin() string {
    78  	if o == nil || o.Skin == nil {
    79  		var ret string
    80  		return ret
    81  	}
    82  	return *o.Skin
    83  }
    84  
    85  // GetSkinOk returns a tuple with the Skin field value if set, nil otherwise
    86  // and a boolean to check if the value has been set.
    87  func (o *PlayerEntry) GetSkinOk() (*string, bool) {
    88  	if o == nil || o.Skin == nil {
    89  		return nil, false
    90  	}
    91  	return o.Skin, true
    92  }
    93  
    94  // HasSkin returns a boolean if a field has been set.
    95  func (o *PlayerEntry) HasSkin() bool {
    96  	if o != nil && o.Skin != nil {
    97  		return true
    98  	}
    99  
   100  	return false
   101  }
   102  
   103  // SetSkin gets a reference to the given string and assigns it to the Skin field.
   104  func (o *PlayerEntry) SetSkin(v string) {
   105  	o.Skin = &v
   106  }
   107  
   108  // GetColor returns the Color field value if set, zero value otherwise.
   109  func (o *PlayerEntry) GetColor() string {
   110  	if o == nil || o.Color == nil {
   111  		var ret string
   112  		return ret
   113  	}
   114  	return *o.Color
   115  }
   116  
   117  // GetColorOk returns a tuple with the Color field value if set, nil otherwise
   118  // and a boolean to check if the value has been set.
   119  func (o *PlayerEntry) GetColorOk() (*string, bool) {
   120  	if o == nil || o.Color == nil {
   121  		return nil, false
   122  	}
   123  	return o.Color, true
   124  }
   125  
   126  // HasColor returns a boolean if a field has been set.
   127  func (o *PlayerEntry) HasColor() bool {
   128  	if o != nil && o.Color != nil {
   129  		return true
   130  	}
   131  
   132  	return false
   133  }
   134  
   135  // SetColor gets a reference to the given string and assigns it to the Color field.
   136  func (o *PlayerEntry) SetColor(v string) {
   137  	o.Color = &v
   138  }
   139  
   140  // GetScore returns the Score field value if set, zero value otherwise.
   141  func (o *PlayerEntry) GetScore() float32 {
   142  	if o == nil || o.Score == nil {
   143  		var ret float32
   144  		return ret
   145  	}
   146  	return *o.Score
   147  }
   148  
   149  // GetScoreOk returns a tuple with the Score field value if set, nil otherwise
   150  // and a boolean to check if the value has been set.
   151  func (o *PlayerEntry) GetScoreOk() (*float32, bool) {
   152  	if o == nil || o.Score == nil {
   153  		return nil, false
   154  	}
   155  	return o.Score, true
   156  }
   157  
   158  // HasScore returns a boolean if a field has been set.
   159  func (o *PlayerEntry) HasScore() bool {
   160  	if o != nil && o.Score != nil {
   161  		return true
   162  	}
   163  
   164  	return false
   165  }
   166  
   167  // SetScore gets a reference to the given float32 and assigns it to the Score field.
   168  func (o *PlayerEntry) SetScore(v float32) {
   169  	o.Score = &v
   170  }
   171  
   172  // GetSpeed returns the Speed field value if set, zero value otherwise.
   173  func (o *PlayerEntry) GetSpeed() float32 {
   174  	if o == nil || o.Speed == nil {
   175  		var ret float32
   176  		return ret
   177  	}
   178  	return *o.Speed
   179  }
   180  
   181  // GetSpeedOk returns a tuple with the Speed field value if set, nil otherwise
   182  // and a boolean to check if the value has been set.
   183  func (o *PlayerEntry) GetSpeedOk() (*float32, bool) {
   184  	if o == nil || o.Speed == nil {
   185  		return nil, false
   186  	}
   187  	return o.Speed, true
   188  }
   189  
   190  // HasSpeed returns a boolean if a field has been set.
   191  func (o *PlayerEntry) HasSpeed() bool {
   192  	if o != nil && o.Speed != nil {
   193  		return true
   194  	}
   195  
   196  	return false
   197  }
   198  
   199  // SetSpeed gets a reference to the given float32 and assigns it to the Speed field.
   200  func (o *PlayerEntry) SetSpeed(v float32) {
   201  	o.Speed = &v
   202  }
   203  
   204  // GetWeight returns the Weight field value if set, zero value otherwise.
   205  func (o *PlayerEntry) GetWeight() float32 {
   206  	if o == nil || o.Weight == nil {
   207  		var ret float32
   208  		return ret
   209  	}
   210  	return *o.Weight
   211  }
   212  
   213  // GetWeightOk returns a tuple with the Weight field value if set, nil otherwise
   214  // and a boolean to check if the value has been set.
   215  func (o *PlayerEntry) GetWeightOk() (*float32, bool) {
   216  	if o == nil || o.Weight == nil {
   217  		return nil, false
   218  	}
   219  	return o.Weight, true
   220  }
   221  
   222  // HasWeight returns a boolean if a field has been set.
   223  func (o *PlayerEntry) HasWeight() bool {
   224  	if o != nil && o.Weight != nil {
   225  		return true
   226  	}
   227  
   228  	return false
   229  }
   230  
   231  // SetWeight gets a reference to the given float32 and assigns it to the Weight field.
   232  func (o *PlayerEntry) SetWeight(v float32) {
   233  	o.Weight = &v
   234  }
   235  
   236  func (o PlayerEntry) MarshalJSON() ([]byte, error) {
   237  	toSerialize := map[string]interface{}{}
   238  	if o.Name != nil {
   239  		toSerialize["Name"] = o.Name
   240  	}
   241  	if o.Skin != nil {
   242  		toSerialize["Skin"] = o.Skin
   243  	}
   244  	if o.Color != nil {
   245  		toSerialize["Color"] = o.Color
   246  	}
   247  	if o.Score != nil {
   248  		toSerialize["Score"] = o.Score
   249  	}
   250  	if o.Speed != nil {
   251  		toSerialize["Speed"] = o.Speed
   252  	}
   253  	if o.Weight != nil {
   254  		toSerialize["Weight"] = o.Weight
   255  	}
   256  	return json.Marshal(toSerialize)
   257  }
   258  
   259  type NullablePlayerEntry struct {
   260  	value *PlayerEntry
   261  	isSet bool
   262  }
   263  
   264  func (v NullablePlayerEntry) Get() *PlayerEntry {
   265  	return v.value
   266  }
   267  
   268  func (v *NullablePlayerEntry) Set(val *PlayerEntry) {
   269  	v.value = val
   270  	v.isSet = true
   271  }
   272  
   273  func (v NullablePlayerEntry) IsSet() bool {
   274  	return v.isSet
   275  }
   276  
   277  func (v *NullablePlayerEntry) Unset() {
   278  	v.value = nil
   279  	v.isSet = false
   280  }
   281  
   282  func NewNullablePlayerEntry(val *PlayerEntry) *NullablePlayerEntry {
   283  	return &NullablePlayerEntry{value: val, isSet: true}
   284  }
   285  
   286  func (v NullablePlayerEntry) MarshalJSON() ([]byte, error) {
   287  	return json.Marshal(v.value)
   288  }
   289  
   290  func (v *NullablePlayerEntry) UnmarshalJSON(src []byte) error {
   291  	v.isSet = true
   292  	return json.Unmarshal(src, &v.value)
   293  }
   294  
   295  
   296  

View as plain text