diff --git a/streams/gen_accept.go b/streams/gen_accept.go index 74abc3c3..15c34dcb 100644 --- a/streams/gen_accept.go +++ b/streams/gen_accept.go @@ -2456,3 +2456,41 @@ func (t *Accept) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Accept) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Accept) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Accept) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_activity.go b/streams/gen_activity.go index 39015807..141f0fa2 100644 --- a/streams/gen_activity.go +++ b/streams/gen_activity.go @@ -2456,3 +2456,41 @@ func (t *Activity) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Activity) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Activity) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Activity) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_add.go b/streams/gen_add.go index b1d97c19..127af8e2 100644 --- a/streams/gen_add.go +++ b/streams/gen_add.go @@ -2456,3 +2456,41 @@ func (t *Add) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Add) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Add) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Add) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_announce.go b/streams/gen_announce.go index b6da751a..440f84c8 100644 --- a/streams/gen_announce.go +++ b/streams/gen_announce.go @@ -2456,3 +2456,41 @@ func (t *Announce) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Announce) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Announce) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Announce) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_application.go b/streams/gen_application.go index eda6cc14..c5405c7b 100644 --- a/streams/gen_application.go +++ b/streams/gen_application.go @@ -2097,3 +2097,41 @@ func (t *Application) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Application) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Application) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Application) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_arrive.go b/streams/gen_arrive.go index 141c2983..10bf0967 100644 --- a/streams/gen_arrive.go +++ b/streams/gen_arrive.go @@ -2404,3 +2404,41 @@ func (t *Arrive) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Arrive) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Arrive) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Arrive) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_article.go b/streams/gen_article.go index a21cb447..ea4d8b86 100644 --- a/streams/gen_article.go +++ b/streams/gen_article.go @@ -2097,3 +2097,41 @@ func (t *Article) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Article) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Article) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Article) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_audio.go b/streams/gen_audio.go index 655c3fe6..45664979 100644 --- a/streams/gen_audio.go +++ b/streams/gen_audio.go @@ -2097,3 +2097,41 @@ func (t *Audio) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Audio) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Audio) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Audio) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_block.go b/streams/gen_block.go index ef456b3e..5da8afae 100644 --- a/streams/gen_block.go +++ b/streams/gen_block.go @@ -2456,3 +2456,41 @@ func (t *Block) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Block) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Block) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Block) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_collection.go b/streams/gen_collection.go index 33abd42b..28cc981c 100644 --- a/streams/gen_collection.go +++ b/streams/gen_collection.go @@ -2310,3 +2310,41 @@ func (t *Collection) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Collection) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Collection) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Collection) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_collectionpage.go b/streams/gen_collectionpage.go index aa53800e..7f372737 100644 --- a/streams/gen_collectionpage.go +++ b/streams/gen_collectionpage.go @@ -2424,3 +2424,41 @@ func (t *CollectionPage) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *CollectionPage) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *CollectionPage) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *CollectionPage) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_create.go b/streams/gen_create.go index 3c9ec5c9..41dee706 100644 --- a/streams/gen_create.go +++ b/streams/gen_create.go @@ -2456,3 +2456,41 @@ func (t *Create) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Create) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Create) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Create) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_delete.go b/streams/gen_delete.go index da7754e8..b4dd67d8 100644 --- a/streams/gen_delete.go +++ b/streams/gen_delete.go @@ -2456,3 +2456,41 @@ func (t *Delete) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Delete) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Delete) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Delete) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_dislike.go b/streams/gen_dislike.go index 815a317b..e8926463 100644 --- a/streams/gen_dislike.go +++ b/streams/gen_dislike.go @@ -2456,3 +2456,41 @@ func (t *Dislike) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Dislike) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Dislike) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Dislike) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_document.go b/streams/gen_document.go index 73547132..d85930ba 100644 --- a/streams/gen_document.go +++ b/streams/gen_document.go @@ -2097,3 +2097,41 @@ func (t *Document) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Document) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Document) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Document) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_event.go b/streams/gen_event.go index 01242ccc..2c839cf6 100644 --- a/streams/gen_event.go +++ b/streams/gen_event.go @@ -2097,3 +2097,41 @@ func (t *Event) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Event) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Event) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Event) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_flag.go b/streams/gen_flag.go index bae434ea..b931b703 100644 --- a/streams/gen_flag.go +++ b/streams/gen_flag.go @@ -2456,3 +2456,41 @@ func (t *Flag) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Flag) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Flag) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Flag) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_follow.go b/streams/gen_follow.go index 80b911fd..12a11de5 100644 --- a/streams/gen_follow.go +++ b/streams/gen_follow.go @@ -2456,3 +2456,41 @@ func (t *Follow) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Follow) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Follow) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Follow) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_group.go b/streams/gen_group.go index adf263db..f32a3385 100644 --- a/streams/gen_group.go +++ b/streams/gen_group.go @@ -2097,3 +2097,41 @@ func (t *Group) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Group) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Group) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Group) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_ignore.go b/streams/gen_ignore.go index 3d286f3e..6ed22447 100644 --- a/streams/gen_ignore.go +++ b/streams/gen_ignore.go @@ -2456,3 +2456,41 @@ func (t *Ignore) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Ignore) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Ignore) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Ignore) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_image.go b/streams/gen_image.go index a7273a6e..2d122e65 100644 --- a/streams/gen_image.go +++ b/streams/gen_image.go @@ -2165,3 +2165,41 @@ func (t *Image) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Image) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Image) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Image) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_intransitiveactivity.go b/streams/gen_intransitiveactivity.go index 7f3ab3ef..126f9dd4 100644 --- a/streams/gen_intransitiveactivity.go +++ b/streams/gen_intransitiveactivity.go @@ -2404,3 +2404,41 @@ func (t *IntransitiveActivity) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *IntransitiveActivity) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *IntransitiveActivity) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *IntransitiveActivity) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_invite.go b/streams/gen_invite.go index a608d085..f366a40a 100644 --- a/streams/gen_invite.go +++ b/streams/gen_invite.go @@ -2456,3 +2456,41 @@ func (t *Invite) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Invite) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Invite) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Invite) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_join.go b/streams/gen_join.go index c42b139b..e6000d9c 100644 --- a/streams/gen_join.go +++ b/streams/gen_join.go @@ -2456,3 +2456,41 @@ func (t *Join) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Join) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Join) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Join) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_leave.go b/streams/gen_leave.go index cae133ab..79767796 100644 --- a/streams/gen_leave.go +++ b/streams/gen_leave.go @@ -2456,3 +2456,41 @@ func (t *Leave) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Leave) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Leave) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Leave) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_like.go b/streams/gen_like.go index 2d7e6fa2..5e734ac7 100644 --- a/streams/gen_like.go +++ b/streams/gen_like.go @@ -2456,3 +2456,41 @@ func (t *Like) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Like) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Like) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Like) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_listen.go b/streams/gen_listen.go index 8c0982fa..4a2ac142 100644 --- a/streams/gen_listen.go +++ b/streams/gen_listen.go @@ -2456,3 +2456,41 @@ func (t *Listen) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Listen) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Listen) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Listen) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_move.go b/streams/gen_move.go index c92ea94b..ee476a7c 100644 --- a/streams/gen_move.go +++ b/streams/gen_move.go @@ -2456,3 +2456,41 @@ func (t *Move) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Move) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Move) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Move) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_note.go b/streams/gen_note.go index 6438530e..0b79f9c6 100644 --- a/streams/gen_note.go +++ b/streams/gen_note.go @@ -2097,3 +2097,41 @@ func (t *Note) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Note) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Note) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Note) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_object.go b/streams/gen_object.go index 697186da..f065c3d4 100644 --- a/streams/gen_object.go +++ b/streams/gen_object.go @@ -2097,3 +2097,41 @@ func (t *Object) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Object) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Object) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Object) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_offer.go b/streams/gen_offer.go index c19f2e26..eba4bae3 100644 --- a/streams/gen_offer.go +++ b/streams/gen_offer.go @@ -2456,3 +2456,41 @@ func (t *Offer) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Offer) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Offer) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Offer) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_orderedcollection.go b/streams/gen_orderedcollection.go index 1f361a2b..16dcaa7f 100644 --- a/streams/gen_orderedcollection.go +++ b/streams/gen_orderedcollection.go @@ -2310,3 +2310,41 @@ func (t *OrderedCollection) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *OrderedCollection) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *OrderedCollection) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *OrderedCollection) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_orderedcollectionpage.go b/streams/gen_orderedcollectionpage.go index f5adde8a..f872cd36 100644 --- a/streams/gen_orderedcollectionpage.go +++ b/streams/gen_orderedcollectionpage.go @@ -2421,6 +2421,44 @@ func (t *OrderedCollectionPage) SetSharedInbox(k *url.URL) { } +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *OrderedCollectionPage) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *OrderedCollectionPage) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *OrderedCollectionPage) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} + // ResolvePartOf passes the actual concrete type to the resolver for handing property partOf. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. func (t *OrderedCollectionPage) ResolvePartOf(r *Resolver) (s Resolution, err error) { s = Unresolved diff --git a/streams/gen_organization.go b/streams/gen_organization.go index 9c0d43a8..e9983fb2 100644 --- a/streams/gen_organization.go +++ b/streams/gen_organization.go @@ -2097,3 +2097,41 @@ func (t *Organization) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Organization) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Organization) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Organization) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_page.go b/streams/gen_page.go index cefadcc0..874416d6 100644 --- a/streams/gen_page.go +++ b/streams/gen_page.go @@ -2097,3 +2097,41 @@ func (t *Page) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Page) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Page) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Page) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_person.go b/streams/gen_person.go index 73e7f08a..1d8beb74 100644 --- a/streams/gen_person.go +++ b/streams/gen_person.go @@ -2097,3 +2097,41 @@ func (t *Person) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Person) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Person) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Person) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_place.go b/streams/gen_place.go index 3f50b4b9..bfa8e088 100644 --- a/streams/gen_place.go +++ b/streams/gen_place.go @@ -2267,3 +2267,41 @@ func (t *Place) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Place) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Place) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Place) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_profile.go b/streams/gen_profile.go index 32969a67..ee4f6a84 100644 --- a/streams/gen_profile.go +++ b/streams/gen_profile.go @@ -2131,3 +2131,41 @@ func (t *Profile) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Profile) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Profile) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Profile) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_question.go b/streams/gen_question.go index fa3ce050..8d7dd654 100644 --- a/streams/gen_question.go +++ b/streams/gen_question.go @@ -2598,3 +2598,41 @@ func (t *Question) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Question) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Question) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Question) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_read.go b/streams/gen_read.go index f07ad012..5e17f0b4 100644 --- a/streams/gen_read.go +++ b/streams/gen_read.go @@ -2456,3 +2456,41 @@ func (t *Read) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Read) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Read) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Read) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_reject.go b/streams/gen_reject.go index e4fdfee5..6226219f 100644 --- a/streams/gen_reject.go +++ b/streams/gen_reject.go @@ -2456,3 +2456,41 @@ func (t *Reject) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Reject) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Reject) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Reject) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_relationship.go b/streams/gen_relationship.go index 26c59a61..0118782a 100644 --- a/streams/gen_relationship.go +++ b/streams/gen_relationship.go @@ -2230,3 +2230,41 @@ func (t *Relationship) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Relationship) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Relationship) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Relationship) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_remove.go b/streams/gen_remove.go index 0d40ab8b..994b7750 100644 --- a/streams/gen_remove.go +++ b/streams/gen_remove.go @@ -2456,3 +2456,41 @@ func (t *Remove) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Remove) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Remove) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Remove) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_service.go b/streams/gen_service.go index 623c8da3..8c540471 100644 --- a/streams/gen_service.go +++ b/streams/gen_service.go @@ -2097,3 +2097,41 @@ func (t *Service) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Service) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Service) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Service) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_tentativeaccept.go b/streams/gen_tentativeaccept.go index 7240ca6a..a862a28c 100644 --- a/streams/gen_tentativeaccept.go +++ b/streams/gen_tentativeaccept.go @@ -2456,3 +2456,41 @@ func (t *TentativeAccept) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *TentativeAccept) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *TentativeAccept) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *TentativeAccept) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_tentativereject.go b/streams/gen_tentativereject.go index 5e7cb9cf..8eef5873 100644 --- a/streams/gen_tentativereject.go +++ b/streams/gen_tentativereject.go @@ -2456,3 +2456,41 @@ func (t *TentativeReject) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *TentativeReject) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *TentativeReject) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *TentativeReject) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_tombstone.go b/streams/gen_tombstone.go index 867a116c..39c424cb 100644 --- a/streams/gen_tombstone.go +++ b/streams/gen_tombstone.go @@ -2187,3 +2187,41 @@ func (t *Tombstone) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Tombstone) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Tombstone) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Tombstone) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_travel.go b/streams/gen_travel.go index 8fea4ff0..bd6471f7 100644 --- a/streams/gen_travel.go +++ b/streams/gen_travel.go @@ -2404,3 +2404,41 @@ func (t *Travel) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Travel) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Travel) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Travel) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_undo.go b/streams/gen_undo.go index 796d82ed..d47b6f02 100644 --- a/streams/gen_undo.go +++ b/streams/gen_undo.go @@ -2456,3 +2456,41 @@ func (t *Undo) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Undo) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Undo) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Undo) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_update.go b/streams/gen_update.go index b8c67e5a..79d8d7d2 100644 --- a/streams/gen_update.go +++ b/streams/gen_update.go @@ -2456,3 +2456,41 @@ func (t *Update) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Update) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Update) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Update) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_video.go b/streams/gen_video.go index 64fe4952..6cde7e50 100644 --- a/streams/gen_video.go +++ b/streams/gen_video.go @@ -2097,3 +2097,41 @@ func (t *Video) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Video) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *Video) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *Video) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +} diff --git a/streams/gen_view.go b/streams/gen_view.go index db0a0f95..479ce647 100644 --- a/streams/gen_view.go +++ b/streams/gen_view.go @@ -2456,3 +2456,41 @@ func (t *View) SetSharedInbox(k *url.URL) { t.raw.SetSharedInbox(k) } + +// ResolveShares passes the actual concrete type to the resolver for handing property shares. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *View) ResolveShares(r *Resolver) (s Resolution, err error) { + s = Unresolved + handled := false + if t.raw.IsSharesCollection() { + handled, err = r.dispatch(t.raw.GetSharesCollection()) + if handled { + s = Resolved + } + } else if t.raw.IsSharesOrderedCollection() { + s = RawResolutionNeeded + } else if t.raw.IsSharesAnyURI() { + s = RawResolutionNeeded + } + return + +} + +// HasShares returns a Presence appropriate for clients to determine whether it would be necessary to do raw handling, if desired. +func (t *View) HasShares() (p Presence) { + p = NoPresence + if t.raw.IsSharesCollection() { + p = ConvenientPresence + } else if t.raw.IsSharesOrderedCollection() { + p = RawPresence + } else if t.raw.IsSharesAnyURI() { + p = RawPresence + } + return + +} + +// SetShares sets this value to be a 'Collection' type. +func (t *View) SetShares(i vocab.CollectionType) { + t.raw.SetSharesCollection(i) + +}