github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_contract_user.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  // ContractUser struct for ContractUser
    18  type ContractUser struct {
    19  	Id *string `json:"id,omitempty"`
    20  	Type *string `json:"type,omitempty"`
    21  	Name *string `json:"name,omitempty"`
    22  	FamilyName *string `json:"family_name,omitempty"`
    23  	GivenName *string `json:"given_name,omitempty"`
    24  	PhoneticFamilyName *string `json:"phonetic_family_name,omitempty"`
    25  	PhoneticGivenName *string `json:"phonetic_given_name,omitempty"`
    26  	PhoneNumber *string `json:"phone_number,omitempty"`
    27  	PhoneNumber2 *string `json:"phone_number_2,omitempty"`
    28  	// ISO639
    29  	Language *string `json:"language,omitempty"`
    30  	// uri
    31  	Picture *string `json:"picture,omitempty"`
    32  	Email *string `json:"email,omitempty"`
    33  	Emails *[]string `json:"emails,omitempty"`
    34  	Role *string `json:"role,omitempty"`
    35  	Category *string `json:"category,omitempty"`
    36  	Address *ContractOwnerAddress `json:"address,omitempty"`
    37  	License *ContractUserLicense `json:"license,omitempty"`
    38  }
    39  
    40  // NewContractUser instantiates a new ContractUser object
    41  // This constructor will assign default values to properties that have it defined,
    42  // and makes sure properties required by API are set, but the set of arguments
    43  // will change when the set of required properties is changed
    44  func NewContractUser() *ContractUser {
    45  	this := ContractUser{}
    46  	return &this
    47  }
    48  
    49  // NewContractUserWithDefaults instantiates a new ContractUser object
    50  // This constructor will only assign default values to properties that have it defined,
    51  // but it doesn't guarantee that properties required by API are set
    52  func NewContractUserWithDefaults() *ContractUser {
    53  	this := ContractUser{}
    54  	return &this
    55  }
    56  
    57  // GetId returns the Id field value if set, zero value otherwise.
    58  func (o *ContractUser) GetId() string {
    59  	if o == nil || o.Id == nil {
    60  		var ret string
    61  		return ret
    62  	}
    63  	return *o.Id
    64  }
    65  
    66  // GetIdOk returns a tuple with the Id field value if set, nil otherwise
    67  // and a boolean to check if the value has been set.
    68  func (o *ContractUser) GetIdOk() (*string, bool) {
    69  	if o == nil || o.Id == nil {
    70  		return nil, false
    71  	}
    72  	return o.Id, true
    73  }
    74  
    75  // HasId returns a boolean if a field has been set.
    76  func (o *ContractUser) HasId() bool {
    77  	if o != nil && o.Id != nil {
    78  		return true
    79  	}
    80  
    81  	return false
    82  }
    83  
    84  // SetId gets a reference to the given string and assigns it to the Id field.
    85  func (o *ContractUser) SetId(v string) {
    86  	o.Id = &v
    87  }
    88  
    89  // GetType returns the Type field value if set, zero value otherwise.
    90  func (o *ContractUser) GetType() string {
    91  	if o == nil || o.Type == nil {
    92  		var ret string
    93  		return ret
    94  	}
    95  	return *o.Type
    96  }
    97  
    98  // GetTypeOk returns a tuple with the Type field value if set, nil otherwise
    99  // and a boolean to check if the value has been set.
   100  func (o *ContractUser) GetTypeOk() (*string, bool) {
   101  	if o == nil || o.Type == nil {
   102  		return nil, false
   103  	}
   104  	return o.Type, true
   105  }
   106  
   107  // HasType returns a boolean if a field has been set.
   108  func (o *ContractUser) HasType() bool {
   109  	if o != nil && o.Type != nil {
   110  		return true
   111  	}
   112  
   113  	return false
   114  }
   115  
   116  // SetType gets a reference to the given string and assigns it to the Type field.
   117  func (o *ContractUser) SetType(v string) {
   118  	o.Type = &v
   119  }
   120  
   121  // GetName returns the Name field value if set, zero value otherwise.
   122  func (o *ContractUser) GetName() string {
   123  	if o == nil || o.Name == nil {
   124  		var ret string
   125  		return ret
   126  	}
   127  	return *o.Name
   128  }
   129  
   130  // GetNameOk returns a tuple with the Name field value if set, nil otherwise
   131  // and a boolean to check if the value has been set.
   132  func (o *ContractUser) GetNameOk() (*string, bool) {
   133  	if o == nil || o.Name == nil {
   134  		return nil, false
   135  	}
   136  	return o.Name, true
   137  }
   138  
   139  // HasName returns a boolean if a field has been set.
   140  func (o *ContractUser) HasName() bool {
   141  	if o != nil && o.Name != nil {
   142  		return true
   143  	}
   144  
   145  	return false
   146  }
   147  
   148  // SetName gets a reference to the given string and assigns it to the Name field.
   149  func (o *ContractUser) SetName(v string) {
   150  	o.Name = &v
   151  }
   152  
   153  // GetFamilyName returns the FamilyName field value if set, zero value otherwise.
   154  func (o *ContractUser) GetFamilyName() string {
   155  	if o == nil || o.FamilyName == nil {
   156  		var ret string
   157  		return ret
   158  	}
   159  	return *o.FamilyName
   160  }
   161  
   162  // GetFamilyNameOk returns a tuple with the FamilyName field value if set, nil otherwise
   163  // and a boolean to check if the value has been set.
   164  func (o *ContractUser) GetFamilyNameOk() (*string, bool) {
   165  	if o == nil || o.FamilyName == nil {
   166  		return nil, false
   167  	}
   168  	return o.FamilyName, true
   169  }
   170  
   171  // HasFamilyName returns a boolean if a field has been set.
   172  func (o *ContractUser) HasFamilyName() bool {
   173  	if o != nil && o.FamilyName != nil {
   174  		return true
   175  	}
   176  
   177  	return false
   178  }
   179  
   180  // SetFamilyName gets a reference to the given string and assigns it to the FamilyName field.
   181  func (o *ContractUser) SetFamilyName(v string) {
   182  	o.FamilyName = &v
   183  }
   184  
   185  // GetGivenName returns the GivenName field value if set, zero value otherwise.
   186  func (o *ContractUser) GetGivenName() string {
   187  	if o == nil || o.GivenName == nil {
   188  		var ret string
   189  		return ret
   190  	}
   191  	return *o.GivenName
   192  }
   193  
   194  // GetGivenNameOk returns a tuple with the GivenName field value if set, nil otherwise
   195  // and a boolean to check if the value has been set.
   196  func (o *ContractUser) GetGivenNameOk() (*string, bool) {
   197  	if o == nil || o.GivenName == nil {
   198  		return nil, false
   199  	}
   200  	return o.GivenName, true
   201  }
   202  
   203  // HasGivenName returns a boolean if a field has been set.
   204  func (o *ContractUser) HasGivenName() bool {
   205  	if o != nil && o.GivenName != nil {
   206  		return true
   207  	}
   208  
   209  	return false
   210  }
   211  
   212  // SetGivenName gets a reference to the given string and assigns it to the GivenName field.
   213  func (o *ContractUser) SetGivenName(v string) {
   214  	o.GivenName = &v
   215  }
   216  
   217  // GetPhoneticFamilyName returns the PhoneticFamilyName field value if set, zero value otherwise.
   218  func (o *ContractUser) GetPhoneticFamilyName() string {
   219  	if o == nil || o.PhoneticFamilyName == nil {
   220  		var ret string
   221  		return ret
   222  	}
   223  	return *o.PhoneticFamilyName
   224  }
   225  
   226  // GetPhoneticFamilyNameOk returns a tuple with the PhoneticFamilyName field value if set, nil otherwise
   227  // and a boolean to check if the value has been set.
   228  func (o *ContractUser) GetPhoneticFamilyNameOk() (*string, bool) {
   229  	if o == nil || o.PhoneticFamilyName == nil {
   230  		return nil, false
   231  	}
   232  	return o.PhoneticFamilyName, true
   233  }
   234  
   235  // HasPhoneticFamilyName returns a boolean if a field has been set.
   236  func (o *ContractUser) HasPhoneticFamilyName() bool {
   237  	if o != nil && o.PhoneticFamilyName != nil {
   238  		return true
   239  	}
   240  
   241  	return false
   242  }
   243  
   244  // SetPhoneticFamilyName gets a reference to the given string and assigns it to the PhoneticFamilyName field.
   245  func (o *ContractUser) SetPhoneticFamilyName(v string) {
   246  	o.PhoneticFamilyName = &v
   247  }
   248  
   249  // GetPhoneticGivenName returns the PhoneticGivenName field value if set, zero value otherwise.
   250  func (o *ContractUser) GetPhoneticGivenName() string {
   251  	if o == nil || o.PhoneticGivenName == nil {
   252  		var ret string
   253  		return ret
   254  	}
   255  	return *o.PhoneticGivenName
   256  }
   257  
   258  // GetPhoneticGivenNameOk returns a tuple with the PhoneticGivenName field value if set, nil otherwise
   259  // and a boolean to check if the value has been set.
   260  func (o *ContractUser) GetPhoneticGivenNameOk() (*string, bool) {
   261  	if o == nil || o.PhoneticGivenName == nil {
   262  		return nil, false
   263  	}
   264  	return o.PhoneticGivenName, true
   265  }
   266  
   267  // HasPhoneticGivenName returns a boolean if a field has been set.
   268  func (o *ContractUser) HasPhoneticGivenName() bool {
   269  	if o != nil && o.PhoneticGivenName != nil {
   270  		return true
   271  	}
   272  
   273  	return false
   274  }
   275  
   276  // SetPhoneticGivenName gets a reference to the given string and assigns it to the PhoneticGivenName field.
   277  func (o *ContractUser) SetPhoneticGivenName(v string) {
   278  	o.PhoneticGivenName = &v
   279  }
   280  
   281  // GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise.
   282  func (o *ContractUser) GetPhoneNumber() string {
   283  	if o == nil || o.PhoneNumber == nil {
   284  		var ret string
   285  		return ret
   286  	}
   287  	return *o.PhoneNumber
   288  }
   289  
   290  // GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise
   291  // and a boolean to check if the value has been set.
   292  func (o *ContractUser) GetPhoneNumberOk() (*string, bool) {
   293  	if o == nil || o.PhoneNumber == nil {
   294  		return nil, false
   295  	}
   296  	return o.PhoneNumber, true
   297  }
   298  
   299  // HasPhoneNumber returns a boolean if a field has been set.
   300  func (o *ContractUser) HasPhoneNumber() bool {
   301  	if o != nil && o.PhoneNumber != nil {
   302  		return true
   303  	}
   304  
   305  	return false
   306  }
   307  
   308  // SetPhoneNumber gets a reference to the given string and assigns it to the PhoneNumber field.
   309  func (o *ContractUser) SetPhoneNumber(v string) {
   310  	o.PhoneNumber = &v
   311  }
   312  
   313  // GetPhoneNumber2 returns the PhoneNumber2 field value if set, zero value otherwise.
   314  func (o *ContractUser) GetPhoneNumber2() string {
   315  	if o == nil || o.PhoneNumber2 == nil {
   316  		var ret string
   317  		return ret
   318  	}
   319  	return *o.PhoneNumber2
   320  }
   321  
   322  // GetPhoneNumber2Ok returns a tuple with the PhoneNumber2 field value if set, nil otherwise
   323  // and a boolean to check if the value has been set.
   324  func (o *ContractUser) GetPhoneNumber2Ok() (*string, bool) {
   325  	if o == nil || o.PhoneNumber2 == nil {
   326  		return nil, false
   327  	}
   328  	return o.PhoneNumber2, true
   329  }
   330  
   331  // HasPhoneNumber2 returns a boolean if a field has been set.
   332  func (o *ContractUser) HasPhoneNumber2() bool {
   333  	if o != nil && o.PhoneNumber2 != nil {
   334  		return true
   335  	}
   336  
   337  	return false
   338  }
   339  
   340  // SetPhoneNumber2 gets a reference to the given string and assigns it to the PhoneNumber2 field.
   341  func (o *ContractUser) SetPhoneNumber2(v string) {
   342  	o.PhoneNumber2 = &v
   343  }
   344  
   345  // GetLanguage returns the Language field value if set, zero value otherwise.
   346  func (o *ContractUser) GetLanguage() string {
   347  	if o == nil || o.Language == nil {
   348  		var ret string
   349  		return ret
   350  	}
   351  	return *o.Language
   352  }
   353  
   354  // GetLanguageOk returns a tuple with the Language field value if set, nil otherwise
   355  // and a boolean to check if the value has been set.
   356  func (o *ContractUser) GetLanguageOk() (*string, bool) {
   357  	if o == nil || o.Language == nil {
   358  		return nil, false
   359  	}
   360  	return o.Language, true
   361  }
   362  
   363  // HasLanguage returns a boolean if a field has been set.
   364  func (o *ContractUser) HasLanguage() bool {
   365  	if o != nil && o.Language != nil {
   366  		return true
   367  	}
   368  
   369  	return false
   370  }
   371  
   372  // SetLanguage gets a reference to the given string and assigns it to the Language field.
   373  func (o *ContractUser) SetLanguage(v string) {
   374  	o.Language = &v
   375  }
   376  
   377  // GetPicture returns the Picture field value if set, zero value otherwise.
   378  func (o *ContractUser) GetPicture() string {
   379  	if o == nil || o.Picture == nil {
   380  		var ret string
   381  		return ret
   382  	}
   383  	return *o.Picture
   384  }
   385  
   386  // GetPictureOk returns a tuple with the Picture field value if set, nil otherwise
   387  // and a boolean to check if the value has been set.
   388  func (o *ContractUser) GetPictureOk() (*string, bool) {
   389  	if o == nil || o.Picture == nil {
   390  		return nil, false
   391  	}
   392  	return o.Picture, true
   393  }
   394  
   395  // HasPicture returns a boolean if a field has been set.
   396  func (o *ContractUser) HasPicture() bool {
   397  	if o != nil && o.Picture != nil {
   398  		return true
   399  	}
   400  
   401  	return false
   402  }
   403  
   404  // SetPicture gets a reference to the given string and assigns it to the Picture field.
   405  func (o *ContractUser) SetPicture(v string) {
   406  	o.Picture = &v
   407  }
   408  
   409  // GetEmail returns the Email field value if set, zero value otherwise.
   410  func (o *ContractUser) GetEmail() string {
   411  	if o == nil || o.Email == nil {
   412  		var ret string
   413  		return ret
   414  	}
   415  	return *o.Email
   416  }
   417  
   418  // GetEmailOk returns a tuple with the Email field value if set, nil otherwise
   419  // and a boolean to check if the value has been set.
   420  func (o *ContractUser) GetEmailOk() (*string, bool) {
   421  	if o == nil || o.Email == nil {
   422  		return nil, false
   423  	}
   424  	return o.Email, true
   425  }
   426  
   427  // HasEmail returns a boolean if a field has been set.
   428  func (o *ContractUser) HasEmail() bool {
   429  	if o != nil && o.Email != nil {
   430  		return true
   431  	}
   432  
   433  	return false
   434  }
   435  
   436  // SetEmail gets a reference to the given string and assigns it to the Email field.
   437  func (o *ContractUser) SetEmail(v string) {
   438  	o.Email = &v
   439  }
   440  
   441  // GetEmails returns the Emails field value if set, zero value otherwise.
   442  func (o *ContractUser) GetEmails() []string {
   443  	if o == nil || o.Emails == nil {
   444  		var ret []string
   445  		return ret
   446  	}
   447  	return *o.Emails
   448  }
   449  
   450  // GetEmailsOk returns a tuple with the Emails field value if set, nil otherwise
   451  // and a boolean to check if the value has been set.
   452  func (o *ContractUser) GetEmailsOk() (*[]string, bool) {
   453  	if o == nil || o.Emails == nil {
   454  		return nil, false
   455  	}
   456  	return o.Emails, true
   457  }
   458  
   459  // HasEmails returns a boolean if a field has been set.
   460  func (o *ContractUser) HasEmails() bool {
   461  	if o != nil && o.Emails != nil {
   462  		return true
   463  	}
   464  
   465  	return false
   466  }
   467  
   468  // SetEmails gets a reference to the given []string and assigns it to the Emails field.
   469  func (o *ContractUser) SetEmails(v []string) {
   470  	o.Emails = &v
   471  }
   472  
   473  // GetRole returns the Role field value if set, zero value otherwise.
   474  func (o *ContractUser) GetRole() string {
   475  	if o == nil || o.Role == nil {
   476  		var ret string
   477  		return ret
   478  	}
   479  	return *o.Role
   480  }
   481  
   482  // GetRoleOk returns a tuple with the Role field value if set, nil otherwise
   483  // and a boolean to check if the value has been set.
   484  func (o *ContractUser) GetRoleOk() (*string, bool) {
   485  	if o == nil || o.Role == nil {
   486  		return nil, false
   487  	}
   488  	return o.Role, true
   489  }
   490  
   491  // HasRole returns a boolean if a field has been set.
   492  func (o *ContractUser) HasRole() bool {
   493  	if o != nil && o.Role != nil {
   494  		return true
   495  	}
   496  
   497  	return false
   498  }
   499  
   500  // SetRole gets a reference to the given string and assigns it to the Role field.
   501  func (o *ContractUser) SetRole(v string) {
   502  	o.Role = &v
   503  }
   504  
   505  // GetCategory returns the Category field value if set, zero value otherwise.
   506  func (o *ContractUser) GetCategory() string {
   507  	if o == nil || o.Category == nil {
   508  		var ret string
   509  		return ret
   510  	}
   511  	return *o.Category
   512  }
   513  
   514  // GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
   515  // and a boolean to check if the value has been set.
   516  func (o *ContractUser) GetCategoryOk() (*string, bool) {
   517  	if o == nil || o.Category == nil {
   518  		return nil, false
   519  	}
   520  	return o.Category, true
   521  }
   522  
   523  // HasCategory returns a boolean if a field has been set.
   524  func (o *ContractUser) HasCategory() bool {
   525  	if o != nil && o.Category != nil {
   526  		return true
   527  	}
   528  
   529  	return false
   530  }
   531  
   532  // SetCategory gets a reference to the given string and assigns it to the Category field.
   533  func (o *ContractUser) SetCategory(v string) {
   534  	o.Category = &v
   535  }
   536  
   537  // GetAddress returns the Address field value if set, zero value otherwise.
   538  func (o *ContractUser) GetAddress() ContractOwnerAddress {
   539  	if o == nil || o.Address == nil {
   540  		var ret ContractOwnerAddress
   541  		return ret
   542  	}
   543  	return *o.Address
   544  }
   545  
   546  // GetAddressOk returns a tuple with the Address field value if set, nil otherwise
   547  // and a boolean to check if the value has been set.
   548  func (o *ContractUser) GetAddressOk() (*ContractOwnerAddress, bool) {
   549  	if o == nil || o.Address == nil {
   550  		return nil, false
   551  	}
   552  	return o.Address, true
   553  }
   554  
   555  // HasAddress returns a boolean if a field has been set.
   556  func (o *ContractUser) HasAddress() bool {
   557  	if o != nil && o.Address != nil {
   558  		return true
   559  	}
   560  
   561  	return false
   562  }
   563  
   564  // SetAddress gets a reference to the given ContractOwnerAddress and assigns it to the Address field.
   565  func (o *ContractUser) SetAddress(v ContractOwnerAddress) {
   566  	o.Address = &v
   567  }
   568  
   569  // GetLicense returns the License field value if set, zero value otherwise.
   570  func (o *ContractUser) GetLicense() ContractUserLicense {
   571  	if o == nil || o.License == nil {
   572  		var ret ContractUserLicense
   573  		return ret
   574  	}
   575  	return *o.License
   576  }
   577  
   578  // GetLicenseOk returns a tuple with the License field value if set, nil otherwise
   579  // and a boolean to check if the value has been set.
   580  func (o *ContractUser) GetLicenseOk() (*ContractUserLicense, bool) {
   581  	if o == nil || o.License == nil {
   582  		return nil, false
   583  	}
   584  	return o.License, true
   585  }
   586  
   587  // HasLicense returns a boolean if a field has been set.
   588  func (o *ContractUser) HasLicense() bool {
   589  	if o != nil && o.License != nil {
   590  		return true
   591  	}
   592  
   593  	return false
   594  }
   595  
   596  // SetLicense gets a reference to the given ContractUserLicense and assigns it to the License field.
   597  func (o *ContractUser) SetLicense(v ContractUserLicense) {
   598  	o.License = &v
   599  }
   600  
   601  func (o ContractUser) MarshalJSON() ([]byte, error) {
   602  	toSerialize := map[string]interface{}{}
   603  	if o.Id != nil {
   604  		toSerialize["id"] = o.Id
   605  	}
   606  	if o.Type != nil {
   607  		toSerialize["type"] = o.Type
   608  	}
   609  	if o.Name != nil {
   610  		toSerialize["name"] = o.Name
   611  	}
   612  	if o.FamilyName != nil {
   613  		toSerialize["family_name"] = o.FamilyName
   614  	}
   615  	if o.GivenName != nil {
   616  		toSerialize["given_name"] = o.GivenName
   617  	}
   618  	if o.PhoneticFamilyName != nil {
   619  		toSerialize["phonetic_family_name"] = o.PhoneticFamilyName
   620  	}
   621  	if o.PhoneticGivenName != nil {
   622  		toSerialize["phonetic_given_name"] = o.PhoneticGivenName
   623  	}
   624  	if o.PhoneNumber != nil {
   625  		toSerialize["phone_number"] = o.PhoneNumber
   626  	}
   627  	if o.PhoneNumber2 != nil {
   628  		toSerialize["phone_number_2"] = o.PhoneNumber2
   629  	}
   630  	if o.Language != nil {
   631  		toSerialize["language"] = o.Language
   632  	}
   633  	if o.Picture != nil {
   634  		toSerialize["picture"] = o.Picture
   635  	}
   636  	if o.Email != nil {
   637  		toSerialize["email"] = o.Email
   638  	}
   639  	if o.Emails != nil {
   640  		toSerialize["emails"] = o.Emails
   641  	}
   642  	if o.Role != nil {
   643  		toSerialize["role"] = o.Role
   644  	}
   645  	if o.Category != nil {
   646  		toSerialize["category"] = o.Category
   647  	}
   648  	if o.Address != nil {
   649  		toSerialize["address"] = o.Address
   650  	}
   651  	if o.License != nil {
   652  		toSerialize["license"] = o.License
   653  	}
   654  	return json.Marshal(toSerialize)
   655  }
   656  
   657  type NullableContractUser struct {
   658  	value *ContractUser
   659  	isSet bool
   660  }
   661  
   662  func (v NullableContractUser) Get() *ContractUser {
   663  	return v.value
   664  }
   665  
   666  func (v *NullableContractUser) Set(val *ContractUser) {
   667  	v.value = val
   668  	v.isSet = true
   669  }
   670  
   671  func (v NullableContractUser) IsSet() bool {
   672  	return v.isSet
   673  }
   674  
   675  func (v *NullableContractUser) Unset() {
   676  	v.value = nil
   677  	v.isSet = false
   678  }
   679  
   680  func NewNullableContractUser(val *ContractUser) *NullableContractUser {
   681  	return &NullableContractUser{value: val, isSet: true}
   682  }
   683  
   684  func (v NullableContractUser) MarshalJSON() ([]byte, error) {
   685  	return json.Marshal(v.value)
   686  }
   687  
   688  func (v *NullableContractUser) UnmarshalJSON(src []byte) error {
   689  	v.isSet = true
   690  	return json.Unmarshal(src, &v.value)
   691  }
   692  
   693