1// 2package vocab 3 4import ( 5 "net/url" 6 "time" 7) 8 9// RelationshipType is an interface for accepting types that extend from 'Relationship'. 10type RelationshipType interface { 11 Serializer 12 Deserializer 13 IsSubjectObject() (ok bool) 14 GetSubjectObject() (v ObjectType) 15 SetSubjectObject(v ObjectType) 16 IsSubjectLink() (ok bool) 17 GetSubjectLink() (v LinkType) 18 SetSubjectLink(v LinkType) 19 IsSubjectIRI() (ok bool) 20 GetSubjectIRI() (v *url.URL) 21 SetSubjectIRI(v *url.URL) 22 ObjectLen() (l int) 23 IsObject(index int) (ok bool) 24 GetObject(index int) (v ObjectType) 25 AppendObject(v ObjectType) 26 PrependObject(v ObjectType) 27 RemoveObject(index int) 28 IsObjectIRI(index int) (ok bool) 29 GetObjectIRI(index int) (v *url.URL) 30 AppendObjectIRI(v *url.URL) 31 PrependObjectIRI(v *url.URL) 32 RemoveObjectIRI(index int) 33 IsRelationship() (ok bool) 34 GetRelationship() (v ObjectType) 35 SetRelationship(v ObjectType) 36 IsRelationshipIRI() (ok bool) 37 GetRelationshipIRI() (v *url.URL) 38 SetRelationshipIRI(v *url.URL) 39 IsAltitude() (ok bool) 40 GetAltitude() (v float64) 41 SetAltitude(v float64) 42 IsAltitudeIRI() (ok bool) 43 GetAltitudeIRI() (v *url.URL) 44 SetAltitudeIRI(v *url.URL) 45 AttachmentLen() (l int) 46 IsAttachmentObject(index int) (ok bool) 47 GetAttachmentObject(index int) (v ObjectType) 48 AppendAttachmentObject(v ObjectType) 49 PrependAttachmentObject(v ObjectType) 50 RemoveAttachmentObject(index int) 51 IsAttachmentLink(index int) (ok bool) 52 GetAttachmentLink(index int) (v LinkType) 53 AppendAttachmentLink(v LinkType) 54 PrependAttachmentLink(v LinkType) 55 RemoveAttachmentLink(index int) 56 IsAttachmentIRI(index int) (ok bool) 57 GetAttachmentIRI(index int) (v *url.URL) 58 AppendAttachmentIRI(v *url.URL) 59 PrependAttachmentIRI(v *url.URL) 60 RemoveAttachmentIRI(index int) 61 AttributedToLen() (l int) 62 IsAttributedToObject(index int) (ok bool) 63 GetAttributedToObject(index int) (v ObjectType) 64 AppendAttributedToObject(v ObjectType) 65 PrependAttributedToObject(v ObjectType) 66 RemoveAttributedToObject(index int) 67 IsAttributedToLink(index int) (ok bool) 68 GetAttributedToLink(index int) (v LinkType) 69 AppendAttributedToLink(v LinkType) 70 PrependAttributedToLink(v LinkType) 71 RemoveAttributedToLink(index int) 72 IsAttributedToIRI(index int) (ok bool) 73 GetAttributedToIRI(index int) (v *url.URL) 74 AppendAttributedToIRI(v *url.URL) 75 PrependAttributedToIRI(v *url.URL) 76 RemoveAttributedToIRI(index int) 77 AudienceLen() (l int) 78 IsAudienceObject(index int) (ok bool) 79 GetAudienceObject(index int) (v ObjectType) 80 AppendAudienceObject(v ObjectType) 81 PrependAudienceObject(v ObjectType) 82 RemoveAudienceObject(index int) 83 IsAudienceLink(index int) (ok bool) 84 GetAudienceLink(index int) (v LinkType) 85 AppendAudienceLink(v LinkType) 86 PrependAudienceLink(v LinkType) 87 RemoveAudienceLink(index int) 88 IsAudienceIRI(index int) (ok bool) 89 GetAudienceIRI(index int) (v *url.URL) 90 AppendAudienceIRI(v *url.URL) 91 PrependAudienceIRI(v *url.URL) 92 RemoveAudienceIRI(index int) 93 ContentLen() (l int) 94 IsContentString(index int) (ok bool) 95 GetContentString(index int) (v string) 96 AppendContentString(v string) 97 PrependContentString(v string) 98 RemoveContentString(index int) 99 IsContentLangString(index int) (ok bool) 100 GetContentLangString(index int) (v string) 101 AppendContentLangString(v string) 102 PrependContentLangString(v string) 103 RemoveContentLangString(index int) 104 IsContentIRI(index int) (ok bool) 105 GetContentIRI(index int) (v *url.URL) 106 AppendContentIRI(v *url.URL) 107 PrependContentIRI(v *url.URL) 108 RemoveContentIRI(index int) 109 ContentMapLanguages() (l []string) 110 GetContentMap(l string) (v string) 111 SetContentMap(l string, v string) 112 ContextLen() (l int) 113 IsContextObject(index int) (ok bool) 114 GetContextObject(index int) (v ObjectType) 115 AppendContextObject(v ObjectType) 116 PrependContextObject(v ObjectType) 117 RemoveContextObject(index int) 118 IsContextLink(index int) (ok bool) 119 GetContextLink(index int) (v LinkType) 120 AppendContextLink(v LinkType) 121 PrependContextLink(v LinkType) 122 RemoveContextLink(index int) 123 IsContextIRI(index int) (ok bool) 124 GetContextIRI(index int) (v *url.URL) 125 AppendContextIRI(v *url.URL) 126 PrependContextIRI(v *url.URL) 127 RemoveContextIRI(index int) 128 NameLen() (l int) 129 IsNameString(index int) (ok bool) 130 GetNameString(index int) (v string) 131 AppendNameString(v string) 132 PrependNameString(v string) 133 RemoveNameString(index int) 134 IsNameLangString(index int) (ok bool) 135 GetNameLangString(index int) (v string) 136 AppendNameLangString(v string) 137 PrependNameLangString(v string) 138 RemoveNameLangString(index int) 139 IsNameIRI(index int) (ok bool) 140 GetNameIRI(index int) (v *url.URL) 141 AppendNameIRI(v *url.URL) 142 PrependNameIRI(v *url.URL) 143 RemoveNameIRI(index int) 144 NameMapLanguages() (l []string) 145 GetNameMap(l string) (v string) 146 SetNameMap(l string, v string) 147 IsEndTime() (ok bool) 148 GetEndTime() (v time.Time) 149 SetEndTime(v time.Time) 150 IsEndTimeIRI() (ok bool) 151 GetEndTimeIRI() (v *url.URL) 152 SetEndTimeIRI(v *url.URL) 153 GeneratorLen() (l int) 154 IsGeneratorObject(index int) (ok bool) 155 GetGeneratorObject(index int) (v ObjectType) 156 AppendGeneratorObject(v ObjectType) 157 PrependGeneratorObject(v ObjectType) 158 RemoveGeneratorObject(index int) 159 IsGeneratorLink(index int) (ok bool) 160 GetGeneratorLink(index int) (v LinkType) 161 AppendGeneratorLink(v LinkType) 162 PrependGeneratorLink(v LinkType) 163 RemoveGeneratorLink(index int) 164 IsGeneratorIRI(index int) (ok bool) 165 GetGeneratorIRI(index int) (v *url.URL) 166 AppendGeneratorIRI(v *url.URL) 167 PrependGeneratorIRI(v *url.URL) 168 RemoveGeneratorIRI(index int) 169 IconLen() (l int) 170 IsIconImage(index int) (ok bool) 171 GetIconImage(index int) (v ImageType) 172 AppendIconImage(v ImageType) 173 PrependIconImage(v ImageType) 174 RemoveIconImage(index int) 175 IsIconLink(index int) (ok bool) 176 GetIconLink(index int) (v LinkType) 177 AppendIconLink(v LinkType) 178 PrependIconLink(v LinkType) 179 RemoveIconLink(index int) 180 IsIconIRI(index int) (ok bool) 181 GetIconIRI(index int) (v *url.URL) 182 AppendIconIRI(v *url.URL) 183 PrependIconIRI(v *url.URL) 184 RemoveIconIRI(index int) 185 HasId() (ok bool) 186 GetId() (v *url.URL) 187 SetId(v *url.URL) 188 HasUnknownId() (ok bool) 189 GetUnknownId() (v interface{}) 190 SetUnknownId(i interface{}) 191 ImageLen() (l int) 192 IsImageImage(index int) (ok bool) 193 GetImageImage(index int) (v ImageType) 194 AppendImageImage(v ImageType) 195 PrependImageImage(v ImageType) 196 RemoveImageImage(index int) 197 IsImageLink(index int) (ok bool) 198 GetImageLink(index int) (v LinkType) 199 AppendImageLink(v LinkType) 200 PrependImageLink(v LinkType) 201 RemoveImageLink(index int) 202 IsImageIRI(index int) (ok bool) 203 GetImageIRI(index int) (v *url.URL) 204 AppendImageIRI(v *url.URL) 205 PrependImageIRI(v *url.URL) 206 RemoveImageIRI(index int) 207 InReplyToLen() (l int) 208 IsInReplyToObject(index int) (ok bool) 209 GetInReplyToObject(index int) (v ObjectType) 210 AppendInReplyToObject(v ObjectType) 211 PrependInReplyToObject(v ObjectType) 212 RemoveInReplyToObject(index int) 213 IsInReplyToLink(index int) (ok bool) 214 GetInReplyToLink(index int) (v LinkType) 215 AppendInReplyToLink(v LinkType) 216 PrependInReplyToLink(v LinkType) 217 RemoveInReplyToLink(index int) 218 IsInReplyToIRI(index int) (ok bool) 219 GetInReplyToIRI(index int) (v *url.URL) 220 AppendInReplyToIRI(v *url.URL) 221 PrependInReplyToIRI(v *url.URL) 222 RemoveInReplyToIRI(index int) 223 LocationLen() (l int) 224 IsLocationObject(index int) (ok bool) 225 GetLocationObject(index int) (v ObjectType) 226 AppendLocationObject(v ObjectType) 227 PrependLocationObject(v ObjectType) 228 RemoveLocationObject(index int) 229 IsLocationLink(index int) (ok bool) 230 GetLocationLink(index int) (v LinkType) 231 AppendLocationLink(v LinkType) 232 PrependLocationLink(v LinkType) 233 RemoveLocationLink(index int) 234 IsLocationIRI(index int) (ok bool) 235 GetLocationIRI(index int) (v *url.URL) 236 AppendLocationIRI(v *url.URL) 237 PrependLocationIRI(v *url.URL) 238 RemoveLocationIRI(index int) 239 PreviewLen() (l int) 240 IsPreviewObject(index int) (ok bool) 241 GetPreviewObject(index int) (v ObjectType) 242 AppendPreviewObject(v ObjectType) 243 PrependPreviewObject(v ObjectType) 244 RemovePreviewObject(index int) 245 IsPreviewLink(index int) (ok bool) 246 GetPreviewLink(index int) (v LinkType) 247 AppendPreviewLink(v LinkType) 248 PrependPreviewLink(v LinkType) 249 RemovePreviewLink(index int) 250 IsPreviewIRI(index int) (ok bool) 251 GetPreviewIRI(index int) (v *url.URL) 252 AppendPreviewIRI(v *url.URL) 253 PrependPreviewIRI(v *url.URL) 254 RemovePreviewIRI(index int) 255 IsPublished() (ok bool) 256 GetPublished() (v time.Time) 257 SetPublished(v time.Time) 258 IsPublishedIRI() (ok bool) 259 GetPublishedIRI() (v *url.URL) 260 SetPublishedIRI(v *url.URL) 261 IsReplies() (ok bool) 262 GetReplies() (v CollectionType) 263 SetReplies(v CollectionType) 264 IsRepliesIRI() (ok bool) 265 GetRepliesIRI() (v *url.URL) 266 SetRepliesIRI(v *url.URL) 267 IsStartTime() (ok bool) 268 GetStartTime() (v time.Time) 269 SetStartTime(v time.Time) 270 IsStartTimeIRI() (ok bool) 271 GetStartTimeIRI() (v *url.URL) 272 SetStartTimeIRI(v *url.URL) 273 SummaryLen() (l int) 274 IsSummaryString(index int) (ok bool) 275 GetSummaryString(index int) (v string) 276 AppendSummaryString(v string) 277 PrependSummaryString(v string) 278 RemoveSummaryString(index int) 279 IsSummaryLangString(index int) (ok bool) 280 GetSummaryLangString(index int) (v string) 281 AppendSummaryLangString(v string) 282 PrependSummaryLangString(v string) 283 RemoveSummaryLangString(index int) 284 IsSummaryIRI(index int) (ok bool) 285 GetSummaryIRI(index int) (v *url.URL) 286 AppendSummaryIRI(v *url.URL) 287 PrependSummaryIRI(v *url.URL) 288 RemoveSummaryIRI(index int) 289 SummaryMapLanguages() (l []string) 290 GetSummaryMap(l string) (v string) 291 SetSummaryMap(l string, v string) 292 TagLen() (l int) 293 IsTagObject(index int) (ok bool) 294 GetTagObject(index int) (v ObjectType) 295 AppendTagObject(v ObjectType) 296 PrependTagObject(v ObjectType) 297 RemoveTagObject(index int) 298 IsTagLink(index int) (ok bool) 299 GetTagLink(index int) (v LinkType) 300 AppendTagLink(v LinkType) 301 PrependTagLink(v LinkType) 302 RemoveTagLink(index int) 303 IsTagIRI(index int) (ok bool) 304 GetTagIRI(index int) (v *url.URL) 305 AppendTagIRI(v *url.URL) 306 PrependTagIRI(v *url.URL) 307 RemoveTagIRI(index int) 308 TypeLen() (l int) 309 GetType(index int) (v interface{}) 310 AppendType(v interface{}) 311 PrependType(v interface{}) 312 RemoveType(index int) 313 IsUpdated() (ok bool) 314 GetUpdated() (v time.Time) 315 SetUpdated(v time.Time) 316 IsUpdatedIRI() (ok bool) 317 GetUpdatedIRI() (v *url.URL) 318 SetUpdatedIRI(v *url.URL) 319 UrlLen() (l int) 320 IsUrlAnyURI(index int) (ok bool) 321 GetUrlAnyURI(index int) (v *url.URL) 322 AppendUrlAnyURI(v *url.URL) 323 PrependUrlAnyURI(v *url.URL) 324 RemoveUrlAnyURI(index int) 325 IsUrlLink(index int) (ok bool) 326 GetUrlLink(index int) (v LinkType) 327 AppendUrlLink(v LinkType) 328 PrependUrlLink(v LinkType) 329 RemoveUrlLink(index int) 330 ToLen() (l int) 331 IsToObject(index int) (ok bool) 332 GetToObject(index int) (v ObjectType) 333 AppendToObject(v ObjectType) 334 PrependToObject(v ObjectType) 335 RemoveToObject(index int) 336 IsToLink(index int) (ok bool) 337 GetToLink(index int) (v LinkType) 338 AppendToLink(v LinkType) 339 PrependToLink(v LinkType) 340 RemoveToLink(index int) 341 IsToIRI(index int) (ok bool) 342 GetToIRI(index int) (v *url.URL) 343 AppendToIRI(v *url.URL) 344 PrependToIRI(v *url.URL) 345 RemoveToIRI(index int) 346 BtoLen() (l int) 347 IsBtoObject(index int) (ok bool) 348 GetBtoObject(index int) (v ObjectType) 349 AppendBtoObject(v ObjectType) 350 PrependBtoObject(v ObjectType) 351 RemoveBtoObject(index int) 352 IsBtoLink(index int) (ok bool) 353 GetBtoLink(index int) (v LinkType) 354 AppendBtoLink(v LinkType) 355 PrependBtoLink(v LinkType) 356 RemoveBtoLink(index int) 357 IsBtoIRI(index int) (ok bool) 358 GetBtoIRI(index int) (v *url.URL) 359 AppendBtoIRI(v *url.URL) 360 PrependBtoIRI(v *url.URL) 361 RemoveBtoIRI(index int) 362 CcLen() (l int) 363 IsCcObject(index int) (ok bool) 364 GetCcObject(index int) (v ObjectType) 365 AppendCcObject(v ObjectType) 366 PrependCcObject(v ObjectType) 367 RemoveCcObject(index int) 368 IsCcLink(index int) (ok bool) 369 GetCcLink(index int) (v LinkType) 370 AppendCcLink(v LinkType) 371 PrependCcLink(v LinkType) 372 RemoveCcLink(index int) 373 IsCcIRI(index int) (ok bool) 374 GetCcIRI(index int) (v *url.URL) 375 AppendCcIRI(v *url.URL) 376 PrependCcIRI(v *url.URL) 377 RemoveCcIRI(index int) 378 BccLen() (l int) 379 IsBccObject(index int) (ok bool) 380 GetBccObject(index int) (v ObjectType) 381 AppendBccObject(v ObjectType) 382 PrependBccObject(v ObjectType) 383 RemoveBccObject(index int) 384 IsBccLink(index int) (ok bool) 385 GetBccLink(index int) (v LinkType) 386 AppendBccLink(v LinkType) 387 PrependBccLink(v LinkType) 388 RemoveBccLink(index int) 389 IsBccIRI(index int) (ok bool) 390 GetBccIRI(index int) (v *url.URL) 391 AppendBccIRI(v *url.URL) 392 PrependBccIRI(v *url.URL) 393 RemoveBccIRI(index int) 394 IsMediaType() (ok bool) 395 GetMediaType() (v string) 396 SetMediaType(v string) 397 IsMediaTypeIRI() (ok bool) 398 GetMediaTypeIRI() (v *url.URL) 399 SetMediaTypeIRI(v *url.URL) 400 IsDuration() (ok bool) 401 GetDuration() (v time.Duration) 402 SetDuration(v time.Duration) 403 IsDurationIRI() (ok bool) 404 GetDurationIRI() (v *url.URL) 405 SetDurationIRI(v *url.URL) 406 IsSource() (ok bool) 407 GetSource() (v ObjectType) 408 SetSource(v ObjectType) 409 IsSourceIRI() (ok bool) 410 GetSourceIRI() (v *url.URL) 411 SetSourceIRI(v *url.URL) 412 IsInboxOrderedCollection() (ok bool) 413 GetInboxOrderedCollection() (v OrderedCollectionType) 414 SetInboxOrderedCollection(v OrderedCollectionType) 415 IsInboxAnyURI() (ok bool) 416 GetInboxAnyURI() (v *url.URL) 417 SetInboxAnyURI(v *url.URL) 418 IsOutboxOrderedCollection() (ok bool) 419 GetOutboxOrderedCollection() (v OrderedCollectionType) 420 SetOutboxOrderedCollection(v OrderedCollectionType) 421 IsOutboxAnyURI() (ok bool) 422 GetOutboxAnyURI() (v *url.URL) 423 SetOutboxAnyURI(v *url.URL) 424 IsFollowingCollection() (ok bool) 425 GetFollowingCollection() (v CollectionType) 426 SetFollowingCollection(v CollectionType) 427 IsFollowingOrderedCollection() (ok bool) 428 GetFollowingOrderedCollection() (v OrderedCollectionType) 429 SetFollowingOrderedCollection(v OrderedCollectionType) 430 IsFollowingAnyURI() (ok bool) 431 GetFollowingAnyURI() (v *url.URL) 432 SetFollowingAnyURI(v *url.URL) 433 IsFollowersCollection() (ok bool) 434 GetFollowersCollection() (v CollectionType) 435 SetFollowersCollection(v CollectionType) 436 IsFollowersOrderedCollection() (ok bool) 437 GetFollowersOrderedCollection() (v OrderedCollectionType) 438 SetFollowersOrderedCollection(v OrderedCollectionType) 439 IsFollowersAnyURI() (ok bool) 440 GetFollowersAnyURI() (v *url.URL) 441 SetFollowersAnyURI(v *url.URL) 442 IsLikedCollection() (ok bool) 443 GetLikedCollection() (v CollectionType) 444 SetLikedCollection(v CollectionType) 445 IsLikedOrderedCollection() (ok bool) 446 GetLikedOrderedCollection() (v OrderedCollectionType) 447 SetLikedOrderedCollection(v OrderedCollectionType) 448 IsLikedAnyURI() (ok bool) 449 GetLikedAnyURI() (v *url.URL) 450 SetLikedAnyURI(v *url.URL) 451 IsLikesCollection() (ok bool) 452 GetLikesCollection() (v CollectionType) 453 SetLikesCollection(v CollectionType) 454 IsLikesOrderedCollection() (ok bool) 455 GetLikesOrderedCollection() (v OrderedCollectionType) 456 SetLikesOrderedCollection(v OrderedCollectionType) 457 IsLikesAnyURI() (ok bool) 458 GetLikesAnyURI() (v *url.URL) 459 SetLikesAnyURI(v *url.URL) 460 StreamsLen() (l int) 461 GetStreams(index int) (v *url.URL) 462 AppendStreams(v *url.URL) 463 PrependStreams(v *url.URL) 464 RemoveStreams(index int) 465 HasUnknownStreams() (ok bool) 466 GetUnknownStreams() (v interface{}) 467 SetUnknownStreams(i interface{}) 468 IsPreferredUsername() (ok bool) 469 GetPreferredUsername() (v string) 470 SetPreferredUsername(v string) 471 IsPreferredUsernameIRI() (ok bool) 472 GetPreferredUsernameIRI() (v *url.URL) 473 SetPreferredUsernameIRI(v *url.URL) 474 PreferredUsernameMapLanguages() (l []string) 475 GetPreferredUsernameMap(l string) (v string) 476 SetPreferredUsernameMap(l string, v string) 477 IsEndpoints() (ok bool) 478 GetEndpoints() (v ObjectType) 479 SetEndpoints(v ObjectType) 480 IsEndpointsIRI() (ok bool) 481 GetEndpointsIRI() (v *url.URL) 482 SetEndpointsIRI(v *url.URL) 483 HasProxyUrl() (ok bool) 484 GetProxyUrl() (v *url.URL) 485 SetProxyUrl(v *url.URL) 486 HasUnknownProxyUrl() (ok bool) 487 GetUnknownProxyUrl() (v interface{}) 488 SetUnknownProxyUrl(i interface{}) 489 HasOauthAuthorizationEndpoint() (ok bool) 490 GetOauthAuthorizationEndpoint() (v *url.URL) 491 SetOauthAuthorizationEndpoint(v *url.URL) 492 HasUnknownOauthAuthorizationEndpoint() (ok bool) 493 GetUnknownOauthAuthorizationEndpoint() (v interface{}) 494 SetUnknownOauthAuthorizationEndpoint(i interface{}) 495 HasOauthTokenEndpoint() (ok bool) 496 GetOauthTokenEndpoint() (v *url.URL) 497 SetOauthTokenEndpoint(v *url.URL) 498 HasUnknownOauthTokenEndpoint() (ok bool) 499 GetUnknownOauthTokenEndpoint() (v interface{}) 500 SetUnknownOauthTokenEndpoint(i interface{}) 501 HasProvideClientKey() (ok bool) 502 GetProvideClientKey() (v *url.URL) 503 SetProvideClientKey(v *url.URL) 504 HasUnknownProvideClientKey() (ok bool) 505 GetUnknownProvideClientKey() (v interface{}) 506 SetUnknownProvideClientKey(i interface{}) 507 HasSignClientKey() (ok bool) 508 GetSignClientKey() (v *url.URL) 509 SetSignClientKey(v *url.URL) 510 HasUnknownSignClientKey() (ok bool) 511 GetUnknownSignClientKey() (v interface{}) 512 SetUnknownSignClientKey(i interface{}) 513 HasSharedInbox() (ok bool) 514 GetSharedInbox() (v *url.URL) 515 SetSharedInbox(v *url.URL) 516 HasUnknownSharedInbox() (ok bool) 517 GetUnknownSharedInbox() (v interface{}) 518 SetUnknownSharedInbox(i interface{}) 519} 520 521// Describes a relationship between two individuals. The subject and object properties are used to identify the connected individuals. See 5.2 Representing Relationships Between Entities for additional information. 522type Relationship struct { 523 // An unknown value. 524 unknown_ map[string]interface{} 525 // The functional 'subject' value could have multiple types, but only a single value 526 subject *subjectIntermediateType 527 // The 'object' value could have multiple types and values 528 object []*objectIntermediateType 529 // The functional 'relationship' value could have multiple types, but only a single value 530 relationship *relationshipIntermediateType 531 // The functional 'altitude' value could have multiple types, but only a single value 532 altitude *altitudeIntermediateType 533 // The 'attachment' value could have multiple types and values 534 attachment []*attachmentIntermediateType 535 // The 'attributedTo' value could have multiple types and values 536 attributedTo []*attributedToIntermediateType 537 // The 'audience' value could have multiple types and values 538 audience []*audienceIntermediateType 539 // The 'content' value could have multiple types and values 540 content []*contentIntermediateType 541 // The 'contentMap' value holds language-specific values for property 'content' 542 contentMap map[string]string 543 // The 'context' value could have multiple types and values 544 context []*contextIntermediateType 545 // The 'name' value could have multiple types and values 546 name []*nameIntermediateType 547 // The 'nameMap' value holds language-specific values for property 'name' 548 nameMap map[string]string 549 // The functional 'endTime' value could have multiple types, but only a single value 550 endTime *endTimeIntermediateType 551 // The 'generator' value could have multiple types and values 552 generator []*generatorIntermediateType 553 // The 'icon' value could have multiple types and values 554 icon []*iconIntermediateType 555 // The functional 'id' value holds a single type and a single value 556 id *url.URL 557 // The 'image' value could have multiple types and values 558 image []*imageIntermediateType 559 // The 'inReplyTo' value could have multiple types and values 560 inReplyTo []*inReplyToIntermediateType 561 // The 'location' value could have multiple types and values 562 location []*locationIntermediateType 563 // The 'preview' value could have multiple types and values 564 preview []*previewIntermediateType 565 // The functional 'published' value could have multiple types, but only a single value 566 published *publishedIntermediateType 567 // The functional 'replies' value could have multiple types, but only a single value 568 replies *repliesIntermediateType 569 // The functional 'startTime' value could have multiple types, but only a single value 570 startTime *startTimeIntermediateType 571 // The 'summary' value could have multiple types and values 572 summary []*summaryIntermediateType 573 // The 'summaryMap' value holds language-specific values for property 'summary' 574 summaryMap map[string]string 575 // The 'tag' value could have multiple types and values 576 tag []*tagIntermediateType 577 // The 'type' value can hold any type and any number of values 578 typeName []interface{} 579 // The functional 'updated' value could have multiple types, but only a single value 580 updated *updatedIntermediateType 581 // The 'url' value could have multiple types and values 582 url []*urlIntermediateType 583 // The 'to' value could have multiple types and values 584 to []*toIntermediateType 585 // The 'bto' value could have multiple types and values 586 bto []*btoIntermediateType 587 // The 'cc' value could have multiple types and values 588 cc []*ccIntermediateType 589 // The 'bcc' value could have multiple types and values 590 bcc []*bccIntermediateType 591 // The functional 'mediaType' value could have multiple types, but only a single value 592 mediaType *mediaTypeIntermediateType 593 // The functional 'duration' value could have multiple types, but only a single value 594 duration *durationIntermediateType 595 // The functional 'source' value could have multiple types, but only a single value 596 source *sourceIntermediateType 597 // The functional 'inbox' value could have multiple types, but only a single value 598 inbox *inboxIntermediateType 599 // The functional 'outbox' value could have multiple types, but only a single value 600 outbox *outboxIntermediateType 601 // The functional 'following' value could have multiple types, but only a single value 602 following *followingIntermediateType 603 // The functional 'followers' value could have multiple types, but only a single value 604 followers *followersIntermediateType 605 // The functional 'liked' value could have multiple types, but only a single value 606 liked *likedIntermediateType 607 // The functional 'likes' value could have multiple types, but only a single value 608 likes *likesIntermediateType 609 // The 'streams' value holds a single type and any number of values 610 streams []*url.URL 611 // The functional 'preferredUsername' value could have multiple types, but only a single value 612 preferredUsername *preferredUsernameIntermediateType 613 // The 'preferredUsernameMap' value holds language-specific values for property 'preferredUsername' 614 preferredUsernameMap map[string]string 615 // The functional 'endpoints' value could have multiple types, but only a single value 616 endpoints *endpointsIntermediateType 617 // The functional 'proxyUrl' value holds a single type and a single value 618 proxyUrl *url.URL 619 // The functional 'oauthAuthorizationEndpoint' value holds a single type and a single value 620 oauthAuthorizationEndpoint *url.URL 621 // The functional 'oauthTokenEndpoint' value holds a single type and a single value 622 oauthTokenEndpoint *url.URL 623 // The functional 'provideClientKey' value holds a single type and a single value 624 provideClientKey *url.URL 625 // The functional 'signClientKey' value holds a single type and a single value 626 signClientKey *url.URL 627 // The functional 'sharedInbox' value holds a single type and a single value 628 sharedInbox *url.URL 629} 630 631// IsSubjectObject determines whether the call to GetSubjectObject is safe 632func (t *Relationship) IsSubjectObject() (ok bool) { 633 return t.subject != nil && t.subject.Object != nil 634 635} 636 637// GetSubjectObject returns the value safely if IsSubjectObject returned true 638func (t *Relationship) GetSubjectObject() (v ObjectType) { 639 return t.subject.Object 640 641} 642 643// SetSubjectObject sets the value of subject to be of ObjectType type 644func (t *Relationship) SetSubjectObject(v ObjectType) { 645 t.subject = &subjectIntermediateType{Object: v} 646 647} 648 649// IsSubjectLink determines whether the call to GetSubjectLink is safe 650func (t *Relationship) IsSubjectLink() (ok bool) { 651 return t.subject != nil && t.subject.Link != nil 652 653} 654 655// GetSubjectLink returns the value safely if IsSubjectLink returned true 656func (t *Relationship) GetSubjectLink() (v LinkType) { 657 return t.subject.Link 658 659} 660 661// SetSubjectLink sets the value of subject to be of LinkType type 662func (t *Relationship) SetSubjectLink(v LinkType) { 663 t.subject = &subjectIntermediateType{Link: v} 664 665} 666 667// IsSubjectIRI determines whether the call to GetSubjectIRI is safe 668func (t *Relationship) IsSubjectIRI() (ok bool) { 669 return t.subject != nil && t.subject.IRI != nil 670 671} 672 673// GetSubjectIRI returns the value safely if IsSubjectIRI returned true 674func (t *Relationship) GetSubjectIRI() (v *url.URL) { 675 return t.subject.IRI 676 677} 678 679// SetSubjectIRI sets the value of subject to be of *url.URL type 680func (t *Relationship) SetSubjectIRI(v *url.URL) { 681 t.subject = &subjectIntermediateType{IRI: v} 682 683} 684 685// HasUnknownSubject determines whether the call to GetUnknownSubject is safe 686func (t *Relationship) HasUnknownSubject() (ok bool) { 687 return t.subject != nil && t.subject.unknown_ != nil 688 689} 690 691// GetUnknownSubject returns the unknown value for subject 692func (t *Relationship) GetUnknownSubject() (v interface{}) { 693 return t.subject.unknown_ 694 695} 696 697// SetUnknownSubject sets the unknown value of subject 698func (t *Relationship) SetUnknownSubject(i interface{}) { 699 if t.unknown_ == nil { 700 t.unknown_ = make(map[string]interface{}) 701 } 702 tmp := &subjectIntermediateType{} 703 tmp.unknown_ = i 704 t.subject = tmp 705 706} 707 708// ObjectLen determines the number of elements able to be used for the IsObject, GetObject, and RemoveObject functions 709func (t *Relationship) ObjectLen() (l int) { 710 return len(t.object) 711 712} 713 714// IsObject determines whether the call to GetObject is safe for the specified index 715func (t *Relationship) IsObject(index int) (ok bool) { 716 return t.object[index].Object != nil 717 718} 719 720// GetObject returns the value safely if IsObject returned true for the specified index 721func (t *Relationship) GetObject(index int) (v ObjectType) { 722 return t.object[index].Object 723 724} 725 726// AppendObject adds to the back of object a ObjectType type 727func (t *Relationship) AppendObject(v ObjectType) { 728 t.object = append(t.object, &objectIntermediateType{Object: v}) 729 730} 731 732// PrependObject adds to the front of object a ObjectType type 733func (t *Relationship) PrependObject(v ObjectType) { 734 t.object = append([]*objectIntermediateType{&objectIntermediateType{Object: v}}, t.object...) 735 736} 737 738// RemoveObject deletes the value from the specified index 739func (t *Relationship) RemoveObject(index int) { 740 copy(t.object[index:], t.object[index+1:]) 741 t.object[len(t.object)-1] = nil 742 t.object = t.object[:len(t.object)-1] 743 744} 745 746// IsObjectIRI determines whether the call to GetObjectIRI is safe for the specified index 747func (t *Relationship) IsObjectIRI(index int) (ok bool) { 748 return t.object[index].IRI != nil 749 750} 751 752// GetObjectIRI returns the value safely if IsObjectIRI returned true for the specified index 753func (t *Relationship) GetObjectIRI(index int) (v *url.URL) { 754 return t.object[index].IRI 755 756} 757 758// AppendObjectIRI adds to the back of object a *url.URL type 759func (t *Relationship) AppendObjectIRI(v *url.URL) { 760 t.object = append(t.object, &objectIntermediateType{IRI: v}) 761 762} 763 764// PrependObjectIRI adds to the front of object a *url.URL type 765func (t *Relationship) PrependObjectIRI(v *url.URL) { 766 t.object = append([]*objectIntermediateType{&objectIntermediateType{IRI: v}}, t.object...) 767 768} 769 770// RemoveObjectIRI deletes the value from the specified index 771func (t *Relationship) RemoveObjectIRI(index int) { 772 copy(t.object[index:], t.object[index+1:]) 773 t.object[len(t.object)-1] = nil 774 t.object = t.object[:len(t.object)-1] 775 776} 777 778// HasUnknownObject determines whether the call to GetUnknownObject is safe 779func (t *Relationship) HasUnknownObject() (ok bool) { 780 return t.object != nil && t.object[0].unknown_ != nil 781 782} 783 784// GetUnknownObject returns the unknown value for object 785func (t *Relationship) GetUnknownObject() (v interface{}) { 786 return t.object[0].unknown_ 787 788} 789 790// SetUnknownObject sets the unknown value of object 791func (t *Relationship) SetUnknownObject(i interface{}) { 792 if t.unknown_ == nil { 793 t.unknown_ = make(map[string]interface{}) 794 } 795 tmp := &objectIntermediateType{} 796 tmp.unknown_ = i 797 t.object = append(t.object, tmp) 798 799} 800 801// IsRelationship determines whether the call to GetRelationship is safe 802func (t *Relationship) IsRelationship() (ok bool) { 803 return t.relationship != nil && t.relationship.Object != nil 804 805} 806 807// GetRelationship returns the value safely if IsRelationship returned true 808func (t *Relationship) GetRelationship() (v ObjectType) { 809 return t.relationship.Object 810 811} 812 813// SetRelationship sets the value of relationship to be of ObjectType type 814func (t *Relationship) SetRelationship(v ObjectType) { 815 t.relationship = &relationshipIntermediateType{Object: v} 816 817} 818 819// IsRelationshipIRI determines whether the call to GetRelationshipIRI is safe 820func (t *Relationship) IsRelationshipIRI() (ok bool) { 821 return t.relationship != nil && t.relationship.IRI != nil 822 823} 824 825// GetRelationshipIRI returns the value safely if IsRelationshipIRI returned true 826func (t *Relationship) GetRelationshipIRI() (v *url.URL) { 827 return t.relationship.IRI 828 829} 830 831// SetRelationshipIRI sets the value of relationship to be of *url.URL type 832func (t *Relationship) SetRelationshipIRI(v *url.URL) { 833 t.relationship = &relationshipIntermediateType{IRI: v} 834 835} 836 837// HasUnknownRelationship determines whether the call to GetUnknownRelationship is safe 838func (t *Relationship) HasUnknownRelationship() (ok bool) { 839 return t.relationship != nil && t.relationship.unknown_ != nil 840 841} 842 843// GetUnknownRelationship returns the unknown value for relationship 844func (t *Relationship) GetUnknownRelationship() (v interface{}) { 845 return t.relationship.unknown_ 846 847} 848 849// SetUnknownRelationship sets the unknown value of relationship 850func (t *Relationship) SetUnknownRelationship(i interface{}) { 851 if t.unknown_ == nil { 852 t.unknown_ = make(map[string]interface{}) 853 } 854 tmp := &relationshipIntermediateType{} 855 tmp.unknown_ = i 856 t.relationship = tmp 857 858} 859 860// IsAltitude determines whether the call to GetAltitude is safe 861func (t *Relationship) IsAltitude() (ok bool) { 862 return t.altitude != nil && t.altitude.float != nil 863 864} 865 866// GetAltitude returns the value safely if IsAltitude returned true 867func (t *Relationship) GetAltitude() (v float64) { 868 return *t.altitude.float 869 870} 871 872// SetAltitude sets the value of altitude to be of float64 type 873func (t *Relationship) SetAltitude(v float64) { 874 t.altitude = &altitudeIntermediateType{float: &v} 875 876} 877 878// IsAltitudeIRI determines whether the call to GetAltitudeIRI is safe 879func (t *Relationship) IsAltitudeIRI() (ok bool) { 880 return t.altitude != nil && t.altitude.IRI != nil 881 882} 883 884// GetAltitudeIRI returns the value safely if IsAltitudeIRI returned true 885func (t *Relationship) GetAltitudeIRI() (v *url.URL) { 886 return t.altitude.IRI 887 888} 889 890// SetAltitudeIRI sets the value of altitude to be of *url.URL type 891func (t *Relationship) SetAltitudeIRI(v *url.URL) { 892 t.altitude = &altitudeIntermediateType{IRI: v} 893 894} 895 896// HasUnknownAltitude determines whether the call to GetUnknownAltitude is safe 897func (t *Relationship) HasUnknownAltitude() (ok bool) { 898 return t.altitude != nil && t.altitude.unknown_ != nil 899 900} 901 902// GetUnknownAltitude returns the unknown value for altitude 903func (t *Relationship) GetUnknownAltitude() (v interface{}) { 904 return t.altitude.unknown_ 905 906} 907 908// SetUnknownAltitude sets the unknown value of altitude 909func (t *Relationship) SetUnknownAltitude(i interface{}) { 910 if t.unknown_ == nil { 911 t.unknown_ = make(map[string]interface{}) 912 } 913 tmp := &altitudeIntermediateType{} 914 tmp.unknown_ = i 915 t.altitude = tmp 916 917} 918 919// AttachmentLen determines the number of elements able to be used for the IsAttachmentObject, GetAttachmentObject, and RemoveAttachmentObject functions 920func (t *Relationship) AttachmentLen() (l int) { 921 return len(t.attachment) 922 923} 924 925// IsAttachmentObject determines whether the call to GetAttachmentObject is safe for the specified index 926func (t *Relationship) IsAttachmentObject(index int) (ok bool) { 927 return t.attachment[index].Object != nil 928 929} 930 931// GetAttachmentObject returns the value safely if IsAttachmentObject returned true for the specified index 932func (t *Relationship) GetAttachmentObject(index int) (v ObjectType) { 933 return t.attachment[index].Object 934 935} 936 937// AppendAttachmentObject adds to the back of attachment a ObjectType type 938func (t *Relationship) AppendAttachmentObject(v ObjectType) { 939 t.attachment = append(t.attachment, &attachmentIntermediateType{Object: v}) 940 941} 942 943// PrependAttachmentObject adds to the front of attachment a ObjectType type 944func (t *Relationship) PrependAttachmentObject(v ObjectType) { 945 t.attachment = append([]*attachmentIntermediateType{&attachmentIntermediateType{Object: v}}, t.attachment...) 946 947} 948 949// RemoveAttachmentObject deletes the value from the specified index 950func (t *Relationship) RemoveAttachmentObject(index int) { 951 copy(t.attachment[index:], t.attachment[index+1:]) 952 t.attachment[len(t.attachment)-1] = nil 953 t.attachment = t.attachment[:len(t.attachment)-1] 954 955} 956 957// IsAttachmentLink determines whether the call to GetAttachmentLink is safe for the specified index 958func (t *Relationship) IsAttachmentLink(index int) (ok bool) { 959 return t.attachment[index].Link != nil 960 961} 962 963// GetAttachmentLink returns the value safely if IsAttachmentLink returned true for the specified index 964func (t *Relationship) GetAttachmentLink(index int) (v LinkType) { 965 return t.attachment[index].Link 966 967} 968 969// AppendAttachmentLink adds to the back of attachment a LinkType type 970func (t *Relationship) AppendAttachmentLink(v LinkType) { 971 t.attachment = append(t.attachment, &attachmentIntermediateType{Link: v}) 972 973} 974 975// PrependAttachmentLink adds to the front of attachment a LinkType type 976func (t *Relationship) PrependAttachmentLink(v LinkType) { 977 t.attachment = append([]*attachmentIntermediateType{&attachmentIntermediateType{Link: v}}, t.attachment...) 978 979} 980 981// RemoveAttachmentLink deletes the value from the specified index 982func (t *Relationship) RemoveAttachmentLink(index int) { 983 copy(t.attachment[index:], t.attachment[index+1:]) 984 t.attachment[len(t.attachment)-1] = nil 985 t.attachment = t.attachment[:len(t.attachment)-1] 986 987} 988 989// IsAttachmentIRI determines whether the call to GetAttachmentIRI is safe for the specified index 990func (t *Relationship) IsAttachmentIRI(index int) (ok bool) { 991 return t.attachment[index].IRI != nil 992 993} 994 995// GetAttachmentIRI returns the value safely if IsAttachmentIRI returned true for the specified index 996func (t *Relationship) GetAttachmentIRI(index int) (v *url.URL) { 997 return t.attachment[index].IRI 998 999} 1000 1001// AppendAttachmentIRI adds to the back of attachment a *url.URL type 1002func (t *Relationship) AppendAttachmentIRI(v *url.URL) { 1003 t.attachment = append(t.attachment, &attachmentIntermediateType{IRI: v}) 1004 1005} 1006 1007// PrependAttachmentIRI adds to the front of attachment a *url.URL type 1008func (t *Relationship) PrependAttachmentIRI(v *url.URL) { 1009 t.attachment = append([]*attachmentIntermediateType{&attachmentIntermediateType{IRI: v}}, t.attachment...) 1010 1011} 1012 1013// RemoveAttachmentIRI deletes the value from the specified index 1014func (t *Relationship) RemoveAttachmentIRI(index int) { 1015 copy(t.attachment[index:], t.attachment[index+1:]) 1016 t.attachment[len(t.attachment)-1] = nil 1017 t.attachment = t.attachment[:len(t.attachment)-1] 1018 1019} 1020 1021// HasUnknownAttachment determines whether the call to GetUnknownAttachment is safe 1022func (t *Relationship) HasUnknownAttachment() (ok bool) { 1023 return t.attachment != nil && t.attachment[0].unknown_ != nil 1024 1025} 1026 1027// GetUnknownAttachment returns the unknown value for attachment 1028func (t *Relationship) GetUnknownAttachment() (v interface{}) { 1029 return t.attachment[0].unknown_ 1030 1031} 1032 1033// SetUnknownAttachment sets the unknown value of attachment 1034func (t *Relationship) SetUnknownAttachment(i interface{}) { 1035 if t.unknown_ == nil { 1036 t.unknown_ = make(map[string]interface{}) 1037 } 1038 tmp := &attachmentIntermediateType{} 1039 tmp.unknown_ = i 1040 t.attachment = append(t.attachment, tmp) 1041 1042} 1043 1044// AttributedToLen determines the number of elements able to be used for the IsAttributedToObject, GetAttributedToObject, and RemoveAttributedToObject functions 1045func (t *Relationship) AttributedToLen() (l int) { 1046 return len(t.attributedTo) 1047 1048} 1049 1050// IsAttributedToObject determines whether the call to GetAttributedToObject is safe for the specified index 1051func (t *Relationship) IsAttributedToObject(index int) (ok bool) { 1052 return t.attributedTo[index].Object != nil 1053 1054} 1055 1056// GetAttributedToObject returns the value safely if IsAttributedToObject returned true for the specified index 1057func (t *Relationship) GetAttributedToObject(index int) (v ObjectType) { 1058 return t.attributedTo[index].Object 1059 1060} 1061 1062// AppendAttributedToObject adds to the back of attributedTo a ObjectType type 1063func (t *Relationship) AppendAttributedToObject(v ObjectType) { 1064 t.attributedTo = append(t.attributedTo, &attributedToIntermediateType{Object: v}) 1065 1066} 1067 1068// PrependAttributedToObject adds to the front of attributedTo a ObjectType type 1069func (t *Relationship) PrependAttributedToObject(v ObjectType) { 1070 t.attributedTo = append([]*attributedToIntermediateType{&attributedToIntermediateType{Object: v}}, t.attributedTo...) 1071 1072} 1073 1074// RemoveAttributedToObject deletes the value from the specified index 1075func (t *Relationship) RemoveAttributedToObject(index int) { 1076 copy(t.attributedTo[index:], t.attributedTo[index+1:]) 1077 t.attributedTo[len(t.attributedTo)-1] = nil 1078 t.attributedTo = t.attributedTo[:len(t.attributedTo)-1] 1079 1080} 1081 1082// IsAttributedToLink determines whether the call to GetAttributedToLink is safe for the specified index 1083func (t *Relationship) IsAttributedToLink(index int) (ok bool) { 1084 return t.attributedTo[index].Link != nil 1085 1086} 1087 1088// GetAttributedToLink returns the value safely if IsAttributedToLink returned true for the specified index 1089func (t *Relationship) GetAttributedToLink(index int) (v LinkType) { 1090 return t.attributedTo[index].Link 1091 1092} 1093 1094// AppendAttributedToLink adds to the back of attributedTo a LinkType type 1095func (t *Relationship) AppendAttributedToLink(v LinkType) { 1096 t.attributedTo = append(t.attributedTo, &attributedToIntermediateType{Link: v}) 1097 1098} 1099 1100// PrependAttributedToLink adds to the front of attributedTo a LinkType type 1101func (t *Relationship) PrependAttributedToLink(v LinkType) { 1102 t.attributedTo = append([]*attributedToIntermediateType{&attributedToIntermediateType{Link: v}}, t.attributedTo...) 1103 1104} 1105 1106// RemoveAttributedToLink deletes the value from the specified index 1107func (t *Relationship) RemoveAttributedToLink(index int) { 1108 copy(t.attributedTo[index:], t.attributedTo[index+1:]) 1109 t.attributedTo[len(t.attributedTo)-1] = nil 1110 t.attributedTo = t.attributedTo[:len(t.attributedTo)-1] 1111 1112} 1113 1114// IsAttributedToIRI determines whether the call to GetAttributedToIRI is safe for the specified index 1115func (t *Relationship) IsAttributedToIRI(index int) (ok bool) { 1116 return t.attributedTo[index].IRI != nil 1117 1118} 1119 1120// GetAttributedToIRI returns the value safely if IsAttributedToIRI returned true for the specified index 1121func (t *Relationship) GetAttributedToIRI(index int) (v *url.URL) { 1122 return t.attributedTo[index].IRI 1123 1124} 1125 1126// AppendAttributedToIRI adds to the back of attributedTo a *url.URL type 1127func (t *Relationship) AppendAttributedToIRI(v *url.URL) { 1128 t.attributedTo = append(t.attributedTo, &attributedToIntermediateType{IRI: v}) 1129 1130} 1131 1132// PrependAttributedToIRI adds to the front of attributedTo a *url.URL type 1133func (t *Relationship) PrependAttributedToIRI(v *url.URL) { 1134 t.attributedTo = append([]*attributedToIntermediateType{&attributedToIntermediateType{IRI: v}}, t.attributedTo...) 1135 1136} 1137 1138// RemoveAttributedToIRI deletes the value from the specified index 1139func (t *Relationship) RemoveAttributedToIRI(index int) { 1140 copy(t.attributedTo[index:], t.attributedTo[index+1:]) 1141 t.attributedTo[len(t.attributedTo)-1] = nil 1142 t.attributedTo = t.attributedTo[:len(t.attributedTo)-1] 1143 1144} 1145 1146// HasUnknownAttributedTo determines whether the call to GetUnknownAttributedTo is safe 1147func (t *Relationship) HasUnknownAttributedTo() (ok bool) { 1148 return t.attributedTo != nil && t.attributedTo[0].unknown_ != nil 1149 1150} 1151 1152// GetUnknownAttributedTo returns the unknown value for attributedTo 1153func (t *Relationship) GetUnknownAttributedTo() (v interface{}) { 1154 return t.attributedTo[0].unknown_ 1155 1156} 1157 1158// SetUnknownAttributedTo sets the unknown value of attributedTo 1159func (t *Relationship) SetUnknownAttributedTo(i interface{}) { 1160 if t.unknown_ == nil { 1161 t.unknown_ = make(map[string]interface{}) 1162 } 1163 tmp := &attributedToIntermediateType{} 1164 tmp.unknown_ = i 1165 t.attributedTo = append(t.attributedTo, tmp) 1166 1167} 1168 1169// AudienceLen determines the number of elements able to be used for the IsAudienceObject, GetAudienceObject, and RemoveAudienceObject functions 1170func (t *Relationship) AudienceLen() (l int) { 1171 return len(t.audience) 1172 1173} 1174 1175// IsAudienceObject determines whether the call to GetAudienceObject is safe for the specified index 1176func (t *Relationship) IsAudienceObject(index int) (ok bool) { 1177 return t.audience[index].Object != nil 1178 1179} 1180 1181// GetAudienceObject returns the value safely if IsAudienceObject returned true for the specified index 1182func (t *Relationship) GetAudienceObject(index int) (v ObjectType) { 1183 return t.audience[index].Object 1184 1185} 1186 1187// AppendAudienceObject adds to the back of audience a ObjectType type 1188func (t *Relationship) AppendAudienceObject(v ObjectType) { 1189 t.audience = append(t.audience, &audienceIntermediateType{Object: v}) 1190 1191} 1192 1193// PrependAudienceObject adds to the front of audience a ObjectType type 1194func (t *Relationship) PrependAudienceObject(v ObjectType) { 1195 t.audience = append([]*audienceIntermediateType{&audienceIntermediateType{Object: v}}, t.audience...) 1196 1197} 1198 1199// RemoveAudienceObject deletes the value from the specified index 1200func (t *Relationship) RemoveAudienceObject(index int) { 1201 copy(t.audience[index:], t.audience[index+1:]) 1202 t.audience[len(t.audience)-1] = nil 1203 t.audience = t.audience[:len(t.audience)-1] 1204 1205} 1206 1207// IsAudienceLink determines whether the call to GetAudienceLink is safe for the specified index 1208func (t *Relationship) IsAudienceLink(index int) (ok bool) { 1209 return t.audience[index].Link != nil 1210 1211} 1212 1213// GetAudienceLink returns the value safely if IsAudienceLink returned true for the specified index 1214func (t *Relationship) GetAudienceLink(index int) (v LinkType) { 1215 return t.audience[index].Link 1216 1217} 1218 1219// AppendAudienceLink adds to the back of audience a LinkType type 1220func (t *Relationship) AppendAudienceLink(v LinkType) { 1221 t.audience = append(t.audience, &audienceIntermediateType{Link: v}) 1222 1223} 1224 1225// PrependAudienceLink adds to the front of audience a LinkType type 1226func (t *Relationship) PrependAudienceLink(v LinkType) { 1227 t.audience = append([]*audienceIntermediateType{&audienceIntermediateType{Link: v}}, t.audience...) 1228 1229} 1230 1231// RemoveAudienceLink deletes the value from the specified index 1232func (t *Relationship) RemoveAudienceLink(index int) { 1233 copy(t.audience[index:], t.audience[index+1:]) 1234 t.audience[len(t.audience)-1] = nil 1235 t.audience = t.audience[:len(t.audience)-1] 1236 1237} 1238 1239// IsAudienceIRI determines whether the call to GetAudienceIRI is safe for the specified index 1240func (t *Relationship) IsAudienceIRI(index int) (ok bool) { 1241 return t.audience[index].IRI != nil 1242 1243} 1244 1245// GetAudienceIRI returns the value safely if IsAudienceIRI returned true for the specified index 1246func (t *Relationship) GetAudienceIRI(index int) (v *url.URL) { 1247 return t.audience[index].IRI 1248 1249} 1250 1251// AppendAudienceIRI adds to the back of audience a *url.URL type 1252func (t *Relationship) AppendAudienceIRI(v *url.URL) { 1253 t.audience = append(t.audience, &audienceIntermediateType{IRI: v}) 1254 1255} 1256 1257// PrependAudienceIRI adds to the front of audience a *url.URL type 1258func (t *Relationship) PrependAudienceIRI(v *url.URL) { 1259 t.audience = append([]*audienceIntermediateType{&audienceIntermediateType{IRI: v}}, t.audience...) 1260 1261} 1262 1263// RemoveAudienceIRI deletes the value from the specified index 1264func (t *Relationship) RemoveAudienceIRI(index int) { 1265 copy(t.audience[index:], t.audience[index+1:]) 1266 t.audience[len(t.audience)-1] = nil 1267 t.audience = t.audience[:len(t.audience)-1] 1268 1269} 1270 1271// HasUnknownAudience determines whether the call to GetUnknownAudience is safe 1272func (t *Relationship) HasUnknownAudience() (ok bool) { 1273 return t.audience != nil && t.audience[0].unknown_ != nil 1274 1275} 1276 1277// GetUnknownAudience returns the unknown value for audience 1278func (t *Relationship) GetUnknownAudience() (v interface{}) { 1279 return t.audience[0].unknown_ 1280 1281} 1282 1283// SetUnknownAudience sets the unknown value of audience 1284func (t *Relationship) SetUnknownAudience(i interface{}) { 1285 if t.unknown_ == nil { 1286 t.unknown_ = make(map[string]interface{}) 1287 } 1288 tmp := &audienceIntermediateType{} 1289 tmp.unknown_ = i 1290 t.audience = append(t.audience, tmp) 1291 1292} 1293 1294// ContentLen determines the number of elements able to be used for the IsContentString, GetContentString, and RemoveContentString functions 1295func (t *Relationship) ContentLen() (l int) { 1296 return len(t.content) 1297 1298} 1299 1300// IsContentString determines whether the call to GetContentString is safe for the specified index 1301func (t *Relationship) IsContentString(index int) (ok bool) { 1302 return t.content[index].stringName != nil 1303 1304} 1305 1306// GetContentString returns the value safely if IsContentString returned true for the specified index 1307func (t *Relationship) GetContentString(index int) (v string) { 1308 return *t.content[index].stringName 1309 1310} 1311 1312// AppendContentString adds to the back of content a string type 1313func (t *Relationship) AppendContentString(v string) { 1314 t.content = append(t.content, &contentIntermediateType{stringName: &v}) 1315 1316} 1317 1318// PrependContentString adds to the front of content a string type 1319func (t *Relationship) PrependContentString(v string) { 1320 t.content = append([]*contentIntermediateType{&contentIntermediateType{stringName: &v}}, t.content...) 1321 1322} 1323 1324// RemoveContentString deletes the value from the specified index 1325func (t *Relationship) RemoveContentString(index int) { 1326 copy(t.content[index:], t.content[index+1:]) 1327 t.content[len(t.content)-1] = nil 1328 t.content = t.content[:len(t.content)-1] 1329 1330} 1331 1332// IsContentLangString determines whether the call to GetContentLangString is safe for the specified index 1333func (t *Relationship) IsContentLangString(index int) (ok bool) { 1334 return t.content[index].langString != nil 1335 1336} 1337 1338// GetContentLangString returns the value safely if IsContentLangString returned true for the specified index 1339func (t *Relationship) GetContentLangString(index int) (v string) { 1340 return *t.content[index].langString 1341 1342} 1343 1344// AppendContentLangString adds to the back of content a string type 1345func (t *Relationship) AppendContentLangString(v string) { 1346 t.content = append(t.content, &contentIntermediateType{langString: &v}) 1347 1348} 1349 1350// PrependContentLangString adds to the front of content a string type 1351func (t *Relationship) PrependContentLangString(v string) { 1352 t.content = append([]*contentIntermediateType{&contentIntermediateType{langString: &v}}, t.content...) 1353 1354} 1355 1356// RemoveContentLangString deletes the value from the specified index 1357func (t *Relationship) RemoveContentLangString(index int) { 1358 copy(t.content[index:], t.content[index+1:]) 1359 t.content[len(t.content)-1] = nil 1360 t.content = t.content[:len(t.content)-1] 1361 1362} 1363 1364// IsContentIRI determines whether the call to GetContentIRI is safe for the specified index 1365func (t *Relationship) IsContentIRI(index int) (ok bool) { 1366 return t.content[index].IRI != nil 1367 1368} 1369 1370// GetContentIRI returns the value safely if IsContentIRI returned true for the specified index 1371func (t *Relationship) GetContentIRI(index int) (v *url.URL) { 1372 return t.content[index].IRI 1373 1374} 1375 1376// AppendContentIRI adds to the back of content a *url.URL type 1377func (t *Relationship) AppendContentIRI(v *url.URL) { 1378 t.content = append(t.content, &contentIntermediateType{IRI: v}) 1379 1380} 1381 1382// PrependContentIRI adds to the front of content a *url.URL type 1383func (t *Relationship) PrependContentIRI(v *url.URL) { 1384 t.content = append([]*contentIntermediateType{&contentIntermediateType{IRI: v}}, t.content...) 1385 1386} 1387 1388// RemoveContentIRI deletes the value from the specified index 1389func (t *Relationship) RemoveContentIRI(index int) { 1390 copy(t.content[index:], t.content[index+1:]) 1391 t.content[len(t.content)-1] = nil 1392 t.content = t.content[:len(t.content)-1] 1393 1394} 1395 1396// HasUnknownContent determines whether the call to GetUnknownContent is safe 1397func (t *Relationship) HasUnknownContent() (ok bool) { 1398 return t.content != nil && t.content[0].unknown_ != nil 1399 1400} 1401 1402// GetUnknownContent returns the unknown value for content 1403func (t *Relationship) GetUnknownContent() (v interface{}) { 1404 return t.content[0].unknown_ 1405 1406} 1407 1408// SetUnknownContent sets the unknown value of content 1409func (t *Relationship) SetUnknownContent(i interface{}) { 1410 if t.unknown_ == nil { 1411 t.unknown_ = make(map[string]interface{}) 1412 } 1413 tmp := &contentIntermediateType{} 1414 tmp.unknown_ = i 1415 t.content = append(t.content, tmp) 1416 1417} 1418 1419// ContentMapLanguages returns all languages for this property's language mapping, or nil if there are none. 1420func (t *Relationship) ContentMapLanguages() (l []string) { 1421 if t.contentMap == nil || len(t.contentMap) == 0 { 1422 return nil 1423 } 1424 for k := range t.contentMap { 1425 l = append(l, k) 1426 } 1427 return 1428 1429} 1430 1431// GetContentMap retrieves the value of the property for the specified language, or an empty string if it does not exist 1432func (t *Relationship) GetContentMap(l string) (v string) { 1433 if t.contentMap == nil { 1434 return "" 1435 } 1436 ok := false 1437 v, ok = t.contentMap[l] 1438 if !ok { 1439 return "" 1440 } 1441 return v 1442 1443} 1444 1445// SetContentMap sets the value of the property for the specified language 1446func (t *Relationship) SetContentMap(l string, v string) { 1447 if t.contentMap == nil { 1448 t.contentMap = make(map[string]string) 1449 } 1450 t.contentMap[l] = v 1451 1452} 1453 1454// ContextLen determines the number of elements able to be used for the IsContextObject, GetContextObject, and RemoveContextObject functions 1455func (t *Relationship) ContextLen() (l int) { 1456 return len(t.context) 1457 1458} 1459 1460// IsContextObject determines whether the call to GetContextObject is safe for the specified index 1461func (t *Relationship) IsContextObject(index int) (ok bool) { 1462 return t.context[index].Object != nil 1463 1464} 1465 1466// GetContextObject returns the value safely if IsContextObject returned true for the specified index 1467func (t *Relationship) GetContextObject(index int) (v ObjectType) { 1468 return t.context[index].Object 1469 1470} 1471 1472// AppendContextObject adds to the back of context a ObjectType type 1473func (t *Relationship) AppendContextObject(v ObjectType) { 1474 t.context = append(t.context, &contextIntermediateType{Object: v}) 1475 1476} 1477 1478// PrependContextObject adds to the front of context a ObjectType type 1479func (t *Relationship) PrependContextObject(v ObjectType) { 1480 t.context = append([]*contextIntermediateType{&contextIntermediateType{Object: v}}, t.context...) 1481 1482} 1483 1484// RemoveContextObject deletes the value from the specified index 1485func (t *Relationship) RemoveContextObject(index int) { 1486 copy(t.context[index:], t.context[index+1:]) 1487 t.context[len(t.context)-1] = nil 1488 t.context = t.context[:len(t.context)-1] 1489 1490} 1491 1492// IsContextLink determines whether the call to GetContextLink is safe for the specified index 1493func (t *Relationship) IsContextLink(index int) (ok bool) { 1494 return t.context[index].Link != nil 1495 1496} 1497 1498// GetContextLink returns the value safely if IsContextLink returned true for the specified index 1499func (t *Relationship) GetContextLink(index int) (v LinkType) { 1500 return t.context[index].Link 1501 1502} 1503 1504// AppendContextLink adds to the back of context a LinkType type 1505func (t *Relationship) AppendContextLink(v LinkType) { 1506 t.context = append(t.context, &contextIntermediateType{Link: v}) 1507 1508} 1509 1510// PrependContextLink adds to the front of context a LinkType type 1511func (t *Relationship) PrependContextLink(v LinkType) { 1512 t.context = append([]*contextIntermediateType{&contextIntermediateType{Link: v}}, t.context...) 1513 1514} 1515 1516// RemoveContextLink deletes the value from the specified index 1517func (t *Relationship) RemoveContextLink(index int) { 1518 copy(t.context[index:], t.context[index+1:]) 1519 t.context[len(t.context)-1] = nil 1520 t.context = t.context[:len(t.context)-1] 1521 1522} 1523 1524// IsContextIRI determines whether the call to GetContextIRI is safe for the specified index 1525func (t *Relationship) IsContextIRI(index int) (ok bool) { 1526 return t.context[index].IRI != nil 1527 1528} 1529 1530// GetContextIRI returns the value safely if IsContextIRI returned true for the specified index 1531func (t *Relationship) GetContextIRI(index int) (v *url.URL) { 1532 return t.context[index].IRI 1533 1534} 1535 1536// AppendContextIRI adds to the back of context a *url.URL type 1537func (t *Relationship) AppendContextIRI(v *url.URL) { 1538 t.context = append(t.context, &contextIntermediateType{IRI: v}) 1539 1540} 1541 1542// PrependContextIRI adds to the front of context a *url.URL type 1543func (t *Relationship) PrependContextIRI(v *url.URL) { 1544 t.context = append([]*contextIntermediateType{&contextIntermediateType{IRI: v}}, t.context...) 1545 1546} 1547 1548// RemoveContextIRI deletes the value from the specified index 1549func (t *Relationship) RemoveContextIRI(index int) { 1550 copy(t.context[index:], t.context[index+1:]) 1551 t.context[len(t.context)-1] = nil 1552 t.context = t.context[:len(t.context)-1] 1553 1554} 1555 1556// HasUnknownContext determines whether the call to GetUnknownContext is safe 1557func (t *Relationship) HasUnknownContext() (ok bool) { 1558 return t.context != nil && t.context[0].unknown_ != nil 1559 1560} 1561 1562// GetUnknownContext returns the unknown value for context 1563func (t *Relationship) GetUnknownContext() (v interface{}) { 1564 return t.context[0].unknown_ 1565 1566} 1567 1568// SetUnknownContext sets the unknown value of context 1569func (t *Relationship) SetUnknownContext(i interface{}) { 1570 if t.unknown_ == nil { 1571 t.unknown_ = make(map[string]interface{}) 1572 } 1573 tmp := &contextIntermediateType{} 1574 tmp.unknown_ = i 1575 t.context = append(t.context, tmp) 1576 1577} 1578 1579// NameLen determines the number of elements able to be used for the IsNameString, GetNameString, and RemoveNameString functions 1580func (t *Relationship) NameLen() (l int) { 1581 return len(t.name) 1582 1583} 1584 1585// IsNameString determines whether the call to GetNameString is safe for the specified index 1586func (t *Relationship) IsNameString(index int) (ok bool) { 1587 return t.name[index].stringName != nil 1588 1589} 1590 1591// GetNameString returns the value safely if IsNameString returned true for the specified index 1592func (t *Relationship) GetNameString(index int) (v string) { 1593 return *t.name[index].stringName 1594 1595} 1596 1597// AppendNameString adds to the back of name a string type 1598func (t *Relationship) AppendNameString(v string) { 1599 t.name = append(t.name, &nameIntermediateType{stringName: &v}) 1600 1601} 1602 1603// PrependNameString adds to the front of name a string type 1604func (t *Relationship) PrependNameString(v string) { 1605 t.name = append([]*nameIntermediateType{&nameIntermediateType{stringName: &v}}, t.name...) 1606 1607} 1608 1609// RemoveNameString deletes the value from the specified index 1610func (t *Relationship) RemoveNameString(index int) { 1611 copy(t.name[index:], t.name[index+1:]) 1612 t.name[len(t.name)-1] = nil 1613 t.name = t.name[:len(t.name)-1] 1614 1615} 1616 1617// IsNameLangString determines whether the call to GetNameLangString is safe for the specified index 1618func (t *Relationship) IsNameLangString(index int) (ok bool) { 1619 return t.name[index].langString != nil 1620 1621} 1622 1623// GetNameLangString returns the value safely if IsNameLangString returned true for the specified index 1624func (t *Relationship) GetNameLangString(index int) (v string) { 1625 return *t.name[index].langString 1626 1627} 1628 1629// AppendNameLangString adds to the back of name a string type 1630func (t *Relationship) AppendNameLangString(v string) { 1631 t.name = append(t.name, &nameIntermediateType{langString: &v}) 1632 1633} 1634 1635// PrependNameLangString adds to the front of name a string type 1636func (t *Relationship) PrependNameLangString(v string) { 1637 t.name = append([]*nameIntermediateType{&nameIntermediateType{langString: &v}}, t.name...) 1638 1639} 1640 1641// RemoveNameLangString deletes the value from the specified index 1642func (t *Relationship) RemoveNameLangString(index int) { 1643 copy(t.name[index:], t.name[index+1:]) 1644 t.name[len(t.name)-1] = nil 1645 t.name = t.name[:len(t.name)-1] 1646 1647} 1648 1649// IsNameIRI determines whether the call to GetNameIRI is safe for the specified index 1650func (t *Relationship) IsNameIRI(index int) (ok bool) { 1651 return t.name[index].IRI != nil 1652 1653} 1654 1655// GetNameIRI returns the value safely if IsNameIRI returned true for the specified index 1656func (t *Relationship) GetNameIRI(index int) (v *url.URL) { 1657 return t.name[index].IRI 1658 1659} 1660 1661// AppendNameIRI adds to the back of name a *url.URL type 1662func (t *Relationship) AppendNameIRI(v *url.URL) { 1663 t.name = append(t.name, &nameIntermediateType{IRI: v}) 1664 1665} 1666 1667// PrependNameIRI adds to the front of name a *url.URL type 1668func (t *Relationship) PrependNameIRI(v *url.URL) { 1669 t.name = append([]*nameIntermediateType{&nameIntermediateType{IRI: v}}, t.name...) 1670 1671} 1672 1673// RemoveNameIRI deletes the value from the specified index 1674func (t *Relationship) RemoveNameIRI(index int) { 1675 copy(t.name[index:], t.name[index+1:]) 1676 t.name[len(t.name)-1] = nil 1677 t.name = t.name[:len(t.name)-1] 1678 1679} 1680 1681// HasUnknownName determines whether the call to GetUnknownName is safe 1682func (t *Relationship) HasUnknownName() (ok bool) { 1683 return t.name != nil && t.name[0].unknown_ != nil 1684 1685} 1686 1687// GetUnknownName returns the unknown value for name 1688func (t *Relationship) GetUnknownName() (v interface{}) { 1689 return t.name[0].unknown_ 1690 1691} 1692 1693// SetUnknownName sets the unknown value of name 1694func (t *Relationship) SetUnknownName(i interface{}) { 1695 if t.unknown_ == nil { 1696 t.unknown_ = make(map[string]interface{}) 1697 } 1698 tmp := &nameIntermediateType{} 1699 tmp.unknown_ = i 1700 t.name = append(t.name, tmp) 1701 1702} 1703 1704// NameMapLanguages returns all languages for this property's language mapping, or nil if there are none. 1705func (t *Relationship) NameMapLanguages() (l []string) { 1706 if t.nameMap == nil || len(t.nameMap) == 0 { 1707 return nil 1708 } 1709 for k := range t.nameMap { 1710 l = append(l, k) 1711 } 1712 return 1713 1714} 1715 1716// GetNameMap retrieves the value of the property for the specified language, or an empty string if it does not exist 1717func (t *Relationship) GetNameMap(l string) (v string) { 1718 if t.nameMap == nil { 1719 return "" 1720 } 1721 ok := false 1722 v, ok = t.nameMap[l] 1723 if !ok { 1724 return "" 1725 } 1726 return v 1727 1728} 1729 1730// SetNameMap sets the value of the property for the specified language 1731func (t *Relationship) SetNameMap(l string, v string) { 1732 if t.nameMap == nil { 1733 t.nameMap = make(map[string]string) 1734 } 1735 t.nameMap[l] = v 1736 1737} 1738 1739// IsEndTime determines whether the call to GetEndTime is safe 1740func (t *Relationship) IsEndTime() (ok bool) { 1741 return t.endTime != nil && t.endTime.dateTime != nil 1742 1743} 1744 1745// GetEndTime returns the value safely if IsEndTime returned true 1746func (t *Relationship) GetEndTime() (v time.Time) { 1747 return *t.endTime.dateTime 1748 1749} 1750 1751// SetEndTime sets the value of endTime to be of time.Time type 1752func (t *Relationship) SetEndTime(v time.Time) { 1753 t.endTime = &endTimeIntermediateType{dateTime: &v} 1754 1755} 1756 1757// IsEndTimeIRI determines whether the call to GetEndTimeIRI is safe 1758func (t *Relationship) IsEndTimeIRI() (ok bool) { 1759 return t.endTime != nil && t.endTime.IRI != nil 1760 1761} 1762 1763// GetEndTimeIRI returns the value safely if IsEndTimeIRI returned true 1764func (t *Relationship) GetEndTimeIRI() (v *url.URL) { 1765 return t.endTime.IRI 1766 1767} 1768 1769// SetEndTimeIRI sets the value of endTime to be of *url.URL type 1770func (t *Relationship) SetEndTimeIRI(v *url.URL) { 1771 t.endTime = &endTimeIntermediateType{IRI: v} 1772 1773} 1774 1775// HasUnknownEndTime determines whether the call to GetUnknownEndTime is safe 1776func (t *Relationship) HasUnknownEndTime() (ok bool) { 1777 return t.endTime != nil && t.endTime.unknown_ != nil 1778 1779} 1780 1781// GetUnknownEndTime returns the unknown value for endTime 1782func (t *Relationship) GetUnknownEndTime() (v interface{}) { 1783 return t.endTime.unknown_ 1784 1785} 1786 1787// SetUnknownEndTime sets the unknown value of endTime 1788func (t *Relationship) SetUnknownEndTime(i interface{}) { 1789 if t.unknown_ == nil { 1790 t.unknown_ = make(map[string]interface{}) 1791 } 1792 tmp := &endTimeIntermediateType{} 1793 tmp.unknown_ = i 1794 t.endTime = tmp 1795 1796} 1797 1798// GeneratorLen determines the number of elements able to be used for the IsGeneratorObject, GetGeneratorObject, and RemoveGeneratorObject functions 1799func (t *Relationship) GeneratorLen() (l int) { 1800 return len(t.generator) 1801 1802} 1803 1804// IsGeneratorObject determines whether the call to GetGeneratorObject is safe for the specified index 1805func (t *Relationship) IsGeneratorObject(index int) (ok bool) { 1806 return t.generator[index].Object != nil 1807 1808} 1809 1810// GetGeneratorObject returns the value safely if IsGeneratorObject returned true for the specified index 1811func (t *Relationship) GetGeneratorObject(index int) (v ObjectType) { 1812 return t.generator[index].Object 1813 1814} 1815 1816// AppendGeneratorObject adds to the back of generator a ObjectType type 1817func (t *Relationship) AppendGeneratorObject(v ObjectType) { 1818 t.generator = append(t.generator, &generatorIntermediateType{Object: v}) 1819 1820} 1821 1822// PrependGeneratorObject adds to the front of generator a ObjectType type 1823func (t *Relationship) PrependGeneratorObject(v ObjectType) { 1824 t.generator = append([]*generatorIntermediateType{&generatorIntermediateType{Object: v}}, t.generator...) 1825 1826} 1827 1828// RemoveGeneratorObject deletes the value from the specified index 1829func (t *Relationship) RemoveGeneratorObject(index int) { 1830 copy(t.generator[index:], t.generator[index+1:]) 1831 t.generator[len(t.generator)-1] = nil 1832 t.generator = t.generator[:len(t.generator)-1] 1833 1834} 1835 1836// IsGeneratorLink determines whether the call to GetGeneratorLink is safe for the specified index 1837func (t *Relationship) IsGeneratorLink(index int) (ok bool) { 1838 return t.generator[index].Link != nil 1839 1840} 1841 1842// GetGeneratorLink returns the value safely if IsGeneratorLink returned true for the specified index 1843func (t *Relationship) GetGeneratorLink(index int) (v LinkType) { 1844 return t.generator[index].Link 1845 1846} 1847 1848// AppendGeneratorLink adds to the back of generator a LinkType type 1849func (t *Relationship) AppendGeneratorLink(v LinkType) { 1850 t.generator = append(t.generator, &generatorIntermediateType{Link: v}) 1851 1852} 1853 1854// PrependGeneratorLink adds to the front of generator a LinkType type 1855func (t *Relationship) PrependGeneratorLink(v LinkType) { 1856 t.generator = append([]*generatorIntermediateType{&generatorIntermediateType{Link: v}}, t.generator...) 1857 1858} 1859 1860// RemoveGeneratorLink deletes the value from the specified index 1861func (t *Relationship) RemoveGeneratorLink(index int) { 1862 copy(t.generator[index:], t.generator[index+1:]) 1863 t.generator[len(t.generator)-1] = nil 1864 t.generator = t.generator[:len(t.generator)-1] 1865 1866} 1867 1868// IsGeneratorIRI determines whether the call to GetGeneratorIRI is safe for the specified index 1869func (t *Relationship) IsGeneratorIRI(index int) (ok bool) { 1870 return t.generator[index].IRI != nil 1871 1872} 1873 1874// GetGeneratorIRI returns the value safely if IsGeneratorIRI returned true for the specified index 1875func (t *Relationship) GetGeneratorIRI(index int) (v *url.URL) { 1876 return t.generator[index].IRI 1877 1878} 1879 1880// AppendGeneratorIRI adds to the back of generator a *url.URL type 1881func (t *Relationship) AppendGeneratorIRI(v *url.URL) { 1882 t.generator = append(t.generator, &generatorIntermediateType{IRI: v}) 1883 1884} 1885 1886// PrependGeneratorIRI adds to the front of generator a *url.URL type 1887func (t *Relationship) PrependGeneratorIRI(v *url.URL) { 1888 t.generator = append([]*generatorIntermediateType{&generatorIntermediateType{IRI: v}}, t.generator...) 1889 1890} 1891 1892// RemoveGeneratorIRI deletes the value from the specified index 1893func (t *Relationship) RemoveGeneratorIRI(index int) { 1894 copy(t.generator[index:], t.generator[index+1:]) 1895 t.generator[len(t.generator)-1] = nil 1896 t.generator = t.generator[:len(t.generator)-1] 1897 1898} 1899 1900// HasUnknownGenerator determines whether the call to GetUnknownGenerator is safe 1901func (t *Relationship) HasUnknownGenerator() (ok bool) { 1902 return t.generator != nil && t.generator[0].unknown_ != nil 1903 1904} 1905 1906// GetUnknownGenerator returns the unknown value for generator 1907func (t *Relationship) GetUnknownGenerator() (v interface{}) { 1908 return t.generator[0].unknown_ 1909 1910} 1911 1912// SetUnknownGenerator sets the unknown value of generator 1913func (t *Relationship) SetUnknownGenerator(i interface{}) { 1914 if t.unknown_ == nil { 1915 t.unknown_ = make(map[string]interface{}) 1916 } 1917 tmp := &generatorIntermediateType{} 1918 tmp.unknown_ = i 1919 t.generator = append(t.generator, tmp) 1920 1921} 1922 1923// IconLen determines the number of elements able to be used for the IsIconImage, GetIconImage, and RemoveIconImage functions 1924func (t *Relationship) IconLen() (l int) { 1925 return len(t.icon) 1926 1927} 1928 1929// IsIconImage determines whether the call to GetIconImage is safe for the specified index 1930func (t *Relationship) IsIconImage(index int) (ok bool) { 1931 return t.icon[index].Image != nil 1932 1933} 1934 1935// GetIconImage returns the value safely if IsIconImage returned true for the specified index 1936func (t *Relationship) GetIconImage(index int) (v ImageType) { 1937 return t.icon[index].Image 1938 1939} 1940 1941// AppendIconImage adds to the back of icon a ImageType type 1942func (t *Relationship) AppendIconImage(v ImageType) { 1943 t.icon = append(t.icon, &iconIntermediateType{Image: v}) 1944 1945} 1946 1947// PrependIconImage adds to the front of icon a ImageType type 1948func (t *Relationship) PrependIconImage(v ImageType) { 1949 t.icon = append([]*iconIntermediateType{&iconIntermediateType{Image: v}}, t.icon...) 1950 1951} 1952 1953// RemoveIconImage deletes the value from the specified index 1954func (t *Relationship) RemoveIconImage(index int) { 1955 copy(t.icon[index:], t.icon[index+1:]) 1956 t.icon[len(t.icon)-1] = nil 1957 t.icon = t.icon[:len(t.icon)-1] 1958 1959} 1960 1961// IsIconLink determines whether the call to GetIconLink is safe for the specified index 1962func (t *Relationship) IsIconLink(index int) (ok bool) { 1963 return t.icon[index].Link != nil 1964 1965} 1966 1967// GetIconLink returns the value safely if IsIconLink returned true for the specified index 1968func (t *Relationship) GetIconLink(index int) (v LinkType) { 1969 return t.icon[index].Link 1970 1971} 1972 1973// AppendIconLink adds to the back of icon a LinkType type 1974func (t *Relationship) AppendIconLink(v LinkType) { 1975 t.icon = append(t.icon, &iconIntermediateType{Link: v}) 1976 1977} 1978 1979// PrependIconLink adds to the front of icon a LinkType type 1980func (t *Relationship) PrependIconLink(v LinkType) { 1981 t.icon = append([]*iconIntermediateType{&iconIntermediateType{Link: v}}, t.icon...) 1982 1983} 1984 1985// RemoveIconLink deletes the value from the specified index 1986func (t *Relationship) RemoveIconLink(index int) { 1987 copy(t.icon[index:], t.icon[index+1:]) 1988 t.icon[len(t.icon)-1] = nil 1989 t.icon = t.icon[:len(t.icon)-1] 1990 1991} 1992 1993// IsIconIRI determines whether the call to GetIconIRI is safe for the specified index 1994func (t *Relationship) IsIconIRI(index int) (ok bool) { 1995 return t.icon[index].IRI != nil 1996 1997} 1998 1999// GetIconIRI returns the value safely if IsIconIRI returned true for the specified index 2000func (t *Relationship) GetIconIRI(index int) (v *url.URL) { 2001 return t.icon[index].IRI 2002 2003} 2004 2005// AppendIconIRI adds to the back of icon a *url.URL type 2006func (t *Relationship) AppendIconIRI(v *url.URL) { 2007 t.icon = append(t.icon, &iconIntermediateType{IRI: v}) 2008 2009} 2010 2011// PrependIconIRI adds to the front of icon a *url.URL type 2012func (t *Relationship) PrependIconIRI(v *url.URL) { 2013 t.icon = append([]*iconIntermediateType{&iconIntermediateType{IRI: v}}, t.icon...) 2014 2015} 2016 2017// RemoveIconIRI deletes the value from the specified index 2018func (t *Relationship) RemoveIconIRI(index int) { 2019 copy(t.icon[index:], t.icon[index+1:]) 2020 t.icon[len(t.icon)-1] = nil 2021 t.icon = t.icon[:len(t.icon)-1] 2022 2023} 2024 2025// HasUnknownIcon determines whether the call to GetUnknownIcon is safe 2026func (t *Relationship) HasUnknownIcon() (ok bool) { 2027 return t.icon != nil && t.icon[0].unknown_ != nil 2028 2029} 2030 2031// GetUnknownIcon returns the unknown value for icon 2032func (t *Relationship) GetUnknownIcon() (v interface{}) { 2033 return t.icon[0].unknown_ 2034 2035} 2036 2037// SetUnknownIcon sets the unknown value of icon 2038func (t *Relationship) SetUnknownIcon(i interface{}) { 2039 if t.unknown_ == nil { 2040 t.unknown_ = make(map[string]interface{}) 2041 } 2042 tmp := &iconIntermediateType{} 2043 tmp.unknown_ = i 2044 t.icon = append(t.icon, tmp) 2045 2046} 2047 2048// HasId determines whether the call to GetId is safe 2049func (t *Relationship) HasId() (ok bool) { 2050 return t.id != nil 2051 2052} 2053 2054// GetId returns the value for id 2055func (t *Relationship) GetId() (v *url.URL) { 2056 return t.id 2057 2058} 2059 2060// SetId sets the value of id 2061func (t *Relationship) SetId(v *url.URL) { 2062 t.id = v 2063 2064} 2065 2066// HasUnknownId determines whether the call to GetUnknownId is safe 2067func (t *Relationship) HasUnknownId() (ok bool) { 2068 return t.unknown_ != nil && t.unknown_["id"] != nil 2069 2070} 2071 2072// GetUnknownId returns the unknown value for id 2073func (t *Relationship) GetUnknownId() (v interface{}) { 2074 return t.unknown_["id"] 2075 2076} 2077 2078// SetUnknownId sets the unknown value of id 2079func (t *Relationship) SetUnknownId(i interface{}) { 2080 if t.unknown_ == nil { 2081 t.unknown_ = make(map[string]interface{}) 2082 } 2083 t.unknown_["id"] = i 2084 2085} 2086 2087// ImageLen determines the number of elements able to be used for the IsImageImage, GetImageImage, and RemoveImageImage functions 2088func (t *Relationship) ImageLen() (l int) { 2089 return len(t.image) 2090 2091} 2092 2093// IsImageImage determines whether the call to GetImageImage is safe for the specified index 2094func (t *Relationship) IsImageImage(index int) (ok bool) { 2095 return t.image[index].Image != nil 2096 2097} 2098 2099// GetImageImage returns the value safely if IsImageImage returned true for the specified index 2100func (t *Relationship) GetImageImage(index int) (v ImageType) { 2101 return t.image[index].Image 2102 2103} 2104 2105// AppendImageImage adds to the back of image a ImageType type 2106func (t *Relationship) AppendImageImage(v ImageType) { 2107 t.image = append(t.image, &imageIntermediateType{Image: v}) 2108 2109} 2110 2111// PrependImageImage adds to the front of image a ImageType type 2112func (t *Relationship) PrependImageImage(v ImageType) { 2113 t.image = append([]*imageIntermediateType{&imageIntermediateType{Image: v}}, t.image...) 2114 2115} 2116 2117// RemoveImageImage deletes the value from the specified index 2118func (t *Relationship) RemoveImageImage(index int) { 2119 copy(t.image[index:], t.image[index+1:]) 2120 t.image[len(t.image)-1] = nil 2121 t.image = t.image[:len(t.image)-1] 2122 2123} 2124 2125// IsImageLink determines whether the call to GetImageLink is safe for the specified index 2126func (t *Relationship) IsImageLink(index int) (ok bool) { 2127 return t.image[index].Link != nil 2128 2129} 2130 2131// GetImageLink returns the value safely if IsImageLink returned true for the specified index 2132func (t *Relationship) GetImageLink(index int) (v LinkType) { 2133 return t.image[index].Link 2134 2135} 2136 2137// AppendImageLink adds to the back of image a LinkType type 2138func (t *Relationship) AppendImageLink(v LinkType) { 2139 t.image = append(t.image, &imageIntermediateType{Link: v}) 2140 2141} 2142 2143// PrependImageLink adds to the front of image a LinkType type 2144func (t *Relationship) PrependImageLink(v LinkType) { 2145 t.image = append([]*imageIntermediateType{&imageIntermediateType{Link: v}}, t.image...) 2146 2147} 2148 2149// RemoveImageLink deletes the value from the specified index 2150func (t *Relationship) RemoveImageLink(index int) { 2151 copy(t.image[index:], t.image[index+1:]) 2152 t.image[len(t.image)-1] = nil 2153 t.image = t.image[:len(t.image)-1] 2154 2155} 2156 2157// IsImageIRI determines whether the call to GetImageIRI is safe for the specified index 2158func (t *Relationship) IsImageIRI(index int) (ok bool) { 2159 return t.image[index].IRI != nil 2160 2161} 2162 2163// GetImageIRI returns the value safely if IsImageIRI returned true for the specified index 2164func (t *Relationship) GetImageIRI(index int) (v *url.URL) { 2165 return t.image[index].IRI 2166 2167} 2168 2169// AppendImageIRI adds to the back of image a *url.URL type 2170func (t *Relationship) AppendImageIRI(v *url.URL) { 2171 t.image = append(t.image, &imageIntermediateType{IRI: v}) 2172 2173} 2174 2175// PrependImageIRI adds to the front of image a *url.URL type 2176func (t *Relationship) PrependImageIRI(v *url.URL) { 2177 t.image = append([]*imageIntermediateType{&imageIntermediateType{IRI: v}}, t.image...) 2178 2179} 2180 2181// RemoveImageIRI deletes the value from the specified index 2182func (t *Relationship) RemoveImageIRI(index int) { 2183 copy(t.image[index:], t.image[index+1:]) 2184 t.image[len(t.image)-1] = nil 2185 t.image = t.image[:len(t.image)-1] 2186 2187} 2188 2189// HasUnknownImage determines whether the call to GetUnknownImage is safe 2190func (t *Relationship) HasUnknownImage() (ok bool) { 2191 return t.image != nil && t.image[0].unknown_ != nil 2192 2193} 2194 2195// GetUnknownImage returns the unknown value for image 2196func (t *Relationship) GetUnknownImage() (v interface{}) { 2197 return t.image[0].unknown_ 2198 2199} 2200 2201// SetUnknownImage sets the unknown value of image 2202func (t *Relationship) SetUnknownImage(i interface{}) { 2203 if t.unknown_ == nil { 2204 t.unknown_ = make(map[string]interface{}) 2205 } 2206 tmp := &imageIntermediateType{} 2207 tmp.unknown_ = i 2208 t.image = append(t.image, tmp) 2209 2210} 2211 2212// InReplyToLen determines the number of elements able to be used for the IsInReplyToObject, GetInReplyToObject, and RemoveInReplyToObject functions 2213func (t *Relationship) InReplyToLen() (l int) { 2214 return len(t.inReplyTo) 2215 2216} 2217 2218// IsInReplyToObject determines whether the call to GetInReplyToObject is safe for the specified index 2219func (t *Relationship) IsInReplyToObject(index int) (ok bool) { 2220 return t.inReplyTo[index].Object != nil 2221 2222} 2223 2224// GetInReplyToObject returns the value safely if IsInReplyToObject returned true for the specified index 2225func (t *Relationship) GetInReplyToObject(index int) (v ObjectType) { 2226 return t.inReplyTo[index].Object 2227 2228} 2229 2230// AppendInReplyToObject adds to the back of inReplyTo a ObjectType type 2231func (t *Relationship) AppendInReplyToObject(v ObjectType) { 2232 t.inReplyTo = append(t.inReplyTo, &inReplyToIntermediateType{Object: v}) 2233 2234} 2235 2236// PrependInReplyToObject adds to the front of inReplyTo a ObjectType type 2237func (t *Relationship) PrependInReplyToObject(v ObjectType) { 2238 t.inReplyTo = append([]*inReplyToIntermediateType{&inReplyToIntermediateType{Object: v}}, t.inReplyTo...) 2239 2240} 2241 2242// RemoveInReplyToObject deletes the value from the specified index 2243func (t *Relationship) RemoveInReplyToObject(index int) { 2244 copy(t.inReplyTo[index:], t.inReplyTo[index+1:]) 2245 t.inReplyTo[len(t.inReplyTo)-1] = nil 2246 t.inReplyTo = t.inReplyTo[:len(t.inReplyTo)-1] 2247 2248} 2249 2250// IsInReplyToLink determines whether the call to GetInReplyToLink is safe for the specified index 2251func (t *Relationship) IsInReplyToLink(index int) (ok bool) { 2252 return t.inReplyTo[index].Link != nil 2253 2254} 2255 2256// GetInReplyToLink returns the value safely if IsInReplyToLink returned true for the specified index 2257func (t *Relationship) GetInReplyToLink(index int) (v LinkType) { 2258 return t.inReplyTo[index].Link 2259 2260} 2261 2262// AppendInReplyToLink adds to the back of inReplyTo a LinkType type 2263func (t *Relationship) AppendInReplyToLink(v LinkType) { 2264 t.inReplyTo = append(t.inReplyTo, &inReplyToIntermediateType{Link: v}) 2265 2266} 2267 2268// PrependInReplyToLink adds to the front of inReplyTo a LinkType type 2269func (t *Relationship) PrependInReplyToLink(v LinkType) { 2270 t.inReplyTo = append([]*inReplyToIntermediateType{&inReplyToIntermediateType{Link: v}}, t.inReplyTo...) 2271 2272} 2273 2274// RemoveInReplyToLink deletes the value from the specified index 2275func (t *Relationship) RemoveInReplyToLink(index int) { 2276 copy(t.inReplyTo[index:], t.inReplyTo[index+1:]) 2277 t.inReplyTo[len(t.inReplyTo)-1] = nil 2278 t.inReplyTo = t.inReplyTo[:len(t.inReplyTo)-1] 2279 2280} 2281 2282// IsInReplyToIRI determines whether the call to GetInReplyToIRI is safe for the specified index 2283func (t *Relationship) IsInReplyToIRI(index int) (ok bool) { 2284 return t.inReplyTo[index].IRI != nil 2285 2286} 2287 2288// GetInReplyToIRI returns the value safely if IsInReplyToIRI returned true for the specified index 2289func (t *Relationship) GetInReplyToIRI(index int) (v *url.URL) { 2290 return t.inReplyTo[index].IRI 2291 2292} 2293 2294// AppendInReplyToIRI adds to the back of inReplyTo a *url.URL type 2295func (t *Relationship) AppendInReplyToIRI(v *url.URL) { 2296 t.inReplyTo = append(t.inReplyTo, &inReplyToIntermediateType{IRI: v}) 2297 2298} 2299 2300// PrependInReplyToIRI adds to the front of inReplyTo a *url.URL type 2301func (t *Relationship) PrependInReplyToIRI(v *url.URL) { 2302 t.inReplyTo = append([]*inReplyToIntermediateType{&inReplyToIntermediateType{IRI: v}}, t.inReplyTo...) 2303 2304} 2305 2306// RemoveInReplyToIRI deletes the value from the specified index 2307func (t *Relationship) RemoveInReplyToIRI(index int) { 2308 copy(t.inReplyTo[index:], t.inReplyTo[index+1:]) 2309 t.inReplyTo[len(t.inReplyTo)-1] = nil 2310 t.inReplyTo = t.inReplyTo[:len(t.inReplyTo)-1] 2311 2312} 2313 2314// HasUnknownInReplyTo determines whether the call to GetUnknownInReplyTo is safe 2315func (t *Relationship) HasUnknownInReplyTo() (ok bool) { 2316 return t.inReplyTo != nil && t.inReplyTo[0].unknown_ != nil 2317 2318} 2319 2320// GetUnknownInReplyTo returns the unknown value for inReplyTo 2321func (t *Relationship) GetUnknownInReplyTo() (v interface{}) { 2322 return t.inReplyTo[0].unknown_ 2323 2324} 2325 2326// SetUnknownInReplyTo sets the unknown value of inReplyTo 2327func (t *Relationship) SetUnknownInReplyTo(i interface{}) { 2328 if t.unknown_ == nil { 2329 t.unknown_ = make(map[string]interface{}) 2330 } 2331 tmp := &inReplyToIntermediateType{} 2332 tmp.unknown_ = i 2333 t.inReplyTo = append(t.inReplyTo, tmp) 2334 2335} 2336 2337// LocationLen determines the number of elements able to be used for the IsLocationObject, GetLocationObject, and RemoveLocationObject functions 2338func (t *Relationship) LocationLen() (l int) { 2339 return len(t.location) 2340 2341} 2342 2343// IsLocationObject determines whether the call to GetLocationObject is safe for the specified index 2344func (t *Relationship) IsLocationObject(index int) (ok bool) { 2345 return t.location[index].Object != nil 2346 2347} 2348 2349// GetLocationObject returns the value safely if IsLocationObject returned true for the specified index 2350func (t *Relationship) GetLocationObject(index int) (v ObjectType) { 2351 return t.location[index].Object 2352 2353} 2354 2355// AppendLocationObject adds to the back of location a ObjectType type 2356func (t *Relationship) AppendLocationObject(v ObjectType) { 2357 t.location = append(t.location, &locationIntermediateType{Object: v}) 2358 2359} 2360 2361// PrependLocationObject adds to the front of location a ObjectType type 2362func (t *Relationship) PrependLocationObject(v ObjectType) { 2363 t.location = append([]*locationIntermediateType{&locationIntermediateType{Object: v}}, t.location...) 2364 2365} 2366 2367// RemoveLocationObject deletes the value from the specified index 2368func (t *Relationship) RemoveLocationObject(index int) { 2369 copy(t.location[index:], t.location[index+1:]) 2370 t.location[len(t.location)-1] = nil 2371 t.location = t.location[:len(t.location)-1] 2372 2373} 2374 2375// IsLocationLink determines whether the call to GetLocationLink is safe for the specified index 2376func (t *Relationship) IsLocationLink(index int) (ok bool) { 2377 return t.location[index].Link != nil 2378 2379} 2380 2381// GetLocationLink returns the value safely if IsLocationLink returned true for the specified index 2382func (t *Relationship) GetLocationLink(index int) (v LinkType) { 2383 return t.location[index].Link 2384 2385} 2386 2387// AppendLocationLink adds to the back of location a LinkType type 2388func (t *Relationship) AppendLocationLink(v LinkType) { 2389 t.location = append(t.location, &locationIntermediateType{Link: v}) 2390 2391} 2392 2393// PrependLocationLink adds to the front of location a LinkType type 2394func (t *Relationship) PrependLocationLink(v LinkType) { 2395 t.location = append([]*locationIntermediateType{&locationIntermediateType{Link: v}}, t.location...) 2396 2397} 2398 2399// RemoveLocationLink deletes the value from the specified index 2400func (t *Relationship) RemoveLocationLink(index int) { 2401 copy(t.location[index:], t.location[index+1:]) 2402 t.location[len(t.location)-1] = nil 2403 t.location = t.location[:len(t.location)-1] 2404 2405} 2406 2407// IsLocationIRI determines whether the call to GetLocationIRI is safe for the specified index 2408func (t *Relationship) IsLocationIRI(index int) (ok bool) { 2409 return t.location[index].IRI != nil 2410 2411} 2412 2413// GetLocationIRI returns the value safely if IsLocationIRI returned true for the specified index 2414func (t *Relationship) GetLocationIRI(index int) (v *url.URL) { 2415 return t.location[index].IRI 2416 2417} 2418 2419// AppendLocationIRI adds to the back of location a *url.URL type 2420func (t *Relationship) AppendLocationIRI(v *url.URL) { 2421 t.location = append(t.location, &locationIntermediateType{IRI: v}) 2422 2423} 2424 2425// PrependLocationIRI adds to the front of location a *url.URL type 2426func (t *Relationship) PrependLocationIRI(v *url.URL) { 2427 t.location = append([]*locationIntermediateType{&locationIntermediateType{IRI: v}}, t.location...) 2428 2429} 2430 2431// RemoveLocationIRI deletes the value from the specified index 2432func (t *Relationship) RemoveLocationIRI(index int) { 2433 copy(t.location[index:], t.location[index+1:]) 2434 t.location[len(t.location)-1] = nil 2435 t.location = t.location[:len(t.location)-1] 2436 2437} 2438 2439// HasUnknownLocation determines whether the call to GetUnknownLocation is safe 2440func (t *Relationship) HasUnknownLocation() (ok bool) { 2441 return t.location != nil && t.location[0].unknown_ != nil 2442 2443} 2444 2445// GetUnknownLocation returns the unknown value for location 2446func (t *Relationship) GetUnknownLocation() (v interface{}) { 2447 return t.location[0].unknown_ 2448 2449} 2450 2451// SetUnknownLocation sets the unknown value of location 2452func (t *Relationship) SetUnknownLocation(i interface{}) { 2453 if t.unknown_ == nil { 2454 t.unknown_ = make(map[string]interface{}) 2455 } 2456 tmp := &locationIntermediateType{} 2457 tmp.unknown_ = i 2458 t.location = append(t.location, tmp) 2459 2460} 2461 2462// PreviewLen determines the number of elements able to be used for the IsPreviewObject, GetPreviewObject, and RemovePreviewObject functions 2463func (t *Relationship) PreviewLen() (l int) { 2464 return len(t.preview) 2465 2466} 2467 2468// IsPreviewObject determines whether the call to GetPreviewObject is safe for the specified index 2469func (t *Relationship) IsPreviewObject(index int) (ok bool) { 2470 return t.preview[index].Object != nil 2471 2472} 2473 2474// GetPreviewObject returns the value safely if IsPreviewObject returned true for the specified index 2475func (t *Relationship) GetPreviewObject(index int) (v ObjectType) { 2476 return t.preview[index].Object 2477 2478} 2479 2480// AppendPreviewObject adds to the back of preview a ObjectType type 2481func (t *Relationship) AppendPreviewObject(v ObjectType) { 2482 t.preview = append(t.preview, &previewIntermediateType{Object: v}) 2483 2484} 2485 2486// PrependPreviewObject adds to the front of preview a ObjectType type 2487func (t *Relationship) PrependPreviewObject(v ObjectType) { 2488 t.preview = append([]*previewIntermediateType{&previewIntermediateType{Object: v}}, t.preview...) 2489 2490} 2491 2492// RemovePreviewObject deletes the value from the specified index 2493func (t *Relationship) RemovePreviewObject(index int) { 2494 copy(t.preview[index:], t.preview[index+1:]) 2495 t.preview[len(t.preview)-1] = nil 2496 t.preview = t.preview[:len(t.preview)-1] 2497 2498} 2499 2500// IsPreviewLink determines whether the call to GetPreviewLink is safe for the specified index 2501func (t *Relationship) IsPreviewLink(index int) (ok bool) { 2502 return t.preview[index].Link != nil 2503 2504} 2505 2506// GetPreviewLink returns the value safely if IsPreviewLink returned true for the specified index 2507func (t *Relationship) GetPreviewLink(index int) (v LinkType) { 2508 return t.preview[index].Link 2509 2510} 2511 2512// AppendPreviewLink adds to the back of preview a LinkType type 2513func (t *Relationship) AppendPreviewLink(v LinkType) { 2514 t.preview = append(t.preview, &previewIntermediateType{Link: v}) 2515 2516} 2517 2518// PrependPreviewLink adds to the front of preview a LinkType type 2519func (t *Relationship) PrependPreviewLink(v LinkType) { 2520 t.preview = append([]*previewIntermediateType{&previewIntermediateType{Link: v}}, t.preview...) 2521 2522} 2523 2524// RemovePreviewLink deletes the value from the specified index 2525func (t *Relationship) RemovePreviewLink(index int) { 2526 copy(t.preview[index:], t.preview[index+1:]) 2527 t.preview[len(t.preview)-1] = nil 2528 t.preview = t.preview[:len(t.preview)-1] 2529 2530} 2531 2532// IsPreviewIRI determines whether the call to GetPreviewIRI is safe for the specified index 2533func (t *Relationship) IsPreviewIRI(index int) (ok bool) { 2534 return t.preview[index].IRI != nil 2535 2536} 2537 2538// GetPreviewIRI returns the value safely if IsPreviewIRI returned true for the specified index 2539func (t *Relationship) GetPreviewIRI(index int) (v *url.URL) { 2540 return t.preview[index].IRI 2541 2542} 2543 2544// AppendPreviewIRI adds to the back of preview a *url.URL type 2545func (t *Relationship) AppendPreviewIRI(v *url.URL) { 2546 t.preview = append(t.preview, &previewIntermediateType{IRI: v}) 2547 2548} 2549 2550// PrependPreviewIRI adds to the front of preview a *url.URL type 2551func (t *Relationship) PrependPreviewIRI(v *url.URL) { 2552 t.preview = append([]*previewIntermediateType{&previewIntermediateType{IRI: v}}, t.preview...) 2553 2554} 2555 2556// RemovePreviewIRI deletes the value from the specified index 2557func (t *Relationship) RemovePreviewIRI(index int) { 2558 copy(t.preview[index:], t.preview[index+1:]) 2559 t.preview[len(t.preview)-1] = nil 2560 t.preview = t.preview[:len(t.preview)-1] 2561 2562} 2563 2564// HasUnknownPreview determines whether the call to GetUnknownPreview is safe 2565func (t *Relationship) HasUnknownPreview() (ok bool) { 2566 return t.preview != nil && t.preview[0].unknown_ != nil 2567 2568} 2569 2570// GetUnknownPreview returns the unknown value for preview 2571func (t *Relationship) GetUnknownPreview() (v interface{}) { 2572 return t.preview[0].unknown_ 2573 2574} 2575 2576// SetUnknownPreview sets the unknown value of preview 2577func (t *Relationship) SetUnknownPreview(i interface{}) { 2578 if t.unknown_ == nil { 2579 t.unknown_ = make(map[string]interface{}) 2580 } 2581 tmp := &previewIntermediateType{} 2582 tmp.unknown_ = i 2583 t.preview = append(t.preview, tmp) 2584 2585} 2586 2587// IsPublished determines whether the call to GetPublished is safe 2588func (t *Relationship) IsPublished() (ok bool) { 2589 return t.published != nil && t.published.dateTime != nil 2590 2591} 2592 2593// GetPublished returns the value safely if IsPublished returned true 2594func (t *Relationship) GetPublished() (v time.Time) { 2595 return *t.published.dateTime 2596 2597} 2598 2599// SetPublished sets the value of published to be of time.Time type 2600func (t *Relationship) SetPublished(v time.Time) { 2601 t.published = &publishedIntermediateType{dateTime: &v} 2602 2603} 2604 2605// IsPublishedIRI determines whether the call to GetPublishedIRI is safe 2606func (t *Relationship) IsPublishedIRI() (ok bool) { 2607 return t.published != nil && t.published.IRI != nil 2608 2609} 2610 2611// GetPublishedIRI returns the value safely if IsPublishedIRI returned true 2612func (t *Relationship) GetPublishedIRI() (v *url.URL) { 2613 return t.published.IRI 2614 2615} 2616 2617// SetPublishedIRI sets the value of published to be of *url.URL type 2618func (t *Relationship) SetPublishedIRI(v *url.URL) { 2619 t.published = &publishedIntermediateType{IRI: v} 2620 2621} 2622 2623// HasUnknownPublished determines whether the call to GetUnknownPublished is safe 2624func (t *Relationship) HasUnknownPublished() (ok bool) { 2625 return t.published != nil && t.published.unknown_ != nil 2626 2627} 2628 2629// GetUnknownPublished returns the unknown value for published 2630func (t *Relationship) GetUnknownPublished() (v interface{}) { 2631 return t.published.unknown_ 2632 2633} 2634 2635// SetUnknownPublished sets the unknown value of published 2636func (t *Relationship) SetUnknownPublished(i interface{}) { 2637 if t.unknown_ == nil { 2638 t.unknown_ = make(map[string]interface{}) 2639 } 2640 tmp := &publishedIntermediateType{} 2641 tmp.unknown_ = i 2642 t.published = tmp 2643 2644} 2645 2646// IsReplies determines whether the call to GetReplies is safe 2647func (t *Relationship) IsReplies() (ok bool) { 2648 return t.replies != nil && t.replies.Collection != nil 2649 2650} 2651 2652// GetReplies returns the value safely if IsReplies returned true 2653func (t *Relationship) GetReplies() (v CollectionType) { 2654 return t.replies.Collection 2655 2656} 2657 2658// SetReplies sets the value of replies to be of CollectionType type 2659func (t *Relationship) SetReplies(v CollectionType) { 2660 t.replies = &repliesIntermediateType{Collection: v} 2661 2662} 2663 2664// IsRepliesIRI determines whether the call to GetRepliesIRI is safe 2665func (t *Relationship) IsRepliesIRI() (ok bool) { 2666 return t.replies != nil && t.replies.IRI != nil 2667 2668} 2669 2670// GetRepliesIRI returns the value safely if IsRepliesIRI returned true 2671func (t *Relationship) GetRepliesIRI() (v *url.URL) { 2672 return t.replies.IRI 2673 2674} 2675 2676// SetRepliesIRI sets the value of replies to be of *url.URL type 2677func (t *Relationship) SetRepliesIRI(v *url.URL) { 2678 t.replies = &repliesIntermediateType{IRI: v} 2679 2680} 2681 2682// HasUnknownReplies determines whether the call to GetUnknownReplies is safe 2683func (t *Relationship) HasUnknownReplies() (ok bool) { 2684 return t.replies != nil && t.replies.unknown_ != nil 2685 2686} 2687 2688// GetUnknownReplies returns the unknown value for replies 2689func (t *Relationship) GetUnknownReplies() (v interface{}) { 2690 return t.replies.unknown_ 2691 2692} 2693 2694// SetUnknownReplies sets the unknown value of replies 2695func (t *Relationship) SetUnknownReplies(i interface{}) { 2696 if t.unknown_ == nil { 2697 t.unknown_ = make(map[string]interface{}) 2698 } 2699 tmp := &repliesIntermediateType{} 2700 tmp.unknown_ = i 2701 t.replies = tmp 2702 2703} 2704 2705// IsStartTime determines whether the call to GetStartTime is safe 2706func (t *Relationship) IsStartTime() (ok bool) { 2707 return t.startTime != nil && t.startTime.dateTime != nil 2708 2709} 2710 2711// GetStartTime returns the value safely if IsStartTime returned true 2712func (t *Relationship) GetStartTime() (v time.Time) { 2713 return *t.startTime.dateTime 2714 2715} 2716 2717// SetStartTime sets the value of startTime to be of time.Time type 2718func (t *Relationship) SetStartTime(v time.Time) { 2719 t.startTime = &startTimeIntermediateType{dateTime: &v} 2720 2721} 2722 2723// IsStartTimeIRI determines whether the call to GetStartTimeIRI is safe 2724func (t *Relationship) IsStartTimeIRI() (ok bool) { 2725 return t.startTime != nil && t.startTime.IRI != nil 2726 2727} 2728 2729// GetStartTimeIRI returns the value safely if IsStartTimeIRI returned true 2730func (t *Relationship) GetStartTimeIRI() (v *url.URL) { 2731 return t.startTime.IRI 2732 2733} 2734 2735// SetStartTimeIRI sets the value of startTime to be of *url.URL type 2736func (t *Relationship) SetStartTimeIRI(v *url.URL) { 2737 t.startTime = &startTimeIntermediateType{IRI: v} 2738 2739} 2740 2741// HasUnknownStartTime determines whether the call to GetUnknownStartTime is safe 2742func (t *Relationship) HasUnknownStartTime() (ok bool) { 2743 return t.startTime != nil && t.startTime.unknown_ != nil 2744 2745} 2746 2747// GetUnknownStartTime returns the unknown value for startTime 2748func (t *Relationship) GetUnknownStartTime() (v interface{}) { 2749 return t.startTime.unknown_ 2750 2751} 2752 2753// SetUnknownStartTime sets the unknown value of startTime 2754func (t *Relationship) SetUnknownStartTime(i interface{}) { 2755 if t.unknown_ == nil { 2756 t.unknown_ = make(map[string]interface{}) 2757 } 2758 tmp := &startTimeIntermediateType{} 2759 tmp.unknown_ = i 2760 t.startTime = tmp 2761 2762} 2763 2764// SummaryLen determines the number of elements able to be used for the IsSummaryString, GetSummaryString, and RemoveSummaryString functions 2765func (t *Relationship) SummaryLen() (l int) { 2766 return len(t.summary) 2767 2768} 2769 2770// IsSummaryString determines whether the call to GetSummaryString is safe for the specified index 2771func (t *Relationship) IsSummaryString(index int) (ok bool) { 2772 return t.summary[index].stringName != nil 2773 2774} 2775 2776// GetSummaryString returns the value safely if IsSummaryString returned true for the specified index 2777func (t *Relationship) GetSummaryString(index int) (v string) { 2778 return *t.summary[index].stringName 2779 2780} 2781 2782// AppendSummaryString adds to the back of summary a string type 2783func (t *Relationship) AppendSummaryString(v string) { 2784 t.summary = append(t.summary, &summaryIntermediateType{stringName: &v}) 2785 2786} 2787 2788// PrependSummaryString adds to the front of summary a string type 2789func (t *Relationship) PrependSummaryString(v string) { 2790 t.summary = append([]*summaryIntermediateType{&summaryIntermediateType{stringName: &v}}, t.summary...) 2791 2792} 2793 2794// RemoveSummaryString deletes the value from the specified index 2795func (t *Relationship) RemoveSummaryString(index int) { 2796 copy(t.summary[index:], t.summary[index+1:]) 2797 t.summary[len(t.summary)-1] = nil 2798 t.summary = t.summary[:len(t.summary)-1] 2799 2800} 2801 2802// IsSummaryLangString determines whether the call to GetSummaryLangString is safe for the specified index 2803func (t *Relationship) IsSummaryLangString(index int) (ok bool) { 2804 return t.summary[index].langString != nil 2805 2806} 2807 2808// GetSummaryLangString returns the value safely if IsSummaryLangString returned true for the specified index 2809func (t *Relationship) GetSummaryLangString(index int) (v string) { 2810 return *t.summary[index].langString 2811 2812} 2813 2814// AppendSummaryLangString adds to the back of summary a string type 2815func (t *Relationship) AppendSummaryLangString(v string) { 2816 t.summary = append(t.summary, &summaryIntermediateType{langString: &v}) 2817 2818} 2819 2820// PrependSummaryLangString adds to the front of summary a string type 2821func (t *Relationship) PrependSummaryLangString(v string) { 2822 t.summary = append([]*summaryIntermediateType{&summaryIntermediateType{langString: &v}}, t.summary...) 2823 2824} 2825 2826// RemoveSummaryLangString deletes the value from the specified index 2827func (t *Relationship) RemoveSummaryLangString(index int) { 2828 copy(t.summary[index:], t.summary[index+1:]) 2829 t.summary[len(t.summary)-1] = nil 2830 t.summary = t.summary[:len(t.summary)-1] 2831 2832} 2833 2834// IsSummaryIRI determines whether the call to GetSummaryIRI is safe for the specified index 2835func (t *Relationship) IsSummaryIRI(index int) (ok bool) { 2836 return t.summary[index].IRI != nil 2837 2838} 2839 2840// GetSummaryIRI returns the value safely if IsSummaryIRI returned true for the specified index 2841func (t *Relationship) GetSummaryIRI(index int) (v *url.URL) { 2842 return t.summary[index].IRI 2843 2844} 2845 2846// AppendSummaryIRI adds to the back of summary a *url.URL type 2847func (t *Relationship) AppendSummaryIRI(v *url.URL) { 2848 t.summary = append(t.summary, &summaryIntermediateType{IRI: v}) 2849 2850} 2851 2852// PrependSummaryIRI adds to the front of summary a *url.URL type 2853func (t *Relationship) PrependSummaryIRI(v *url.URL) { 2854 t.summary = append([]*summaryIntermediateType{&summaryIntermediateType{IRI: v}}, t.summary...) 2855 2856} 2857 2858// RemoveSummaryIRI deletes the value from the specified index 2859func (t *Relationship) RemoveSummaryIRI(index int) { 2860 copy(t.summary[index:], t.summary[index+1:]) 2861 t.summary[len(t.summary)-1] = nil 2862 t.summary = t.summary[:len(t.summary)-1] 2863 2864} 2865 2866// HasUnknownSummary determines whether the call to GetUnknownSummary is safe 2867func (t *Relationship) HasUnknownSummary() (ok bool) { 2868 return t.summary != nil && t.summary[0].unknown_ != nil 2869 2870} 2871 2872// GetUnknownSummary returns the unknown value for summary 2873func (t *Relationship) GetUnknownSummary() (v interface{}) { 2874 return t.summary[0].unknown_ 2875 2876} 2877 2878// SetUnknownSummary sets the unknown value of summary 2879func (t *Relationship) SetUnknownSummary(i interface{}) { 2880 if t.unknown_ == nil { 2881 t.unknown_ = make(map[string]interface{}) 2882 } 2883 tmp := &summaryIntermediateType{} 2884 tmp.unknown_ = i 2885 t.summary = append(t.summary, tmp) 2886 2887} 2888 2889// SummaryMapLanguages returns all languages for this property's language mapping, or nil if there are none. 2890func (t *Relationship) SummaryMapLanguages() (l []string) { 2891 if t.summaryMap == nil || len(t.summaryMap) == 0 { 2892 return nil 2893 } 2894 for k := range t.summaryMap { 2895 l = append(l, k) 2896 } 2897 return 2898 2899} 2900 2901// GetSummaryMap retrieves the value of the property for the specified language, or an empty string if it does not exist 2902func (t *Relationship) GetSummaryMap(l string) (v string) { 2903 if t.summaryMap == nil { 2904 return "" 2905 } 2906 ok := false 2907 v, ok = t.summaryMap[l] 2908 if !ok { 2909 return "" 2910 } 2911 return v 2912 2913} 2914 2915// SetSummaryMap sets the value of the property for the specified language 2916func (t *Relationship) SetSummaryMap(l string, v string) { 2917 if t.summaryMap == nil { 2918 t.summaryMap = make(map[string]string) 2919 } 2920 t.summaryMap[l] = v 2921 2922} 2923 2924// TagLen determines the number of elements able to be used for the IsTagObject, GetTagObject, and RemoveTagObject functions 2925func (t *Relationship) TagLen() (l int) { 2926 return len(t.tag) 2927 2928} 2929 2930// IsTagObject determines whether the call to GetTagObject is safe for the specified index 2931func (t *Relationship) IsTagObject(index int) (ok bool) { 2932 return t.tag[index].Object != nil 2933 2934} 2935 2936// GetTagObject returns the value safely if IsTagObject returned true for the specified index 2937func (t *Relationship) GetTagObject(index int) (v ObjectType) { 2938 return t.tag[index].Object 2939 2940} 2941 2942// AppendTagObject adds to the back of tag a ObjectType type 2943func (t *Relationship) AppendTagObject(v ObjectType) { 2944 t.tag = append(t.tag, &tagIntermediateType{Object: v}) 2945 2946} 2947 2948// PrependTagObject adds to the front of tag a ObjectType type 2949func (t *Relationship) PrependTagObject(v ObjectType) { 2950 t.tag = append([]*tagIntermediateType{&tagIntermediateType{Object: v}}, t.tag...) 2951 2952} 2953 2954// RemoveTagObject deletes the value from the specified index 2955func (t *Relationship) RemoveTagObject(index int) { 2956 copy(t.tag[index:], t.tag[index+1:]) 2957 t.tag[len(t.tag)-1] = nil 2958 t.tag = t.tag[:len(t.tag)-1] 2959 2960} 2961 2962// IsTagLink determines whether the call to GetTagLink is safe for the specified index 2963func (t *Relationship) IsTagLink(index int) (ok bool) { 2964 return t.tag[index].Link != nil 2965 2966} 2967 2968// GetTagLink returns the value safely if IsTagLink returned true for the specified index 2969func (t *Relationship) GetTagLink(index int) (v LinkType) { 2970 return t.tag[index].Link 2971 2972} 2973 2974// AppendTagLink adds to the back of tag a LinkType type 2975func (t *Relationship) AppendTagLink(v LinkType) { 2976 t.tag = append(t.tag, &tagIntermediateType{Link: v}) 2977 2978} 2979 2980// PrependTagLink adds to the front of tag a LinkType type 2981func (t *Relationship) PrependTagLink(v LinkType) { 2982 t.tag = append([]*tagIntermediateType{&tagIntermediateType{Link: v}}, t.tag...) 2983 2984} 2985 2986// RemoveTagLink deletes the value from the specified index 2987func (t *Relationship) RemoveTagLink(index int) { 2988 copy(t.tag[index:], t.tag[index+1:]) 2989 t.tag[len(t.tag)-1] = nil 2990 t.tag = t.tag[:len(t.tag)-1] 2991 2992} 2993 2994// IsTagIRI determines whether the call to GetTagIRI is safe for the specified index 2995func (t *Relationship) IsTagIRI(index int) (ok bool) { 2996 return t.tag[index].IRI != nil 2997 2998} 2999 3000// GetTagIRI returns the value safely if IsTagIRI returned true for the specified index 3001func (t *Relationship) GetTagIRI(index int) (v *url.URL) { 3002 return t.tag[index].IRI 3003 3004} 3005 3006// AppendTagIRI adds to the back of tag a *url.URL type 3007func (t *Relationship) AppendTagIRI(v *url.URL) { 3008 t.tag = append(t.tag, &tagIntermediateType{IRI: v}) 3009 3010} 3011 3012// PrependTagIRI adds to the front of tag a *url.URL type 3013func (t *Relationship) PrependTagIRI(v *url.URL) { 3014 t.tag = append([]*tagIntermediateType{&tagIntermediateType{IRI: v}}, t.tag...) 3015 3016} 3017 3018// RemoveTagIRI deletes the value from the specified index 3019func (t *Relationship) RemoveTagIRI(index int) { 3020 copy(t.tag[index:], t.tag[index+1:]) 3021 t.tag[len(t.tag)-1] = nil 3022 t.tag = t.tag[:len(t.tag)-1] 3023 3024} 3025 3026// HasUnknownTag determines whether the call to GetUnknownTag is safe 3027func (t *Relationship) HasUnknownTag() (ok bool) { 3028 return t.tag != nil && t.tag[0].unknown_ != nil 3029 3030} 3031 3032// GetUnknownTag returns the unknown value for tag 3033func (t *Relationship) GetUnknownTag() (v interface{}) { 3034 return t.tag[0].unknown_ 3035 3036} 3037 3038// SetUnknownTag sets the unknown value of tag 3039func (t *Relationship) SetUnknownTag(i interface{}) { 3040 if t.unknown_ == nil { 3041 t.unknown_ = make(map[string]interface{}) 3042 } 3043 tmp := &tagIntermediateType{} 3044 tmp.unknown_ = i 3045 t.tag = append(t.tag, tmp) 3046 3047} 3048 3049// TypeLen determines the number of elements able to be used for the GetType and RemoveType functions 3050func (t *Relationship) TypeLen() (l int) { 3051 return len(t.typeName) 3052 3053} 3054 3055// GetType returns the value for the specified index 3056func (t *Relationship) GetType(index int) (v interface{}) { 3057 return t.typeName[index] 3058 3059} 3060 3061// AppendType adds a value to the back of type 3062func (t *Relationship) AppendType(v interface{}) { 3063 t.typeName = append(t.typeName, v) 3064 3065} 3066 3067// PrependType adds a value to the front of type 3068func (t *Relationship) PrependType(v interface{}) { 3069 t.typeName = append([]interface{}{v}, t.typeName...) 3070 3071} 3072 3073// RemoveType deletes the value from the specified index 3074func (t *Relationship) RemoveType(index int) { 3075 copy(t.typeName[index:], t.typeName[index+1:]) 3076 t.typeName[len(t.typeName)-1] = nil 3077 t.typeName = t.typeName[:len(t.typeName)-1] 3078 3079} 3080 3081// IsUpdated determines whether the call to GetUpdated is safe 3082func (t *Relationship) IsUpdated() (ok bool) { 3083 return t.updated != nil && t.updated.dateTime != nil 3084 3085} 3086 3087// GetUpdated returns the value safely if IsUpdated returned true 3088func (t *Relationship) GetUpdated() (v time.Time) { 3089 return *t.updated.dateTime 3090 3091} 3092 3093// SetUpdated sets the value of updated to be of time.Time type 3094func (t *Relationship) SetUpdated(v time.Time) { 3095 t.updated = &updatedIntermediateType{dateTime: &v} 3096 3097} 3098 3099// IsUpdatedIRI determines whether the call to GetUpdatedIRI is safe 3100func (t *Relationship) IsUpdatedIRI() (ok bool) { 3101 return t.updated != nil && t.updated.IRI != nil 3102 3103} 3104 3105// GetUpdatedIRI returns the value safely if IsUpdatedIRI returned true 3106func (t *Relationship) GetUpdatedIRI() (v *url.URL) { 3107 return t.updated.IRI 3108 3109} 3110 3111// SetUpdatedIRI sets the value of updated to be of *url.URL type 3112func (t *Relationship) SetUpdatedIRI(v *url.URL) { 3113 t.updated = &updatedIntermediateType{IRI: v} 3114 3115} 3116 3117// HasUnknownUpdated determines whether the call to GetUnknownUpdated is safe 3118func (t *Relationship) HasUnknownUpdated() (ok bool) { 3119 return t.updated != nil && t.updated.unknown_ != nil 3120 3121} 3122 3123// GetUnknownUpdated returns the unknown value for updated 3124func (t *Relationship) GetUnknownUpdated() (v interface{}) { 3125 return t.updated.unknown_ 3126 3127} 3128 3129// SetUnknownUpdated sets the unknown value of updated 3130func (t *Relationship) SetUnknownUpdated(i interface{}) { 3131 if t.unknown_ == nil { 3132 t.unknown_ = make(map[string]interface{}) 3133 } 3134 tmp := &updatedIntermediateType{} 3135 tmp.unknown_ = i 3136 t.updated = tmp 3137 3138} 3139 3140// UrlLen determines the number of elements able to be used for the IsUrlAnyURI, GetUrlAnyURI, and RemoveUrlAnyURI functions 3141func (t *Relationship) UrlLen() (l int) { 3142 return len(t.url) 3143 3144} 3145 3146// IsUrlAnyURI determines whether the call to GetUrlAnyURI is safe for the specified index 3147func (t *Relationship) IsUrlAnyURI(index int) (ok bool) { 3148 return t.url[index].anyURI != nil 3149 3150} 3151 3152// GetUrlAnyURI returns the value safely if IsUrlAnyURI returned true for the specified index 3153func (t *Relationship) GetUrlAnyURI(index int) (v *url.URL) { 3154 return t.url[index].anyURI 3155 3156} 3157 3158// AppendUrlAnyURI adds to the back of url a *url.URL type 3159func (t *Relationship) AppendUrlAnyURI(v *url.URL) { 3160 t.url = append(t.url, &urlIntermediateType{anyURI: v}) 3161 3162} 3163 3164// PrependUrlAnyURI adds to the front of url a *url.URL type 3165func (t *Relationship) PrependUrlAnyURI(v *url.URL) { 3166 t.url = append([]*urlIntermediateType{&urlIntermediateType{anyURI: v}}, t.url...) 3167 3168} 3169 3170// RemoveUrlAnyURI deletes the value from the specified index 3171func (t *Relationship) RemoveUrlAnyURI(index int) { 3172 copy(t.url[index:], t.url[index+1:]) 3173 t.url[len(t.url)-1] = nil 3174 t.url = t.url[:len(t.url)-1] 3175 3176} 3177 3178// IsUrlLink determines whether the call to GetUrlLink is safe for the specified index 3179func (t *Relationship) IsUrlLink(index int) (ok bool) { 3180 return t.url[index].Link != nil 3181 3182} 3183 3184// GetUrlLink returns the value safely if IsUrlLink returned true for the specified index 3185func (t *Relationship) GetUrlLink(index int) (v LinkType) { 3186 return t.url[index].Link 3187 3188} 3189 3190// AppendUrlLink adds to the back of url a LinkType type 3191func (t *Relationship) AppendUrlLink(v LinkType) { 3192 t.url = append(t.url, &urlIntermediateType{Link: v}) 3193 3194} 3195 3196// PrependUrlLink adds to the front of url a LinkType type 3197func (t *Relationship) PrependUrlLink(v LinkType) { 3198 t.url = append([]*urlIntermediateType{&urlIntermediateType{Link: v}}, t.url...) 3199 3200} 3201 3202// RemoveUrlLink deletes the value from the specified index 3203func (t *Relationship) RemoveUrlLink(index int) { 3204 copy(t.url[index:], t.url[index+1:]) 3205 t.url[len(t.url)-1] = nil 3206 t.url = t.url[:len(t.url)-1] 3207 3208} 3209 3210// HasUnknownUrl determines whether the call to GetUnknownUrl is safe 3211func (t *Relationship) HasUnknownUrl() (ok bool) { 3212 return t.url != nil && t.url[0].unknown_ != nil 3213 3214} 3215 3216// GetUnknownUrl returns the unknown value for url 3217func (t *Relationship) GetUnknownUrl() (v interface{}) { 3218 return t.url[0].unknown_ 3219 3220} 3221 3222// SetUnknownUrl sets the unknown value of url 3223func (t *Relationship) SetUnknownUrl(i interface{}) { 3224 if t.unknown_ == nil { 3225 t.unknown_ = make(map[string]interface{}) 3226 } 3227 tmp := &urlIntermediateType{} 3228 tmp.unknown_ = i 3229 t.url = append(t.url, tmp) 3230 3231} 3232 3233// ToLen determines the number of elements able to be used for the IsToObject, GetToObject, and RemoveToObject functions 3234func (t *Relationship) ToLen() (l int) { 3235 return len(t.to) 3236 3237} 3238 3239// IsToObject determines whether the call to GetToObject is safe for the specified index 3240func (t *Relationship) IsToObject(index int) (ok bool) { 3241 return t.to[index].Object != nil 3242 3243} 3244 3245// GetToObject returns the value safely if IsToObject returned true for the specified index 3246func (t *Relationship) GetToObject(index int) (v ObjectType) { 3247 return t.to[index].Object 3248 3249} 3250 3251// AppendToObject adds to the back of to a ObjectType type 3252func (t *Relationship) AppendToObject(v ObjectType) { 3253 t.to = append(t.to, &toIntermediateType{Object: v}) 3254 3255} 3256 3257// PrependToObject adds to the front of to a ObjectType type 3258func (t *Relationship) PrependToObject(v ObjectType) { 3259 t.to = append([]*toIntermediateType{&toIntermediateType{Object: v}}, t.to...) 3260 3261} 3262 3263// RemoveToObject deletes the value from the specified index 3264func (t *Relationship) RemoveToObject(index int) { 3265 copy(t.to[index:], t.to[index+1:]) 3266 t.to[len(t.to)-1] = nil 3267 t.to = t.to[:len(t.to)-1] 3268 3269} 3270 3271// IsToLink determines whether the call to GetToLink is safe for the specified index 3272func (t *Relationship) IsToLink(index int) (ok bool) { 3273 return t.to[index].Link != nil 3274 3275} 3276 3277// GetToLink returns the value safely if IsToLink returned true for the specified index 3278func (t *Relationship) GetToLink(index int) (v LinkType) { 3279 return t.to[index].Link 3280 3281} 3282 3283// AppendToLink adds to the back of to a LinkType type 3284func (t *Relationship) AppendToLink(v LinkType) { 3285 t.to = append(t.to, &toIntermediateType{Link: v}) 3286 3287} 3288 3289// PrependToLink adds to the front of to a LinkType type 3290func (t *Relationship) PrependToLink(v LinkType) { 3291 t.to = append([]*toIntermediateType{&toIntermediateType{Link: v}}, t.to...) 3292 3293} 3294 3295// RemoveToLink deletes the value from the specified index 3296func (t *Relationship) RemoveToLink(index int) { 3297 copy(t.to[index:], t.to[index+1:]) 3298 t.to[len(t.to)-1] = nil 3299 t.to = t.to[:len(t.to)-1] 3300 3301} 3302 3303// IsToIRI determines whether the call to GetToIRI is safe for the specified index 3304func (t *Relationship) IsToIRI(index int) (ok bool) { 3305 return t.to[index].IRI != nil 3306 3307} 3308 3309// GetToIRI returns the value safely if IsToIRI returned true for the specified index 3310func (t *Relationship) GetToIRI(index int) (v *url.URL) { 3311 return t.to[index].IRI 3312 3313} 3314 3315// AppendToIRI adds to the back of to a *url.URL type 3316func (t *Relationship) AppendToIRI(v *url.URL) { 3317 t.to = append(t.to, &toIntermediateType{IRI: v}) 3318 3319} 3320 3321// PrependToIRI adds to the front of to a *url.URL type 3322func (t *Relationship) PrependToIRI(v *url.URL) { 3323 t.to = append([]*toIntermediateType{&toIntermediateType{IRI: v}}, t.to...) 3324 3325} 3326 3327// RemoveToIRI deletes the value from the specified index 3328func (t *Relationship) RemoveToIRI(index int) { 3329 copy(t.to[index:], t.to[index+1:]) 3330 t.to[len(t.to)-1] = nil 3331 t.to = t.to[:len(t.to)-1] 3332 3333} 3334 3335// HasUnknownTo determines whether the call to GetUnknownTo is safe 3336func (t *Relationship) HasUnknownTo() (ok bool) { 3337 return t.to != nil && t.to[0].unknown_ != nil 3338 3339} 3340 3341// GetUnknownTo returns the unknown value for to 3342func (t *Relationship) GetUnknownTo() (v interface{}) { 3343 return t.to[0].unknown_ 3344 3345} 3346 3347// SetUnknownTo sets the unknown value of to 3348func (t *Relationship) SetUnknownTo(i interface{}) { 3349 if t.unknown_ == nil { 3350 t.unknown_ = make(map[string]interface{}) 3351 } 3352 tmp := &toIntermediateType{} 3353 tmp.unknown_ = i 3354 t.to = append(t.to, tmp) 3355 3356} 3357 3358// BtoLen determines the number of elements able to be used for the IsBtoObject, GetBtoObject, and RemoveBtoObject functions 3359func (t *Relationship) BtoLen() (l int) { 3360 return len(t.bto) 3361 3362} 3363 3364// IsBtoObject determines whether the call to GetBtoObject is safe for the specified index 3365func (t *Relationship) IsBtoObject(index int) (ok bool) { 3366 return t.bto[index].Object != nil 3367 3368} 3369 3370// GetBtoObject returns the value safely if IsBtoObject returned true for the specified index 3371func (t *Relationship) GetBtoObject(index int) (v ObjectType) { 3372 return t.bto[index].Object 3373 3374} 3375 3376// AppendBtoObject adds to the back of bto a ObjectType type 3377func (t *Relationship) AppendBtoObject(v ObjectType) { 3378 t.bto = append(t.bto, &btoIntermediateType{Object: v}) 3379 3380} 3381 3382// PrependBtoObject adds to the front of bto a ObjectType type 3383func (t *Relationship) PrependBtoObject(v ObjectType) { 3384 t.bto = append([]*btoIntermediateType{&btoIntermediateType{Object: v}}, t.bto...) 3385 3386} 3387 3388// RemoveBtoObject deletes the value from the specified index 3389func (t *Relationship) RemoveBtoObject(index int) { 3390 copy(t.bto[index:], t.bto[index+1:]) 3391 t.bto[len(t.bto)-1] = nil 3392 t.bto = t.bto[:len(t.bto)-1] 3393 3394} 3395 3396// IsBtoLink determines whether the call to GetBtoLink is safe for the specified index 3397func (t *Relationship) IsBtoLink(index int) (ok bool) { 3398 return t.bto[index].Link != nil 3399 3400} 3401 3402// GetBtoLink returns the value safely if IsBtoLink returned true for the specified index 3403func (t *Relationship) GetBtoLink(index int) (v LinkType) { 3404 return t.bto[index].Link 3405 3406} 3407 3408// AppendBtoLink adds to the back of bto a LinkType type 3409func (t *Relationship) AppendBtoLink(v LinkType) { 3410 t.bto = append(t.bto, &btoIntermediateType{Link: v}) 3411 3412} 3413 3414// PrependBtoLink adds to the front of bto a LinkType type 3415func (t *Relationship) PrependBtoLink(v LinkType) { 3416 t.bto = append([]*btoIntermediateType{&btoIntermediateType{Link: v}}, t.bto...) 3417 3418} 3419 3420// RemoveBtoLink deletes the value from the specified index 3421func (t *Relationship) RemoveBtoLink(index int) { 3422 copy(t.bto[index:], t.bto[index+1:]) 3423 t.bto[len(t.bto)-1] = nil 3424 t.bto = t.bto[:len(t.bto)-1] 3425 3426} 3427 3428// IsBtoIRI determines whether the call to GetBtoIRI is safe for the specified index 3429func (t *Relationship) IsBtoIRI(index int) (ok bool) { 3430 return t.bto[index].IRI != nil 3431 3432} 3433 3434// GetBtoIRI returns the value safely if IsBtoIRI returned true for the specified index 3435func (t *Relationship) GetBtoIRI(index int) (v *url.URL) { 3436 return t.bto[index].IRI 3437 3438} 3439 3440// AppendBtoIRI adds to the back of bto a *url.URL type 3441func (t *Relationship) AppendBtoIRI(v *url.URL) { 3442 t.bto = append(t.bto, &btoIntermediateType{IRI: v}) 3443 3444} 3445 3446// PrependBtoIRI adds to the front of bto a *url.URL type 3447func (t *Relationship) PrependBtoIRI(v *url.URL) { 3448 t.bto = append([]*btoIntermediateType{&btoIntermediateType{IRI: v}}, t.bto...) 3449 3450} 3451 3452// RemoveBtoIRI deletes the value from the specified index 3453func (t *Relationship) RemoveBtoIRI(index int) { 3454 copy(t.bto[index:], t.bto[index+1:]) 3455 t.bto[len(t.bto)-1] = nil 3456 t.bto = t.bto[:len(t.bto)-1] 3457 3458} 3459 3460// HasUnknownBto determines whether the call to GetUnknownBto is safe 3461func (t *Relationship) HasUnknownBto() (ok bool) { 3462 return t.bto != nil && t.bto[0].unknown_ != nil 3463 3464} 3465 3466// GetUnknownBto returns the unknown value for bto 3467func (t *Relationship) GetUnknownBto() (v interface{}) { 3468 return t.bto[0].unknown_ 3469 3470} 3471 3472// SetUnknownBto sets the unknown value of bto 3473func (t *Relationship) SetUnknownBto(i interface{}) { 3474 if t.unknown_ == nil { 3475 t.unknown_ = make(map[string]interface{}) 3476 } 3477 tmp := &btoIntermediateType{} 3478 tmp.unknown_ = i 3479 t.bto = append(t.bto, tmp) 3480 3481} 3482 3483// CcLen determines the number of elements able to be used for the IsCcObject, GetCcObject, and RemoveCcObject functions 3484func (t *Relationship) CcLen() (l int) { 3485 return len(t.cc) 3486 3487} 3488 3489// IsCcObject determines whether the call to GetCcObject is safe for the specified index 3490func (t *Relationship) IsCcObject(index int) (ok bool) { 3491 return t.cc[index].Object != nil 3492 3493} 3494 3495// GetCcObject returns the value safely if IsCcObject returned true for the specified index 3496func (t *Relationship) GetCcObject(index int) (v ObjectType) { 3497 return t.cc[index].Object 3498 3499} 3500 3501// AppendCcObject adds to the back of cc a ObjectType type 3502func (t *Relationship) AppendCcObject(v ObjectType) { 3503 t.cc = append(t.cc, &ccIntermediateType{Object: v}) 3504 3505} 3506 3507// PrependCcObject adds to the front of cc a ObjectType type 3508func (t *Relationship) PrependCcObject(v ObjectType) { 3509 t.cc = append([]*ccIntermediateType{&ccIntermediateType{Object: v}}, t.cc...) 3510 3511} 3512 3513// RemoveCcObject deletes the value from the specified index 3514func (t *Relationship) RemoveCcObject(index int) { 3515 copy(t.cc[index:], t.cc[index+1:]) 3516 t.cc[len(t.cc)-1] = nil 3517 t.cc = t.cc[:len(t.cc)-1] 3518 3519} 3520 3521// IsCcLink determines whether the call to GetCcLink is safe for the specified index 3522func (t *Relationship) IsCcLink(index int) (ok bool) { 3523 return t.cc[index].Link != nil 3524 3525} 3526 3527// GetCcLink returns the value safely if IsCcLink returned true for the specified index 3528func (t *Relationship) GetCcLink(index int) (v LinkType) { 3529 return t.cc[index].Link 3530 3531} 3532 3533// AppendCcLink adds to the back of cc a LinkType type 3534func (t *Relationship) AppendCcLink(v LinkType) { 3535 t.cc = append(t.cc, &ccIntermediateType{Link: v}) 3536 3537} 3538 3539// PrependCcLink adds to the front of cc a LinkType type 3540func (t *Relationship) PrependCcLink(v LinkType) { 3541 t.cc = append([]*ccIntermediateType{&ccIntermediateType{Link: v}}, t.cc...) 3542 3543} 3544 3545// RemoveCcLink deletes the value from the specified index 3546func (t *Relationship) RemoveCcLink(index int) { 3547 copy(t.cc[index:], t.cc[index+1:]) 3548 t.cc[len(t.cc)-1] = nil 3549 t.cc = t.cc[:len(t.cc)-1] 3550 3551} 3552 3553// IsCcIRI determines whether the call to GetCcIRI is safe for the specified index 3554func (t *Relationship) IsCcIRI(index int) (ok bool) { 3555 return t.cc[index].IRI != nil 3556 3557} 3558 3559// GetCcIRI returns the value safely if IsCcIRI returned true for the specified index 3560func (t *Relationship) GetCcIRI(index int) (v *url.URL) { 3561 return t.cc[index].IRI 3562 3563} 3564 3565// AppendCcIRI adds to the back of cc a *url.URL type 3566func (t *Relationship) AppendCcIRI(v *url.URL) { 3567 t.cc = append(t.cc, &ccIntermediateType{IRI: v}) 3568 3569} 3570 3571// PrependCcIRI adds to the front of cc a *url.URL type 3572func (t *Relationship) PrependCcIRI(v *url.URL) { 3573 t.cc = append([]*ccIntermediateType{&ccIntermediateType{IRI: v}}, t.cc...) 3574 3575} 3576 3577// RemoveCcIRI deletes the value from the specified index 3578func (t *Relationship) RemoveCcIRI(index int) { 3579 copy(t.cc[index:], t.cc[index+1:]) 3580 t.cc[len(t.cc)-1] = nil 3581 t.cc = t.cc[:len(t.cc)-1] 3582 3583} 3584 3585// HasUnknownCc determines whether the call to GetUnknownCc is safe 3586func (t *Relationship) HasUnknownCc() (ok bool) { 3587 return t.cc != nil && t.cc[0].unknown_ != nil 3588 3589} 3590 3591// GetUnknownCc returns the unknown value for cc 3592func (t *Relationship) GetUnknownCc() (v interface{}) { 3593 return t.cc[0].unknown_ 3594 3595} 3596 3597// SetUnknownCc sets the unknown value of cc 3598func (t *Relationship) SetUnknownCc(i interface{}) { 3599 if t.unknown_ == nil { 3600 t.unknown_ = make(map[string]interface{}) 3601 } 3602 tmp := &ccIntermediateType{} 3603 tmp.unknown_ = i 3604 t.cc = append(t.cc, tmp) 3605 3606} 3607 3608// BccLen determines the number of elements able to be used for the IsBccObject, GetBccObject, and RemoveBccObject functions 3609func (t *Relationship) BccLen() (l int) { 3610 return len(t.bcc) 3611 3612} 3613 3614// IsBccObject determines whether the call to GetBccObject is safe for the specified index 3615func (t *Relationship) IsBccObject(index int) (ok bool) { 3616 return t.bcc[index].Object != nil 3617 3618} 3619 3620// GetBccObject returns the value safely if IsBccObject returned true for the specified index 3621func (t *Relationship) GetBccObject(index int) (v ObjectType) { 3622 return t.bcc[index].Object 3623 3624} 3625 3626// AppendBccObject adds to the back of bcc a ObjectType type 3627func (t *Relationship) AppendBccObject(v ObjectType) { 3628 t.bcc = append(t.bcc, &bccIntermediateType{Object: v}) 3629 3630} 3631 3632// PrependBccObject adds to the front of bcc a ObjectType type 3633func (t *Relationship) PrependBccObject(v ObjectType) { 3634 t.bcc = append([]*bccIntermediateType{&bccIntermediateType{Object: v}}, t.bcc...) 3635 3636} 3637 3638// RemoveBccObject deletes the value from the specified index 3639func (t *Relationship) RemoveBccObject(index int) { 3640 copy(t.bcc[index:], t.bcc[index+1:]) 3641 t.bcc[len(t.bcc)-1] = nil 3642 t.bcc = t.bcc[:len(t.bcc)-1] 3643 3644} 3645 3646// IsBccLink determines whether the call to GetBccLink is safe for the specified index 3647func (t *Relationship) IsBccLink(index int) (ok bool) { 3648 return t.bcc[index].Link != nil 3649 3650} 3651 3652// GetBccLink returns the value safely if IsBccLink returned true for the specified index 3653func (t *Relationship) GetBccLink(index int) (v LinkType) { 3654 return t.bcc[index].Link 3655 3656} 3657 3658// AppendBccLink adds to the back of bcc a LinkType type 3659func (t *Relationship) AppendBccLink(v LinkType) { 3660 t.bcc = append(t.bcc, &bccIntermediateType{Link: v}) 3661 3662} 3663 3664// PrependBccLink adds to the front of bcc a LinkType type 3665func (t *Relationship) PrependBccLink(v LinkType) { 3666 t.bcc = append([]*bccIntermediateType{&bccIntermediateType{Link: v}}, t.bcc...) 3667 3668} 3669 3670// RemoveBccLink deletes the value from the specified index 3671func (t *Relationship) RemoveBccLink(index int) { 3672 copy(t.bcc[index:], t.bcc[index+1:]) 3673 t.bcc[len(t.bcc)-1] = nil 3674 t.bcc = t.bcc[:len(t.bcc)-1] 3675 3676} 3677 3678// IsBccIRI determines whether the call to GetBccIRI is safe for the specified index 3679func (t *Relationship) IsBccIRI(index int) (ok bool) { 3680 return t.bcc[index].IRI != nil 3681 3682} 3683 3684// GetBccIRI returns the value safely if IsBccIRI returned true for the specified index 3685func (t *Relationship) GetBccIRI(index int) (v *url.URL) { 3686 return t.bcc[index].IRI 3687 3688} 3689 3690// AppendBccIRI adds to the back of bcc a *url.URL type 3691func (t *Relationship) AppendBccIRI(v *url.URL) { 3692 t.bcc = append(t.bcc, &bccIntermediateType{IRI: v}) 3693 3694} 3695 3696// PrependBccIRI adds to the front of bcc a *url.URL type 3697func (t *Relationship) PrependBccIRI(v *url.URL) { 3698 t.bcc = append([]*bccIntermediateType{&bccIntermediateType{IRI: v}}, t.bcc...) 3699 3700} 3701 3702// RemoveBccIRI deletes the value from the specified index 3703func (t *Relationship) RemoveBccIRI(index int) { 3704 copy(t.bcc[index:], t.bcc[index+1:]) 3705 t.bcc[len(t.bcc)-1] = nil 3706 t.bcc = t.bcc[:len(t.bcc)-1] 3707 3708} 3709 3710// HasUnknownBcc determines whether the call to GetUnknownBcc is safe 3711func (t *Relationship) HasUnknownBcc() (ok bool) { 3712 return t.bcc != nil && t.bcc[0].unknown_ != nil 3713 3714} 3715 3716// GetUnknownBcc returns the unknown value for bcc 3717func (t *Relationship) GetUnknownBcc() (v interface{}) { 3718 return t.bcc[0].unknown_ 3719 3720} 3721 3722// SetUnknownBcc sets the unknown value of bcc 3723func (t *Relationship) SetUnknownBcc(i interface{}) { 3724 if t.unknown_ == nil { 3725 t.unknown_ = make(map[string]interface{}) 3726 } 3727 tmp := &bccIntermediateType{} 3728 tmp.unknown_ = i 3729 t.bcc = append(t.bcc, tmp) 3730 3731} 3732 3733// IsMediaType determines whether the call to GetMediaType is safe 3734func (t *Relationship) IsMediaType() (ok bool) { 3735 return t.mediaType != nil && t.mediaType.mimeMediaTypeValue != nil 3736 3737} 3738 3739// GetMediaType returns the value safely if IsMediaType returned true 3740func (t *Relationship) GetMediaType() (v string) { 3741 return *t.mediaType.mimeMediaTypeValue 3742 3743} 3744 3745// SetMediaType sets the value of mediaType to be of string type 3746func (t *Relationship) SetMediaType(v string) { 3747 t.mediaType = &mediaTypeIntermediateType{mimeMediaTypeValue: &v} 3748 3749} 3750 3751// IsMediaTypeIRI determines whether the call to GetMediaTypeIRI is safe 3752func (t *Relationship) IsMediaTypeIRI() (ok bool) { 3753 return t.mediaType != nil && t.mediaType.IRI != nil 3754 3755} 3756 3757// GetMediaTypeIRI returns the value safely if IsMediaTypeIRI returned true 3758func (t *Relationship) GetMediaTypeIRI() (v *url.URL) { 3759 return t.mediaType.IRI 3760 3761} 3762 3763// SetMediaTypeIRI sets the value of mediaType to be of *url.URL type 3764func (t *Relationship) SetMediaTypeIRI(v *url.URL) { 3765 t.mediaType = &mediaTypeIntermediateType{IRI: v} 3766 3767} 3768 3769// HasUnknownMediaType determines whether the call to GetUnknownMediaType is safe 3770func (t *Relationship) HasUnknownMediaType() (ok bool) { 3771 return t.mediaType != nil && t.mediaType.unknown_ != nil 3772 3773} 3774 3775// GetUnknownMediaType returns the unknown value for mediaType 3776func (t *Relationship) GetUnknownMediaType() (v interface{}) { 3777 return t.mediaType.unknown_ 3778 3779} 3780 3781// SetUnknownMediaType sets the unknown value of mediaType 3782func (t *Relationship) SetUnknownMediaType(i interface{}) { 3783 if t.unknown_ == nil { 3784 t.unknown_ = make(map[string]interface{}) 3785 } 3786 tmp := &mediaTypeIntermediateType{} 3787 tmp.unknown_ = i 3788 t.mediaType = tmp 3789 3790} 3791 3792// IsDuration determines whether the call to GetDuration is safe 3793func (t *Relationship) IsDuration() (ok bool) { 3794 return t.duration != nil && t.duration.duration != nil 3795 3796} 3797 3798// GetDuration returns the value safely if IsDuration returned true 3799func (t *Relationship) GetDuration() (v time.Duration) { 3800 return *t.duration.duration 3801 3802} 3803 3804// SetDuration sets the value of duration to be of time.Duration type 3805func (t *Relationship) SetDuration(v time.Duration) { 3806 t.duration = &durationIntermediateType{duration: &v} 3807 3808} 3809 3810// IsDurationIRI determines whether the call to GetDurationIRI is safe 3811func (t *Relationship) IsDurationIRI() (ok bool) { 3812 return t.duration != nil && t.duration.IRI != nil 3813 3814} 3815 3816// GetDurationIRI returns the value safely if IsDurationIRI returned true 3817func (t *Relationship) GetDurationIRI() (v *url.URL) { 3818 return t.duration.IRI 3819 3820} 3821 3822// SetDurationIRI sets the value of duration to be of *url.URL type 3823func (t *Relationship) SetDurationIRI(v *url.URL) { 3824 t.duration = &durationIntermediateType{IRI: v} 3825 3826} 3827 3828// HasUnknownDuration determines whether the call to GetUnknownDuration is safe 3829func (t *Relationship) HasUnknownDuration() (ok bool) { 3830 return t.duration != nil && t.duration.unknown_ != nil 3831 3832} 3833 3834// GetUnknownDuration returns the unknown value for duration 3835func (t *Relationship) GetUnknownDuration() (v interface{}) { 3836 return t.duration.unknown_ 3837 3838} 3839 3840// SetUnknownDuration sets the unknown value of duration 3841func (t *Relationship) SetUnknownDuration(i interface{}) { 3842 if t.unknown_ == nil { 3843 t.unknown_ = make(map[string]interface{}) 3844 } 3845 tmp := &durationIntermediateType{} 3846 tmp.unknown_ = i 3847 t.duration = tmp 3848 3849} 3850 3851// IsSource determines whether the call to GetSource is safe 3852func (t *Relationship) IsSource() (ok bool) { 3853 return t.source != nil && t.source.Object != nil 3854 3855} 3856 3857// GetSource returns the value safely if IsSource returned true 3858func (t *Relationship) GetSource() (v ObjectType) { 3859 return t.source.Object 3860 3861} 3862 3863// SetSource sets the value of source to be of ObjectType type 3864func (t *Relationship) SetSource(v ObjectType) { 3865 t.source = &sourceIntermediateType{Object: v} 3866 3867} 3868 3869// IsSourceIRI determines whether the call to GetSourceIRI is safe 3870func (t *Relationship) IsSourceIRI() (ok bool) { 3871 return t.source != nil && t.source.IRI != nil 3872 3873} 3874 3875// GetSourceIRI returns the value safely if IsSourceIRI returned true 3876func (t *Relationship) GetSourceIRI() (v *url.URL) { 3877 return t.source.IRI 3878 3879} 3880 3881// SetSourceIRI sets the value of source to be of *url.URL type 3882func (t *Relationship) SetSourceIRI(v *url.URL) { 3883 t.source = &sourceIntermediateType{IRI: v} 3884 3885} 3886 3887// HasUnknownSource determines whether the call to GetUnknownSource is safe 3888func (t *Relationship) HasUnknownSource() (ok bool) { 3889 return t.source != nil && t.source.unknown_ != nil 3890 3891} 3892 3893// GetUnknownSource returns the unknown value for source 3894func (t *Relationship) GetUnknownSource() (v interface{}) { 3895 return t.source.unknown_ 3896 3897} 3898 3899// SetUnknownSource sets the unknown value of source 3900func (t *Relationship) SetUnknownSource(i interface{}) { 3901 if t.unknown_ == nil { 3902 t.unknown_ = make(map[string]interface{}) 3903 } 3904 tmp := &sourceIntermediateType{} 3905 tmp.unknown_ = i 3906 t.source = tmp 3907 3908} 3909 3910// IsInboxOrderedCollection determines whether the call to GetInboxOrderedCollection is safe 3911func (t *Relationship) IsInboxOrderedCollection() (ok bool) { 3912 return t.inbox != nil && t.inbox.OrderedCollection != nil 3913 3914} 3915 3916// GetInboxOrderedCollection returns the value safely if IsInboxOrderedCollection returned true 3917func (t *Relationship) GetInboxOrderedCollection() (v OrderedCollectionType) { 3918 return t.inbox.OrderedCollection 3919 3920} 3921 3922// SetInboxOrderedCollection sets the value of inbox to be of OrderedCollectionType type 3923func (t *Relationship) SetInboxOrderedCollection(v OrderedCollectionType) { 3924 t.inbox = &inboxIntermediateType{OrderedCollection: v} 3925 3926} 3927 3928// IsInboxAnyURI determines whether the call to GetInboxAnyURI is safe 3929func (t *Relationship) IsInboxAnyURI() (ok bool) { 3930 return t.inbox != nil && t.inbox.anyURI != nil 3931 3932} 3933 3934// GetInboxAnyURI returns the value safely if IsInboxAnyURI returned true 3935func (t *Relationship) GetInboxAnyURI() (v *url.URL) { 3936 return t.inbox.anyURI 3937 3938} 3939 3940// SetInboxAnyURI sets the value of inbox to be of *url.URL type 3941func (t *Relationship) SetInboxAnyURI(v *url.URL) { 3942 t.inbox = &inboxIntermediateType{anyURI: v} 3943 3944} 3945 3946// HasUnknownInbox determines whether the call to GetUnknownInbox is safe 3947func (t *Relationship) HasUnknownInbox() (ok bool) { 3948 return t.inbox != nil && t.inbox.unknown_ != nil 3949 3950} 3951 3952// GetUnknownInbox returns the unknown value for inbox 3953func (t *Relationship) GetUnknownInbox() (v interface{}) { 3954 return t.inbox.unknown_ 3955 3956} 3957 3958// SetUnknownInbox sets the unknown value of inbox 3959func (t *Relationship) SetUnknownInbox(i interface{}) { 3960 if t.unknown_ == nil { 3961 t.unknown_ = make(map[string]interface{}) 3962 } 3963 tmp := &inboxIntermediateType{} 3964 tmp.unknown_ = i 3965 t.inbox = tmp 3966 3967} 3968 3969// IsOutboxOrderedCollection determines whether the call to GetOutboxOrderedCollection is safe 3970func (t *Relationship) IsOutboxOrderedCollection() (ok bool) { 3971 return t.outbox != nil && t.outbox.OrderedCollection != nil 3972 3973} 3974 3975// GetOutboxOrderedCollection returns the value safely if IsOutboxOrderedCollection returned true 3976func (t *Relationship) GetOutboxOrderedCollection() (v OrderedCollectionType) { 3977 return t.outbox.OrderedCollection 3978 3979} 3980 3981// SetOutboxOrderedCollection sets the value of outbox to be of OrderedCollectionType type 3982func (t *Relationship) SetOutboxOrderedCollection(v OrderedCollectionType) { 3983 t.outbox = &outboxIntermediateType{OrderedCollection: v} 3984 3985} 3986 3987// IsOutboxAnyURI determines whether the call to GetOutboxAnyURI is safe 3988func (t *Relationship) IsOutboxAnyURI() (ok bool) { 3989 return t.outbox != nil && t.outbox.anyURI != nil 3990 3991} 3992 3993// GetOutboxAnyURI returns the value safely if IsOutboxAnyURI returned true 3994func (t *Relationship) GetOutboxAnyURI() (v *url.URL) { 3995 return t.outbox.anyURI 3996 3997} 3998 3999// SetOutboxAnyURI sets the value of outbox to be of *url.URL type 4000func (t *Relationship) SetOutboxAnyURI(v *url.URL) { 4001 t.outbox = &outboxIntermediateType{anyURI: v} 4002 4003} 4004 4005// HasUnknownOutbox determines whether the call to GetUnknownOutbox is safe 4006func (t *Relationship) HasUnknownOutbox() (ok bool) { 4007 return t.outbox != nil && t.outbox.unknown_ != nil 4008 4009} 4010 4011// GetUnknownOutbox returns the unknown value for outbox 4012func (t *Relationship) GetUnknownOutbox() (v interface{}) { 4013 return t.outbox.unknown_ 4014 4015} 4016 4017// SetUnknownOutbox sets the unknown value of outbox 4018func (t *Relationship) SetUnknownOutbox(i interface{}) { 4019 if t.unknown_ == nil { 4020 t.unknown_ = make(map[string]interface{}) 4021 } 4022 tmp := &outboxIntermediateType{} 4023 tmp.unknown_ = i 4024 t.outbox = tmp 4025 4026} 4027 4028// IsFollowingCollection determines whether the call to GetFollowingCollection is safe 4029func (t *Relationship) IsFollowingCollection() (ok bool) { 4030 return t.following != nil && t.following.Collection != nil 4031 4032} 4033 4034// GetFollowingCollection returns the value safely if IsFollowingCollection returned true 4035func (t *Relationship) GetFollowingCollection() (v CollectionType) { 4036 return t.following.Collection 4037 4038} 4039 4040// SetFollowingCollection sets the value of following to be of CollectionType type 4041func (t *Relationship) SetFollowingCollection(v CollectionType) { 4042 t.following = &followingIntermediateType{Collection: v} 4043 4044} 4045 4046// IsFollowingOrderedCollection determines whether the call to GetFollowingOrderedCollection is safe 4047func (t *Relationship) IsFollowingOrderedCollection() (ok bool) { 4048 return t.following != nil && t.following.OrderedCollection != nil 4049 4050} 4051 4052// GetFollowingOrderedCollection returns the value safely if IsFollowingOrderedCollection returned true 4053func (t *Relationship) GetFollowingOrderedCollection() (v OrderedCollectionType) { 4054 return t.following.OrderedCollection 4055 4056} 4057 4058// SetFollowingOrderedCollection sets the value of following to be of OrderedCollectionType type 4059func (t *Relationship) SetFollowingOrderedCollection(v OrderedCollectionType) { 4060 t.following = &followingIntermediateType{OrderedCollection: v} 4061 4062} 4063 4064// IsFollowingAnyURI determines whether the call to GetFollowingAnyURI is safe 4065func (t *Relationship) IsFollowingAnyURI() (ok bool) { 4066 return t.following != nil && t.following.anyURI != nil 4067 4068} 4069 4070// GetFollowingAnyURI returns the value safely if IsFollowingAnyURI returned true 4071func (t *Relationship) GetFollowingAnyURI() (v *url.URL) { 4072 return t.following.anyURI 4073 4074} 4075 4076// SetFollowingAnyURI sets the value of following to be of *url.URL type 4077func (t *Relationship) SetFollowingAnyURI(v *url.URL) { 4078 t.following = &followingIntermediateType{anyURI: v} 4079 4080} 4081 4082// HasUnknownFollowing determines whether the call to GetUnknownFollowing is safe 4083func (t *Relationship) HasUnknownFollowing() (ok bool) { 4084 return t.following != nil && t.following.unknown_ != nil 4085 4086} 4087 4088// GetUnknownFollowing returns the unknown value for following 4089func (t *Relationship) GetUnknownFollowing() (v interface{}) { 4090 return t.following.unknown_ 4091 4092} 4093 4094// SetUnknownFollowing sets the unknown value of following 4095func (t *Relationship) SetUnknownFollowing(i interface{}) { 4096 if t.unknown_ == nil { 4097 t.unknown_ = make(map[string]interface{}) 4098 } 4099 tmp := &followingIntermediateType{} 4100 tmp.unknown_ = i 4101 t.following = tmp 4102 4103} 4104 4105// IsFollowersCollection determines whether the call to GetFollowersCollection is safe 4106func (t *Relationship) IsFollowersCollection() (ok bool) { 4107 return t.followers != nil && t.followers.Collection != nil 4108 4109} 4110 4111// GetFollowersCollection returns the value safely if IsFollowersCollection returned true 4112func (t *Relationship) GetFollowersCollection() (v CollectionType) { 4113 return t.followers.Collection 4114 4115} 4116 4117// SetFollowersCollection sets the value of followers to be of CollectionType type 4118func (t *Relationship) SetFollowersCollection(v CollectionType) { 4119 t.followers = &followersIntermediateType{Collection: v} 4120 4121} 4122 4123// IsFollowersOrderedCollection determines whether the call to GetFollowersOrderedCollection is safe 4124func (t *Relationship) IsFollowersOrderedCollection() (ok bool) { 4125 return t.followers != nil && t.followers.OrderedCollection != nil 4126 4127} 4128 4129// GetFollowersOrderedCollection returns the value safely if IsFollowersOrderedCollection returned true 4130func (t *Relationship) GetFollowersOrderedCollection() (v OrderedCollectionType) { 4131 return t.followers.OrderedCollection 4132 4133} 4134 4135// SetFollowersOrderedCollection sets the value of followers to be of OrderedCollectionType type 4136func (t *Relationship) SetFollowersOrderedCollection(v OrderedCollectionType) { 4137 t.followers = &followersIntermediateType{OrderedCollection: v} 4138 4139} 4140 4141// IsFollowersAnyURI determines whether the call to GetFollowersAnyURI is safe 4142func (t *Relationship) IsFollowersAnyURI() (ok bool) { 4143 return t.followers != nil && t.followers.anyURI != nil 4144 4145} 4146 4147// GetFollowersAnyURI returns the value safely if IsFollowersAnyURI returned true 4148func (t *Relationship) GetFollowersAnyURI() (v *url.URL) { 4149 return t.followers.anyURI 4150 4151} 4152 4153// SetFollowersAnyURI sets the value of followers to be of *url.URL type 4154func (t *Relationship) SetFollowersAnyURI(v *url.URL) { 4155 t.followers = &followersIntermediateType{anyURI: v} 4156 4157} 4158 4159// HasUnknownFollowers determines whether the call to GetUnknownFollowers is safe 4160func (t *Relationship) HasUnknownFollowers() (ok bool) { 4161 return t.followers != nil && t.followers.unknown_ != nil 4162 4163} 4164 4165// GetUnknownFollowers returns the unknown value for followers 4166func (t *Relationship) GetUnknownFollowers() (v interface{}) { 4167 return t.followers.unknown_ 4168 4169} 4170 4171// SetUnknownFollowers sets the unknown value of followers 4172func (t *Relationship) SetUnknownFollowers(i interface{}) { 4173 if t.unknown_ == nil { 4174 t.unknown_ = make(map[string]interface{}) 4175 } 4176 tmp := &followersIntermediateType{} 4177 tmp.unknown_ = i 4178 t.followers = tmp 4179 4180} 4181 4182// IsLikedCollection determines whether the call to GetLikedCollection is safe 4183func (t *Relationship) IsLikedCollection() (ok bool) { 4184 return t.liked != nil && t.liked.Collection != nil 4185 4186} 4187 4188// GetLikedCollection returns the value safely if IsLikedCollection returned true 4189func (t *Relationship) GetLikedCollection() (v CollectionType) { 4190 return t.liked.Collection 4191 4192} 4193 4194// SetLikedCollection sets the value of liked to be of CollectionType type 4195func (t *Relationship) SetLikedCollection(v CollectionType) { 4196 t.liked = &likedIntermediateType{Collection: v} 4197 4198} 4199 4200// IsLikedOrderedCollection determines whether the call to GetLikedOrderedCollection is safe 4201func (t *Relationship) IsLikedOrderedCollection() (ok bool) { 4202 return t.liked != nil && t.liked.OrderedCollection != nil 4203 4204} 4205 4206// GetLikedOrderedCollection returns the value safely if IsLikedOrderedCollection returned true 4207func (t *Relationship) GetLikedOrderedCollection() (v OrderedCollectionType) { 4208 return t.liked.OrderedCollection 4209 4210} 4211 4212// SetLikedOrderedCollection sets the value of liked to be of OrderedCollectionType type 4213func (t *Relationship) SetLikedOrderedCollection(v OrderedCollectionType) { 4214 t.liked = &likedIntermediateType{OrderedCollection: v} 4215 4216} 4217 4218// IsLikedAnyURI determines whether the call to GetLikedAnyURI is safe 4219func (t *Relationship) IsLikedAnyURI() (ok bool) { 4220 return t.liked != nil && t.liked.anyURI != nil 4221 4222} 4223 4224// GetLikedAnyURI returns the value safely if IsLikedAnyURI returned true 4225func (t *Relationship) GetLikedAnyURI() (v *url.URL) { 4226 return t.liked.anyURI 4227 4228} 4229 4230// SetLikedAnyURI sets the value of liked to be of *url.URL type 4231func (t *Relationship) SetLikedAnyURI(v *url.URL) { 4232 t.liked = &likedIntermediateType{anyURI: v} 4233 4234} 4235 4236// HasUnknownLiked determines whether the call to GetUnknownLiked is safe 4237func (t *Relationship) HasUnknownLiked() (ok bool) { 4238 return t.liked != nil && t.liked.unknown_ != nil 4239 4240} 4241 4242// GetUnknownLiked returns the unknown value for liked 4243func (t *Relationship) GetUnknownLiked() (v interface{}) { 4244 return t.liked.unknown_ 4245 4246} 4247 4248// SetUnknownLiked sets the unknown value of liked 4249func (t *Relationship) SetUnknownLiked(i interface{}) { 4250 if t.unknown_ == nil { 4251 t.unknown_ = make(map[string]interface{}) 4252 } 4253 tmp := &likedIntermediateType{} 4254 tmp.unknown_ = i 4255 t.liked = tmp 4256 4257} 4258 4259// IsLikesCollection determines whether the call to GetLikesCollection is safe 4260func (t *Relationship) IsLikesCollection() (ok bool) { 4261 return t.likes != nil && t.likes.Collection != nil 4262 4263} 4264 4265// GetLikesCollection returns the value safely if IsLikesCollection returned true 4266func (t *Relationship) GetLikesCollection() (v CollectionType) { 4267 return t.likes.Collection 4268 4269} 4270 4271// SetLikesCollection sets the value of likes to be of CollectionType type 4272func (t *Relationship) SetLikesCollection(v CollectionType) { 4273 t.likes = &likesIntermediateType{Collection: v} 4274 4275} 4276 4277// IsLikesOrderedCollection determines whether the call to GetLikesOrderedCollection is safe 4278func (t *Relationship) IsLikesOrderedCollection() (ok bool) { 4279 return t.likes != nil && t.likes.OrderedCollection != nil 4280 4281} 4282 4283// GetLikesOrderedCollection returns the value safely if IsLikesOrderedCollection returned true 4284func (t *Relationship) GetLikesOrderedCollection() (v OrderedCollectionType) { 4285 return t.likes.OrderedCollection 4286 4287} 4288 4289// SetLikesOrderedCollection sets the value of likes to be of OrderedCollectionType type 4290func (t *Relationship) SetLikesOrderedCollection(v OrderedCollectionType) { 4291 t.likes = &likesIntermediateType{OrderedCollection: v} 4292 4293} 4294 4295// IsLikesAnyURI determines whether the call to GetLikesAnyURI is safe 4296func (t *Relationship) IsLikesAnyURI() (ok bool) { 4297 return t.likes != nil && t.likes.anyURI != nil 4298 4299} 4300 4301// GetLikesAnyURI returns the value safely if IsLikesAnyURI returned true 4302func (t *Relationship) GetLikesAnyURI() (v *url.URL) { 4303 return t.likes.anyURI 4304 4305} 4306 4307// SetLikesAnyURI sets the value of likes to be of *url.URL type 4308func (t *Relationship) SetLikesAnyURI(v *url.URL) { 4309 t.likes = &likesIntermediateType{anyURI: v} 4310 4311} 4312 4313// HasUnknownLikes determines whether the call to GetUnknownLikes is safe 4314func (t *Relationship) HasUnknownLikes() (ok bool) { 4315 return t.likes != nil && t.likes.unknown_ != nil 4316 4317} 4318 4319// GetUnknownLikes returns the unknown value for likes 4320func (t *Relationship) GetUnknownLikes() (v interface{}) { 4321 return t.likes.unknown_ 4322 4323} 4324 4325// SetUnknownLikes sets the unknown value of likes 4326func (t *Relationship) SetUnknownLikes(i interface{}) { 4327 if t.unknown_ == nil { 4328 t.unknown_ = make(map[string]interface{}) 4329 } 4330 tmp := &likesIntermediateType{} 4331 tmp.unknown_ = i 4332 t.likes = tmp 4333 4334} 4335 4336// StreamsLen determines the number of elements able to be used for the GetStreams and RemoveStreams functions 4337func (t *Relationship) StreamsLen() (l int) { 4338 return len(t.streams) 4339 4340} 4341 4342// GetStreams returns the value for the specified index 4343func (t *Relationship) GetStreams(index int) (v *url.URL) { 4344 return t.streams[index] 4345 4346} 4347 4348// AppendStreams adds a value to the back of streams 4349func (t *Relationship) AppendStreams(v *url.URL) { 4350 t.streams = append(t.streams, v) 4351 4352} 4353 4354// PrependStreams adds a value to the front of streams 4355func (t *Relationship) PrependStreams(v *url.URL) { 4356 t.streams = append([]*url.URL{v}, t.streams...) 4357 4358} 4359 4360// RemoveStreams deletes the value from the specified index 4361func (t *Relationship) RemoveStreams(index int) { 4362 copy(t.streams[index:], t.streams[index+1:]) 4363 t.streams[len(t.streams)-1] = nil 4364 t.streams = t.streams[:len(t.streams)-1] 4365 4366} 4367 4368// HasUnknownStreams determines whether the call to GetUnknownStreams is safe 4369func (t *Relationship) HasUnknownStreams() (ok bool) { 4370 return t.unknown_ != nil && t.unknown_["streams"] != nil 4371 4372} 4373 4374// GetUnknownStreams returns the unknown value for streams 4375func (t *Relationship) GetUnknownStreams() (v interface{}) { 4376 return t.unknown_["streams"] 4377 4378} 4379 4380// SetUnknownStreams sets the unknown value of streams 4381func (t *Relationship) SetUnknownStreams(i interface{}) { 4382 if t.unknown_ == nil { 4383 t.unknown_ = make(map[string]interface{}) 4384 } 4385 t.unknown_["streams"] = i 4386 4387} 4388 4389// IsPreferredUsername determines whether the call to GetPreferredUsername is safe 4390func (t *Relationship) IsPreferredUsername() (ok bool) { 4391 return t.preferredUsername != nil && t.preferredUsername.stringName != nil 4392 4393} 4394 4395// GetPreferredUsername returns the value safely if IsPreferredUsername returned true 4396func (t *Relationship) GetPreferredUsername() (v string) { 4397 return *t.preferredUsername.stringName 4398 4399} 4400 4401// SetPreferredUsername sets the value of preferredUsername to be of string type 4402func (t *Relationship) SetPreferredUsername(v string) { 4403 t.preferredUsername = &preferredUsernameIntermediateType{stringName: &v} 4404 4405} 4406 4407// IsPreferredUsernameIRI determines whether the call to GetPreferredUsernameIRI is safe 4408func (t *Relationship) IsPreferredUsernameIRI() (ok bool) { 4409 return t.preferredUsername != nil && t.preferredUsername.IRI != nil 4410 4411} 4412 4413// GetPreferredUsernameIRI returns the value safely if IsPreferredUsernameIRI returned true 4414func (t *Relationship) GetPreferredUsernameIRI() (v *url.URL) { 4415 return t.preferredUsername.IRI 4416 4417} 4418 4419// SetPreferredUsernameIRI sets the value of preferredUsername to be of *url.URL type 4420func (t *Relationship) SetPreferredUsernameIRI(v *url.URL) { 4421 t.preferredUsername = &preferredUsernameIntermediateType{IRI: v} 4422 4423} 4424 4425// HasUnknownPreferredUsername determines whether the call to GetUnknownPreferredUsername is safe 4426func (t *Relationship) HasUnknownPreferredUsername() (ok bool) { 4427 return t.preferredUsername != nil && t.preferredUsername.unknown_ != nil 4428 4429} 4430 4431// GetUnknownPreferredUsername returns the unknown value for preferredUsername 4432func (t *Relationship) GetUnknownPreferredUsername() (v interface{}) { 4433 return t.preferredUsername.unknown_ 4434 4435} 4436 4437// SetUnknownPreferredUsername sets the unknown value of preferredUsername 4438func (t *Relationship) SetUnknownPreferredUsername(i interface{}) { 4439 if t.unknown_ == nil { 4440 t.unknown_ = make(map[string]interface{}) 4441 } 4442 tmp := &preferredUsernameIntermediateType{} 4443 tmp.unknown_ = i 4444 t.preferredUsername = tmp 4445 4446} 4447 4448// PreferredUsernameMapLanguages returns all languages for this property's language mapping, or nil if there are none. 4449func (t *Relationship) PreferredUsernameMapLanguages() (l []string) { 4450 if t.preferredUsernameMap == nil || len(t.preferredUsernameMap) == 0 { 4451 return nil 4452 } 4453 for k := range t.preferredUsernameMap { 4454 l = append(l, k) 4455 } 4456 return 4457 4458} 4459 4460// GetPreferredUsernameMap retrieves the value of the property for the specified language, or an empty string if it does not exist 4461func (t *Relationship) GetPreferredUsernameMap(l string) (v string) { 4462 if t.preferredUsernameMap == nil { 4463 return "" 4464 } 4465 ok := false 4466 v, ok = t.preferredUsernameMap[l] 4467 if !ok { 4468 return "" 4469 } 4470 return v 4471 4472} 4473 4474// SetPreferredUsernameMap sets the value of the property for the specified language 4475func (t *Relationship) SetPreferredUsernameMap(l string, v string) { 4476 if t.preferredUsernameMap == nil { 4477 t.preferredUsernameMap = make(map[string]string) 4478 } 4479 t.preferredUsernameMap[l] = v 4480 4481} 4482 4483// IsEndpoints determines whether the call to GetEndpoints is safe 4484func (t *Relationship) IsEndpoints() (ok bool) { 4485 return t.endpoints != nil && t.endpoints.Object != nil 4486 4487} 4488 4489// GetEndpoints returns the value safely if IsEndpoints returned true 4490func (t *Relationship) GetEndpoints() (v ObjectType) { 4491 return t.endpoints.Object 4492 4493} 4494 4495// SetEndpoints sets the value of endpoints to be of ObjectType type 4496func (t *Relationship) SetEndpoints(v ObjectType) { 4497 t.endpoints = &endpointsIntermediateType{Object: v} 4498 4499} 4500 4501// IsEndpointsIRI determines whether the call to GetEndpointsIRI is safe 4502func (t *Relationship) IsEndpointsIRI() (ok bool) { 4503 return t.endpoints != nil && t.endpoints.IRI != nil 4504 4505} 4506 4507// GetEndpointsIRI returns the value safely if IsEndpointsIRI returned true 4508func (t *Relationship) GetEndpointsIRI() (v *url.URL) { 4509 return t.endpoints.IRI 4510 4511} 4512 4513// SetEndpointsIRI sets the value of endpoints to be of *url.URL type 4514func (t *Relationship) SetEndpointsIRI(v *url.URL) { 4515 t.endpoints = &endpointsIntermediateType{IRI: v} 4516 4517} 4518 4519// HasUnknownEndpoints determines whether the call to GetUnknownEndpoints is safe 4520func (t *Relationship) HasUnknownEndpoints() (ok bool) { 4521 return t.endpoints != nil && t.endpoints.unknown_ != nil 4522 4523} 4524 4525// GetUnknownEndpoints returns the unknown value for endpoints 4526func (t *Relationship) GetUnknownEndpoints() (v interface{}) { 4527 return t.endpoints.unknown_ 4528 4529} 4530 4531// SetUnknownEndpoints sets the unknown value of endpoints 4532func (t *Relationship) SetUnknownEndpoints(i interface{}) { 4533 if t.unknown_ == nil { 4534 t.unknown_ = make(map[string]interface{}) 4535 } 4536 tmp := &endpointsIntermediateType{} 4537 tmp.unknown_ = i 4538 t.endpoints = tmp 4539 4540} 4541 4542// HasProxyUrl determines whether the call to GetProxyUrl is safe 4543func (t *Relationship) HasProxyUrl() (ok bool) { 4544 return t.proxyUrl != nil 4545 4546} 4547 4548// GetProxyUrl returns the value for proxyUrl 4549func (t *Relationship) GetProxyUrl() (v *url.URL) { 4550 return t.proxyUrl 4551 4552} 4553 4554// SetProxyUrl sets the value of proxyUrl 4555func (t *Relationship) SetProxyUrl(v *url.URL) { 4556 t.proxyUrl = v 4557 4558} 4559 4560// HasUnknownProxyUrl determines whether the call to GetUnknownProxyUrl is safe 4561func (t *Relationship) HasUnknownProxyUrl() (ok bool) { 4562 return t.unknown_ != nil && t.unknown_["proxyUrl"] != nil 4563 4564} 4565 4566// GetUnknownProxyUrl returns the unknown value for proxyUrl 4567func (t *Relationship) GetUnknownProxyUrl() (v interface{}) { 4568 return t.unknown_["proxyUrl"] 4569 4570} 4571 4572// SetUnknownProxyUrl sets the unknown value of proxyUrl 4573func (t *Relationship) SetUnknownProxyUrl(i interface{}) { 4574 if t.unknown_ == nil { 4575 t.unknown_ = make(map[string]interface{}) 4576 } 4577 t.unknown_["proxyUrl"] = i 4578 4579} 4580 4581// HasOauthAuthorizationEndpoint determines whether the call to GetOauthAuthorizationEndpoint is safe 4582func (t *Relationship) HasOauthAuthorizationEndpoint() (ok bool) { 4583 return t.oauthAuthorizationEndpoint != nil 4584 4585} 4586 4587// GetOauthAuthorizationEndpoint returns the value for oauthAuthorizationEndpoint 4588func (t *Relationship) GetOauthAuthorizationEndpoint() (v *url.URL) { 4589 return t.oauthAuthorizationEndpoint 4590 4591} 4592 4593// SetOauthAuthorizationEndpoint sets the value of oauthAuthorizationEndpoint 4594func (t *Relationship) SetOauthAuthorizationEndpoint(v *url.URL) { 4595 t.oauthAuthorizationEndpoint = v 4596 4597} 4598 4599// HasUnknownOauthAuthorizationEndpoint determines whether the call to GetUnknownOauthAuthorizationEndpoint is safe 4600func (t *Relationship) HasUnknownOauthAuthorizationEndpoint() (ok bool) { 4601 return t.unknown_ != nil && t.unknown_["oauthAuthorizationEndpoint"] != nil 4602 4603} 4604 4605// GetUnknownOauthAuthorizationEndpoint returns the unknown value for oauthAuthorizationEndpoint 4606func (t *Relationship) GetUnknownOauthAuthorizationEndpoint() (v interface{}) { 4607 return t.unknown_["oauthAuthorizationEndpoint"] 4608 4609} 4610 4611// SetUnknownOauthAuthorizationEndpoint sets the unknown value of oauthAuthorizationEndpoint 4612func (t *Relationship) SetUnknownOauthAuthorizationEndpoint(i interface{}) { 4613 if t.unknown_ == nil { 4614 t.unknown_ = make(map[string]interface{}) 4615 } 4616 t.unknown_["oauthAuthorizationEndpoint"] = i 4617 4618} 4619 4620// HasOauthTokenEndpoint determines whether the call to GetOauthTokenEndpoint is safe 4621func (t *Relationship) HasOauthTokenEndpoint() (ok bool) { 4622 return t.oauthTokenEndpoint != nil 4623 4624} 4625 4626// GetOauthTokenEndpoint returns the value for oauthTokenEndpoint 4627func (t *Relationship) GetOauthTokenEndpoint() (v *url.URL) { 4628 return t.oauthTokenEndpoint 4629 4630} 4631 4632// SetOauthTokenEndpoint sets the value of oauthTokenEndpoint 4633func (t *Relationship) SetOauthTokenEndpoint(v *url.URL) { 4634 t.oauthTokenEndpoint = v 4635 4636} 4637 4638// HasUnknownOauthTokenEndpoint determines whether the call to GetUnknownOauthTokenEndpoint is safe 4639func (t *Relationship) HasUnknownOauthTokenEndpoint() (ok bool) { 4640 return t.unknown_ != nil && t.unknown_["oauthTokenEndpoint"] != nil 4641 4642} 4643 4644// GetUnknownOauthTokenEndpoint returns the unknown value for oauthTokenEndpoint 4645func (t *Relationship) GetUnknownOauthTokenEndpoint() (v interface{}) { 4646 return t.unknown_["oauthTokenEndpoint"] 4647 4648} 4649 4650// SetUnknownOauthTokenEndpoint sets the unknown value of oauthTokenEndpoint 4651func (t *Relationship) SetUnknownOauthTokenEndpoint(i interface{}) { 4652 if t.unknown_ == nil { 4653 t.unknown_ = make(map[string]interface{}) 4654 } 4655 t.unknown_["oauthTokenEndpoint"] = i 4656 4657} 4658 4659// HasProvideClientKey determines whether the call to GetProvideClientKey is safe 4660func (t *Relationship) HasProvideClientKey() (ok bool) { 4661 return t.provideClientKey != nil 4662 4663} 4664 4665// GetProvideClientKey returns the value for provideClientKey 4666func (t *Relationship) GetProvideClientKey() (v *url.URL) { 4667 return t.provideClientKey 4668 4669} 4670 4671// SetProvideClientKey sets the value of provideClientKey 4672func (t *Relationship) SetProvideClientKey(v *url.URL) { 4673 t.provideClientKey = v 4674 4675} 4676 4677// HasUnknownProvideClientKey determines whether the call to GetUnknownProvideClientKey is safe 4678func (t *Relationship) HasUnknownProvideClientKey() (ok bool) { 4679 return t.unknown_ != nil && t.unknown_["provideClientKey"] != nil 4680 4681} 4682 4683// GetUnknownProvideClientKey returns the unknown value for provideClientKey 4684func (t *Relationship) GetUnknownProvideClientKey() (v interface{}) { 4685 return t.unknown_["provideClientKey"] 4686 4687} 4688 4689// SetUnknownProvideClientKey sets the unknown value of provideClientKey 4690func (t *Relationship) SetUnknownProvideClientKey(i interface{}) { 4691 if t.unknown_ == nil { 4692 t.unknown_ = make(map[string]interface{}) 4693 } 4694 t.unknown_["provideClientKey"] = i 4695 4696} 4697 4698// HasSignClientKey determines whether the call to GetSignClientKey is safe 4699func (t *Relationship) HasSignClientKey() (ok bool) { 4700 return t.signClientKey != nil 4701 4702} 4703 4704// GetSignClientKey returns the value for signClientKey 4705func (t *Relationship) GetSignClientKey() (v *url.URL) { 4706 return t.signClientKey 4707 4708} 4709 4710// SetSignClientKey sets the value of signClientKey 4711func (t *Relationship) SetSignClientKey(v *url.URL) { 4712 t.signClientKey = v 4713 4714} 4715 4716// HasUnknownSignClientKey determines whether the call to GetUnknownSignClientKey is safe 4717func (t *Relationship) HasUnknownSignClientKey() (ok bool) { 4718 return t.unknown_ != nil && t.unknown_["signClientKey"] != nil 4719 4720} 4721 4722// GetUnknownSignClientKey returns the unknown value for signClientKey 4723func (t *Relationship) GetUnknownSignClientKey() (v interface{}) { 4724 return t.unknown_["signClientKey"] 4725 4726} 4727 4728// SetUnknownSignClientKey sets the unknown value of signClientKey 4729func (t *Relationship) SetUnknownSignClientKey(i interface{}) { 4730 if t.unknown_ == nil { 4731 t.unknown_ = make(map[string]interface{}) 4732 } 4733 t.unknown_["signClientKey"] = i 4734 4735} 4736 4737// HasSharedInbox determines whether the call to GetSharedInbox is safe 4738func (t *Relationship) HasSharedInbox() (ok bool) { 4739 return t.sharedInbox != nil 4740 4741} 4742 4743// GetSharedInbox returns the value for sharedInbox 4744func (t *Relationship) GetSharedInbox() (v *url.URL) { 4745 return t.sharedInbox 4746 4747} 4748 4749// SetSharedInbox sets the value of sharedInbox 4750func (t *Relationship) SetSharedInbox(v *url.URL) { 4751 t.sharedInbox = v 4752 4753} 4754 4755// HasUnknownSharedInbox determines whether the call to GetUnknownSharedInbox is safe 4756func (t *Relationship) HasUnknownSharedInbox() (ok bool) { 4757 return t.unknown_ != nil && t.unknown_["sharedInbox"] != nil 4758 4759} 4760 4761// GetUnknownSharedInbox returns the unknown value for sharedInbox 4762func (t *Relationship) GetUnknownSharedInbox() (v interface{}) { 4763 return t.unknown_["sharedInbox"] 4764 4765} 4766 4767// SetUnknownSharedInbox sets the unknown value of sharedInbox 4768func (t *Relationship) SetUnknownSharedInbox(i interface{}) { 4769 if t.unknown_ == nil { 4770 t.unknown_ = make(map[string]interface{}) 4771 } 4772 t.unknown_["sharedInbox"] = i 4773 4774} 4775 4776// AddUnknown adds a raw extension to this object with the specified key 4777func (t *Relationship) AddUnknown(k string, i interface{}) (this *Relationship) { 4778 if t.unknown_ == nil { 4779 t.unknown_ = make(map[string]interface{}) 4780 } 4781 t.unknown_[k] = i 4782 return t 4783 4784} 4785 4786// HasUnknown returns true if there is an unknown object with the specified key 4787func (t *Relationship) HasUnknown(k string) (b bool) { 4788 if t.unknown_ == nil { 4789 return false 4790 } 4791 _, ok := t.unknown_[k] 4792 return ok 4793 4794} 4795 4796// RemoveUnknown removes a raw extension from this object with the specified key 4797func (t *Relationship) RemoveUnknown(k string) (this *Relationship) { 4798 delete(t.unknown_, k) 4799 return t 4800 4801} 4802 4803// Serialize turns this object into a map[string]interface{}. Note that the "type" property will automatically be populated with "Relationship" if not manually set by the caller 4804func (t *Relationship) Serialize() (m map[string]interface{}, err error) { 4805 m = make(map[string]interface{}) 4806 for k, v := range t.unknown_ { 4807 m[k] = unknownValueSerialize(v) 4808 } 4809 var typeAlreadySet bool 4810 for _, k := range t.typeName { 4811 if ks, ok := k.(string); ok { 4812 if ks == "Relationship" { 4813 typeAlreadySet = true 4814 break 4815 } 4816 } 4817 } 4818 if !typeAlreadySet { 4819 t.typeName = append(t.typeName, "Relationship") 4820 } 4821 // Begin generation by generateFunctionalMultiTypeDefinition 4822 if t.subject != nil { 4823 if v, err := serializeSubjectIntermediateType(t.subject); err == nil { 4824 m["subject"] = v 4825 } else { 4826 return m, err 4827 } 4828 } 4829 // End generation by generateFunctionalMultiTypeDefinition 4830 // Begin generation by generateNonFunctionalMultiTypeDefinition 4831 if v, err := serializeSliceObjectIntermediateType(t.object); err == nil && v != nil { 4832 if len(v) == 1 { 4833 m["object"] = v[0] 4834 } else { 4835 m["object"] = v 4836 } 4837 } else if err != nil { 4838 return m, err 4839 } 4840 // End generation by generateNonFunctionalMultiTypeDefinition 4841 // Begin generation by generateFunctionalMultiTypeDefinition 4842 if t.relationship != nil { 4843 if v, err := serializeRelationshipIntermediateType(t.relationship); err == nil { 4844 m["relationship"] = v 4845 } else { 4846 return m, err 4847 } 4848 } 4849 // End generation by generateFunctionalMultiTypeDefinition 4850 // Begin generation by generateFunctionalMultiTypeDefinition 4851 if t.altitude != nil { 4852 if v, err := serializeAltitudeIntermediateType(t.altitude); err == nil { 4853 m["altitude"] = v 4854 } else { 4855 return m, err 4856 } 4857 } 4858 // End generation by generateFunctionalMultiTypeDefinition 4859 // Begin generation by generateNonFunctionalMultiTypeDefinition 4860 if v, err := serializeSliceAttachmentIntermediateType(t.attachment); err == nil && v != nil { 4861 if len(v) == 1 { 4862 m["attachment"] = v[0] 4863 } else { 4864 m["attachment"] = v 4865 } 4866 } else if err != nil { 4867 return m, err 4868 } 4869 // End generation by generateNonFunctionalMultiTypeDefinition 4870 // Begin generation by generateNonFunctionalMultiTypeDefinition 4871 if v, err := serializeSliceAttributedToIntermediateType(t.attributedTo); err == nil && v != nil { 4872 if len(v) == 1 { 4873 m["attributedTo"] = v[0] 4874 } else { 4875 m["attributedTo"] = v 4876 } 4877 } else if err != nil { 4878 return m, err 4879 } 4880 // End generation by generateNonFunctionalMultiTypeDefinition 4881 // Begin generation by generateNonFunctionalMultiTypeDefinition 4882 if v, err := serializeSliceAudienceIntermediateType(t.audience); err == nil && v != nil { 4883 if len(v) == 1 { 4884 m["audience"] = v[0] 4885 } else { 4886 m["audience"] = v 4887 } 4888 } else if err != nil { 4889 return m, err 4890 } 4891 // End generation by generateNonFunctionalMultiTypeDefinition 4892 // Begin generation by generateNonFunctionalMultiTypeDefinition 4893 if v, err := serializeSliceContentIntermediateType(t.content); err == nil && v != nil { 4894 if len(v) == 1 { 4895 m["content"] = v[0] 4896 } else { 4897 m["content"] = v 4898 } 4899 } else if err != nil { 4900 return m, err 4901 } 4902 // End generation by generateNonFunctionalMultiTypeDefinition 4903 4904 // Begin generation by generateNaturalLanguageMap 4905 if t.contentMap != nil && len(t.contentMap) >= 0 { 4906 m["contentMap"] = t.contentMap 4907 } 4908 // End generation by generateNaturalLanguageMap 4909 // Begin generation by generateNonFunctionalMultiTypeDefinition 4910 if v, err := serializeSliceContextIntermediateType(t.context); err == nil && v != nil { 4911 if len(v) == 1 { 4912 m["context"] = v[0] 4913 } else { 4914 m["context"] = v 4915 } 4916 } else if err != nil { 4917 return m, err 4918 } 4919 // End generation by generateNonFunctionalMultiTypeDefinition 4920 // Begin generation by generateNonFunctionalMultiTypeDefinition 4921 if v, err := serializeSliceNameIntermediateType(t.name); err == nil && v != nil { 4922 if len(v) == 1 { 4923 m["name"] = v[0] 4924 } else { 4925 m["name"] = v 4926 } 4927 } else if err != nil { 4928 return m, err 4929 } 4930 // End generation by generateNonFunctionalMultiTypeDefinition 4931 4932 // Begin generation by generateNaturalLanguageMap 4933 if t.nameMap != nil && len(t.nameMap) >= 0 { 4934 m["nameMap"] = t.nameMap 4935 } 4936 // End generation by generateNaturalLanguageMap 4937 // Begin generation by generateFunctionalMultiTypeDefinition 4938 if t.endTime != nil { 4939 if v, err := serializeEndTimeIntermediateType(t.endTime); err == nil { 4940 m["endTime"] = v 4941 } else { 4942 return m, err 4943 } 4944 } 4945 // End generation by generateFunctionalMultiTypeDefinition 4946 // Begin generation by generateNonFunctionalMultiTypeDefinition 4947 if v, err := serializeSliceGeneratorIntermediateType(t.generator); err == nil && v != nil { 4948 if len(v) == 1 { 4949 m["generator"] = v[0] 4950 } else { 4951 m["generator"] = v 4952 } 4953 } else if err != nil { 4954 return m, err 4955 } 4956 // End generation by generateNonFunctionalMultiTypeDefinition 4957 // Begin generation by generateNonFunctionalMultiTypeDefinition 4958 if v, err := serializeSliceIconIntermediateType(t.icon); err == nil && v != nil { 4959 if len(v) == 1 { 4960 m["icon"] = v[0] 4961 } else { 4962 m["icon"] = v 4963 } 4964 } else if err != nil { 4965 return m, err 4966 } 4967 // End generation by generateNonFunctionalMultiTypeDefinition 4968 // Begin generation by RangeReference.Serialize for Value 4969 if t.id != nil { 4970 idSerializeFunc := func() (interface{}, error) { 4971 v := t.id 4972 tmp := anyURISerialize(v) 4973 return tmp, nil 4974 } 4975 idResult, err := idSerializeFunc() 4976 if err == nil { 4977 m["id"] = idResult 4978 } else { 4979 return m, err 4980 } 4981 } 4982 // End generation by RangeReference.Serialize for Value 4983 // Begin generation by generateNonFunctionalMultiTypeDefinition 4984 if v, err := serializeSliceImageIntermediateType(t.image); err == nil && v != nil { 4985 if len(v) == 1 { 4986 m["image"] = v[0] 4987 } else { 4988 m["image"] = v 4989 } 4990 } else if err != nil { 4991 return m, err 4992 } 4993 // End generation by generateNonFunctionalMultiTypeDefinition 4994 // Begin generation by generateNonFunctionalMultiTypeDefinition 4995 if v, err := serializeSliceInReplyToIntermediateType(t.inReplyTo); err == nil && v != nil { 4996 if len(v) == 1 { 4997 m["inReplyTo"] = v[0] 4998 } else { 4999 m["inReplyTo"] = v 5000 } 5001 } else if err != nil { 5002 return m, err 5003 } 5004 // End generation by generateNonFunctionalMultiTypeDefinition 5005 // Begin generation by generateNonFunctionalMultiTypeDefinition 5006 if v, err := serializeSliceLocationIntermediateType(t.location); err == nil && v != nil { 5007 if len(v) == 1 { 5008 m["location"] = v[0] 5009 } else { 5010 m["location"] = v 5011 } 5012 } else if err != nil { 5013 return m, err 5014 } 5015 // End generation by generateNonFunctionalMultiTypeDefinition 5016 // Begin generation by generateNonFunctionalMultiTypeDefinition 5017 if v, err := serializeSlicePreviewIntermediateType(t.preview); err == nil && v != nil { 5018 if len(v) == 1 { 5019 m["preview"] = v[0] 5020 } else { 5021 m["preview"] = v 5022 } 5023 } else if err != nil { 5024 return m, err 5025 } 5026 // End generation by generateNonFunctionalMultiTypeDefinition 5027 // Begin generation by generateFunctionalMultiTypeDefinition 5028 if t.published != nil { 5029 if v, err := serializePublishedIntermediateType(t.published); err == nil { 5030 m["published"] = v 5031 } else { 5032 return m, err 5033 } 5034 } 5035 // End generation by generateFunctionalMultiTypeDefinition 5036 // Begin generation by generateFunctionalMultiTypeDefinition 5037 if t.replies != nil { 5038 if v, err := serializeRepliesIntermediateType(t.replies); err == nil { 5039 m["replies"] = v 5040 } else { 5041 return m, err 5042 } 5043 } 5044 // End generation by generateFunctionalMultiTypeDefinition 5045 // Begin generation by generateFunctionalMultiTypeDefinition 5046 if t.startTime != nil { 5047 if v, err := serializeStartTimeIntermediateType(t.startTime); err == nil { 5048 m["startTime"] = v 5049 } else { 5050 return m, err 5051 } 5052 } 5053 // End generation by generateFunctionalMultiTypeDefinition 5054 // Begin generation by generateNonFunctionalMultiTypeDefinition 5055 if v, err := serializeSliceSummaryIntermediateType(t.summary); err == nil && v != nil { 5056 if len(v) == 1 { 5057 m["summary"] = v[0] 5058 } else { 5059 m["summary"] = v 5060 } 5061 } else if err != nil { 5062 return m, err 5063 } 5064 // End generation by generateNonFunctionalMultiTypeDefinition 5065 5066 // Begin generation by generateNaturalLanguageMap 5067 if t.summaryMap != nil && len(t.summaryMap) >= 0 { 5068 m["summaryMap"] = t.summaryMap 5069 } 5070 // End generation by generateNaturalLanguageMap 5071 // Begin generation by generateNonFunctionalMultiTypeDefinition 5072 if v, err := serializeSliceTagIntermediateType(t.tag); err == nil && v != nil { 5073 if len(v) == 1 { 5074 m["tag"] = v[0] 5075 } else { 5076 m["tag"] = v 5077 } 5078 } else if err != nil { 5079 return m, err 5080 } 5081 // End generation by generateNonFunctionalMultiTypeDefinition 5082 // Begin generation by generateNonFunctionalAnyDefinition 5083 if t.typeName != nil { 5084 if len(t.typeName) == 1 { 5085 m["type"] = t.typeName[0] 5086 } else { 5087 m["type"] = t.typeName 5088 } 5089 } 5090 // End generation by generateNonFunctionalAnyDefinition 5091 // Begin generation by generateFunctionalMultiTypeDefinition 5092 if t.updated != nil { 5093 if v, err := serializeUpdatedIntermediateType(t.updated); err == nil { 5094 m["updated"] = v 5095 } else { 5096 return m, err 5097 } 5098 } 5099 // End generation by generateFunctionalMultiTypeDefinition 5100 // Begin generation by generateNonFunctionalMultiTypeDefinition 5101 if v, err := serializeSliceUrlIntermediateType(t.url); err == nil && v != nil { 5102 if len(v) == 1 { 5103 m["url"] = v[0] 5104 } else { 5105 m["url"] = v 5106 } 5107 } else if err != nil { 5108 return m, err 5109 } 5110 // End generation by generateNonFunctionalMultiTypeDefinition 5111 // Begin generation by generateNonFunctionalMultiTypeDefinition 5112 if v, err := serializeSliceToIntermediateType(t.to); err == nil && v != nil { 5113 if len(v) == 1 { 5114 m["to"] = v[0] 5115 } else { 5116 m["to"] = v 5117 } 5118 } else if err != nil { 5119 return m, err 5120 } 5121 // End generation by generateNonFunctionalMultiTypeDefinition 5122 // Begin generation by generateNonFunctionalMultiTypeDefinition 5123 if v, err := serializeSliceBtoIntermediateType(t.bto); err == nil && v != nil { 5124 if len(v) == 1 { 5125 m["bto"] = v[0] 5126 } else { 5127 m["bto"] = v 5128 } 5129 } else if err != nil { 5130 return m, err 5131 } 5132 // End generation by generateNonFunctionalMultiTypeDefinition 5133 // Begin generation by generateNonFunctionalMultiTypeDefinition 5134 if v, err := serializeSliceCcIntermediateType(t.cc); err == nil && v != nil { 5135 if len(v) == 1 { 5136 m["cc"] = v[0] 5137 } else { 5138 m["cc"] = v 5139 } 5140 } else if err != nil { 5141 return m, err 5142 } 5143 // End generation by generateNonFunctionalMultiTypeDefinition 5144 // Begin generation by generateNonFunctionalMultiTypeDefinition 5145 if v, err := serializeSliceBccIntermediateType(t.bcc); err == nil && v != nil { 5146 if len(v) == 1 { 5147 m["bcc"] = v[0] 5148 } else { 5149 m["bcc"] = v 5150 } 5151 } else if err != nil { 5152 return m, err 5153 } 5154 // End generation by generateNonFunctionalMultiTypeDefinition 5155 // Begin generation by generateFunctionalMultiTypeDefinition 5156 if t.mediaType != nil { 5157 if v, err := serializeMediaTypeIntermediateType(t.mediaType); err == nil { 5158 m["mediaType"] = v 5159 } else { 5160 return m, err 5161 } 5162 } 5163 // End generation by generateFunctionalMultiTypeDefinition 5164 // Begin generation by generateFunctionalMultiTypeDefinition 5165 if t.duration != nil { 5166 if v, err := serializeDurationIntermediateType(t.duration); err == nil { 5167 m["duration"] = v 5168 } else { 5169 return m, err 5170 } 5171 } 5172 // End generation by generateFunctionalMultiTypeDefinition 5173 // Begin generation by generateFunctionalMultiTypeDefinition 5174 if t.source != nil { 5175 if v, err := serializeSourceIntermediateType(t.source); err == nil { 5176 m["source"] = v 5177 } else { 5178 return m, err 5179 } 5180 } 5181 // End generation by generateFunctionalMultiTypeDefinition 5182 // Begin generation by generateFunctionalMultiTypeDefinition 5183 if t.inbox != nil { 5184 if v, err := serializeInboxIntermediateType(t.inbox); err == nil { 5185 m["inbox"] = v 5186 } else { 5187 return m, err 5188 } 5189 } 5190 // End generation by generateFunctionalMultiTypeDefinition 5191 // Begin generation by generateFunctionalMultiTypeDefinition 5192 if t.outbox != nil { 5193 if v, err := serializeOutboxIntermediateType(t.outbox); err == nil { 5194 m["outbox"] = v 5195 } else { 5196 return m, err 5197 } 5198 } 5199 // End generation by generateFunctionalMultiTypeDefinition 5200 // Begin generation by generateFunctionalMultiTypeDefinition 5201 if t.following != nil { 5202 if v, err := serializeFollowingIntermediateType(t.following); err == nil { 5203 m["following"] = v 5204 } else { 5205 return m, err 5206 } 5207 } 5208 // End generation by generateFunctionalMultiTypeDefinition 5209 // Begin generation by generateFunctionalMultiTypeDefinition 5210 if t.followers != nil { 5211 if v, err := serializeFollowersIntermediateType(t.followers); err == nil { 5212 m["followers"] = v 5213 } else { 5214 return m, err 5215 } 5216 } 5217 // End generation by generateFunctionalMultiTypeDefinition 5218 // Begin generation by generateFunctionalMultiTypeDefinition 5219 if t.liked != nil { 5220 if v, err := serializeLikedIntermediateType(t.liked); err == nil { 5221 m["liked"] = v 5222 } else { 5223 return m, err 5224 } 5225 } 5226 // End generation by generateFunctionalMultiTypeDefinition 5227 // Begin generation by generateFunctionalMultiTypeDefinition 5228 if t.likes != nil { 5229 if v, err := serializeLikesIntermediateType(t.likes); err == nil { 5230 m["likes"] = v 5231 } else { 5232 return m, err 5233 } 5234 } 5235 // End generation by generateFunctionalMultiTypeDefinition 5236 // Begin generation by RangeReference.Serialize for Value 5237 var streamsTemp []interface{} 5238 for _, v := range t.streams { 5239 tmp := anyURISerialize(v) 5240 streamsTemp = append(streamsTemp, tmp) 5241 } 5242 if streamsTemp != nil { 5243 if len(streamsTemp) == 1 { 5244 m["streams"] = streamsTemp[0] 5245 } else { 5246 m["streams"] = streamsTemp 5247 } 5248 } 5249 // End generation by RangeReference.Serialize for Value 5250 // Begin generation by generateFunctionalMultiTypeDefinition 5251 if t.preferredUsername != nil { 5252 if v, err := serializePreferredUsernameIntermediateType(t.preferredUsername); err == nil { 5253 m["preferredUsername"] = v 5254 } else { 5255 return m, err 5256 } 5257 } 5258 // End generation by generateFunctionalMultiTypeDefinition 5259 5260 // Begin generation by generateNaturalLanguageMap 5261 if t.preferredUsernameMap != nil && len(t.preferredUsernameMap) >= 0 { 5262 m["preferredUsernameMap"] = t.preferredUsernameMap 5263 } 5264 // End generation by generateNaturalLanguageMap 5265 // Begin generation by generateFunctionalMultiTypeDefinition 5266 if t.endpoints != nil { 5267 if v, err := serializeEndpointsIntermediateType(t.endpoints); err == nil { 5268 m["endpoints"] = v 5269 } else { 5270 return m, err 5271 } 5272 } 5273 // End generation by generateFunctionalMultiTypeDefinition 5274 // Begin generation by RangeReference.Serialize for Value 5275 if t.proxyUrl != nil { 5276 proxyUrlSerializeFunc := func() (interface{}, error) { 5277 v := t.proxyUrl 5278 tmp := anyURISerialize(v) 5279 return tmp, nil 5280 } 5281 proxyUrlResult, err := proxyUrlSerializeFunc() 5282 if err == nil { 5283 m["proxyUrl"] = proxyUrlResult 5284 } else { 5285 return m, err 5286 } 5287 } 5288 // End generation by RangeReference.Serialize for Value 5289 // Begin generation by RangeReference.Serialize for Value 5290 if t.oauthAuthorizationEndpoint != nil { 5291 oauthAuthorizationEndpointSerializeFunc := func() (interface{}, error) { 5292 v := t.oauthAuthorizationEndpoint 5293 tmp := anyURISerialize(v) 5294 return tmp, nil 5295 } 5296 oauthAuthorizationEndpointResult, err := oauthAuthorizationEndpointSerializeFunc() 5297 if err == nil { 5298 m["oauthAuthorizationEndpoint"] = oauthAuthorizationEndpointResult 5299 } else { 5300 return m, err 5301 } 5302 } 5303 // End generation by RangeReference.Serialize for Value 5304 // Begin generation by RangeReference.Serialize for Value 5305 if t.oauthTokenEndpoint != nil { 5306 oauthTokenEndpointSerializeFunc := func() (interface{}, error) { 5307 v := t.oauthTokenEndpoint 5308 tmp := anyURISerialize(v) 5309 return tmp, nil 5310 } 5311 oauthTokenEndpointResult, err := oauthTokenEndpointSerializeFunc() 5312 if err == nil { 5313 m["oauthTokenEndpoint"] = oauthTokenEndpointResult 5314 } else { 5315 return m, err 5316 } 5317 } 5318 // End generation by RangeReference.Serialize for Value 5319 // Begin generation by RangeReference.Serialize for Value 5320 if t.provideClientKey != nil { 5321 provideClientKeySerializeFunc := func() (interface{}, error) { 5322 v := t.provideClientKey 5323 tmp := anyURISerialize(v) 5324 return tmp, nil 5325 } 5326 provideClientKeyResult, err := provideClientKeySerializeFunc() 5327 if err == nil { 5328 m["provideClientKey"] = provideClientKeyResult 5329 } else { 5330 return m, err 5331 } 5332 } 5333 // End generation by RangeReference.Serialize for Value 5334 // Begin generation by RangeReference.Serialize for Value 5335 if t.signClientKey != nil { 5336 signClientKeySerializeFunc := func() (interface{}, error) { 5337 v := t.signClientKey 5338 tmp := anyURISerialize(v) 5339 return tmp, nil 5340 } 5341 signClientKeyResult, err := signClientKeySerializeFunc() 5342 if err == nil { 5343 m["signClientKey"] = signClientKeyResult 5344 } else { 5345 return m, err 5346 } 5347 } 5348 // End generation by RangeReference.Serialize for Value 5349 // Begin generation by RangeReference.Serialize for Value 5350 if t.sharedInbox != nil { 5351 sharedInboxSerializeFunc := func() (interface{}, error) { 5352 v := t.sharedInbox 5353 tmp := anyURISerialize(v) 5354 return tmp, nil 5355 } 5356 sharedInboxResult, err := sharedInboxSerializeFunc() 5357 if err == nil { 5358 m["sharedInbox"] = sharedInboxResult 5359 } else { 5360 return m, err 5361 } 5362 } 5363 // End generation by RangeReference.Serialize for Value 5364 return 5365 5366} 5367 5368// Deserialize populates this object from a map[string]interface{} 5369func (t *Relationship) Deserialize(m map[string]interface{}) (err error) { 5370 for k, v := range m { 5371 handled := false 5372 if !handled { 5373 // Begin generation by generateFunctionalMultiTypeDefinition 5374 if k == "subject" { 5375 t.subject, err = deserializeSubjectIntermediateType(v) 5376 if err != nil { 5377 return err 5378 } 5379 handled = true 5380 } 5381 // End generation by generateFunctionalMultiTypeDefinition 5382 } 5383 if !handled { 5384 // Begin generation by generateNonFunctionalMultiTypeDefinition 5385 if k == "object" { 5386 if tmpMap, ok := v.(map[string]interface{}); ok { 5387 tmp, err := deserializeObjectIntermediateType(tmpMap) 5388 if err != nil { 5389 return err 5390 } 5391 t.object = []*objectIntermediateType{tmp} 5392 handled = true 5393 } else if tmpSlice, ok := v.([]interface{}); ok { 5394 t.object, err = deserializeSliceObjectIntermediateType(tmpSlice) 5395 if err != nil { 5396 return err 5397 } 5398 handled = true 5399 } else { 5400 tmp := &objectIntermediateType{} 5401 err = tmp.Deserialize(v) 5402 if err != nil { 5403 return err 5404 } 5405 t.object = []*objectIntermediateType{tmp} 5406 handled = true 5407 } 5408 } 5409 // End generation by generateNonFunctionalMultiTypeDefinition 5410 } 5411 if !handled { 5412 // Begin generation by generateFunctionalMultiTypeDefinition 5413 if k == "relationship" { 5414 t.relationship, err = deserializeRelationshipIntermediateType(v) 5415 if err != nil { 5416 return err 5417 } 5418 handled = true 5419 } 5420 // End generation by generateFunctionalMultiTypeDefinition 5421 } 5422 if !handled { 5423 // Begin generation by generateFunctionalMultiTypeDefinition 5424 if k == "altitude" { 5425 t.altitude, err = deserializeAltitudeIntermediateType(v) 5426 if err != nil { 5427 return err 5428 } 5429 handled = true 5430 } 5431 // End generation by generateFunctionalMultiTypeDefinition 5432 } 5433 if !handled { 5434 // Begin generation by generateNonFunctionalMultiTypeDefinition 5435 if k == "attachment" { 5436 if tmpMap, ok := v.(map[string]interface{}); ok { 5437 tmp, err := deserializeAttachmentIntermediateType(tmpMap) 5438 if err != nil { 5439 return err 5440 } 5441 t.attachment = []*attachmentIntermediateType{tmp} 5442 handled = true 5443 } else if tmpSlice, ok := v.([]interface{}); ok { 5444 t.attachment, err = deserializeSliceAttachmentIntermediateType(tmpSlice) 5445 if err != nil { 5446 return err 5447 } 5448 handled = true 5449 } else { 5450 tmp := &attachmentIntermediateType{} 5451 err = tmp.Deserialize(v) 5452 if err != nil { 5453 return err 5454 } 5455 t.attachment = []*attachmentIntermediateType{tmp} 5456 handled = true 5457 } 5458 } 5459 // End generation by generateNonFunctionalMultiTypeDefinition 5460 } 5461 if !handled { 5462 // Begin generation by generateNonFunctionalMultiTypeDefinition 5463 if k == "attributedTo" { 5464 if tmpMap, ok := v.(map[string]interface{}); ok { 5465 tmp, err := deserializeAttributedToIntermediateType(tmpMap) 5466 if err != nil { 5467 return err 5468 } 5469 t.attributedTo = []*attributedToIntermediateType{tmp} 5470 handled = true 5471 } else if tmpSlice, ok := v.([]interface{}); ok { 5472 t.attributedTo, err = deserializeSliceAttributedToIntermediateType(tmpSlice) 5473 if err != nil { 5474 return err 5475 } 5476 handled = true 5477 } else { 5478 tmp := &attributedToIntermediateType{} 5479 err = tmp.Deserialize(v) 5480 if err != nil { 5481 return err 5482 } 5483 t.attributedTo = []*attributedToIntermediateType{tmp} 5484 handled = true 5485 } 5486 } 5487 // End generation by generateNonFunctionalMultiTypeDefinition 5488 } 5489 if !handled { 5490 // Begin generation by generateNonFunctionalMultiTypeDefinition 5491 if k == "audience" { 5492 if tmpMap, ok := v.(map[string]interface{}); ok { 5493 tmp, err := deserializeAudienceIntermediateType(tmpMap) 5494 if err != nil { 5495 return err 5496 } 5497 t.audience = []*audienceIntermediateType{tmp} 5498 handled = true 5499 } else if tmpSlice, ok := v.([]interface{}); ok { 5500 t.audience, err = deserializeSliceAudienceIntermediateType(tmpSlice) 5501 if err != nil { 5502 return err 5503 } 5504 handled = true 5505 } else { 5506 tmp := &audienceIntermediateType{} 5507 err = tmp.Deserialize(v) 5508 if err != nil { 5509 return err 5510 } 5511 t.audience = []*audienceIntermediateType{tmp} 5512 handled = true 5513 } 5514 } 5515 // End generation by generateNonFunctionalMultiTypeDefinition 5516 } 5517 if !handled { 5518 // Begin generation by generateNonFunctionalMultiTypeDefinition 5519 if k == "content" { 5520 if tmpMap, ok := v.(map[string]interface{}); ok { 5521 tmp, err := deserializeContentIntermediateType(tmpMap) 5522 if err != nil { 5523 return err 5524 } 5525 t.content = []*contentIntermediateType{tmp} 5526 handled = true 5527 } else if tmpSlice, ok := v.([]interface{}); ok { 5528 t.content, err = deserializeSliceContentIntermediateType(tmpSlice) 5529 if err != nil { 5530 return err 5531 } 5532 handled = true 5533 } else { 5534 tmp := &contentIntermediateType{} 5535 err = tmp.Deserialize(v) 5536 if err != nil { 5537 return err 5538 } 5539 t.content = []*contentIntermediateType{tmp} 5540 handled = true 5541 } 5542 } 5543 // End generation by generateNonFunctionalMultiTypeDefinition 5544 5545 // Begin generation by generateNaturalLanguageMap 5546 if k == "contentMap" { 5547 if vMap, ok := v.(map[string]interface{}); ok { 5548 val := make(map[string]string) 5549 for k, iVal := range vMap { 5550 if sVal, ok := iVal.(string); ok { 5551 val[k] = sVal 5552 } 5553 } 5554 t.contentMap = val 5555 handled = true 5556 } 5557 } 5558 // End generation by generateNaturalLanguageMap 5559 } 5560 if !handled { 5561 // Begin generation by generateNonFunctionalMultiTypeDefinition 5562 if k == "context" { 5563 if tmpMap, ok := v.(map[string]interface{}); ok { 5564 tmp, err := deserializeContextIntermediateType(tmpMap) 5565 if err != nil { 5566 return err 5567 } 5568 t.context = []*contextIntermediateType{tmp} 5569 handled = true 5570 } else if tmpSlice, ok := v.([]interface{}); ok { 5571 t.context, err = deserializeSliceContextIntermediateType(tmpSlice) 5572 if err != nil { 5573 return err 5574 } 5575 handled = true 5576 } else { 5577 tmp := &contextIntermediateType{} 5578 err = tmp.Deserialize(v) 5579 if err != nil { 5580 return err 5581 } 5582 t.context = []*contextIntermediateType{tmp} 5583 handled = true 5584 } 5585 } 5586 // End generation by generateNonFunctionalMultiTypeDefinition 5587 } 5588 if !handled { 5589 // Begin generation by generateNonFunctionalMultiTypeDefinition 5590 if k == "name" { 5591 if tmpMap, ok := v.(map[string]interface{}); ok { 5592 tmp, err := deserializeNameIntermediateType(tmpMap) 5593 if err != nil { 5594 return err 5595 } 5596 t.name = []*nameIntermediateType{tmp} 5597 handled = true 5598 } else if tmpSlice, ok := v.([]interface{}); ok { 5599 t.name, err = deserializeSliceNameIntermediateType(tmpSlice) 5600 if err != nil { 5601 return err 5602 } 5603 handled = true 5604 } else { 5605 tmp := &nameIntermediateType{} 5606 err = tmp.Deserialize(v) 5607 if err != nil { 5608 return err 5609 } 5610 t.name = []*nameIntermediateType{tmp} 5611 handled = true 5612 } 5613 } 5614 // End generation by generateNonFunctionalMultiTypeDefinition 5615 5616 // Begin generation by generateNaturalLanguageMap 5617 if k == "nameMap" { 5618 if vMap, ok := v.(map[string]interface{}); ok { 5619 val := make(map[string]string) 5620 for k, iVal := range vMap { 5621 if sVal, ok := iVal.(string); ok { 5622 val[k] = sVal 5623 } 5624 } 5625 t.nameMap = val 5626 handled = true 5627 } 5628 } 5629 // End generation by generateNaturalLanguageMap 5630 } 5631 if !handled { 5632 // Begin generation by generateFunctionalMultiTypeDefinition 5633 if k == "endTime" { 5634 t.endTime, err = deserializeEndTimeIntermediateType(v) 5635 if err != nil { 5636 return err 5637 } 5638 handled = true 5639 } 5640 // End generation by generateFunctionalMultiTypeDefinition 5641 } 5642 if !handled { 5643 // Begin generation by generateNonFunctionalMultiTypeDefinition 5644 if k == "generator" { 5645 if tmpMap, ok := v.(map[string]interface{}); ok { 5646 tmp, err := deserializeGeneratorIntermediateType(tmpMap) 5647 if err != nil { 5648 return err 5649 } 5650 t.generator = []*generatorIntermediateType{tmp} 5651 handled = true 5652 } else if tmpSlice, ok := v.([]interface{}); ok { 5653 t.generator, err = deserializeSliceGeneratorIntermediateType(tmpSlice) 5654 if err != nil { 5655 return err 5656 } 5657 handled = true 5658 } else { 5659 tmp := &generatorIntermediateType{} 5660 err = tmp.Deserialize(v) 5661 if err != nil { 5662 return err 5663 } 5664 t.generator = []*generatorIntermediateType{tmp} 5665 handled = true 5666 } 5667 } 5668 // End generation by generateNonFunctionalMultiTypeDefinition 5669 } 5670 if !handled { 5671 // Begin generation by generateNonFunctionalMultiTypeDefinition 5672 if k == "icon" { 5673 if tmpMap, ok := v.(map[string]interface{}); ok { 5674 tmp, err := deserializeIconIntermediateType(tmpMap) 5675 if err != nil { 5676 return err 5677 } 5678 t.icon = []*iconIntermediateType{tmp} 5679 handled = true 5680 } else if tmpSlice, ok := v.([]interface{}); ok { 5681 t.icon, err = deserializeSliceIconIntermediateType(tmpSlice) 5682 if err != nil { 5683 return err 5684 } 5685 handled = true 5686 } else { 5687 tmp := &iconIntermediateType{} 5688 err = tmp.Deserialize(v) 5689 if err != nil { 5690 return err 5691 } 5692 t.icon = []*iconIntermediateType{tmp} 5693 handled = true 5694 } 5695 } 5696 // End generation by generateNonFunctionalMultiTypeDefinition 5697 } 5698 if !handled { 5699 // Begin generation by RangeReference.Deserialize for Value 5700 if k == "id" { 5701 if v, ok := v.(interface{}); ok { 5702 tmp, err := anyURIDeserialize(v) 5703 if err != nil { 5704 return err 5705 } 5706 t.id = tmp 5707 handled = true 5708 } 5709 } 5710 // End generation by RangeReference.Deserialize for Value 5711 } 5712 if !handled { 5713 // Begin generation by generateNonFunctionalMultiTypeDefinition 5714 if k == "image" { 5715 if tmpMap, ok := v.(map[string]interface{}); ok { 5716 tmp, err := deserializeImageIntermediateType(tmpMap) 5717 if err != nil { 5718 return err 5719 } 5720 t.image = []*imageIntermediateType{tmp} 5721 handled = true 5722 } else if tmpSlice, ok := v.([]interface{}); ok { 5723 t.image, err = deserializeSliceImageIntermediateType(tmpSlice) 5724 if err != nil { 5725 return err 5726 } 5727 handled = true 5728 } else { 5729 tmp := &imageIntermediateType{} 5730 err = tmp.Deserialize(v) 5731 if err != nil { 5732 return err 5733 } 5734 t.image = []*imageIntermediateType{tmp} 5735 handled = true 5736 } 5737 } 5738 // End generation by generateNonFunctionalMultiTypeDefinition 5739 } 5740 if !handled { 5741 // Begin generation by generateNonFunctionalMultiTypeDefinition 5742 if k == "inReplyTo" { 5743 if tmpMap, ok := v.(map[string]interface{}); ok { 5744 tmp, err := deserializeInReplyToIntermediateType(tmpMap) 5745 if err != nil { 5746 return err 5747 } 5748 t.inReplyTo = []*inReplyToIntermediateType{tmp} 5749 handled = true 5750 } else if tmpSlice, ok := v.([]interface{}); ok { 5751 t.inReplyTo, err = deserializeSliceInReplyToIntermediateType(tmpSlice) 5752 if err != nil { 5753 return err 5754 } 5755 handled = true 5756 } else { 5757 tmp := &inReplyToIntermediateType{} 5758 err = tmp.Deserialize(v) 5759 if err != nil { 5760 return err 5761 } 5762 t.inReplyTo = []*inReplyToIntermediateType{tmp} 5763 handled = true 5764 } 5765 } 5766 // End generation by generateNonFunctionalMultiTypeDefinition 5767 } 5768 if !handled { 5769 // Begin generation by generateNonFunctionalMultiTypeDefinition 5770 if k == "location" { 5771 if tmpMap, ok := v.(map[string]interface{}); ok { 5772 tmp, err := deserializeLocationIntermediateType(tmpMap) 5773 if err != nil { 5774 return err 5775 } 5776 t.location = []*locationIntermediateType{tmp} 5777 handled = true 5778 } else if tmpSlice, ok := v.([]interface{}); ok { 5779 t.location, err = deserializeSliceLocationIntermediateType(tmpSlice) 5780 if err != nil { 5781 return err 5782 } 5783 handled = true 5784 } else { 5785 tmp := &locationIntermediateType{} 5786 err = tmp.Deserialize(v) 5787 if err != nil { 5788 return err 5789 } 5790 t.location = []*locationIntermediateType{tmp} 5791 handled = true 5792 } 5793 } 5794 // End generation by generateNonFunctionalMultiTypeDefinition 5795 } 5796 if !handled { 5797 // Begin generation by generateNonFunctionalMultiTypeDefinition 5798 if k == "preview" { 5799 if tmpMap, ok := v.(map[string]interface{}); ok { 5800 tmp, err := deserializePreviewIntermediateType(tmpMap) 5801 if err != nil { 5802 return err 5803 } 5804 t.preview = []*previewIntermediateType{tmp} 5805 handled = true 5806 } else if tmpSlice, ok := v.([]interface{}); ok { 5807 t.preview, err = deserializeSlicePreviewIntermediateType(tmpSlice) 5808 if err != nil { 5809 return err 5810 } 5811 handled = true 5812 } else { 5813 tmp := &previewIntermediateType{} 5814 err = tmp.Deserialize(v) 5815 if err != nil { 5816 return err 5817 } 5818 t.preview = []*previewIntermediateType{tmp} 5819 handled = true 5820 } 5821 } 5822 // End generation by generateNonFunctionalMultiTypeDefinition 5823 } 5824 if !handled { 5825 // Begin generation by generateFunctionalMultiTypeDefinition 5826 if k == "published" { 5827 t.published, err = deserializePublishedIntermediateType(v) 5828 if err != nil { 5829 return err 5830 } 5831 handled = true 5832 } 5833 // End generation by generateFunctionalMultiTypeDefinition 5834 } 5835 if !handled { 5836 // Begin generation by generateFunctionalMultiTypeDefinition 5837 if k == "replies" { 5838 t.replies, err = deserializeRepliesIntermediateType(v) 5839 if err != nil { 5840 return err 5841 } 5842 handled = true 5843 } 5844 // End generation by generateFunctionalMultiTypeDefinition 5845 } 5846 if !handled { 5847 // Begin generation by generateFunctionalMultiTypeDefinition 5848 if k == "startTime" { 5849 t.startTime, err = deserializeStartTimeIntermediateType(v) 5850 if err != nil { 5851 return err 5852 } 5853 handled = true 5854 } 5855 // End generation by generateFunctionalMultiTypeDefinition 5856 } 5857 if !handled { 5858 // Begin generation by generateNonFunctionalMultiTypeDefinition 5859 if k == "summary" { 5860 if tmpMap, ok := v.(map[string]interface{}); ok { 5861 tmp, err := deserializeSummaryIntermediateType(tmpMap) 5862 if err != nil { 5863 return err 5864 } 5865 t.summary = []*summaryIntermediateType{tmp} 5866 handled = true 5867 } else if tmpSlice, ok := v.([]interface{}); ok { 5868 t.summary, err = deserializeSliceSummaryIntermediateType(tmpSlice) 5869 if err != nil { 5870 return err 5871 } 5872 handled = true 5873 } else { 5874 tmp := &summaryIntermediateType{} 5875 err = tmp.Deserialize(v) 5876 if err != nil { 5877 return err 5878 } 5879 t.summary = []*summaryIntermediateType{tmp} 5880 handled = true 5881 } 5882 } 5883 // End generation by generateNonFunctionalMultiTypeDefinition 5884 5885 // Begin generation by generateNaturalLanguageMap 5886 if k == "summaryMap" { 5887 if vMap, ok := v.(map[string]interface{}); ok { 5888 val := make(map[string]string) 5889 for k, iVal := range vMap { 5890 if sVal, ok := iVal.(string); ok { 5891 val[k] = sVal 5892 } 5893 } 5894 t.summaryMap = val 5895 handled = true 5896 } 5897 } 5898 // End generation by generateNaturalLanguageMap 5899 } 5900 if !handled { 5901 // Begin generation by generateNonFunctionalMultiTypeDefinition 5902 if k == "tag" { 5903 if tmpMap, ok := v.(map[string]interface{}); ok { 5904 tmp, err := deserializeTagIntermediateType(tmpMap) 5905 if err != nil { 5906 return err 5907 } 5908 t.tag = []*tagIntermediateType{tmp} 5909 handled = true 5910 } else if tmpSlice, ok := v.([]interface{}); ok { 5911 t.tag, err = deserializeSliceTagIntermediateType(tmpSlice) 5912 if err != nil { 5913 return err 5914 } 5915 handled = true 5916 } else { 5917 tmp := &tagIntermediateType{} 5918 err = tmp.Deserialize(v) 5919 if err != nil { 5920 return err 5921 } 5922 t.tag = []*tagIntermediateType{tmp} 5923 handled = true 5924 } 5925 } 5926 // End generation by generateNonFunctionalMultiTypeDefinition 5927 } 5928 if !handled { 5929 // Begin generation by generateNonFunctionalAnyDefinition 5930 if k == "type" { 5931 if tmpTypeSlice, ok := v.([]interface{}); ok { 5932 t.typeName = tmpTypeSlice 5933 handled = true 5934 } else { 5935 t.typeName = []interface{}{v} 5936 handled = true 5937 } 5938 } 5939 // End generation by generateNonFunctionalAnyDefinition 5940 } 5941 if !handled { 5942 // Begin generation by generateFunctionalMultiTypeDefinition 5943 if k == "updated" { 5944 t.updated, err = deserializeUpdatedIntermediateType(v) 5945 if err != nil { 5946 return err 5947 } 5948 handled = true 5949 } 5950 // End generation by generateFunctionalMultiTypeDefinition 5951 } 5952 if !handled { 5953 // Begin generation by generateNonFunctionalMultiTypeDefinition 5954 if k == "url" { 5955 if tmpMap, ok := v.(map[string]interface{}); ok { 5956 tmp, err := deserializeUrlIntermediateType(tmpMap) 5957 if err != nil { 5958 return err 5959 } 5960 t.url = []*urlIntermediateType{tmp} 5961 handled = true 5962 } else if tmpSlice, ok := v.([]interface{}); ok { 5963 t.url, err = deserializeSliceUrlIntermediateType(tmpSlice) 5964 if err != nil { 5965 return err 5966 } 5967 handled = true 5968 } else { 5969 tmp := &urlIntermediateType{} 5970 err = tmp.Deserialize(v) 5971 if err != nil { 5972 return err 5973 } 5974 t.url = []*urlIntermediateType{tmp} 5975 handled = true 5976 } 5977 } 5978 // End generation by generateNonFunctionalMultiTypeDefinition 5979 } 5980 if !handled { 5981 // Begin generation by generateNonFunctionalMultiTypeDefinition 5982 if k == "to" { 5983 if tmpMap, ok := v.(map[string]interface{}); ok { 5984 tmp, err := deserializeToIntermediateType(tmpMap) 5985 if err != nil { 5986 return err 5987 } 5988 t.to = []*toIntermediateType{tmp} 5989 handled = true 5990 } else if tmpSlice, ok := v.([]interface{}); ok { 5991 t.to, err = deserializeSliceToIntermediateType(tmpSlice) 5992 if err != nil { 5993 return err 5994 } 5995 handled = true 5996 } else { 5997 tmp := &toIntermediateType{} 5998 err = tmp.Deserialize(v) 5999 if err != nil { 6000 return err 6001 } 6002 t.to = []*toIntermediateType{tmp} 6003 handled = true 6004 } 6005 } 6006 // End generation by generateNonFunctionalMultiTypeDefinition 6007 } 6008 if !handled { 6009 // Begin generation by generateNonFunctionalMultiTypeDefinition 6010 if k == "bto" { 6011 if tmpMap, ok := v.(map[string]interface{}); ok { 6012 tmp, err := deserializeBtoIntermediateType(tmpMap) 6013 if err != nil { 6014 return err 6015 } 6016 t.bto = []*btoIntermediateType{tmp} 6017 handled = true 6018 } else if tmpSlice, ok := v.([]interface{}); ok { 6019 t.bto, err = deserializeSliceBtoIntermediateType(tmpSlice) 6020 if err != nil { 6021 return err 6022 } 6023 handled = true 6024 } else { 6025 tmp := &btoIntermediateType{} 6026 err = tmp.Deserialize(v) 6027 if err != nil { 6028 return err 6029 } 6030 t.bto = []*btoIntermediateType{tmp} 6031 handled = true 6032 } 6033 } 6034 // End generation by generateNonFunctionalMultiTypeDefinition 6035 } 6036 if !handled { 6037 // Begin generation by generateNonFunctionalMultiTypeDefinition 6038 if k == "cc" { 6039 if tmpMap, ok := v.(map[string]interface{}); ok { 6040 tmp, err := deserializeCcIntermediateType(tmpMap) 6041 if err != nil { 6042 return err 6043 } 6044 t.cc = []*ccIntermediateType{tmp} 6045 handled = true 6046 } else if tmpSlice, ok := v.([]interface{}); ok { 6047 t.cc, err = deserializeSliceCcIntermediateType(tmpSlice) 6048 if err != nil { 6049 return err 6050 } 6051 handled = true 6052 } else { 6053 tmp := &ccIntermediateType{} 6054 err = tmp.Deserialize(v) 6055 if err != nil { 6056 return err 6057 } 6058 t.cc = []*ccIntermediateType{tmp} 6059 handled = true 6060 } 6061 } 6062 // End generation by generateNonFunctionalMultiTypeDefinition 6063 } 6064 if !handled { 6065 // Begin generation by generateNonFunctionalMultiTypeDefinition 6066 if k == "bcc" { 6067 if tmpMap, ok := v.(map[string]interface{}); ok { 6068 tmp, err := deserializeBccIntermediateType(tmpMap) 6069 if err != nil { 6070 return err 6071 } 6072 t.bcc = []*bccIntermediateType{tmp} 6073 handled = true 6074 } else if tmpSlice, ok := v.([]interface{}); ok { 6075 t.bcc, err = deserializeSliceBccIntermediateType(tmpSlice) 6076 if err != nil { 6077 return err 6078 } 6079 handled = true 6080 } else { 6081 tmp := &bccIntermediateType{} 6082 err = tmp.Deserialize(v) 6083 if err != nil { 6084 return err 6085 } 6086 t.bcc = []*bccIntermediateType{tmp} 6087 handled = true 6088 } 6089 } 6090 // End generation by generateNonFunctionalMultiTypeDefinition 6091 } 6092 if !handled { 6093 // Begin generation by generateFunctionalMultiTypeDefinition 6094 if k == "mediaType" { 6095 t.mediaType, err = deserializeMediaTypeIntermediateType(v) 6096 if err != nil { 6097 return err 6098 } 6099 handled = true 6100 } 6101 // End generation by generateFunctionalMultiTypeDefinition 6102 } 6103 if !handled { 6104 // Begin generation by generateFunctionalMultiTypeDefinition 6105 if k == "duration" { 6106 t.duration, err = deserializeDurationIntermediateType(v) 6107 if err != nil { 6108 return err 6109 } 6110 handled = true 6111 } 6112 // End generation by generateFunctionalMultiTypeDefinition 6113 } 6114 if !handled { 6115 // Begin generation by generateFunctionalMultiTypeDefinition 6116 if k == "source" { 6117 t.source, err = deserializeSourceIntermediateType(v) 6118 if err != nil { 6119 return err 6120 } 6121 handled = true 6122 } 6123 // End generation by generateFunctionalMultiTypeDefinition 6124 } 6125 if !handled { 6126 // Begin generation by generateFunctionalMultiTypeDefinition 6127 if k == "inbox" { 6128 t.inbox, err = deserializeInboxIntermediateType(v) 6129 if err != nil { 6130 return err 6131 } 6132 handled = true 6133 } 6134 // End generation by generateFunctionalMultiTypeDefinition 6135 } 6136 if !handled { 6137 // Begin generation by generateFunctionalMultiTypeDefinition 6138 if k == "outbox" { 6139 t.outbox, err = deserializeOutboxIntermediateType(v) 6140 if err != nil { 6141 return err 6142 } 6143 handled = true 6144 } 6145 // End generation by generateFunctionalMultiTypeDefinition 6146 } 6147 if !handled { 6148 // Begin generation by generateFunctionalMultiTypeDefinition 6149 if k == "following" { 6150 t.following, err = deserializeFollowingIntermediateType(v) 6151 if err != nil { 6152 return err 6153 } 6154 handled = true 6155 } 6156 // End generation by generateFunctionalMultiTypeDefinition 6157 } 6158 if !handled { 6159 // Begin generation by generateFunctionalMultiTypeDefinition 6160 if k == "followers" { 6161 t.followers, err = deserializeFollowersIntermediateType(v) 6162 if err != nil { 6163 return err 6164 } 6165 handled = true 6166 } 6167 // End generation by generateFunctionalMultiTypeDefinition 6168 } 6169 if !handled { 6170 // Begin generation by generateFunctionalMultiTypeDefinition 6171 if k == "liked" { 6172 t.liked, err = deserializeLikedIntermediateType(v) 6173 if err != nil { 6174 return err 6175 } 6176 handled = true 6177 } 6178 // End generation by generateFunctionalMultiTypeDefinition 6179 } 6180 if !handled { 6181 // Begin generation by generateFunctionalMultiTypeDefinition 6182 if k == "likes" { 6183 t.likes, err = deserializeLikesIntermediateType(v) 6184 if err != nil { 6185 return err 6186 } 6187 handled = true 6188 } 6189 // End generation by generateFunctionalMultiTypeDefinition 6190 } 6191 if !handled { 6192 // Begin generation by RangeReference.Deserialize for Value 6193 if k == "streams" { 6194 if tmpSlice, ok := v.([]interface{}); ok { 6195 for _, tmpElem := range tmpSlice { 6196 if v, ok := tmpElem.(interface{}); ok { 6197 tmp, err := anyURIDeserialize(v) 6198 if err != nil { 6199 return err 6200 } 6201 t.streams = append(t.streams, tmp) 6202 handled = true 6203 } 6204 } 6205 } else if v, ok := v.(interface{}); ok { 6206 tmp, err := anyURIDeserialize(v) 6207 if err != nil { 6208 return err 6209 } 6210 t.streams = append(t.streams, tmp) 6211 handled = true 6212 } 6213 } 6214 // End generation by RangeReference.Deserialize for Value 6215 } 6216 if !handled { 6217 // Begin generation by generateFunctionalMultiTypeDefinition 6218 if k == "preferredUsername" { 6219 t.preferredUsername, err = deserializePreferredUsernameIntermediateType(v) 6220 if err != nil { 6221 return err 6222 } 6223 handled = true 6224 } 6225 // End generation by generateFunctionalMultiTypeDefinition 6226 6227 // Begin generation by generateNaturalLanguageMap 6228 if k == "preferredUsernameMap" { 6229 if vMap, ok := v.(map[string]interface{}); ok { 6230 val := make(map[string]string) 6231 for k, iVal := range vMap { 6232 if sVal, ok := iVal.(string); ok { 6233 val[k] = sVal 6234 } 6235 } 6236 t.preferredUsernameMap = val 6237 handled = true 6238 } 6239 } 6240 // End generation by generateNaturalLanguageMap 6241 } 6242 if !handled { 6243 // Begin generation by generateFunctionalMultiTypeDefinition 6244 if k == "endpoints" { 6245 t.endpoints, err = deserializeEndpointsIntermediateType(v) 6246 if err != nil { 6247 return err 6248 } 6249 handled = true 6250 } 6251 // End generation by generateFunctionalMultiTypeDefinition 6252 } 6253 if !handled { 6254 // Begin generation by RangeReference.Deserialize for Value 6255 if k == "proxyUrl" { 6256 if v, ok := v.(interface{}); ok { 6257 tmp, err := anyURIDeserialize(v) 6258 if err != nil { 6259 return err 6260 } 6261 t.proxyUrl = tmp 6262 handled = true 6263 } 6264 } 6265 // End generation by RangeReference.Deserialize for Value 6266 } 6267 if !handled { 6268 // Begin generation by RangeReference.Deserialize for Value 6269 if k == "oauthAuthorizationEndpoint" { 6270 if v, ok := v.(interface{}); ok { 6271 tmp, err := anyURIDeserialize(v) 6272 if err != nil { 6273 return err 6274 } 6275 t.oauthAuthorizationEndpoint = tmp 6276 handled = true 6277 } 6278 } 6279 // End generation by RangeReference.Deserialize for Value 6280 } 6281 if !handled { 6282 // Begin generation by RangeReference.Deserialize for Value 6283 if k == "oauthTokenEndpoint" { 6284 if v, ok := v.(interface{}); ok { 6285 tmp, err := anyURIDeserialize(v) 6286 if err != nil { 6287 return err 6288 } 6289 t.oauthTokenEndpoint = tmp 6290 handled = true 6291 } 6292 } 6293 // End generation by RangeReference.Deserialize for Value 6294 } 6295 if !handled { 6296 // Begin generation by RangeReference.Deserialize for Value 6297 if k == "provideClientKey" { 6298 if v, ok := v.(interface{}); ok { 6299 tmp, err := anyURIDeserialize(v) 6300 if err != nil { 6301 return err 6302 } 6303 t.provideClientKey = tmp 6304 handled = true 6305 } 6306 } 6307 // End generation by RangeReference.Deserialize for Value 6308 } 6309 if !handled { 6310 // Begin generation by RangeReference.Deserialize for Value 6311 if k == "signClientKey" { 6312 if v, ok := v.(interface{}); ok { 6313 tmp, err := anyURIDeserialize(v) 6314 if err != nil { 6315 return err 6316 } 6317 t.signClientKey = tmp 6318 handled = true 6319 } 6320 } 6321 // End generation by RangeReference.Deserialize for Value 6322 } 6323 if !handled { 6324 // Begin generation by RangeReference.Deserialize for Value 6325 if k == "sharedInbox" { 6326 if v, ok := v.(interface{}); ok { 6327 tmp, err := anyURIDeserialize(v) 6328 if err != nil { 6329 return err 6330 } 6331 t.sharedInbox = tmp 6332 handled = true 6333 } 6334 } 6335 // End generation by RangeReference.Deserialize for Value 6336 } 6337 if !handled && k != "@context" { 6338 if t.unknown_ == nil { 6339 t.unknown_ = make(map[string]interface{}) 6340 } 6341 t.unknown_[k] = unknownValueDeserialize(v) 6342 } 6343 } 6344 return 6345 6346} 6347