...

Source file src/go.formulabun.club/translator/client/model_player_info_entry.go

Documentation: go.formulabun.club/translator/client

     1  /*
     2  Translator service between a srb2kart server and json
     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  // PlayerInfoEntry struct for PlayerInfoEntry
    18  type PlayerInfoEntry struct {
    19  	Node *float32 `json:"Node,omitempty"`
    20  	Name *string `json:"Name,omitempty"`
    21  	Address *string `json:"Address,omitempty"`
    22  	Team *float32 `json:"Team,omitempty"`
    23  	Skin *float32 `json:"Skin,omitempty"`
    24  	Data *float32 `json:"Data,omitempty"`
    25  	Score *float32 `json:"Score,omitempty"`
    26  	TimeInServer *float32 `json:"TimeInServer,omitempty"`
    27  }
    28  
    29  // NewPlayerInfoEntry instantiates a new PlayerInfoEntry object
    30  // This constructor will assign default values to properties that have it defined,
    31  // and makes sure properties required by API are set, but the set of arguments
    32  // will change when the set of required properties is changed
    33  func NewPlayerInfoEntry() *PlayerInfoEntry {
    34  	this := PlayerInfoEntry{}
    35  	return &this
    36  }
    37  
    38  // NewPlayerInfoEntryWithDefaults instantiates a new PlayerInfoEntry object
    39  // This constructor will only assign default values to properties that have it defined,
    40  // but it doesn't guarantee that properties required by API are set
    41  func NewPlayerInfoEntryWithDefaults() *PlayerInfoEntry {
    42  	this := PlayerInfoEntry{}
    43  	return &this
    44  }
    45  
    46  // GetNode returns the Node field value if set, zero value otherwise.
    47  func (o *PlayerInfoEntry) GetNode() float32 {
    48  	if o == nil || o.Node == nil {
    49  		var ret float32
    50  		return ret
    51  	}
    52  	return *o.Node
    53  }
    54  
    55  // GetNodeOk returns a tuple with the Node field value if set, nil otherwise
    56  // and a boolean to check if the value has been set.
    57  func (o *PlayerInfoEntry) GetNodeOk() (*float32, bool) {
    58  	if o == nil || o.Node == nil {
    59  		return nil, false
    60  	}
    61  	return o.Node, true
    62  }
    63  
    64  // HasNode returns a boolean if a field has been set.
    65  func (o *PlayerInfoEntry) HasNode() bool {
    66  	if o != nil && o.Node != nil {
    67  		return true
    68  	}
    69  
    70  	return false
    71  }
    72  
    73  // SetNode gets a reference to the given float32 and assigns it to the Node field.
    74  func (o *PlayerInfoEntry) SetNode(v float32) {
    75  	o.Node = &v
    76  }
    77  
    78  // GetName returns the Name field value if set, zero value otherwise.
    79  func (o *PlayerInfoEntry) GetName() string {
    80  	if o == nil || o.Name == nil {
    81  		var ret string
    82  		return ret
    83  	}
    84  	return *o.Name
    85  }
    86  
    87  // GetNameOk returns a tuple with the Name field value if set, nil otherwise
    88  // and a boolean to check if the value has been set.
    89  func (o *PlayerInfoEntry) GetNameOk() (*string, bool) {
    90  	if o == nil || o.Name == nil {
    91  		return nil, false
    92  	}
    93  	return o.Name, true
    94  }
    95  
    96  // HasName returns a boolean if a field has been set.
    97  func (o *PlayerInfoEntry) HasName() bool {
    98  	if o != nil && o.Name != nil {
    99  		return true
   100  	}
   101  
   102  	return false
   103  }
   104  
   105  // SetName gets a reference to the given string and assigns it to the Name field.
   106  func (o *PlayerInfoEntry) SetName(v string) {
   107  	o.Name = &v
   108  }
   109  
   110  // GetAddress returns the Address field value if set, zero value otherwise.
   111  func (o *PlayerInfoEntry) GetAddress() string {
   112  	if o == nil || o.Address == nil {
   113  		var ret string
   114  		return ret
   115  	}
   116  	return *o.Address
   117  }
   118  
   119  // GetAddressOk returns a tuple with the Address field value if set, nil otherwise
   120  // and a boolean to check if the value has been set.
   121  func (o *PlayerInfoEntry) GetAddressOk() (*string, bool) {
   122  	if o == nil || o.Address == nil {
   123  		return nil, false
   124  	}
   125  	return o.Address, true
   126  }
   127  
   128  // HasAddress returns a boolean if a field has been set.
   129  func (o *PlayerInfoEntry) HasAddress() bool {
   130  	if o != nil && o.Address != nil {
   131  		return true
   132  	}
   133  
   134  	return false
   135  }
   136  
   137  // SetAddress gets a reference to the given string and assigns it to the Address field.
   138  func (o *PlayerInfoEntry) SetAddress(v string) {
   139  	o.Address = &v
   140  }
   141  
   142  // GetTeam returns the Team field value if set, zero value otherwise.
   143  func (o *PlayerInfoEntry) GetTeam() float32 {
   144  	if o == nil || o.Team == nil {
   145  		var ret float32
   146  		return ret
   147  	}
   148  	return *o.Team
   149  }
   150  
   151  // GetTeamOk returns a tuple with the Team field value if set, nil otherwise
   152  // and a boolean to check if the value has been set.
   153  func (o *PlayerInfoEntry) GetTeamOk() (*float32, bool) {
   154  	if o == nil || o.Team == nil {
   155  		return nil, false
   156  	}
   157  	return o.Team, true
   158  }
   159  
   160  // HasTeam returns a boolean if a field has been set.
   161  func (o *PlayerInfoEntry) HasTeam() bool {
   162  	if o != nil && o.Team != nil {
   163  		return true
   164  	}
   165  
   166  	return false
   167  }
   168  
   169  // SetTeam gets a reference to the given float32 and assigns it to the Team field.
   170  func (o *PlayerInfoEntry) SetTeam(v float32) {
   171  	o.Team = &v
   172  }
   173  
   174  // GetSkin returns the Skin field value if set, zero value otherwise.
   175  func (o *PlayerInfoEntry) GetSkin() float32 {
   176  	if o == nil || o.Skin == nil {
   177  		var ret float32
   178  		return ret
   179  	}
   180  	return *o.Skin
   181  }
   182  
   183  // GetSkinOk returns a tuple with the Skin field value if set, nil otherwise
   184  // and a boolean to check if the value has been set.
   185  func (o *PlayerInfoEntry) GetSkinOk() (*float32, bool) {
   186  	if o == nil || o.Skin == nil {
   187  		return nil, false
   188  	}
   189  	return o.Skin, true
   190  }
   191  
   192  // HasSkin returns a boolean if a field has been set.
   193  func (o *PlayerInfoEntry) HasSkin() bool {
   194  	if o != nil && o.Skin != nil {
   195  		return true
   196  	}
   197  
   198  	return false
   199  }
   200  
   201  // SetSkin gets a reference to the given float32 and assigns it to the Skin field.
   202  func (o *PlayerInfoEntry) SetSkin(v float32) {
   203  	o.Skin = &v
   204  }
   205  
   206  // GetData returns the Data field value if set, zero value otherwise.
   207  func (o *PlayerInfoEntry) GetData() float32 {
   208  	if o == nil || o.Data == nil {
   209  		var ret float32
   210  		return ret
   211  	}
   212  	return *o.Data
   213  }
   214  
   215  // GetDataOk returns a tuple with the Data field value if set, nil otherwise
   216  // and a boolean to check if the value has been set.
   217  func (o *PlayerInfoEntry) GetDataOk() (*float32, bool) {
   218  	if o == nil || o.Data == nil {
   219  		return nil, false
   220  	}
   221  	return o.Data, true
   222  }
   223  
   224  // HasData returns a boolean if a field has been set.
   225  func (o *PlayerInfoEntry) HasData() bool {
   226  	if o != nil && o.Data != nil {
   227  		return true
   228  	}
   229  
   230  	return false
   231  }
   232  
   233  // SetData gets a reference to the given float32 and assigns it to the Data field.
   234  func (o *PlayerInfoEntry) SetData(v float32) {
   235  	o.Data = &v
   236  }
   237  
   238  // GetScore returns the Score field value if set, zero value otherwise.
   239  func (o *PlayerInfoEntry) GetScore() float32 {
   240  	if o == nil || o.Score == nil {
   241  		var ret float32
   242  		return ret
   243  	}
   244  	return *o.Score
   245  }
   246  
   247  // GetScoreOk returns a tuple with the Score field value if set, nil otherwise
   248  // and a boolean to check if the value has been set.
   249  func (o *PlayerInfoEntry) GetScoreOk() (*float32, bool) {
   250  	if o == nil || o.Score == nil {
   251  		return nil, false
   252  	}
   253  	return o.Score, true
   254  }
   255  
   256  // HasScore returns a boolean if a field has been set.
   257  func (o *PlayerInfoEntry) HasScore() bool {
   258  	if o != nil && o.Score != nil {
   259  		return true
   260  	}
   261  
   262  	return false
   263  }
   264  
   265  // SetScore gets a reference to the given float32 and assigns it to the Score field.
   266  func (o *PlayerInfoEntry) SetScore(v float32) {
   267  	o.Score = &v
   268  }
   269  
   270  // GetTimeInServer returns the TimeInServer field value if set, zero value otherwise.
   271  func (o *PlayerInfoEntry) GetTimeInServer() float32 {
   272  	if o == nil || o.TimeInServer == nil {
   273  		var ret float32
   274  		return ret
   275  	}
   276  	return *o.TimeInServer
   277  }
   278  
   279  // GetTimeInServerOk returns a tuple with the TimeInServer field value if set, nil otherwise
   280  // and a boolean to check if the value has been set.
   281  func (o *PlayerInfoEntry) GetTimeInServerOk() (*float32, bool) {
   282  	if o == nil || o.TimeInServer == nil {
   283  		return nil, false
   284  	}
   285  	return o.TimeInServer, true
   286  }
   287  
   288  // HasTimeInServer returns a boolean if a field has been set.
   289  func (o *PlayerInfoEntry) HasTimeInServer() bool {
   290  	if o != nil && o.TimeInServer != nil {
   291  		return true
   292  	}
   293  
   294  	return false
   295  }
   296  
   297  // SetTimeInServer gets a reference to the given float32 and assigns it to the TimeInServer field.
   298  func (o *PlayerInfoEntry) SetTimeInServer(v float32) {
   299  	o.TimeInServer = &v
   300  }
   301  
   302  func (o PlayerInfoEntry) MarshalJSON() ([]byte, error) {
   303  	toSerialize := map[string]interface{}{}
   304  	if o.Node != nil {
   305  		toSerialize["Node"] = o.Node
   306  	}
   307  	if o.Name != nil {
   308  		toSerialize["Name"] = o.Name
   309  	}
   310  	if o.Address != nil {
   311  		toSerialize["Address"] = o.Address
   312  	}
   313  	if o.Team != nil {
   314  		toSerialize["Team"] = o.Team
   315  	}
   316  	if o.Skin != nil {
   317  		toSerialize["Skin"] = o.Skin
   318  	}
   319  	if o.Data != nil {
   320  		toSerialize["Data"] = o.Data
   321  	}
   322  	if o.Score != nil {
   323  		toSerialize["Score"] = o.Score
   324  	}
   325  	if o.TimeInServer != nil {
   326  		toSerialize["TimeInServer"] = o.TimeInServer
   327  	}
   328  	return json.Marshal(toSerialize)
   329  }
   330  
   331  type NullablePlayerInfoEntry struct {
   332  	value *PlayerInfoEntry
   333  	isSet bool
   334  }
   335  
   336  func (v NullablePlayerInfoEntry) Get() *PlayerInfoEntry {
   337  	return v.value
   338  }
   339  
   340  func (v *NullablePlayerInfoEntry) Set(val *PlayerInfoEntry) {
   341  	v.value = val
   342  	v.isSet = true
   343  }
   344  
   345  func (v NullablePlayerInfoEntry) IsSet() bool {
   346  	return v.isSet
   347  }
   348  
   349  func (v *NullablePlayerInfoEntry) Unset() {
   350  	v.value = nil
   351  	v.isSet = false
   352  }
   353  
   354  func NewNullablePlayerInfoEntry(val *PlayerInfoEntry) *NullablePlayerInfoEntry {
   355  	return &NullablePlayerInfoEntry{value: val, isSet: true}
   356  }
   357  
   358  func (v NullablePlayerInfoEntry) MarshalJSON() ([]byte, error) {
   359  	return json.Marshal(v.value)
   360  }
   361  
   362  func (v *NullablePlayerInfoEntry) UnmarshalJSON(src []byte) error {
   363  	v.isSet = true
   364  	return json.Unmarshal(src, &v.value)
   365  }
   366  
   367  
   368  

View as plain text