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