github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_participant.go (about)

     1  /*
     2   * Cios Openapi
     3   *
     4   * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
     5   *
     6   * API version: 1.0.1
     7   */
     8  
     9  // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
    10  
    11  package cios
    12  
    13  import (
    14  	"encoding/json"
    15  )
    16  
    17  // Participant struct for Participant
    18  type Participant struct {
    19  	ParticipantId *string `json:"participant_id,omitempty"`
    20  	Token *string `json:"token,omitempty"`
    21  	Expires *int32 `json:"expires,omitempty"`
    22  	Target *int32 `json:"target,omitempty"`
    23  	Used *int32 `json:"used,omitempty"`
    24  }
    25  
    26  // NewParticipant instantiates a new Participant object
    27  // This constructor will assign default values to properties that have it defined,
    28  // and makes sure properties required by API are set, but the set of arguments
    29  // will change when the set of required properties is changed
    30  func NewParticipant() *Participant {
    31  	this := Participant{}
    32  	return &this
    33  }
    34  
    35  // NewParticipantWithDefaults instantiates a new Participant object
    36  // This constructor will only assign default values to properties that have it defined,
    37  // but it doesn't guarantee that properties required by API are set
    38  func NewParticipantWithDefaults() *Participant {
    39  	this := Participant{}
    40  	return &this
    41  }
    42  
    43  // GetParticipantId returns the ParticipantId field value if set, zero value otherwise.
    44  func (o *Participant) GetParticipantId() string {
    45  	if o == nil || o.ParticipantId == nil {
    46  		var ret string
    47  		return ret
    48  	}
    49  	return *o.ParticipantId
    50  }
    51  
    52  // GetParticipantIdOk returns a tuple with the ParticipantId field value if set, nil otherwise
    53  // and a boolean to check if the value has been set.
    54  func (o *Participant) GetParticipantIdOk() (*string, bool) {
    55  	if o == nil || o.ParticipantId == nil {
    56  		return nil, false
    57  	}
    58  	return o.ParticipantId, true
    59  }
    60  
    61  // HasParticipantId returns a boolean if a field has been set.
    62  func (o *Participant) HasParticipantId() bool {
    63  	if o != nil && o.ParticipantId != nil {
    64  		return true
    65  	}
    66  
    67  	return false
    68  }
    69  
    70  // SetParticipantId gets a reference to the given string and assigns it to the ParticipantId field.
    71  func (o *Participant) SetParticipantId(v string) {
    72  	o.ParticipantId = &v
    73  }
    74  
    75  // GetToken returns the Token field value if set, zero value otherwise.
    76  func (o *Participant) GetToken() string {
    77  	if o == nil || o.Token == nil {
    78  		var ret string
    79  		return ret
    80  	}
    81  	return *o.Token
    82  }
    83  
    84  // GetTokenOk returns a tuple with the Token field value if set, nil otherwise
    85  // and a boolean to check if the value has been set.
    86  func (o *Participant) GetTokenOk() (*string, bool) {
    87  	if o == nil || o.Token == nil {
    88  		return nil, false
    89  	}
    90  	return o.Token, true
    91  }
    92  
    93  // HasToken returns a boolean if a field has been set.
    94  func (o *Participant) HasToken() bool {
    95  	if o != nil && o.Token != nil {
    96  		return true
    97  	}
    98  
    99  	return false
   100  }
   101  
   102  // SetToken gets a reference to the given string and assigns it to the Token field.
   103  func (o *Participant) SetToken(v string) {
   104  	o.Token = &v
   105  }
   106  
   107  // GetExpires returns the Expires field value if set, zero value otherwise.
   108  func (o *Participant) GetExpires() int32 {
   109  	if o == nil || o.Expires == nil {
   110  		var ret int32
   111  		return ret
   112  	}
   113  	return *o.Expires
   114  }
   115  
   116  // GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise
   117  // and a boolean to check if the value has been set.
   118  func (o *Participant) GetExpiresOk() (*int32, bool) {
   119  	if o == nil || o.Expires == nil {
   120  		return nil, false
   121  	}
   122  	return o.Expires, true
   123  }
   124  
   125  // HasExpires returns a boolean if a field has been set.
   126  func (o *Participant) HasExpires() bool {
   127  	if o != nil && o.Expires != nil {
   128  		return true
   129  	}
   130  
   131  	return false
   132  }
   133  
   134  // SetExpires gets a reference to the given int32 and assigns it to the Expires field.
   135  func (o *Participant) SetExpires(v int32) {
   136  	o.Expires = &v
   137  }
   138  
   139  // GetTarget returns the Target field value if set, zero value otherwise.
   140  func (o *Participant) GetTarget() int32 {
   141  	if o == nil || o.Target == nil {
   142  		var ret int32
   143  		return ret
   144  	}
   145  	return *o.Target
   146  }
   147  
   148  // GetTargetOk returns a tuple with the Target field value if set, nil otherwise
   149  // and a boolean to check if the value has been set.
   150  func (o *Participant) GetTargetOk() (*int32, bool) {
   151  	if o == nil || o.Target == nil {
   152  		return nil, false
   153  	}
   154  	return o.Target, true
   155  }
   156  
   157  // HasTarget returns a boolean if a field has been set.
   158  func (o *Participant) HasTarget() bool {
   159  	if o != nil && o.Target != nil {
   160  		return true
   161  	}
   162  
   163  	return false
   164  }
   165  
   166  // SetTarget gets a reference to the given int32 and assigns it to the Target field.
   167  func (o *Participant) SetTarget(v int32) {
   168  	o.Target = &v
   169  }
   170  
   171  // GetUsed returns the Used field value if set, zero value otherwise.
   172  func (o *Participant) GetUsed() int32 {
   173  	if o == nil || o.Used == nil {
   174  		var ret int32
   175  		return ret
   176  	}
   177  	return *o.Used
   178  }
   179  
   180  // GetUsedOk returns a tuple with the Used field value if set, nil otherwise
   181  // and a boolean to check if the value has been set.
   182  func (o *Participant) GetUsedOk() (*int32, bool) {
   183  	if o == nil || o.Used == nil {
   184  		return nil, false
   185  	}
   186  	return o.Used, true
   187  }
   188  
   189  // HasUsed returns a boolean if a field has been set.
   190  func (o *Participant) HasUsed() bool {
   191  	if o != nil && o.Used != nil {
   192  		return true
   193  	}
   194  
   195  	return false
   196  }
   197  
   198  // SetUsed gets a reference to the given int32 and assigns it to the Used field.
   199  func (o *Participant) SetUsed(v int32) {
   200  	o.Used = &v
   201  }
   202  
   203  func (o Participant) MarshalJSON() ([]byte, error) {
   204  	toSerialize := map[string]interface{}{}
   205  	if o.ParticipantId != nil {
   206  		toSerialize["participant_id"] = o.ParticipantId
   207  	}
   208  	if o.Token != nil {
   209  		toSerialize["token"] = o.Token
   210  	}
   211  	if o.Expires != nil {
   212  		toSerialize["expires"] = o.Expires
   213  	}
   214  	if o.Target != nil {
   215  		toSerialize["target"] = o.Target
   216  	}
   217  	if o.Used != nil {
   218  		toSerialize["used"] = o.Used
   219  	}
   220  	return json.Marshal(toSerialize)
   221  }
   222  
   223  type NullableParticipant struct {
   224  	value *Participant
   225  	isSet bool
   226  }
   227  
   228  func (v NullableParticipant) Get() *Participant {
   229  	return v.value
   230  }
   231  
   232  func (v *NullableParticipant) Set(val *Participant) {
   233  	v.value = val
   234  	v.isSet = true
   235  }
   236  
   237  func (v NullableParticipant) IsSet() bool {
   238  	return v.isSet
   239  }
   240  
   241  func (v *NullableParticipant) Unset() {
   242  	v.value = nil
   243  	v.isSet = false
   244  }
   245  
   246  func NewNullableParticipant(val *Participant) *NullableParticipant {
   247  	return &NullableParticipant{value: val, isSet: true}
   248  }
   249  
   250  func (v NullableParticipant) MarshalJSON() ([]byte, error) {
   251  	return json.Marshal(v.value)
   252  }
   253  
   254  func (v *NullableParticipant) UnmarshalJSON(src []byte) error {
   255  	v.isSet = true
   256  	return json.Unmarshal(src, &v.value)
   257  }
   258  
   259