summaryrefslogtreecommitdiff
path: root/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_first
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_first')
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_first/gen_pkg.go3
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_first/gen_property_activitystreams_first.go49
2 files changed, 50 insertions, 2 deletions
diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_first/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_first/gen_pkg.go
index 9ab75cc0a..f0177bc66 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_first/gen_pkg.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_first/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_first/gen_property_activitystreams_first.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_first/gen_property_activitystreams_first.go
index c757647f7..7ec5616a1 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_first/gen_property_activitystreams_first.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_first/gen_property_activitystreams_first.go
@@ -16,6 +16,7 @@ import (
type ActivityStreamsFirstProperty struct {
activitystreamsCollectionPageMember vocab.ActivityStreamsCollectionPage
activitystreamsLinkMember vocab.ActivityStreamsLink
+ tootHashtagMember vocab.TootHashtag
activitystreamsMentionMember vocab.ActivityStreamsMention
activitystreamsOrderedCollectionPageMember vocab.ActivityStreamsOrderedCollectionPage
unknown interface{}
@@ -63,6 +64,12 @@ func DeserializeFirstProperty(m map[string]interface{}, aliasMap map[string]stri
alias: alias,
}
return this, nil
+ } else if v, err := mgr.DeserializeHashtagToot()(m, aliasMap); err == nil {
+ this := &ActivityStreamsFirstProperty{
+ alias: alias,
+ tootHashtagMember: v,
+ }
+ return this, nil
} else if v, err := mgr.DeserializeMentionActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFirstProperty{
activitystreamsMentionMember: v,
@@ -96,6 +103,7 @@ func NewActivityStreamsFirstProperty() *ActivityStreamsFirstProperty {
func (this *ActivityStreamsFirstProperty) 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 ActivityStreamsFirstProperty) 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 ActivityStreamsFirstProperty) 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 ActivityStreamsFirstProperty) GetType() vocab.Type {
@@ -145,6 +159,9 @@ func (this ActivityStreamsFirstProperty) 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 ActivityStreamsFirstProperty) GetType() vocab.Type {
func (this ActivityStreamsFirstProperty) HasAny() bool {
return this.IsActivityStreamsCollectionPage() ||
this.IsActivityStreamsLink() ||
+ this.IsTootHashtag() ||
this.IsActivityStreamsMention() ||
this.IsActivityStreamsOrderedCollectionPage() ||
this.iri != nil
@@ -200,6 +218,13 @@ func (this ActivityStreamsFirstProperty) 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 ActivityStreamsFirstProperty) 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 ActivityStreamsFirstProperty) 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 ActivityStreamsFirstProperty) 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 ActivityStreamsFirstProperty) LessThan(o vocab.ActivityStreamsFirstPr
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 ActivityStreamsFirstProperty) 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 *ActivityStreamsFirstProperty) SetIRI(v *url.URL) {
this.iri = v
}
+// SetTootHashtag sets the value of this property. Calling IsTootHashtag
+// afterwards returns true.
+func (this *ActivityStreamsFirstProperty) 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 *ActivityStreamsFirstProperty) SetType(t vocab.Type) error {
@@ -346,6 +387,10 @@ func (this *ActivityStreamsFirstProperty) 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