summaryrefslogtreecommitdiff
path: root/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_url
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_url
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_url')
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_url/gen_pkg.go3
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_url/gen_property_activitystreams_url.go106
2 files changed, 108 insertions, 1 deletions
diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_url/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_url/gen_pkg.go
index cad89cd63..9a636a774 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_url/gen_pkg.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_url/gen_pkg.go
@@ -9,6 +9,9 @@ var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
+ // 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_url/gen_property_activitystreams_url.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_url/gen_property_activitystreams_url.go
index 79719e452..ac8cf84c6 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_url/gen_property_activitystreams_url.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_url/gen_property_activitystreams_url.go
@@ -17,6 +17,7 @@ import (
type ActivityStreamsUrlPropertyIterator struct {
xmlschemaAnyURIMember *url.URL
activitystreamsLinkMember vocab.ActivityStreamsLink
+ tootHashtagMember vocab.TootHashtag
activitystreamsMentionMember vocab.ActivityStreamsMention
unknown interface{}
alias string
@@ -43,6 +44,12 @@ func deserializeActivityStreamsUrlPropertyIterator(i interface{}, aliasMap map[s
alias: alias,
}
return this, nil
+ } else if v, err := mgr.DeserializeHashtagToot()(m, aliasMap); err == nil {
+ this := &ActivityStreamsUrlPropertyIterator{
+ alias: alias,
+ tootHashtagMember: v,
+ }
+ return this, nil
} else if v, err := mgr.DeserializeMentionActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsUrlPropertyIterator{
activitystreamsMentionMember: v,
@@ -85,12 +92,21 @@ func (this ActivityStreamsUrlPropertyIterator) GetIRI() *url.URL {
return this.xmlschemaAnyURIMember
}
+// GetTootHashtag returns the value of this property. When IsTootHashtag returns
+// false, GetTootHashtag will return an arbitrary value.
+func (this ActivityStreamsUrlPropertyIterator) 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 ActivityStreamsUrlPropertyIterator) GetType() vocab.Type {
if this.IsActivityStreamsLink() {
return this.GetActivityStreamsLink()
}
+ if this.IsTootHashtag() {
+ return this.GetTootHashtag()
+ }
if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention()
}
@@ -108,6 +124,7 @@ func (this ActivityStreamsUrlPropertyIterator) GetXMLSchemaAnyURI() *url.URL {
func (this ActivityStreamsUrlPropertyIterator) HasAny() bool {
return this.IsXMLSchemaAnyURI() ||
this.IsActivityStreamsLink() ||
+ this.IsTootHashtag() ||
this.IsActivityStreamsMention()
}
@@ -131,6 +148,13 @@ func (this ActivityStreamsUrlPropertyIterator) IsIRI() bool {
return this.xmlschemaAnyURIMember != 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 ActivityStreamsUrlPropertyIterator) IsTootHashtag() bool {
+ return this.tootHashtagMember != nil
+}
+
// IsXMLSchemaAnyURI returns true if this property has a type of "anyURI". When
// true, use the GetXMLSchemaAnyURI and SetXMLSchemaAnyURI methods to access
// and set this property.
@@ -146,6 +170,8 @@ func (this ActivityStreamsUrlPropertyIterator) JSONLDContext() map[string]string
var child map[string]string
if this.IsActivityStreamsLink() {
child = this.GetActivityStreamsLink().JSONLDContext()
+ } else if this.IsTootHashtag() {
+ child = this.GetTootHashtag().JSONLDContext()
} else if this.IsActivityStreamsMention() {
child = this.GetActivityStreamsMention().JSONLDContext()
}
@@ -170,9 +196,12 @@ func (this ActivityStreamsUrlPropertyIterator) KindIndex() int {
if this.IsActivityStreamsLink() {
return 1
}
- if this.IsActivityStreamsMention() {
+ if this.IsTootHashtag() {
return 2
}
+ if this.IsActivityStreamsMention() {
+ return 3
+ }
if this.IsIRI() {
return -2
}
@@ -194,6 +223,8 @@ func (this ActivityStreamsUrlPropertyIterator) LessThan(o vocab.ActivityStreamsU
return anyuri.LessAnyURI(this.GetXMLSchemaAnyURI(), o.GetXMLSchemaAnyURI())
} 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())
}
@@ -247,6 +278,13 @@ func (this *ActivityStreamsUrlPropertyIterator) SetIRI(v *url.URL) {
this.SetXMLSchemaAnyURI(v)
}
+// SetTootHashtag sets the value of this property. Calling IsTootHashtag
+// afterwards returns true.
+func (this *ActivityStreamsUrlPropertyIterator) 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 *ActivityStreamsUrlPropertyIterator) SetType(t vocab.Type) error {
@@ -254,6 +292,10 @@ func (this *ActivityStreamsUrlPropertyIterator) 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
@@ -274,6 +316,7 @@ func (this *ActivityStreamsUrlPropertyIterator) SetXMLSchemaAnyURI(v *url.URL) {
func (this *ActivityStreamsUrlPropertyIterator) clear() {
this.xmlschemaAnyURIMember = nil
this.activitystreamsLinkMember = nil
+ this.tootHashtagMember = nil
this.activitystreamsMentionMember = nil
this.unknown = nil
}
@@ -287,6 +330,8 @@ func (this ActivityStreamsUrlPropertyIterator) serialize() (interface{}, error)
return anyuri.SerializeAnyURI(this.GetXMLSchemaAnyURI())
} else if this.IsActivityStreamsLink() {
return this.GetActivityStreamsLink().Serialize()
+ } else if this.IsTootHashtag() {
+ return this.GetTootHashtag().Serialize()
} else if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention().Serialize()
}
@@ -380,6 +425,17 @@ func (this *ActivityStreamsUrlProperty) AppendIRI(v *url.URL) {
})
}
+// AppendTootHashtag appends a Hashtag value to the back of a list of the property
+// "url". Invalidates iterators that are traversing using Prev.
+func (this *ActivityStreamsUrlProperty) AppendTootHashtag(v vocab.TootHashtag) {
+ this.properties = append(this.properties, &ActivityStreamsUrlPropertyIterator{
+ alias: this.alias,
+ myIdx: this.Len(),
+ parent: this,
+ tootHashtagMember: v,
+ })
+}
+
// PrependType prepends an arbitrary type value to the front of a list of the
// property "url". Invalidates iterators that are traversing using Prev.
// Returns an error if the type is not a valid one to set for this property.
@@ -487,6 +543,23 @@ func (this *ActivityStreamsUrlProperty) InsertIRI(idx int, v *url.URL) {
}
}
+// InsertTootHashtag inserts a Hashtag value at the specified index for a property
+// "url". Existing elements at that index and higher are shifted back once.
+// Invalidates all iterators.
+func (this *ActivityStreamsUrlProperty) InsertTootHashtag(idx int, v vocab.TootHashtag) {
+ this.properties = append(this.properties, nil)
+ copy(this.properties[idx+1:], this.properties[idx:])
+ this.properties[idx] = &ActivityStreamsUrlPropertyIterator{
+ alias: this.alias,
+ myIdx: idx,
+ parent: this,
+ tootHashtagMember: v,
+ }
+ for i := idx; i < this.Len(); i++ {
+ (this.properties)[i].myIdx = i
+ }
+}
+
// PrependType prepends an arbitrary type value to the front of a list of the
// property "url". Invalidates all iterators. Returns an error if the type is
// not a valid one to set for this property.
@@ -574,6 +647,10 @@ func (this ActivityStreamsUrlProperty) Less(i, j int) bool {
rhs := this.properties[j].GetActivityStreamsLink()
return lhs.LessThan(rhs)
} else if idx1 == 2 {
+ lhs := this.properties[i].GetTootHashtag()
+ rhs := this.properties[j].GetTootHashtag()
+ return lhs.LessThan(rhs)
+ } else if idx1 == 3 {
lhs := this.properties[i].GetActivityStreamsMention()
rhs := this.properties[j].GetActivityStreamsMention()
return lhs.LessThan(rhs)
@@ -657,6 +734,20 @@ func (this *ActivityStreamsUrlProperty) PrependIRI(v *url.URL) {
}
}
+// PrependTootHashtag prepends a Hashtag value to the front of a list of the
+// property "url". Invalidates all iterators.
+func (this *ActivityStreamsUrlProperty) PrependTootHashtag(v vocab.TootHashtag) {
+ this.properties = append([]*ActivityStreamsUrlPropertyIterator{{
+ alias: this.alias,
+ myIdx: 0,
+ parent: this,
+ tootHashtagMember: v,
+ }}, this.properties...)
+ for i := 1; i < this.Len(); i++ {
+ (this.properties)[i].myIdx = i
+ }
+}
+
// PrependType prepends an arbitrary type value to the front of a list of the
// property "url". Invalidates all iterators. Returns an error if the type is
// not a valid one to set for this property.
@@ -761,6 +852,19 @@ func (this *ActivityStreamsUrlProperty) SetIRI(idx int, v *url.URL) {
}
}
+// SetTootHashtag sets a Hashtag value to be at the specified index for the
+// property "url". Panics if the index is out of bounds. Invalidates all
+// iterators.
+func (this *ActivityStreamsUrlProperty) SetTootHashtag(idx int, v vocab.TootHashtag) {
+ (this.properties)[idx].parent = nil
+ (this.properties)[idx] = &ActivityStreamsUrlPropertyIterator{
+ alias: this.alias,
+ myIdx: idx,
+ parent: this,
+ tootHashtagMember: v,
+ }
+}
+
// SetType sets an arbitrary type value to the specified index of the property
// "url". Invalidates all iterators. Returns an error if the type is not a
// valid one to set for this property. Panics if the index is out of bounds.