summaryrefslogtreecommitdiff
path: root/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-07-27 20:54:30 +0200
committerLibravatar GitHub <noreply@github.com>2023-07-27 20:54:30 +0200
commitcf4bd700fb9fd1c6915eefe12437a9e074d84c9b (patch)
treef755a27a405a9e000daa6bd6eac9f153518c02e0 /vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev
parent[chore] fix merge issue (#2029) (diff)
downloadgotosocial-cf4bd700fb9fd1c6915eefe12437a9e074d84c9b.tar.xz
[chore] Update activity dependency (#2031)
Diffstat (limited to 'vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev')
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev/gen_pkg.go3
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev/gen_property_activitystreams_prev.go49
2 files changed, 50 insertions, 2 deletions
diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev/gen_pkg.go
index cbc1bb850..57d210f9b 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev/gen_pkg.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev/gen_pkg.go
@@ -13,6 +13,9 @@ type privateManager interface {
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
+ // DeserializeHashtagToot returns the deserialization method for the
+ // "TootHashtag" non-functional property in the vocabulary "Toot"
+ DeserializeHashtagToot() func(map[string]interface{}, map[string]string) (vocab.TootHashtag, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev/gen_property_activitystreams_prev.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev/gen_property_activitystreams_prev.go
index d9bf488b5..d7058195a 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev/gen_property_activitystreams_prev.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_prev/gen_property_activitystreams_prev.go
@@ -16,6 +16,7 @@ import (
type ActivityStreamsPrevProperty struct {
activitystreamsCollectionPageMember vocab.ActivityStreamsCollectionPage
activitystreamsLinkMember vocab.ActivityStreamsLink
+ tootHashtagMember vocab.TootHashtag
activitystreamsMentionMember vocab.ActivityStreamsMention
activitystreamsOrderedCollectionPageMember vocab.ActivityStreamsOrderedCollectionPage
unknown interface{}
@@ -63,6 +64,12 @@ func DeserializePrevProperty(m map[string]interface{}, aliasMap map[string]strin
alias: alias,
}
return this, nil
+ } else if v, err := mgr.DeserializeHashtagToot()(m, aliasMap); err == nil {
+ this := &ActivityStreamsPrevProperty{
+ alias: alias,
+ tootHashtagMember: v,
+ }
+ return this, nil
} else if v, err := mgr.DeserializeMentionActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsPrevProperty{
activitystreamsMentionMember: v,
@@ -96,6 +103,7 @@ func NewActivityStreamsPrevProperty() *ActivityStreamsPrevProperty {
func (this *ActivityStreamsPrevProperty) Clear() {
this.activitystreamsCollectionPageMember = nil
this.activitystreamsLinkMember = nil
+ this.tootHashtagMember = nil
this.activitystreamsMentionMember = nil
this.activitystreamsOrderedCollectionPageMember = nil
this.unknown = nil
@@ -136,6 +144,12 @@ func (this ActivityStreamsPrevProperty) GetIRI() *url.URL {
return this.iri
}
+// GetTootHashtag returns the value of this property. When IsTootHashtag returns
+// false, GetTootHashtag will return an arbitrary value.
+func (this ActivityStreamsPrevProperty) GetTootHashtag() vocab.TootHashtag {
+ return this.tootHashtagMember
+}
+
// GetType returns the value in this property as a Type. Returns nil if the value
// is not an ActivityStreams type, such as an IRI or another value.
func (this ActivityStreamsPrevProperty) GetType() vocab.Type {
@@ -145,6 +159,9 @@ func (this ActivityStreamsPrevProperty) GetType() vocab.Type {
if this.IsActivityStreamsLink() {
return this.GetActivityStreamsLink()
}
+ if this.IsTootHashtag() {
+ return this.GetTootHashtag()
+ }
if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention()
}
@@ -159,6 +176,7 @@ func (this ActivityStreamsPrevProperty) GetType() vocab.Type {
func (this ActivityStreamsPrevProperty) HasAny() bool {
return this.IsActivityStreamsCollectionPage() ||
this.IsActivityStreamsLink() ||
+ this.IsTootHashtag() ||
this.IsActivityStreamsMention() ||
this.IsActivityStreamsOrderedCollectionPage() ||
this.iri != nil
@@ -200,6 +218,13 @@ func (this ActivityStreamsPrevProperty) IsIRI() bool {
return this.iri != nil
}
+// IsTootHashtag returns true if this property has a type of "Hashtag". When true,
+// use the GetTootHashtag and SetTootHashtag methods to access and set this
+// property.
+func (this ActivityStreamsPrevProperty) IsTootHashtag() bool {
+ return this.tootHashtagMember != nil
+}
+
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
@@ -210,6 +235,8 @@ func (this ActivityStreamsPrevProperty) JSONLDContext() map[string]string {
child = this.GetActivityStreamsCollectionPage().JSONLDContext()
} else if this.IsActivityStreamsLink() {
child = this.GetActivityStreamsLink().JSONLDContext()
+ } else if this.IsTootHashtag() {
+ child = this.GetTootHashtag().JSONLDContext()
} else if this.IsActivityStreamsMention() {
child = this.GetActivityStreamsMention().JSONLDContext()
} else if this.IsActivityStreamsOrderedCollectionPage() {
@@ -236,12 +263,15 @@ func (this ActivityStreamsPrevProperty) KindIndex() int {
if this.IsActivityStreamsLink() {
return 1
}
- if this.IsActivityStreamsMention() {
+ if this.IsTootHashtag() {
return 2
}
- if this.IsActivityStreamsOrderedCollectionPage() {
+ if this.IsActivityStreamsMention() {
return 3
}
+ if this.IsActivityStreamsOrderedCollectionPage() {
+ return 4
+ }
if this.IsIRI() {
return -2
}
@@ -263,6 +293,8 @@ func (this ActivityStreamsPrevProperty) LessThan(o vocab.ActivityStreamsPrevProp
return this.GetActivityStreamsCollectionPage().LessThan(o.GetActivityStreamsCollectionPage())
} else if this.IsActivityStreamsLink() {
return this.GetActivityStreamsLink().LessThan(o.GetActivityStreamsLink())
+ } else if this.IsTootHashtag() {
+ return this.GetTootHashtag().LessThan(o.GetTootHashtag())
} else if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention().LessThan(o.GetActivityStreamsMention())
} else if this.IsActivityStreamsOrderedCollectionPage() {
@@ -291,6 +323,8 @@ func (this ActivityStreamsPrevProperty) Serialize() (interface{}, error) {
return this.GetActivityStreamsCollectionPage().Serialize()
} else if this.IsActivityStreamsLink() {
return this.GetActivityStreamsLink().Serialize()
+ } else if this.IsTootHashtag() {
+ return this.GetTootHashtag().Serialize()
} else if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention().Serialize()
} else if this.IsActivityStreamsOrderedCollectionPage() {
@@ -335,6 +369,13 @@ func (this *ActivityStreamsPrevProperty) SetIRI(v *url.URL) {
this.iri = v
}
+// SetTootHashtag sets the value of this property. Calling IsTootHashtag
+// afterwards returns true.
+func (this *ActivityStreamsPrevProperty) SetTootHashtag(v vocab.TootHashtag) {
+ this.Clear()
+ this.tootHashtagMember = v
+}
+
// SetType attempts to set the property for the arbitrary type. Returns an error
// if it is not a valid type to set on this property.
func (this *ActivityStreamsPrevProperty) SetType(t vocab.Type) error {
@@ -346,6 +387,10 @@ func (this *ActivityStreamsPrevProperty) SetType(t vocab.Type) error {
this.SetActivityStreamsLink(v)
return nil
}
+ if v, ok := t.(vocab.TootHashtag); ok {
+ this.SetTootHashtag(v)
+ return nil
+ }
if v, ok := t.(vocab.ActivityStreamsMention); ok {
this.SetActivityStreamsMention(v)
return nil