summaryrefslogtreecommitdiff
path: root/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_partof
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_partof
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_partof')
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_partof/gen_pkg.go3
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_partof/gen_property_activitystreams_partOf.go51
2 files changed, 51 insertions, 3 deletions
diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_partof/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_partof/gen_pkg.go
index d734ec47b..1970f5971 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_partof/gen_pkg.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_partof/gen_pkg.go
@@ -17,6 +17,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_partof/gen_property_activitystreams_partOf.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_partof/gen_property_activitystreams_partOf.go
index a3a70ffa8..fb4e185f8 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_partof/gen_property_activitystreams_partOf.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_partof/gen_property_activitystreams_partOf.go
@@ -17,6 +17,7 @@ type ActivityStreamsPartOfProperty struct {
activitystreamsLinkMember vocab.ActivityStreamsLink
activitystreamsCollectionMember vocab.ActivityStreamsCollection
activitystreamsCollectionPageMember vocab.ActivityStreamsCollectionPage
+ tootHashtagMember vocab.TootHashtag
activitystreamsMentionMember vocab.ActivityStreamsMention
activitystreamsOrderedCollectionMember vocab.ActivityStreamsOrderedCollection
activitystreamsOrderedCollectionPageMember vocab.ActivityStreamsOrderedCollectionPage
@@ -71,6 +72,12 @@ func DeserializePartOfProperty(m map[string]interface{}, aliasMap map[string]str
alias: alias,
}
return this, nil
+ } else if v, err := mgr.DeserializeHashtagToot()(m, aliasMap); err == nil {
+ this := &ActivityStreamsPartOfProperty{
+ alias: alias,
+ tootHashtagMember: v,
+ }
+ return this, nil
} else if v, err := mgr.DeserializeMentionActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsPartOfProperty{
activitystreamsMentionMember: v,
@@ -111,6 +118,7 @@ func (this *ActivityStreamsPartOfProperty) Clear() {
this.activitystreamsLinkMember = nil
this.activitystreamsCollectionMember = nil
this.activitystreamsCollectionPageMember = nil
+ this.tootHashtagMember = nil
this.activitystreamsMentionMember = nil
this.activitystreamsOrderedCollectionMember = nil
this.activitystreamsOrderedCollectionPageMember = nil
@@ -166,6 +174,12 @@ func (this ActivityStreamsPartOfProperty) 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 ActivityStreamsPartOfProperty) 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 ActivityStreamsPartOfProperty) GetType() vocab.Type {
@@ -178,6 +192,9 @@ func (this ActivityStreamsPartOfProperty) GetType() vocab.Type {
if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage()
}
+ if this.IsTootHashtag() {
+ return this.GetTootHashtag()
+ }
if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention()
}
@@ -196,6 +213,7 @@ func (this ActivityStreamsPartOfProperty) HasAny() bool {
return this.IsActivityStreamsLink() ||
this.IsActivityStreamsCollection() ||
this.IsActivityStreamsCollectionPage() ||
+ this.IsTootHashtag() ||
this.IsActivityStreamsMention() ||
this.IsActivityStreamsOrderedCollection() ||
this.IsActivityStreamsOrderedCollectionPage() ||
@@ -253,6 +271,13 @@ func (this ActivityStreamsPartOfProperty) 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 ActivityStreamsPartOfProperty) 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.
@@ -265,6 +290,8 @@ func (this ActivityStreamsPartOfProperty) JSONLDContext() map[string]string {
child = this.GetActivityStreamsCollection().JSONLDContext()
} else if this.IsActivityStreamsCollectionPage() {
child = this.GetActivityStreamsCollectionPage().JSONLDContext()
+ } else if this.IsTootHashtag() {
+ child = this.GetTootHashtag().JSONLDContext()
} else if this.IsActivityStreamsMention() {
child = this.GetActivityStreamsMention().JSONLDContext()
} else if this.IsActivityStreamsOrderedCollection() {
@@ -296,15 +323,18 @@ func (this ActivityStreamsPartOfProperty) KindIndex() int {
if this.IsActivityStreamsCollectionPage() {
return 2
}
- if this.IsActivityStreamsMention() {
+ if this.IsTootHashtag() {
return 3
}
- if this.IsActivityStreamsOrderedCollection() {
+ if this.IsActivityStreamsMention() {
return 4
}
- if this.IsActivityStreamsOrderedCollectionPage() {
+ if this.IsActivityStreamsOrderedCollection() {
return 5
}
+ if this.IsActivityStreamsOrderedCollectionPage() {
+ return 6
+ }
if this.IsIRI() {
return -2
}
@@ -328,6 +358,8 @@ func (this ActivityStreamsPartOfProperty) LessThan(o vocab.ActivityStreamsPartOf
return this.GetActivityStreamsCollection().LessThan(o.GetActivityStreamsCollection())
} else if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage().LessThan(o.GetActivityStreamsCollectionPage())
+ } else if this.IsTootHashtag() {
+ return this.GetTootHashtag().LessThan(o.GetTootHashtag())
} else if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention().LessThan(o.GetActivityStreamsMention())
} else if this.IsActivityStreamsOrderedCollection() {
@@ -360,6 +392,8 @@ func (this ActivityStreamsPartOfProperty) Serialize() (interface{}, error) {
return this.GetActivityStreamsCollection().Serialize()
} else if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage().Serialize()
+ } else if this.IsTootHashtag() {
+ return this.GetTootHashtag().Serialize()
} else if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention().Serialize()
} else if this.IsActivityStreamsOrderedCollection() {
@@ -420,6 +454,13 @@ func (this *ActivityStreamsPartOfProperty) SetIRI(v *url.URL) {
this.iri = v
}
+// SetTootHashtag sets the value of this property. Calling IsTootHashtag
+// afterwards returns true.
+func (this *ActivityStreamsPartOfProperty) 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 *ActivityStreamsPartOfProperty) SetType(t vocab.Type) error {
@@ -435,6 +476,10 @@ func (this *ActivityStreamsPartOfProperty) SetType(t vocab.Type) error {
this.SetActivityStreamsCollectionPage(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