diff --git a/streams/gen_accept.go b/streams/gen_accept.go index 74abc3c..15c34dc 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 3901580..141f0fa 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 b1d97c1..127af8e 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 b6da751..440f84c 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 eda6cc1..c5405c7 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 141c298..10bf096 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 a21cb44..ea4d8b8 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 655c3fe..4566497 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 ef456b3..5da8afa 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 33abd42..28cc981 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 aa53800..7f37273 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 3c9ec5c..41dee70 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 da7754e..b4dd67d 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 815a317..e892646 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 7354713..d85930b 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 01242cc..2c839cf 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 bae434e..b931b70 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 80b911f..12a11de 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 adf263d..f32a338 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 3d286f3..6ed2244 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 a7273a6..2d122e6 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 7f3ab3e..126f9dd 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 a608d08..f366a40 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 c42b139..e6000d9 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 cae133a..7976779 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 2d7e6fa..5e734ac 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 8c0982f..4a2ac14 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 c92ea94..ee476a7 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 6438530..0b79f9c 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 697186d..f065c3d 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 c19f2e2..eba4bae 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 1f361a2..16dcaa7 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 f5adde8..f872cd3 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 9c0d43a..e9983fb 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 cefadcc..874416d 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 73e7f08..1d8beb7 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 3f50b4b..bfa8e08 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 32969a6..ee4f6a8 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 fa3ce05..8d7dd65 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 f07ad01..5e17f0b 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 e4fdfee..6226219 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 26c59a6..0118782 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 0d40ab8..994b775 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 623c8da..8c54047 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 7240ca6..a862a28 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 5e7cb9c..8eef587 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 867a116..39c424c 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 8fea4ff..bd6471f 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 796d82e..d47b6f0 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 b8c67e5..79d8d7d 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 64fe495..6cde7e5 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 db0a0f9..479ce64 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) + +}