diff options
author | 2021-08-23 12:46:05 +0200 | |
---|---|---|
committer | 2021-08-23 12:46:05 +0200 | |
commit | 071eca20ce9527153ed2e549f6198aad32380495 (patch) | |
tree | 958c75f403655b5fedabb20f5e431386798f02b2 /vendor/github.com/go-fed/activity/streams/impl/activitystreams | |
parent | Database updates (#144) (diff) | |
download | gotosocial-071eca20ce9527153ed2e549f6198aad32380495.tar.xz |
Manually approves followers (#146)
* update go-fed
* update go-fed
* manuallyapprovesfollowers
* serialize manuallyApprovesFollowers
Diffstat (limited to 'vendor/github.com/go-fed/activity/streams/impl/activitystreams')
13 files changed, 718 insertions, 240 deletions
diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_doc.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_doc.go new file mode 100644 index 000000000..7b3064f48 --- /dev/null +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_doc.go @@ -0,0 +1,17 @@ +// Code generated by astool. DO NOT EDIT. + +// Package propertymanuallyapprovesfollowers contains the implementation for the +// manuallyApprovesFollowers property. All applications are strongly +// encouraged to use the interface instead of this concrete definition. The +// interfaces allow applications to consume only the types and properties +// needed and be independent of the go-fed implementation if another +// alternative implementation is created. This package is code-generated and +// subject to the same license as the go-fed tool used to generate it. +// +// This package is independent of other types' and properties' implementations +// by having a Manager injected into it to act as a factory for the concrete +// implementations. The implementations have been generated into their own +// separate subpackages for each vocabulary. +// +// Strongly consider using the interfaces instead of this package. +package propertymanuallyapprovesfollowers diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_pkg.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_pkg.go new file mode 100644 index 000000000..9783436ed --- /dev/null +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_pkg.go @@ -0,0 +1,15 @@ +// Code generated by astool. DO NOT EDIT. + +package propertymanuallyapprovesfollowers + +var mgr privateManager + +// privateManager abstracts the code-generated manager that provides access to +// concrete implementations. +type privateManager interface{} + +// SetManager sets the manager package-global variable. For internal use only, do +// not use as part of Application behavior. Must be called at golang init time. +func SetManager(m privateManager) { + mgr = m +} diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_property_activitystreams_manuallyApprovesFollowers.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_property_activitystreams_manuallyApprovesFollowers.go new file mode 100644 index 000000000..e0356a2cf --- /dev/null +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/property_manuallyapprovesfollowers/gen_property_activitystreams_manuallyApprovesFollowers.go @@ -0,0 +1,206 @@ +// Code generated by astool. DO NOT EDIT. + +package propertymanuallyapprovesfollowers + +import ( + "fmt" + boolean "github.com/go-fed/activity/streams/values/boolean" + vocab "github.com/go-fed/activity/streams/vocab" + "net/url" +) + +// ActivityStreamsManuallyApprovesFollowersProperty is the functional property +// "manuallyApprovesFollowers". It is permitted to be a single default-valued +// value type. +type ActivityStreamsManuallyApprovesFollowersProperty struct { + xmlschemaBooleanMember bool + hasBooleanMember bool + unknown interface{} + iri *url.URL + alias string +} + +// DeserializeManuallyApprovesFollowersProperty creates a +// "manuallyApprovesFollowers" property from an interface representation that +// has been unmarshalled from a text or binary format. +func DeserializeManuallyApprovesFollowersProperty(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsManuallyApprovesFollowersProperty, error) { + alias := "" + if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok { + alias = a + } + propName := "manuallyApprovesFollowers" + if len(alias) > 0 { + // Use alias both to find the property, and set within the property. + propName = fmt.Sprintf("%s:%s", alias, "manuallyApprovesFollowers") + } + i, ok := m[propName] + + if ok { + if s, ok := i.(string); ok { + u, err := url.Parse(s) + // If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst + // Also, if no scheme exists, don't treat it as a URL -- net/url is greedy + if err == nil && len(u.Scheme) > 0 { + this := &ActivityStreamsManuallyApprovesFollowersProperty{ + alias: alias, + iri: u, + } + return this, nil + } + } + if v, err := boolean.DeserializeBoolean(i); err == nil { + this := &ActivityStreamsManuallyApprovesFollowersProperty{ + alias: alias, + hasBooleanMember: true, + xmlschemaBooleanMember: v, + } + return this, nil + } + this := &ActivityStreamsManuallyApprovesFollowersProperty{ + alias: alias, + unknown: i, + } + return this, nil + } + return nil, nil +} + +// NewActivityStreamsManuallyApprovesFollowersProperty creates a new +// manuallyApprovesFollowers property. +func NewActivityStreamsManuallyApprovesFollowersProperty() *ActivityStreamsManuallyApprovesFollowersProperty { + return &ActivityStreamsManuallyApprovesFollowersProperty{alias: ""} +} + +// Clear ensures no value of this property is set. Calling IsXMLSchemaBoolean +// afterwards will return false. +func (this *ActivityStreamsManuallyApprovesFollowersProperty) Clear() { + this.unknown = nil + this.iri = nil + this.hasBooleanMember = false +} + +// Get returns the value of this property. When IsXMLSchemaBoolean returns false, +// Get will return any arbitrary value. +func (this ActivityStreamsManuallyApprovesFollowersProperty) Get() bool { + return this.xmlschemaBooleanMember +} + +// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will +// return any arbitrary value. +func (this ActivityStreamsManuallyApprovesFollowersProperty) GetIRI() *url.URL { + return this.iri +} + +// HasAny returns true if the value or IRI is set. +func (this ActivityStreamsManuallyApprovesFollowersProperty) HasAny() bool { + return this.IsXMLSchemaBoolean() || this.iri != nil +} + +// IsIRI returns true if this property is an IRI. +func (this ActivityStreamsManuallyApprovesFollowersProperty) IsIRI() bool { + return this.iri != nil +} + +// IsXMLSchemaBoolean returns true if this property is set and not an IRI. +func (this ActivityStreamsManuallyApprovesFollowersProperty) IsXMLSchemaBoolean() bool { + return this.hasBooleanMember +} + +// 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. +func (this ActivityStreamsManuallyApprovesFollowersProperty) JSONLDContext() map[string]string { + m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias} + var child map[string]string + + /* + Since the literal maps in this function are determined at + code-generation time, this loop should not overwrite an existing key with a + new value. + */ + for k, v := range child { + m[k] = v + } + return m +} + +// KindIndex computes an arbitrary value for indexing this kind of value. This is +// a leaky API detail only for folks looking to replace the go-fed +// implementation. Applications should not use this method. +func (this ActivityStreamsManuallyApprovesFollowersProperty) KindIndex() int { + if this.IsXMLSchemaBoolean() { + return 0 + } + if this.IsIRI() { + return -2 + } + return -1 +} + +// LessThan compares two instances of this property with an arbitrary but stable +// comparison. Applications should not use this because it is only meant to +// help alternative implementations to go-fed to be able to normalize +// nonfunctional properties. +func (this ActivityStreamsManuallyApprovesFollowersProperty) LessThan(o vocab.ActivityStreamsManuallyApprovesFollowersProperty) bool { + // LessThan comparison for if either or both are IRIs. + if this.IsIRI() && o.IsIRI() { + return this.iri.String() < o.GetIRI().String() + } else if this.IsIRI() { + // IRIs are always less than other values, none, or unknowns + return true + } else if o.IsIRI() { + // This other, none, or unknown value is always greater than IRIs + return false + } + // LessThan comparison for the single value or unknown value. + if !this.IsXMLSchemaBoolean() && !o.IsXMLSchemaBoolean() { + // Both are unknowns. + return false + } else if this.IsXMLSchemaBoolean() && !o.IsXMLSchemaBoolean() { + // Values are always greater than unknown values. + return false + } else if !this.IsXMLSchemaBoolean() && o.IsXMLSchemaBoolean() { + // Unknowns are always less than known values. + return true + } else { + // Actual comparison. + return boolean.LessBoolean(this.Get(), o.Get()) + } +} + +// Name returns the name of this property: "manuallyApprovesFollowers". +func (this ActivityStreamsManuallyApprovesFollowersProperty) Name() string { + if len(this.alias) > 0 { + return this.alias + ":" + "manuallyApprovesFollowers" + } else { + return "manuallyApprovesFollowers" + } +} + +// Serialize converts this into an interface representation suitable for +// marshalling into a text or binary format. Applications should not need this +// function as most typical use cases serialize types instead of individual +// properties. It is exposed for alternatives to go-fed implementations to use. +func (this ActivityStreamsManuallyApprovesFollowersProperty) Serialize() (interface{}, error) { + if this.IsXMLSchemaBoolean() { + return boolean.SerializeBoolean(this.Get()) + } else if this.IsIRI() { + return this.iri.String(), nil + } + return this.unknown, nil +} + +// Set sets the value of this property. Calling IsXMLSchemaBoolean afterwards will +// return true. +func (this *ActivityStreamsManuallyApprovesFollowersProperty) Set(v bool) { + this.Clear() + this.xmlschemaBooleanMember = v + this.hasBooleanMember = true +} + +// SetIRI sets the value of this property. Calling IsIRI afterwards will return +// true. +func (this *ActivityStreamsManuallyApprovesFollowersProperty) SetIRI(v *url.URL) { + this.Clear() + this.iri = v +} diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_application/gen_pkg.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_application/gen_pkg.go index 77f918139..05764bc36 100644 --- a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_application/gen_pkg.go +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_application/gen_pkg.go @@ -108,6 +108,11 @@ type privateManager interface { // method for the "ActivityStreamsLocationProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeLocationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLocationProperty, error) + // DeserializeManuallyApprovesFollowersPropertyActivityStreams returns the + // deserialization method for the + // "ActivityStreamsManuallyApprovesFollowersProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeManuallyApprovesFollowersPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error) // DeserializeMediaTypePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsMediaTypeProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_application/gen_type_activitystreams_application.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_application/gen_type_activitystreams_application.go index e4f64ed61..ba850008b 100644 --- a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_application/gen_type_activitystreams_application.go +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_application/gen_type_activitystreams_application.go @@ -16,54 +16,55 @@ import ( // "type": "Application" // } type ActivityStreamsApplication struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - TootDiscoverable vocab.TootDiscoverableProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - TootFeatured vocab.TootFeaturedProperty - ActivityStreamsFollowers vocab.ActivityStreamsFollowersProperty - ActivityStreamsFollowing vocab.ActivityStreamsFollowingProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - ActivityStreamsInbox vocab.ActivityStreamsInboxProperty - ActivityStreamsLiked vocab.ActivityStreamsLikedProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsOutbox vocab.ActivityStreamsOutboxProperty - ActivityStreamsPreferredUsername vocab.ActivityStreamsPreferredUsernameProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - W3IDSecurityV1PublicKey vocab.W3IDSecurityV1PublicKeyProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsStreams vocab.ActivityStreamsStreamsProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ForgeFedTeam vocab.ForgeFedTeamProperty - ForgeFedTicketsTrackedBy vocab.ForgeFedTicketsTrackedByProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - ForgeFedTracksTicketsFor vocab.ForgeFedTracksTicketsForProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + TootDiscoverable vocab.TootDiscoverableProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + TootFeatured vocab.TootFeaturedProperty + ActivityStreamsFollowers vocab.ActivityStreamsFollowersProperty + ActivityStreamsFollowing vocab.ActivityStreamsFollowingProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + ActivityStreamsInbox vocab.ActivityStreamsInboxProperty + ActivityStreamsLiked vocab.ActivityStreamsLikedProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsManuallyApprovesFollowers vocab.ActivityStreamsManuallyApprovesFollowersProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsOutbox vocab.ActivityStreamsOutboxProperty + ActivityStreamsPreferredUsername vocab.ActivityStreamsPreferredUsernameProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + W3IDSecurityV1PublicKey vocab.W3IDSecurityV1PublicKeyProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsStreams vocab.ActivityStreamsStreamsProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ForgeFedTeam vocab.ForgeFedTeamProperty + ForgeFedTicketsTrackedBy vocab.ForgeFedTicketsTrackedByProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + ForgeFedTracksTicketsFor vocab.ForgeFedTracksTicketsForProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsApplicationExtends returns true if the Application type extends @@ -255,6 +256,11 @@ func DeserializeApplication(m map[string]interface{}, aliasMap map[string]string } else if p != nil { this.ActivityStreamsLocation = p } + if p, err := mgr.DeserializeManuallyApprovesFollowersPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsManuallyApprovesFollowers = p + } if p, err := mgr.DeserializeMediaTypePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -420,6 +426,8 @@ func DeserializeApplication(m map[string]interface{}, aliasMap map[string]string continue } else if k == "location" { continue + } else if k == "manuallyApprovesFollowers" { + continue } else if k == "mediaType" { continue } else if k == "name" { @@ -624,6 +632,12 @@ func (this ActivityStreamsApplication) GetActivityStreamsLocation() vocab.Activi return this.ActivityStreamsLocation } +// GetActivityStreamsManuallyApprovesFollowers returns the +// "manuallyApprovesFollowers" property if it exists, and nil otherwise. +func (this ActivityStreamsApplication) GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty { + return this.ActivityStreamsManuallyApprovesFollowers +} + // GetActivityStreamsMediaType returns the "mediaType" property if it exists, and // nil otherwise. func (this ActivityStreamsApplication) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty { @@ -818,6 +832,7 @@ func (this ActivityStreamsApplication) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsLiked, m) m = this.helperJSONLDContext(this.ActivityStreamsLikes, m) m = this.helperJSONLDContext(this.ActivityStreamsLocation, m) + m = this.helperJSONLDContext(this.ActivityStreamsManuallyApprovesFollowers, m) m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m) m = this.helperJSONLDContext(this.ActivityStreamsName, m) m = this.helperJSONLDContext(this.ActivityStreamsObject, m) @@ -1184,6 +1199,20 @@ func (this ActivityStreamsApplication) LessThan(o vocab.ActivityStreamsApplicati // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "manuallyApprovesFollowers" + if lhs, rhs := this.ActivityStreamsManuallyApprovesFollowers, o.GetActivityStreamsManuallyApprovesFollowers(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "mediaType" if lhs, rhs := this.ActivityStreamsMediaType, o.GetActivityStreamsMediaType(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1707,6 +1736,14 @@ func (this ActivityStreamsApplication) Serialize() (map[string]interface{}, erro m[this.ActivityStreamsLocation.Name()] = i } } + // Maybe serialize property "manuallyApprovesFollowers" + if this.ActivityStreamsManuallyApprovesFollowers != nil { + if i, err := this.ActivityStreamsManuallyApprovesFollowers.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsManuallyApprovesFollowers.Name()] = i + } + } // Maybe serialize property "mediaType" if this.ActivityStreamsMediaType != nil { if i, err := this.ActivityStreamsMediaType.Serialize(); err != nil { @@ -2002,6 +2039,12 @@ func (this *ActivityStreamsApplication) SetActivityStreamsLocation(i vocab.Activ this.ActivityStreamsLocation = i } +// SetActivityStreamsManuallyApprovesFollowers sets the +// "manuallyApprovesFollowers" property. +func (this *ActivityStreamsApplication) SetActivityStreamsManuallyApprovesFollowers(i vocab.ActivityStreamsManuallyApprovesFollowersProperty) { + this.ActivityStreamsManuallyApprovesFollowers = i +} + // SetActivityStreamsMediaType sets the "mediaType" property. func (this *ActivityStreamsApplication) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty) { this.ActivityStreamsMediaType = i diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_group/gen_pkg.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_group/gen_pkg.go index 71161f970..167179c55 100644 --- a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_group/gen_pkg.go +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_group/gen_pkg.go @@ -108,6 +108,11 @@ type privateManager interface { // method for the "ActivityStreamsLocationProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeLocationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLocationProperty, error) + // DeserializeManuallyApprovesFollowersPropertyActivityStreams returns the + // deserialization method for the + // "ActivityStreamsManuallyApprovesFollowersProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeManuallyApprovesFollowersPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error) // DeserializeMediaTypePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsMediaTypeProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_group/gen_type_activitystreams_group.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_group/gen_type_activitystreams_group.go index 7c7e43d02..4951eef9b 100644 --- a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_group/gen_type_activitystreams_group.go +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_group/gen_type_activitystreams_group.go @@ -16,54 +16,55 @@ import ( // "type": "Group" // } type ActivityStreamsGroup struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - TootDiscoverable vocab.TootDiscoverableProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - TootFeatured vocab.TootFeaturedProperty - ActivityStreamsFollowers vocab.ActivityStreamsFollowersProperty - ActivityStreamsFollowing vocab.ActivityStreamsFollowingProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - ActivityStreamsInbox vocab.ActivityStreamsInboxProperty - ActivityStreamsLiked vocab.ActivityStreamsLikedProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsOutbox vocab.ActivityStreamsOutboxProperty - ActivityStreamsPreferredUsername vocab.ActivityStreamsPreferredUsernameProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - W3IDSecurityV1PublicKey vocab.W3IDSecurityV1PublicKeyProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsStreams vocab.ActivityStreamsStreamsProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ForgeFedTeam vocab.ForgeFedTeamProperty - ForgeFedTicketsTrackedBy vocab.ForgeFedTicketsTrackedByProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - ForgeFedTracksTicketsFor vocab.ForgeFedTracksTicketsForProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + TootDiscoverable vocab.TootDiscoverableProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + TootFeatured vocab.TootFeaturedProperty + ActivityStreamsFollowers vocab.ActivityStreamsFollowersProperty + ActivityStreamsFollowing vocab.ActivityStreamsFollowingProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + ActivityStreamsInbox vocab.ActivityStreamsInboxProperty + ActivityStreamsLiked vocab.ActivityStreamsLikedProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsManuallyApprovesFollowers vocab.ActivityStreamsManuallyApprovesFollowersProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsOutbox vocab.ActivityStreamsOutboxProperty + ActivityStreamsPreferredUsername vocab.ActivityStreamsPreferredUsernameProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + W3IDSecurityV1PublicKey vocab.W3IDSecurityV1PublicKeyProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsStreams vocab.ActivityStreamsStreamsProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ForgeFedTeam vocab.ForgeFedTeamProperty + ForgeFedTicketsTrackedBy vocab.ForgeFedTicketsTrackedByProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + ForgeFedTracksTicketsFor vocab.ForgeFedTracksTicketsForProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsGroupExtends returns true if the Group type extends from the @@ -235,6 +236,11 @@ func DeserializeGroup(m map[string]interface{}, aliasMap map[string]string) (*Ac } else if p != nil { this.ActivityStreamsLocation = p } + if p, err := mgr.DeserializeManuallyApprovesFollowersPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsManuallyApprovesFollowers = p + } if p, err := mgr.DeserializeMediaTypePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -400,6 +406,8 @@ func DeserializeGroup(m map[string]interface{}, aliasMap map[string]string) (*Ac continue } else if k == "location" { continue + } else if k == "manuallyApprovesFollowers" { + continue } else if k == "mediaType" { continue } else if k == "name" { @@ -624,6 +632,12 @@ func (this ActivityStreamsGroup) GetActivityStreamsLocation() vocab.ActivityStre return this.ActivityStreamsLocation } +// GetActivityStreamsManuallyApprovesFollowers returns the +// "manuallyApprovesFollowers" property if it exists, and nil otherwise. +func (this ActivityStreamsGroup) GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty { + return this.ActivityStreamsManuallyApprovesFollowers +} + // GetActivityStreamsMediaType returns the "mediaType" property if it exists, and // nil otherwise. func (this ActivityStreamsGroup) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty { @@ -818,6 +832,7 @@ func (this ActivityStreamsGroup) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsLiked, m) m = this.helperJSONLDContext(this.ActivityStreamsLikes, m) m = this.helperJSONLDContext(this.ActivityStreamsLocation, m) + m = this.helperJSONLDContext(this.ActivityStreamsManuallyApprovesFollowers, m) m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m) m = this.helperJSONLDContext(this.ActivityStreamsName, m) m = this.helperJSONLDContext(this.ActivityStreamsObject, m) @@ -1184,6 +1199,20 @@ func (this ActivityStreamsGroup) LessThan(o vocab.ActivityStreamsGroup) bool { // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "manuallyApprovesFollowers" + if lhs, rhs := this.ActivityStreamsManuallyApprovesFollowers, o.GetActivityStreamsManuallyApprovesFollowers(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "mediaType" if lhs, rhs := this.ActivityStreamsMediaType, o.GetActivityStreamsMediaType(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1707,6 +1736,14 @@ func (this ActivityStreamsGroup) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsLocation.Name()] = i } } + // Maybe serialize property "manuallyApprovesFollowers" + if this.ActivityStreamsManuallyApprovesFollowers != nil { + if i, err := this.ActivityStreamsManuallyApprovesFollowers.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsManuallyApprovesFollowers.Name()] = i + } + } // Maybe serialize property "mediaType" if this.ActivityStreamsMediaType != nil { if i, err := this.ActivityStreamsMediaType.Serialize(); err != nil { @@ -2002,6 +2039,12 @@ func (this *ActivityStreamsGroup) SetActivityStreamsLocation(i vocab.ActivityStr this.ActivityStreamsLocation = i } +// SetActivityStreamsManuallyApprovesFollowers sets the +// "manuallyApprovesFollowers" property. +func (this *ActivityStreamsGroup) SetActivityStreamsManuallyApprovesFollowers(i vocab.ActivityStreamsManuallyApprovesFollowersProperty) { + this.ActivityStreamsManuallyApprovesFollowers = i +} + // SetActivityStreamsMediaType sets the "mediaType" property. func (this *ActivityStreamsGroup) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty) { this.ActivityStreamsMediaType = i diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_organization/gen_pkg.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_organization/gen_pkg.go index b6b053561..c2d1aba01 100644 --- a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_organization/gen_pkg.go +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_organization/gen_pkg.go @@ -108,6 +108,11 @@ type privateManager interface { // method for the "ActivityStreamsLocationProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeLocationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLocationProperty, error) + // DeserializeManuallyApprovesFollowersPropertyActivityStreams returns the + // deserialization method for the + // "ActivityStreamsManuallyApprovesFollowersProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeManuallyApprovesFollowersPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error) // DeserializeMediaTypePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsMediaTypeProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_organization/gen_type_activitystreams_organization.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_organization/gen_type_activitystreams_organization.go index e7f4736ef..c0df553c1 100644 --- a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_organization/gen_type_activitystreams_organization.go +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_organization/gen_type_activitystreams_organization.go @@ -16,54 +16,55 @@ import ( // "type": "Organization" // } type ActivityStreamsOrganization struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - TootDiscoverable vocab.TootDiscoverableProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - TootFeatured vocab.TootFeaturedProperty - ActivityStreamsFollowers vocab.ActivityStreamsFollowersProperty - ActivityStreamsFollowing vocab.ActivityStreamsFollowingProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - ActivityStreamsInbox vocab.ActivityStreamsInboxProperty - ActivityStreamsLiked vocab.ActivityStreamsLikedProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsOutbox vocab.ActivityStreamsOutboxProperty - ActivityStreamsPreferredUsername vocab.ActivityStreamsPreferredUsernameProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - W3IDSecurityV1PublicKey vocab.W3IDSecurityV1PublicKeyProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsStreams vocab.ActivityStreamsStreamsProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ForgeFedTeam vocab.ForgeFedTeamProperty - ForgeFedTicketsTrackedBy vocab.ForgeFedTicketsTrackedByProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - ForgeFedTracksTicketsFor vocab.ForgeFedTracksTicketsForProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + TootDiscoverable vocab.TootDiscoverableProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + TootFeatured vocab.TootFeaturedProperty + ActivityStreamsFollowers vocab.ActivityStreamsFollowersProperty + ActivityStreamsFollowing vocab.ActivityStreamsFollowingProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + ActivityStreamsInbox vocab.ActivityStreamsInboxProperty + ActivityStreamsLiked vocab.ActivityStreamsLikedProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsManuallyApprovesFollowers vocab.ActivityStreamsManuallyApprovesFollowersProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsOutbox vocab.ActivityStreamsOutboxProperty + ActivityStreamsPreferredUsername vocab.ActivityStreamsPreferredUsernameProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + W3IDSecurityV1PublicKey vocab.W3IDSecurityV1PublicKeyProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsStreams vocab.ActivityStreamsStreamsProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ForgeFedTeam vocab.ForgeFedTeamProperty + ForgeFedTicketsTrackedBy vocab.ForgeFedTicketsTrackedByProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + ForgeFedTracksTicketsFor vocab.ForgeFedTracksTicketsForProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsOrganizationExtends returns true if the Organization type @@ -235,6 +236,11 @@ func DeserializeOrganization(m map[string]interface{}, aliasMap map[string]strin } else if p != nil { this.ActivityStreamsLocation = p } + if p, err := mgr.DeserializeManuallyApprovesFollowersPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsManuallyApprovesFollowers = p + } if p, err := mgr.DeserializeMediaTypePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -400,6 +406,8 @@ func DeserializeOrganization(m map[string]interface{}, aliasMap map[string]strin continue } else if k == "location" { continue + } else if k == "manuallyApprovesFollowers" { + continue } else if k == "mediaType" { continue } else if k == "name" { @@ -624,6 +632,12 @@ func (this ActivityStreamsOrganization) GetActivityStreamsLocation() vocab.Activ return this.ActivityStreamsLocation } +// GetActivityStreamsManuallyApprovesFollowers returns the +// "manuallyApprovesFollowers" property if it exists, and nil otherwise. +func (this ActivityStreamsOrganization) GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty { + return this.ActivityStreamsManuallyApprovesFollowers +} + // GetActivityStreamsMediaType returns the "mediaType" property if it exists, and // nil otherwise. func (this ActivityStreamsOrganization) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty { @@ -818,6 +832,7 @@ func (this ActivityStreamsOrganization) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsLiked, m) m = this.helperJSONLDContext(this.ActivityStreamsLikes, m) m = this.helperJSONLDContext(this.ActivityStreamsLocation, m) + m = this.helperJSONLDContext(this.ActivityStreamsManuallyApprovesFollowers, m) m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m) m = this.helperJSONLDContext(this.ActivityStreamsName, m) m = this.helperJSONLDContext(this.ActivityStreamsObject, m) @@ -1184,6 +1199,20 @@ func (this ActivityStreamsOrganization) LessThan(o vocab.ActivityStreamsOrganiza // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "manuallyApprovesFollowers" + if lhs, rhs := this.ActivityStreamsManuallyApprovesFollowers, o.GetActivityStreamsManuallyApprovesFollowers(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "mediaType" if lhs, rhs := this.ActivityStreamsMediaType, o.GetActivityStreamsMediaType(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1707,6 +1736,14 @@ func (this ActivityStreamsOrganization) Serialize() (map[string]interface{}, err m[this.ActivityStreamsLocation.Name()] = i } } + // Maybe serialize property "manuallyApprovesFollowers" + if this.ActivityStreamsManuallyApprovesFollowers != nil { + if i, err := this.ActivityStreamsManuallyApprovesFollowers.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsManuallyApprovesFollowers.Name()] = i + } + } // Maybe serialize property "mediaType" if this.ActivityStreamsMediaType != nil { if i, err := this.ActivityStreamsMediaType.Serialize(); err != nil { @@ -2002,6 +2039,12 @@ func (this *ActivityStreamsOrganization) SetActivityStreamsLocation(i vocab.Acti this.ActivityStreamsLocation = i } +// SetActivityStreamsManuallyApprovesFollowers sets the +// "manuallyApprovesFollowers" property. +func (this *ActivityStreamsOrganization) SetActivityStreamsManuallyApprovesFollowers(i vocab.ActivityStreamsManuallyApprovesFollowersProperty) { + this.ActivityStreamsManuallyApprovesFollowers = i +} + // SetActivityStreamsMediaType sets the "mediaType" property. func (this *ActivityStreamsOrganization) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty) { this.ActivityStreamsMediaType = i diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_person/gen_pkg.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_person/gen_pkg.go index aacc73b00..44295e2b4 100644 --- a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_person/gen_pkg.go +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_person/gen_pkg.go @@ -108,6 +108,11 @@ type privateManager interface { // method for the "ActivityStreamsLocationProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeLocationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLocationProperty, error) + // DeserializeManuallyApprovesFollowersPropertyActivityStreams returns the + // deserialization method for the + // "ActivityStreamsManuallyApprovesFollowersProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeManuallyApprovesFollowersPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error) // DeserializeMediaTypePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsMediaTypeProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_person/gen_type_activitystreams_person.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_person/gen_type_activitystreams_person.go index 5ccb9ac08..bf51f554e 100644 --- a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_person/gen_type_activitystreams_person.go +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_person/gen_type_activitystreams_person.go @@ -16,54 +16,55 @@ import ( // "type": "Person" // } type ActivityStreamsPerson struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - TootDiscoverable vocab.TootDiscoverableProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - TootFeatured vocab.TootFeaturedProperty - ActivityStreamsFollowers vocab.ActivityStreamsFollowersProperty - ActivityStreamsFollowing vocab.ActivityStreamsFollowingProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - ActivityStreamsInbox vocab.ActivityStreamsInboxProperty - ActivityStreamsLiked vocab.ActivityStreamsLikedProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsOutbox vocab.ActivityStreamsOutboxProperty - ActivityStreamsPreferredUsername vocab.ActivityStreamsPreferredUsernameProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - W3IDSecurityV1PublicKey vocab.W3IDSecurityV1PublicKeyProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsStreams vocab.ActivityStreamsStreamsProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ForgeFedTeam vocab.ForgeFedTeamProperty - ForgeFedTicketsTrackedBy vocab.ForgeFedTicketsTrackedByProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - ForgeFedTracksTicketsFor vocab.ForgeFedTracksTicketsForProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + TootDiscoverable vocab.TootDiscoverableProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + TootFeatured vocab.TootFeaturedProperty + ActivityStreamsFollowers vocab.ActivityStreamsFollowersProperty + ActivityStreamsFollowing vocab.ActivityStreamsFollowingProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + ActivityStreamsInbox vocab.ActivityStreamsInboxProperty + ActivityStreamsLiked vocab.ActivityStreamsLikedProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsManuallyApprovesFollowers vocab.ActivityStreamsManuallyApprovesFollowersProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsOutbox vocab.ActivityStreamsOutboxProperty + ActivityStreamsPreferredUsername vocab.ActivityStreamsPreferredUsernameProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + W3IDSecurityV1PublicKey vocab.W3IDSecurityV1PublicKeyProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsStreams vocab.ActivityStreamsStreamsProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ForgeFedTeam vocab.ForgeFedTeamProperty + ForgeFedTicketsTrackedBy vocab.ForgeFedTicketsTrackedByProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + ForgeFedTracksTicketsFor vocab.ForgeFedTracksTicketsForProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsPersonExtends returns true if the Person type extends from the @@ -235,6 +236,11 @@ func DeserializePerson(m map[string]interface{}, aliasMap map[string]string) (*A } else if p != nil { this.ActivityStreamsLocation = p } + if p, err := mgr.DeserializeManuallyApprovesFollowersPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsManuallyApprovesFollowers = p + } if p, err := mgr.DeserializeMediaTypePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -400,6 +406,8 @@ func DeserializePerson(m map[string]interface{}, aliasMap map[string]string) (*A continue } else if k == "location" { continue + } else if k == "manuallyApprovesFollowers" { + continue } else if k == "mediaType" { continue } else if k == "name" { @@ -624,6 +632,12 @@ func (this ActivityStreamsPerson) GetActivityStreamsLocation() vocab.ActivityStr return this.ActivityStreamsLocation } +// GetActivityStreamsManuallyApprovesFollowers returns the +// "manuallyApprovesFollowers" property if it exists, and nil otherwise. +func (this ActivityStreamsPerson) GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty { + return this.ActivityStreamsManuallyApprovesFollowers +} + // GetActivityStreamsMediaType returns the "mediaType" property if it exists, and // nil otherwise. func (this ActivityStreamsPerson) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty { @@ -818,6 +832,7 @@ func (this ActivityStreamsPerson) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsLiked, m) m = this.helperJSONLDContext(this.ActivityStreamsLikes, m) m = this.helperJSONLDContext(this.ActivityStreamsLocation, m) + m = this.helperJSONLDContext(this.ActivityStreamsManuallyApprovesFollowers, m) m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m) m = this.helperJSONLDContext(this.ActivityStreamsName, m) m = this.helperJSONLDContext(this.ActivityStreamsObject, m) @@ -1184,6 +1199,20 @@ func (this ActivityStreamsPerson) LessThan(o vocab.ActivityStreamsPerson) bool { // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "manuallyApprovesFollowers" + if lhs, rhs := this.ActivityStreamsManuallyApprovesFollowers, o.GetActivityStreamsManuallyApprovesFollowers(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "mediaType" if lhs, rhs := this.ActivityStreamsMediaType, o.GetActivityStreamsMediaType(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1707,6 +1736,14 @@ func (this ActivityStreamsPerson) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsLocation.Name()] = i } } + // Maybe serialize property "manuallyApprovesFollowers" + if this.ActivityStreamsManuallyApprovesFollowers != nil { + if i, err := this.ActivityStreamsManuallyApprovesFollowers.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsManuallyApprovesFollowers.Name()] = i + } + } // Maybe serialize property "mediaType" if this.ActivityStreamsMediaType != nil { if i, err := this.ActivityStreamsMediaType.Serialize(); err != nil { @@ -2002,6 +2039,12 @@ func (this *ActivityStreamsPerson) SetActivityStreamsLocation(i vocab.ActivitySt this.ActivityStreamsLocation = i } +// SetActivityStreamsManuallyApprovesFollowers sets the +// "manuallyApprovesFollowers" property. +func (this *ActivityStreamsPerson) SetActivityStreamsManuallyApprovesFollowers(i vocab.ActivityStreamsManuallyApprovesFollowersProperty) { + this.ActivityStreamsManuallyApprovesFollowers = i +} + // SetActivityStreamsMediaType sets the "mediaType" property. func (this *ActivityStreamsPerson) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty) { this.ActivityStreamsMediaType = i diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_service/gen_pkg.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_service/gen_pkg.go index a8c5f4d3e..1e9d564e2 100644 --- a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_service/gen_pkg.go +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_service/gen_pkg.go @@ -108,6 +108,11 @@ type privateManager interface { // method for the "ActivityStreamsLocationProperty" non-functional // property in the vocabulary "ActivityStreams" DeserializeLocationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLocationProperty, error) + // DeserializeManuallyApprovesFollowersPropertyActivityStreams returns the + // deserialization method for the + // "ActivityStreamsManuallyApprovesFollowersProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeManuallyApprovesFollowersPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsManuallyApprovesFollowersProperty, error) // DeserializeMediaTypePropertyActivityStreams returns the deserialization // method for the "ActivityStreamsMediaTypeProperty" non-functional // property in the vocabulary "ActivityStreams" diff --git a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_service/gen_type_activitystreams_service.go b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_service/gen_type_activitystreams_service.go index b4a26becd..cc9382eb4 100644 --- a/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_service/gen_type_activitystreams_service.go +++ b/vendor/github.com/go-fed/activity/streams/impl/activitystreams/type_service/gen_type_activitystreams_service.go @@ -16,54 +16,55 @@ import ( // "type": "Service" // } type ActivityStreamsService struct { - ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty - ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty - ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty - ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty - ActivityStreamsBcc vocab.ActivityStreamsBccProperty - ActivityStreamsBto vocab.ActivityStreamsBtoProperty - ActivityStreamsCc vocab.ActivityStreamsCcProperty - ActivityStreamsContent vocab.ActivityStreamsContentProperty - ActivityStreamsContext vocab.ActivityStreamsContextProperty - TootDiscoverable vocab.TootDiscoverableProperty - ActivityStreamsDuration vocab.ActivityStreamsDurationProperty - ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty - TootFeatured vocab.TootFeaturedProperty - ActivityStreamsFollowers vocab.ActivityStreamsFollowersProperty - ActivityStreamsFollowing vocab.ActivityStreamsFollowingProperty - ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty - ActivityStreamsIcon vocab.ActivityStreamsIconProperty - JSONLDId vocab.JSONLDIdProperty - ActivityStreamsImage vocab.ActivityStreamsImageProperty - ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty - ActivityStreamsInbox vocab.ActivityStreamsInboxProperty - ActivityStreamsLiked vocab.ActivityStreamsLikedProperty - ActivityStreamsLikes vocab.ActivityStreamsLikesProperty - ActivityStreamsLocation vocab.ActivityStreamsLocationProperty - ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty - ActivityStreamsName vocab.ActivityStreamsNameProperty - ActivityStreamsObject vocab.ActivityStreamsObjectProperty - ActivityStreamsOutbox vocab.ActivityStreamsOutboxProperty - ActivityStreamsPreferredUsername vocab.ActivityStreamsPreferredUsernameProperty - ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty - W3IDSecurityV1PublicKey vocab.W3IDSecurityV1PublicKeyProperty - ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty - ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty - ActivityStreamsShares vocab.ActivityStreamsSharesProperty - ActivityStreamsSource vocab.ActivityStreamsSourceProperty - ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty - ActivityStreamsStreams vocab.ActivityStreamsStreamsProperty - ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty - ActivityStreamsTag vocab.ActivityStreamsTagProperty - ForgeFedTeam vocab.ForgeFedTeamProperty - ForgeFedTicketsTrackedBy vocab.ForgeFedTicketsTrackedByProperty - ActivityStreamsTo vocab.ActivityStreamsToProperty - ForgeFedTracksTicketsFor vocab.ForgeFedTracksTicketsForProperty - JSONLDType vocab.JSONLDTypeProperty - ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty - ActivityStreamsUrl vocab.ActivityStreamsUrlProperty - alias string - unknown map[string]interface{} + ActivityStreamsAltitude vocab.ActivityStreamsAltitudeProperty + ActivityStreamsAttachment vocab.ActivityStreamsAttachmentProperty + ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty + ActivityStreamsAudience vocab.ActivityStreamsAudienceProperty + ActivityStreamsBcc vocab.ActivityStreamsBccProperty + ActivityStreamsBto vocab.ActivityStreamsBtoProperty + ActivityStreamsCc vocab.ActivityStreamsCcProperty + ActivityStreamsContent vocab.ActivityStreamsContentProperty + ActivityStreamsContext vocab.ActivityStreamsContextProperty + TootDiscoverable vocab.TootDiscoverableProperty + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + TootFeatured vocab.TootFeaturedProperty + ActivityStreamsFollowers vocab.ActivityStreamsFollowersProperty + ActivityStreamsFollowing vocab.ActivityStreamsFollowingProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + ActivityStreamsInbox vocab.ActivityStreamsInboxProperty + ActivityStreamsLiked vocab.ActivityStreamsLikedProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsManuallyApprovesFollowers vocab.ActivityStreamsManuallyApprovesFollowersProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsOutbox vocab.ActivityStreamsOutboxProperty + ActivityStreamsPreferredUsername vocab.ActivityStreamsPreferredUsernameProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + W3IDSecurityV1PublicKey vocab.W3IDSecurityV1PublicKeyProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + ActivityStreamsStreams vocab.ActivityStreamsStreamsProperty + ActivityStreamsSummary vocab.ActivityStreamsSummaryProperty + ActivityStreamsTag vocab.ActivityStreamsTagProperty + ForgeFedTeam vocab.ForgeFedTeamProperty + ForgeFedTicketsTrackedBy vocab.ForgeFedTicketsTrackedByProperty + ActivityStreamsTo vocab.ActivityStreamsToProperty + ForgeFedTracksTicketsFor vocab.ForgeFedTracksTicketsForProperty + JSONLDType vocab.JSONLDTypeProperty + ActivityStreamsUpdated vocab.ActivityStreamsUpdatedProperty + ActivityStreamsUrl vocab.ActivityStreamsUrlProperty + alias string + unknown map[string]interface{} } // ActivityStreamsServiceExtends returns true if the Service type extends from the @@ -235,6 +236,11 @@ func DeserializeService(m map[string]interface{}, aliasMap map[string]string) (* } else if p != nil { this.ActivityStreamsLocation = p } + if p, err := mgr.DeserializeManuallyApprovesFollowersPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsManuallyApprovesFollowers = p + } if p, err := mgr.DeserializeMediaTypePropertyActivityStreams()(m, aliasMap); err != nil { return nil, err } else if p != nil { @@ -400,6 +406,8 @@ func DeserializeService(m map[string]interface{}, aliasMap map[string]string) (* continue } else if k == "location" { continue + } else if k == "manuallyApprovesFollowers" { + continue } else if k == "mediaType" { continue } else if k == "name" { @@ -624,6 +632,12 @@ func (this ActivityStreamsService) GetActivityStreamsLocation() vocab.ActivitySt return this.ActivityStreamsLocation } +// GetActivityStreamsManuallyApprovesFollowers returns the +// "manuallyApprovesFollowers" property if it exists, and nil otherwise. +func (this ActivityStreamsService) GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty { + return this.ActivityStreamsManuallyApprovesFollowers +} + // GetActivityStreamsMediaType returns the "mediaType" property if it exists, and // nil otherwise. func (this ActivityStreamsService) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty { @@ -818,6 +832,7 @@ func (this ActivityStreamsService) JSONLDContext() map[string]string { m = this.helperJSONLDContext(this.ActivityStreamsLiked, m) m = this.helperJSONLDContext(this.ActivityStreamsLikes, m) m = this.helperJSONLDContext(this.ActivityStreamsLocation, m) + m = this.helperJSONLDContext(this.ActivityStreamsManuallyApprovesFollowers, m) m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m) m = this.helperJSONLDContext(this.ActivityStreamsName, m) m = this.helperJSONLDContext(this.ActivityStreamsObject, m) @@ -1184,6 +1199,20 @@ func (this ActivityStreamsService) LessThan(o vocab.ActivityStreamsService) bool // Anything else is greater than nil return false } // Else: Both are nil + // Compare property "manuallyApprovesFollowers" + if lhs, rhs := this.ActivityStreamsManuallyApprovesFollowers, o.GetActivityStreamsManuallyApprovesFollowers(); lhs != nil && rhs != nil { + if lhs.LessThan(rhs) { + return true + } else if rhs.LessThan(lhs) { + return false + } + } else if lhs == nil && rhs != nil { + // Nil is less than anything else + return true + } else if rhs != nil && rhs == nil { + // Anything else is greater than nil + return false + } // Else: Both are nil // Compare property "mediaType" if lhs, rhs := this.ActivityStreamsMediaType, o.GetActivityStreamsMediaType(); lhs != nil && rhs != nil { if lhs.LessThan(rhs) { @@ -1707,6 +1736,14 @@ func (this ActivityStreamsService) Serialize() (map[string]interface{}, error) { m[this.ActivityStreamsLocation.Name()] = i } } + // Maybe serialize property "manuallyApprovesFollowers" + if this.ActivityStreamsManuallyApprovesFollowers != nil { + if i, err := this.ActivityStreamsManuallyApprovesFollowers.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsManuallyApprovesFollowers.Name()] = i + } + } // Maybe serialize property "mediaType" if this.ActivityStreamsMediaType != nil { if i, err := this.ActivityStreamsMediaType.Serialize(); err != nil { @@ -2002,6 +2039,12 @@ func (this *ActivityStreamsService) SetActivityStreamsLocation(i vocab.ActivityS this.ActivityStreamsLocation = i } +// SetActivityStreamsManuallyApprovesFollowers sets the +// "manuallyApprovesFollowers" property. +func (this *ActivityStreamsService) SetActivityStreamsManuallyApprovesFollowers(i vocab.ActivityStreamsManuallyApprovesFollowersProperty) { + this.ActivityStreamsManuallyApprovesFollowers = i +} + // SetActivityStreamsMediaType sets the "mediaType" property. func (this *ActivityStreamsService) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty) { this.ActivityStreamsMediaType = i |