From 0e29f1f5bb68a48d9b837d7f4e0a16370734955b Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 9 May 2023 12:16:10 +0200 Subject: [PATCH] [feature] Enable federation in/out of profile PropertyValue fields (#1722) Co-authored-by: kim Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> --- docs/federation/federating_with_gotosocial.md | 56 + go.mod | 2 +- go.sum | 4 +- internal/ap/extract.go | 53 + internal/ap/interfaces.go | 1 + internal/ap/normalize.go | 110 +- internal/ap/normalize_test.go | 16 +- internal/ap/resolve.go | 10 +- internal/ap/serialize.go | 176 +- .../api/activitypub/users/inboxpost_test.go | 9 +- internal/api/client/admin/reportsget_test.go | 52 +- internal/api/model/field.go | 2 +- .../migrations/20230430105735_fieldwork.go | 56 + internal/federation/dereferencing/account.go | 99 +- .../federation/dereferencing/account_test.go | 10 - .../federation/dereferencing/dereferencer.go | 9 +- internal/federation/dereferencing/status.go | 4 +- internal/federation/federatingactor.go | 7 +- .../federation/federatingdb/followers_test.go | 4 +- .../federation/federatingdb/following_test.go | 4 +- internal/federation/federatingdb/update.go | 131 +- internal/federation/federatingdb/util.go | 2 +- internal/federation/federatingprotocol.go | 2 +- internal/gtsmodel/account.go | 3 +- internal/messages/messages.go | 11 +- internal/processing/account/get.go | 2 +- internal/processing/account/update.go | 178 +- internal/processing/account/update_test.go | 80 + internal/processing/fedi/collections.go | 11 +- internal/processing/fedi/common.go | 2 +- internal/processing/fedi/emoji.go | 4 +- internal/processing/fedi/status.go | 10 +- internal/processing/fedi/user.go | 6 +- internal/processing/fromfederator.go | 36 +- internal/processing/search.go | 4 +- internal/processing/util.go | 1 - internal/text/formatter.go | 2 + internal/text/formatter_test.go | 4 + internal/text/goldmark_plaintext.go | 38 + internal/text/plain.go | 52 +- internal/text/plain_test.go | 28 +- internal/transport/controller.go | 6 +- internal/typeutils/astointernal.go | 3 +- internal/typeutils/internaltoas.go | 20 +- internal/typeutils/internaltoas_test.go | 139 +- internal/typeutils/internaltofrontend.go | 37 +- internal/typeutils/internaltofrontend_test.go | 39 +- internal/typeutils/wrap_test.go | 6 +- internal/validate/account_test.go | 2 +- internal/validate/formvalidation.go | 32 +- internal/validate/formvalidation_test.go | 55 +- testrig/testmodels.go | 97 +- .../activity/pub/side_effect_actor.go | 38 +- .../activity/streams/gen_consts.go | 6 + .../activity/streams/gen_init.go | 5 + .../activity/streams/gen_json_resolver.go | 20 + .../activity/streams/gen_manager.go | 26 + .../streams/gen_pkg_schema_disjoint.go | 14 + .../streams/gen_pkg_schema_extendedby.go | 15 + .../streams/gen_pkg_schema_extends.go | 14 + .../streams/gen_pkg_schema_isorextends.go | 14 + .../gen_pkg_schema_property_constructors.go | 13 + .../gen_pkg_schema_type_constructors.go | 13 + .../activity/streams/gen_resolver_utils.go | 3 + .../streams/gen_type_predicated_resolver.go | 13 + .../activity/streams/gen_type_resolver.go | 11 + .../activitystreams/property_actor/gen_pkg.go | 4 + .../gen_property_activitystreams_actor.go | 176 +- .../activitystreams/property_anyof/gen_pkg.go | 4 + .../gen_property_activitystreams_anyOf.go | 176 +- .../property_attachment/gen_pkg.go | 4 + ...gen_property_activitystreams_attachment.go | 176 +- .../property_attributedto/gen_pkg.go | 4 + ...n_property_activitystreams_attributedTo.go | 176 +- .../property_audience/gen_pkg.go | 4 + .../gen_property_activitystreams_audience.go | 176 +- .../activitystreams/property_bcc/gen_pkg.go | 4 + .../gen_property_activitystreams_bcc.go | 175 +- .../activitystreams/property_bto/gen_pkg.go | 4 + .../gen_property_activitystreams_bto.go | 175 +- .../activitystreams/property_cc/gen_pkg.go | 4 + .../gen_property_activitystreams_cc.go | 175 +- .../property_closed/gen_pkg.go | 4 + .../gen_property_activitystreams_closed.go | 176 +- .../property_context/gen_pkg.go | 4 + .../gen_property_activitystreams_context.go | 176 +- .../property_describes/gen_pkg.go | 4 + .../gen_property_activitystreams_describes.go | 82 +- .../property_formertype/gen_pkg.go | 4 + ...gen_property_activitystreams_formerType.go | 176 +- .../property_generator/gen_pkg.go | 4 + .../gen_property_activitystreams_generator.go | 176 +- .../property_inreplyto/gen_pkg.go | 4 + .../gen_property_activitystreams_inReplyTo.go | 176 +- .../property_instrument/gen_pkg.go | 4 + ...gen_property_activitystreams_instrument.go | 176 +- .../activitystreams/property_items/gen_pkg.go | 4 + .../gen_property_activitystreams_items.go | 176 +- .../property_location/gen_pkg.go | 4 + .../gen_property_activitystreams_location.go | 176 +- .../property_object/gen_pkg.go | 4 + .../gen_property_activitystreams_object.go | 176 +- .../activitystreams/property_oneof/gen_pkg.go | 4 + .../gen_property_activitystreams_oneOf.go | 176 +- .../property_ordereditems/gen_pkg.go | 4 + ...n_property_activitystreams_orderedItems.go | 176 +- .../property_origin/gen_pkg.go | 4 + .../gen_property_activitystreams_origin.go | 176 +- .../property_preview/gen_pkg.go | 4 + .../gen_property_activitystreams_preview.go | 176 +- .../property_relationship/gen_pkg.go | 4 + ...n_property_activitystreams_relationship.go | 176 +- .../property_result/gen_pkg.go | 4 + .../gen_property_activitystreams_result.go | 176 +- .../property_source/gen_pkg.go | 4 + .../gen_property_activitystreams_source.go | 82 +- .../property_subject/gen_pkg.go | 4 + .../gen_property_activitystreams_subject.go | 82 +- .../activitystreams/property_tag/gen_pkg.go | 4 + .../gen_property_activitystreams_tag.go | 175 +- .../property_target/gen_pkg.go | 4 + .../gen_property_activitystreams_target.go | 176 +- .../activitystreams/property_to/gen_pkg.go | 4 + .../gen_property_activitystreams_to.go | 175 +- .../gen_type_activitystreams_link.go | 2 +- .../gen_type_activitystreams_mention.go | 2 +- .../gen_type_activitystreams_object.go | 2 +- .../forgefed/property_committedby/gen_pkg.go | 4 + .../gen_property_forgefed_committedBy.go | 82 +- .../forgefed/property_description/gen_pkg.go | 4 + .../gen_property_forgefed_description.go | 82 +- .../forgefed/property_earlyitems/gen_pkg.go | 4 + .../gen_property_forgefed_earlyItems.go | 176 +- .../property_ticketstrackedby/gen_pkg.go | 4 + .../gen_property_forgefed_ticketsTrackedBy.go | 82 +- .../property_tracksticketsfor/gen_pkg.go | 4 + .../gen_property_forgefed_tracksTicketsFor.go | 176 +- .../impl/schema/property_value/gen_doc.go | 17 + .../impl/schema/property_value/gen_pkg.go | 15 + .../gen_property_schema_value.go | 203 ++ .../impl/schema/type_propertyvalue/gen_doc.go | 17 + .../impl/schema/type_propertyvalue/gen_pkg.go | 195 ++ .../gen_type_schema_propertyvalue.go | 1807 +++++++++++++++++ ...roperty_activitystreams_actor_interface.go | 26 + ...roperty_activitystreams_anyOf_interface.go | 26 + ...ty_activitystreams_attachment_interface.go | 27 + ..._activitystreams_attributedTo_interface.go | 27 + ...erty_activitystreams_audience_interface.go | 27 + ..._property_activitystreams_bcc_interface.go | 26 + ..._property_activitystreams_bto_interface.go | 26 + ...n_property_activitystreams_cc_interface.go | 26 + ...operty_activitystreams_closed_interface.go | 26 + ...perty_activitystreams_context_interface.go | 26 + ...rty_activitystreams_describes_interface.go | 11 + ...ty_activitystreams_formerType_interface.go | 27 + ...rty_activitystreams_generator_interface.go | 27 + ...rty_activitystreams_inReplyTo_interface.go | 27 + ...ty_activitystreams_instrument_interface.go | 27 + ...roperty_activitystreams_items_interface.go | 26 + ...erty_activitystreams_location_interface.go | 27 + ...operty_activitystreams_object_interface.go | 26 + ...roperty_activitystreams_oneOf_interface.go | 26 + ..._activitystreams_orderedItems_interface.go | 27 + ...operty_activitystreams_origin_interface.go | 26 + ...perty_activitystreams_preview_interface.go | 26 + ..._activitystreams_relationship_interface.go | 27 + ...operty_activitystreams_result_interface.go | 26 + ...operty_activitystreams_source_interface.go | 11 + ...perty_activitystreams_subject_interface.go | 11 + ..._property_activitystreams_tag_interface.go | 26 + ...operty_activitystreams_target_interface.go | 26 + ...n_property_activitystreams_to_interface.go | 26 + ...property_forgefed_committedBy_interface.go | 11 + ...property_forgefed_description_interface.go | 11 + ..._property_forgefed_earlyItems_interface.go | 27 + ...rty_forgefed_ticketsTrackedBy_interface.go | 11 + ...rty_forgefed_tracksTicketsFor_interface.go | 28 + .../gen_property_schema_value_interface.go | 52 + ...gen_type_schema_propertyvalue_interface.go | 222 ++ vendor/modules.txt | 4 +- 180 files changed, 9278 insertions(+), 1550 deletions(-) create mode 100644 internal/db/bundb/migrations/20230430105735_fieldwork.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_disjoint.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_extendedby.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_extends.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_isorextends.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_property_constructors.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_type_constructors.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/impl/schema/property_value/gen_doc.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/impl/schema/property_value/gen_pkg.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/impl/schema/property_value/gen_property_schema_value.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_doc.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_pkg.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_type_schema_propertyvalue.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_schema_value_interface.go create mode 100644 vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_type_schema_propertyvalue_interface.go diff --git a/docs/federation/federating_with_gotosocial.md b/docs/federation/federating_with_gotosocial.md index fe570d67..9723ce2c 100644 --- a/docs/federation/federating_with_gotosocial.md +++ b/docs/federation/federating_with_gotosocial.md @@ -324,3 +324,59 @@ When a GoToSocial instance receives a `Delete`, it will attempt to derive the de Then, GoToSocial will check if it has a post stored with the given URI. If it does, it will be completely deleted from the database and all user timelines. GoToSocial will only delete a post if it can be sure that the original post was owned by the `actor` that the `Delete` is attributed to. + +## Profile Fields + +Like Mastodon and other fediverse softwares, GoToSocial lets users set key/value pairs on their profile; useful for conveying short pieces of information like links, pronouns, age, etc. + +For the sake of compatibility with other implementations, GoToSocial uses the same schema.org PropertyValue extension that Mastodon uses, present as an `attachment` array value on `actor`s that have fields set. For example, the below JSON shows an account with two PropertyValue fields: + +```json +{ + "@context": [ + "http://joinmastodon.org/ns", + "https://w3id.org/security/v1", + "https://www.w3.org/ns/activitystreams", + "http://schema.org" + ], + "attachment": [ + { + "name": "should you follow me?", + "type": "PropertyValue", + "value": "maybe!" + }, + { + "name": "age", + "type": "PropertyValue", + "value": "120" + } + ], + "discoverable": false, + "featured": "http://example.org/users/1happyturtle/collections/featured", + "followers": "http://example.org/users/1happyturtle/followers", + "following": "http://example.org/users/1happyturtle/following", + "id": "http://example.org/users/1happyturtle", + "inbox": "http://example.org/users/1happyturtle/inbox", + "manuallyApprovesFollowers": true, + "name": "happy little turtle :3", + "outbox": "http://example.org/users/1happyturtle/outbox", + "preferredUsername": "1happyturtle", + "publicKey": { + "id": "http://example.org/users/1happyturtle#main-key", + "owner": "http://example.org/users/1happyturtle", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtTc6Jpg6LrRPhVQG4KLz\n2+YqEUUtZPd4YR+TKXuCnwEG9ZNGhgP046xa9h3EWzrZXaOhXvkUQgJuRqPrAcfN\nvc8jBHV2xrUeD8pu/MWKEabAsA/tgCv3nUC47HQ3/c12aHfYoPz3ufWsGGnrkhci\nv8PaveJ3LohO5vjCn1yZ00v6osMJMViEZvZQaazyE9A8FwraIexXabDpoy7tkHRg\nA1fvSkg4FeSG1XMcIz2NN7xyUuFACD+XkuOk7UqzRd4cjPUPLxiDwIsTlcgGOd3E\nUFMWVlPxSGjY2hIKa3lEHytaYK9IMYdSuyCsJshd3/yYC9LqxZY2KdlKJ80VOVyh\nyQIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "summary": "\u003cp\u003ei post about things that concern me\u003c/p\u003e", + "tag": [], + "type": "Person", + "url": "http://example.org/@1happyturtle" +} +``` + +For `actor`s that have no `PropertyValue` fields set, the `attachment` property will not be set at all. That is, the `attachment` key value will not be present on the `actor` (not even as an empty array or null value). + +While `attachment` is not technically an ordered collection, GoToSocial--again, in line with what other implementations do--does present `attachment` `PropertyValue` fields in the order in which they should to be displayed. + +GoToSocial will also parse PropertyValue fields from remote `actor`s discovered by the GoToSocial instance, to allow them to be displayed to users on the GoToSocial instance. + +GoToSocial allows up to 6 `PropertyValue` fields by default, as opposed to Mastodon's default 4. diff --git a/go.mod b/go.mod index e41a6343..699f9423 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,7 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.8.2 - github.com/superseriousbusiness/activity v1.2.2-gts + github.com/superseriousbusiness/activity v1.3.0-gts github.com/superseriousbusiness/exif-terminator v0.5.0 github.com/superseriousbusiness/oauth2/v4 v4.3.2-SSB.0.20230227143000-f4900831d6c8 github.com/tdewolff/minify/v2 v2.12.5 diff --git a/go.sum b/go.sum index 3a001edd..e9ff9675 100644 --- a/go.sum +++ b/go.sum @@ -541,8 +541,8 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/sunfish-shogi/bufseekio v0.0.0-20210207115823-a4185644b365/go.mod h1:dEzdXgvImkQ3WLI+0KQpmEx8T/C/ma9KeS3AfmU899I= -github.com/superseriousbusiness/activity v1.2.2-gts h1:7duR8MCbYIKyM4UkeSkze2S/2+ve1XHs8kVfaFg58UI= -github.com/superseriousbusiness/activity v1.2.2-gts/go.mod h1:AZw0Xb4Oju8rmaJCZ21gc5CPg47MmNgyac+Hx5jo8VM= +github.com/superseriousbusiness/activity v1.3.0-gts h1:59H3gQIIUK5xefloMmBKCRbl/YUJFzWcy1Qx4zEZkS4= +github.com/superseriousbusiness/activity v1.3.0-gts/go.mod h1:AZw0Xb4Oju8rmaJCZ21gc5CPg47MmNgyac+Hx5jo8VM= github.com/superseriousbusiness/exif-terminator v0.5.0 h1:57SO/geyaOl2v/lJSQLVcQbdghpyFuK8ZTtaHL81fUQ= github.com/superseriousbusiness/exif-terminator v0.5.0/go.mod h1:d5IkskXco/3XRXzOrI73uGYn+wahJEqPlQSSqn6jxSw= github.com/superseriousbusiness/go-jpeg-image-structure/v2 v2.0.0-20220321154430-d89a106fdabe h1:ksl2oCx/Qo8sNDc3Grb8WGKBM9nkvhCm25uvlT86azE= diff --git a/internal/ap/extract.go b/internal/ap/extract.go index 2742d27a..ce7c0390 100644 --- a/internal/ap/extract.go +++ b/internal/ap/extract.go @@ -266,6 +266,59 @@ func ExtractSummary(i WithSummary) string { return "" } +func ExtractFields(i WithAttachment) []*gtsmodel.Field { + attachmentProp := i.GetActivityStreamsAttachment() + if attachmentProp == nil { + // Nothing to do. + return nil + } + + l := attachmentProp.Len() + if l == 0 { + // Nothing to do. + return nil + } + + fields := make([]*gtsmodel.Field, 0, l) + for iter := attachmentProp.Begin(); iter != attachmentProp.End(); iter = iter.Next() { + if !iter.IsSchemaPropertyValue() { + continue + } + + propertyValue := iter.GetSchemaPropertyValue() + if propertyValue == nil { + continue + } + + nameProp := propertyValue.GetActivityStreamsName() + if nameProp == nil || nameProp.Len() != 1 { + continue + } + + name := nameProp.At(0).GetXMLSchemaString() + if name == "" { + continue + } + + valueProp := propertyValue.GetSchemaValue() + if valueProp == nil || !valueProp.IsXMLSchemaString() { + continue + } + + value := valueProp.Get() + if value == "" { + continue + } + + fields = append(fields, >smodel.Field{ + Name: name, + Value: value, + }) + } + + return fields +} + // ExtractDiscoverable extracts the Discoverable boolean of an interface. func ExtractDiscoverable(i WithDiscoverable) (bool, error) { if i.GetTootDiscoverable() == nil { diff --git a/internal/ap/interfaces.go b/internal/ap/interfaces.go index 67479122..611f4bde 100644 --- a/internal/ap/interfaces.go +++ b/internal/ap/interfaces.go @@ -30,6 +30,7 @@ type Accountable interface { WithName WithImage WithSummary + WithAttachment WithSetSummary WithDiscoverable WithURL diff --git a/internal/ap/normalize.go b/internal/ap/normalize.go index 52e29708..38861a1b 100644 --- a/internal/ap/normalize.go +++ b/internal/ap/normalize.go @@ -22,14 +22,23 @@ import ( "github.com/superseriousbusiness/activity/streams" ) -// NormalizeActivityObject normalizes the 'object'.'content' field of the given Activity. +/* + NORMALIZE INCOMING + The below functions should be called to normalize the content + of messages *COMING INTO* GoToSocial via the federation API, + either as the result of delivery from a remote instance to this + instance, or as a result of this instance doing an http call to + another instance to dereference something. +*/ + +// NormalizeIncomingActivityObject normalizes the 'object'.'content' field of the given Activity. // // The rawActivity map should the freshly deserialized json representation of the Activity. // -// This function is a noop if the type passed in is anything except a Create with a Statusable as its Object. -func NormalizeActivityObject(activity pub.Activity, rawJSON map[string]interface{}) { - if activity.GetTypeName() != ActivityCreate { - // Only interested in Create right now. +// This function is a noop if the type passed in is anything except a Create or Update with a Statusable or Accountable as its Object. +func NormalizeIncomingActivityObject(activity pub.Activity, rawJSON map[string]interface{}) { + if typeName := activity.GetTypeName(); typeName != ActivityCreate && typeName != ActivityUpdate { + // Only interested in Create or Update right now. return } @@ -51,8 +60,8 @@ func NormalizeActivityObject(activity pub.Activity, rawJSON map[string]interface } // We now know length is 1 so get the first - // item from the iter. We need this to be - // a Statusable if we're to continue. + // item from the iter. We need this to be + // a Statusable or Accountable if we're to continue. i := createObject.At(0) if i == nil { // This is awkward. @@ -65,38 +74,63 @@ func NormalizeActivityObject(activity pub.Activity, rawJSON map[string]interface return } - statusable, ok := t.(Statusable) - if !ok { - // Object is not Statusable; - // we're not interested. - return - } + switch t.GetTypeName() { + case ObjectArticle, ObjectDocument, ObjectImage, ObjectVideo, ObjectNote, ObjectPage, ObjectEvent, ObjectPlace, ObjectProfile: + statusable, ok := t.(Statusable) + if !ok { + // Object is not Statusable; + // we're not interested. + return + } - rawObject, ok := rawJSON["object"] - if !ok { - // No object in raw map. - return - } + rawObject, ok := rawJSON["object"] + if !ok { + // No object in raw map. + return + } - rawStatusableJSON, ok := rawObject.(map[string]interface{}) - if !ok { - // Object wasn't a json object. - return - } + rawStatusableJSON, ok := rawObject.(map[string]interface{}) + if !ok { + // Object wasn't a json object. + return + } - // Normalize everything we can on the statusable. - NormalizeContent(statusable, rawStatusableJSON) - NormalizeAttachments(statusable, rawStatusableJSON) - NormalizeSummary(statusable, rawStatusableJSON) - NormalizeName(statusable, rawStatusableJSON) + // Normalize everything we can on the statusable. + NormalizeIncomingContent(statusable, rawStatusableJSON) + NormalizeIncomingAttachments(statusable, rawStatusableJSON) + NormalizeIncomingSummary(statusable, rawStatusableJSON) + NormalizeIncomingName(statusable, rawStatusableJSON) + case ActorApplication, ActorGroup, ActorOrganization, ActorPerson, ActorService: + accountable, ok := t.(Accountable) + if !ok { + // Object is not Accountable; + // we're not interested. + return + } + + rawObject, ok := rawJSON["object"] + if !ok { + // No object in raw map. + return + } + + rawAccountableJSON, ok := rawObject.(map[string]interface{}) + if !ok { + // Object wasn't a json object. + return + } + + // Normalize everything we can on the accountable. + NormalizeIncomingSummary(accountable, rawAccountableJSON) + } } -// NormalizeContent replaces the Content of the given item +// NormalizeIncomingContent replaces the Content of the given item // with the raw 'content' value from the raw json object map. // // noop if there was no content in the json object map or the // content was not a plain string. -func NormalizeContent(item WithSetContent, rawJSON map[string]interface{}) { +func NormalizeIncomingContent(item WithSetContent, rawJSON map[string]interface{}) { rawContent, ok := rawJSON["content"] if !ok { // No content in rawJSON. @@ -118,13 +152,13 @@ func NormalizeContent(item WithSetContent, rawJSON map[string]interface{}) { item.SetActivityStreamsContent(contentProp) } -// NormalizeAttachments normalizes all attachments (if any) of the given -// itm, replacing the 'name' (aka content warning) field of each attachment +// NormalizeIncomingAttachments normalizes all attachments (if any) of the given +// item, replacing the 'name' (aka content warning) field of each attachment // with the raw 'name' value from the raw json object map. // // noop if there are no attachments; noop if attachment is not a format // we can understand. -func NormalizeAttachments(item WithAttachment, rawJSON map[string]interface{}) { +func NormalizeIncomingAttachments(item WithAttachment, rawJSON map[string]interface{}) { rawAttachments, ok := rawJSON["attachment"] if !ok { // No attachments in rawJSON. @@ -173,16 +207,16 @@ func NormalizeAttachments(item WithAttachment, rawJSON map[string]interface{}) { continue } - NormalizeName(attachmentable, rawAttachment) + NormalizeIncomingName(attachmentable, rawAttachment) } } -// NormalizeSummary replaces the Summary of the given item +// NormalizeIncomingSummary replaces the Summary of the given item // with the raw 'summary' value from the raw json object map. // // noop if there was no summary in the json object map or the // summary was not a plain string. -func NormalizeSummary(item WithSetSummary, rawJSON map[string]interface{}) { +func NormalizeIncomingSummary(item WithSetSummary, rawJSON map[string]interface{}) { rawSummary, ok := rawJSON["summary"] if !ok { // No summary in rawJSON. @@ -202,12 +236,12 @@ func NormalizeSummary(item WithSetSummary, rawJSON map[string]interface{}) { item.SetActivityStreamsSummary(summaryProp) } -// NormalizeName replaces the Name of the given item +// NormalizeIncomingName replaces the Name of the given item // with the raw 'name' value from the raw json object map. // // noop if there was no name in the json object map or the // name was not a plain string. -func NormalizeName(item WithSetName, rawJSON map[string]interface{}) { +func NormalizeIncomingName(item WithSetName, rawJSON map[string]interface{}) { rawName, ok := rawJSON["name"] if !ok { // No name in rawJSON. diff --git a/internal/ap/normalize_test.go b/internal/ap/normalize_test.go index c265b02f..2c9a1907 100644 --- a/internal/ap/normalize_test.go +++ b/internal/ap/normalize_test.go @@ -49,7 +49,7 @@ func (suite *NormalizeTestSuite) jsonToType(rawJson string) (vocab.Type, map[str } func (suite *NormalizeTestSuite) typeToJson(t vocab.Type) string { - m, err := streams.Serialize(t) + m, err := ap.Serialize(t) if err != nil { suite.FailNow(err.Error()) } @@ -223,7 +223,7 @@ func (suite *NormalizeTestSuite) TestNormalizeActivityObject() { note, ) - ap.NormalizeActivityObject(create, map[string]interface{}{"object": rawNote}) + ap.NormalizeIncomingActivityObject(create, map[string]interface{}{"object": rawNote}) suite.Equal(`UPDATE: As of this morning there are now more than 7 million Mastodon users, most from the #TwitterMigration.

In fact, 100,000 new accounts have been created since last night.

Since last night's spike 8,000-12,000 new accounts are being created every hour.

Yesterday, I estimated that Mastodon would have 8 million users by the end of the week. That might happen a lot sooner if this trend continues.`, ap.ExtractContent(note)) } @@ -248,7 +248,7 @@ func (suite *NormalizeTestSuite) TestNormalizeStatusableAttachmentsOneAttachment }`, suite.typeToJson(note)) // Normalize it! - ap.NormalizeAttachments(note, rawNote) + ap.NormalizeIncomingAttachments(note, rawNote) // After normalization, the 'name' field of the // attachment should no longer be all jacked up. @@ -289,7 +289,7 @@ func (suite *NormalizeTestSuite) TestNormalizeStatusableAttachmentsOneAttachment }`, suite.typeToJson(note)) // Normalize it! - ap.NormalizeAttachments(note, rawNote) + ap.NormalizeIncomingAttachments(note, rawNote) // After normalization, the 'name' field of the // attachment should no longer be all jacked up. @@ -349,7 +349,7 @@ func (suite *NormalizeTestSuite) TestNormalizeStatusableAttachmentsMultipleAttac }`, suite.typeToJson(note)) // Normalize it! - ap.NormalizeAttachments(note, rawNote) + ap.NormalizeIncomingAttachments(note, rawNote) // After normalization, the 'name' field of the // attachment should no longer be all jacked up. @@ -392,7 +392,7 @@ func (suite *NormalizeTestSuite) TestNormalizeAccountableSummary() { accountable, rawAccount := suite.getAccountable() suite.Equal(`about: I'm a #Barbie%20%23girl%20in%20a%20%23Barbie%20%23world%0ALife%20in%20plastic,%20it%27s%20fantastic%0AYou%20can%20brush%20my%20hair,%20undress%20me%20everywhere%0AImagination,%20life%20is%20your%20creation%0AI%27m%20a%20blonde%20bimbo%20girl%0AIn%20a%20fantasy%20world%0ADress%20me%20up,%20make%20it%20tight%0AI%27m%20your%20dolly%0AYou%27re%20my%20doll,%20rock%20and%20roll%0AFeel%20the%20glamour%20in%20pink%0AKiss%20me%20here,%20touch%20me%20there%0AHanky%20panky`, ap.ExtractSummary(accountable)) - ap.NormalizeSummary(accountable, rawAccount) + ap.NormalizeIncomingSummary(accountable, rawAccount) suite.Equal(`about: I'm a #Barbie #girl in a #Barbie #world Life in plastic, it's fantastic You can brush my hair, undress me everywhere @@ -411,7 +411,7 @@ func (suite *NormalizeTestSuite) TestNormalizeStatusableSummary() { statusable, rawAccount := suite.getStatusableWithWeirdSummaryAndName() suite.Equal(`warning: #WEIRD%20%23SUMMARY%20;;;;a;;a;asv%20%20%20%20khop8273987(*%5E&%5E)`, ap.ExtractSummary(statusable)) - ap.NormalizeSummary(statusable, rawAccount) + ap.NormalizeIncomingSummary(statusable, rawAccount) suite.Equal(`warning: #WEIRD #SUMMARY ;;;;a;;a;asv khop8273987(*^&^)`, ap.ExtractSummary(statusable)) } @@ -419,7 +419,7 @@ func (suite *NormalizeTestSuite) TestNormalizeStatusableName() { statusable, rawAccount := suite.getStatusableWithWeirdSummaryAndName() suite.Equal(`warning: #WEIRD%20%23nameEE%20;;;;a;;a;asv%20%20%20%20khop8273987(*%5E&%5E)`, ap.ExtractName(statusable)) - ap.NormalizeName(statusable, rawAccount) + ap.NormalizeIncomingName(statusable, rawAccount) suite.Equal(`WARNING: #WEIRD #nameEE ;;;;a;;a;asv khop8273987(*^&^)`, ap.ExtractName(statusable)) } diff --git a/internal/ap/resolve.go b/internal/ap/resolve.go index 8d116751..ef4d0b50 100644 --- a/internal/ap/resolve.go +++ b/internal/ap/resolve.go @@ -72,10 +72,10 @@ func ResolveStatusable(ctx context.Context, b []byte) (Statusable, error) { return nil, newErrWrongType(err) } - NormalizeContent(statusable, rawStatusable) - NormalizeAttachments(statusable, rawStatusable) - NormalizeSummary(statusable, rawStatusable) - NormalizeName(statusable, rawStatusable) + NormalizeIncomingContent(statusable, rawStatusable) + NormalizeIncomingAttachments(statusable, rawStatusable) + NormalizeIncomingSummary(statusable, rawStatusable) + NormalizeIncomingName(statusable, rawStatusable) return statusable, nil } @@ -118,7 +118,7 @@ func ResolveAccountable(ctx context.Context, b []byte) (Accountable, error) { return nil, newErrWrongType(err) } - NormalizeSummary(accountable, rawAccountable) + NormalizeIncomingSummary(accountable, rawAccountable) return accountable, nil } diff --git a/internal/ap/serialize.go b/internal/ap/serialize.go index 471a7f41..368d7f9a 100644 --- a/internal/ap/serialize.go +++ b/internal/ap/serialize.go @@ -18,13 +18,41 @@ package ap import ( - "errors" + "fmt" "github.com/superseriousbusiness/activity/streams" "github.com/superseriousbusiness/activity/streams/vocab" ) -// SerializeOrderedCollection is a custom serializer for an ActivityStreamsOrderedCollection. +// Serialize is a custom serializer for ActivityStreams types. +// +// In most cases, it will simply call the go-fed streams.Serialize function under the hood. +// However, if custom serialization is required on a specific type (eg for inter-implementation +// compatibility), it can be inserted into the switch as necessary. +// +// Callers should always call this function instead of streams.Serialize, unless there's a +// very good reason to do otherwise. +// +// Currently, the following things will be custom serialized: +// +// - OrderedCollection: 'orderedItems' property will always be made into an array. +// - Any Accountable type: 'attachment' property will always be made into an array. +// - Update: any Accountable 'object's set on an update will be custom serialized as above. +func Serialize(t vocab.Type) (m map[string]interface{}, e error) { + switch t.GetTypeName() { + case ObjectOrderedCollection: + return serializeOrderedCollection(t) + case ActorApplication, ActorGroup, ActorOrganization, ActorPerson, ActorService: + return serializeAccountable(t, true) + case ActivityUpdate: + return serializeWithObject(t) + default: + // No custom serializer necessary. + return streams.Serialize(t) + } +} + +// serializeOrderedCollection is a custom serializer for an ActivityStreamsOrderedCollection. // Unlike the standard streams.Serialize function, this serializer normalizes the orderedItems // value to always be an array/slice, regardless of how many items are contained therein. // @@ -33,32 +61,146 @@ import ( // See: // - https://github.com/go-fed/activity/issues/139 // - https://github.com/mastodon/mastodon/issues/24225 -func SerializeOrderedCollection(orderedCollection vocab.ActivityStreamsOrderedCollection) (map[string]interface{}, error) { +func serializeOrderedCollection(orderedCollection vocab.Type) (map[string]interface{}, error) { data, err := streams.Serialize(orderedCollection) if err != nil { return nil, err } - return data, normalizeOrderedCollectionData(data) -} - -func normalizeOrderedCollectionData(rawOrderedCollection map[string]interface{}) error { - orderedItems, ok := rawOrderedCollection["orderedItems"] + orderedItems, ok := data["orderedItems"] if !ok { - return errors.New("no orderedItems set on OrderedCollection") + // No 'orderedItems', nothing to change. + return data, nil } if _, ok := orderedItems.([]interface{}); ok { // Already slice. - return nil + return data, nil } - orderedItemsString, ok := orderedItems.(string) - if !ok { - return errors.New("orderedItems was neither slice nor string") - } + // Coerce single-object to slice. + data["orderedItems"] = []interface{}{orderedItems} - rawOrderedCollection["orderedItems"] = []string{orderedItemsString} - - return nil + return data, nil +} + +// SerializeAccountable is a custom serializer for any Accountable type. +// This serializer rewrites the 'attachment' value of the Accountable, if +// present, to always be an array/slice. +// +// While this is not strictly necessary in json-ld terms, most other fedi +// implementations look for attachment to be an array of PropertyValue (field) +// entries, and will not parse single-entry, non-array attachments on accounts +// properly. +// +// If the accountable is being serialized as a top-level object (eg., for serving +// in response to an account dereference request), then includeContext should be +// set to true, so as to include the json-ld '@context' entries in the data. +// If the accountable is being serialized as part of another object (eg., as the +// object of an activity), then includeContext should be set to false, as the +// @context entry should be included on the top-level/wrapping activity/object. +func serializeAccountable(accountable vocab.Type, includeContext bool) (map[string]interface{}, error) { + var ( + data map[string]interface{} + err error + ) + + if includeContext { + data, err = streams.Serialize(accountable) + } else { + data, err = accountable.Serialize() + } + + if err != nil { + return nil, err + } + + attachment, ok := data["attachment"] + if !ok { + // No 'attachment', nothing to change. + return data, nil + } + + if _, ok := attachment.([]interface{}); ok { + // Already slice. + return data, nil + } + + // Coerce single-object to slice. + data["attachment"] = []interface{}{attachment} + + return data, nil +} + +func serializeWithObject(t vocab.Type) (map[string]interface{}, error) { + withObject, ok := t.(WithObject) + if !ok { + return nil, fmt.Errorf("serializeWithObject: could not resolve %T to WithObject", t) + } + + data, err := streams.Serialize(t) + if err != nil { + return nil, err + } + + object := withObject.GetActivityStreamsObject() + if object == nil { + // Nothing to do, bail early. + return data, nil + } + + objectLen := object.Len() + if objectLen == 0 { + // Nothing to do, bail early. + return data, nil + } + + // The thing we already serialized has objects + // on it, so we should see if we need to custom + // serialize any of those objects, and replace + // them on the data map as necessary. + objects := make([]interface{}, 0, objectLen) + for iter := object.Begin(); iter != object.End(); iter = iter.Next() { + if iter.IsIRI() { + // Plain IRIs don't need custom serialization. + objects = append(objects, iter.GetIRI().String()) + continue + } + + var ( + objectType = iter.GetType() + objectSer map[string]interface{} + ) + + if objectType == nil { + // This is awkward. + return nil, fmt.Errorf("serializeWithObject: could not resolve object iter %T to vocab.Type", iter) + } + + switch objectType.GetTypeName() { + case ActorApplication, ActorGroup, ActorOrganization, ActorPerson, ActorService: + // @context will be included in wrapping type already, + // we don't need to include it in the object itself. + objectSer, err = serializeAccountable(objectType, false) + default: + // No custom serializer for this type; serialize as normal. + objectSer, err = objectType.Serialize() + } + + if err != nil { + return nil, err + } + + objects = append(objects, objectSer) + } + + if objectLen == 1 { + // Unnest single object. + data["object"] = objects[0] + } else { + // Array of objects. + data["object"] = objects + } + + return data, nil } diff --git a/internal/api/activitypub/users/inboxpost_test.go b/internal/api/activitypub/users/inboxpost_test.go index 12956353..26c4029a 100644 --- a/internal/api/activitypub/users/inboxpost_test.go +++ b/internal/api/activitypub/users/inboxpost_test.go @@ -32,6 +32,7 @@ import ( "github.com/superseriousbusiness/activity/pub" "github.com/superseriousbusiness/activity/streams" "github.com/superseriousbusiness/activity/streams/vocab" + "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/api/activitypub/users" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" @@ -76,7 +77,7 @@ func (suite *InboxPostTestSuite) TestPostBlock() { targetURI := testrig.URLMustParse(blockedAccount.InboxURI) signature, digestHeader, dateHeader := testrig.GetSignatureForActivity(block, blockingAccount.PublicKeyURI, blockingAccount.PrivateKey, targetURI) - bodyI, err := streams.Serialize(block) + bodyI, err := ap.Serialize(block) suite.NoError(err) bodyJson, err := json.Marshal(bodyI) @@ -177,7 +178,7 @@ func (suite *InboxPostTestSuite) TestPostUnblock() { targetURI := testrig.URLMustParse(blockedAccount.InboxURI) signature, digestHeader, dateHeader := testrig.GetSignatureForActivity(undo, blockingAccount.PublicKeyURI, blockingAccount.PrivateKey, targetURI) - bodyI, err := streams.Serialize(undo) + bodyI, err := ap.Serialize(undo) suite.NoError(err) bodyJson, err := json.Marshal(bodyI) @@ -275,7 +276,7 @@ func (suite *InboxPostTestSuite) TestPostUpdate() { targetURI := testrig.URLMustParse(receivingAccount.InboxURI) signature, digestHeader, dateHeader := testrig.GetSignatureForActivity(update, updatedAccount.PublicKeyURI, updatedAccount.PrivateKey, targetURI) - bodyI, err := streams.Serialize(update) + bodyI, err := ap.Serialize(update) suite.NoError(err) bodyJson, err := json.Marshal(bodyI) @@ -412,7 +413,7 @@ func (suite *InboxPostTestSuite) TestPostDelete() { targetURI := testrig.URLMustParse(receivingAccount.InboxURI) signature, digestHeader, dateHeader := testrig.GetSignatureForActivity(delete, deletedAccount.PublicKeyURI, deletedAccount.PrivateKey, targetURI) - bodyI, err := streams.Serialize(delete) + bodyI, err := ap.Serialize(delete) suite.NoError(err) bodyJson, err := json.Marshal(bodyI) diff --git a/internal/api/client/admin/reportsget_test.go b/internal/api/client/admin/reportsget_test.go index 67e6103a..fae21dc0 100644 --- a/internal/api/client/admin/reportsget_test.go +++ b/internal/api/client/admin/reportsget_test.go @@ -224,7 +224,18 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "statuses_count": 7, "last_status_at": "2021-10-20T10:40:37.000Z", "emojis": [], - "fields": [], + "fields": [ + { + "name": "should you follow me?", + "value": "maybe!", + "verified_at": null + }, + { + "name": "age", + "value": "120", + "verified_at": null + } + ], "role": { "name": "user" } @@ -374,7 +385,18 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "statuses_count": 7, "last_status_at": "2021-10-20T10:40:37.000Z", "emojis": [], - "fields": [], + "fields": [ + { + "name": "should you follow me?", + "value": "maybe!", + "verified_at": null + }, + { + "name": "age", + "value": "120", + "verified_at": null + } + ], "role": { "name": "user" } @@ -575,7 +597,18 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() { "statuses_count": 7, "last_status_at": "2021-10-20T10:40:37.000Z", "emojis": [], - "fields": [], + "fields": [ + { + "name": "should you follow me?", + "value": "maybe!", + "verified_at": null + }, + { + "name": "age", + "value": "120", + "verified_at": null + } + ], "role": { "name": "user" } @@ -776,7 +809,18 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() { "statuses_count": 7, "last_status_at": "2021-10-20T10:40:37.000Z", "emojis": [], - "fields": [], + "fields": [ + { + "name": "should you follow me?", + "value": "maybe!", + "verified_at": null + }, + { + "name": "age", + "value": "120", + "verified_at": null + } + ], "role": { "name": "user" } diff --git a/internal/api/model/field.go b/internal/api/model/field.go index 399fef20..c3dc8d67 100644 --- a/internal/api/model/field.go +++ b/internal/api/model/field.go @@ -29,5 +29,5 @@ type Field struct { Value string `json:"value"` // If this field has been verified, when did this occur? (ISO 8601 Datetime). // example: 2021-07-30T09:20:25+00:00 - VerifiedAt string `json:"verified_at,omitempty"` + VerifiedAt *string `json:"verified_at"` } diff --git a/internal/db/bundb/migrations/20230430105735_fieldwork.go b/internal/db/bundb/migrations/20230430105735_fieldwork.go new file mode 100644 index 00000000..a560ec62 --- /dev/null +++ b/internal/db/bundb/migrations/20230430105735_fieldwork.go @@ -0,0 +1,56 @@ +// GoToSocial +// Copyright (C) GoToSocial Authors admin@gotosocial.org +// SPDX-License-Identifier: AGPL-3.0-or-later +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package migrations + +import ( + "context" + "strings" + + "github.com/uptrace/bun" + "github.com/uptrace/bun/dialect" +) + +func init() { + up := func(ctx context.Context, db *bun.DB) error { + var err error + switch db.Dialect().Name() { + case dialect.SQLite: + _, err = db.ExecContext(ctx, "ALTER TABLE ? ADD COLUMN ? VARCHAR", bun.Ident("accounts"), bun.Ident("fields_raw")) + case dialect.PG: + _, err = db.ExecContext(ctx, "ALTER TABLE ? ADD COLUMN ? JSONB", bun.Ident("accounts"), bun.Ident("fields_raw")) + default: + panic("db conn was neither pg not sqlite") + } + + if err != nil && !(strings.Contains(err.Error(), "already exists") || strings.Contains(err.Error(), "duplicate column name") || strings.Contains(err.Error(), "SQLSTATE 42701")) { + return err + } + + return nil + } + + down := func(ctx context.Context, db *bun.DB) error { + return db.RunInTx(ctx, nil, func(ctx context.Context, tx bun.Tx) error { + return nil + }) + } + + if err := Migrations.Register(up, down); err != nil { + panic(err) + } +} diff --git a/internal/federation/dereferencing/account.go b/internal/federation/dereferencing/account.go index 4795db73..b33f1d6f 100644 --- a/internal/federation/dereferencing/account.go +++ b/internal/federation/dereferencing/account.go @@ -38,7 +38,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/transport" ) -func (d *deref) GetAccountByURI(ctx context.Context, requestUser string, uri *url.URL, block bool) (*gtsmodel.Account, error) { +func (d *deref) GetAccountByURI(ctx context.Context, requestUser string, uri *url.URL) (*gtsmodel.Account, error) { var ( account *gtsmodel.Account uriStr = uri.String() @@ -70,11 +70,11 @@ func (d *deref) GetAccountByURI(ctx context.Context, requestUser string, uri *ur ID: id.NewULID(), Domain: uri.Host, URI: uriStr, - }, false, true) + }, d.defaultFetchLatest, false) } // Try to update existing account model - enriched, err := d.enrichAccount(ctx, requestUser, uri, account, false, block) + enriched, err := d.enrichAccount(ctx, requestUser, uri, account, d.defaultFetchLatest, false) if err != nil { log.Errorf(ctx, "error enriching remote account: %v", err) return account, nil // fall back to returning existing @@ -83,7 +83,7 @@ func (d *deref) GetAccountByURI(ctx context.Context, requestUser string, uri *ur return enriched, nil } -func (d *deref) GetAccountByUsernameDomain(ctx context.Context, requestUser string, username string, domain string, block bool) (*gtsmodel.Account, error) { +func (d *deref) GetAccountByUsernameDomain(ctx context.Context, requestUser string, username string, domain string) (*gtsmodel.Account, error) { if domain == config.GetHost() || domain == config.GetAccountDomain() { // We do local lookups using an empty domain, // else it will fail the db search below. @@ -99,19 +99,24 @@ func (d *deref) GetAccountByUsernameDomain(ctx context.Context, requestUser stri if account == nil { // Check for failed local lookup. if domain == "" { - return nil, NewErrNotRetrievable(err) // will be db.ErrNoEntries + return nil, NewErrNotRetrievable(err) // wrapped err will be db.ErrNoEntries } // Create and pass-through a new bare-bones model for dereferencing. - return d.enrichAccount(ctx, requestUser, nil, >smodel.Account{ + account = >smodel.Account{ ID: id.NewULID(), Username: username, Domain: domain, - }, false, true) + } + + // There's no known account to fall back on, + // so return error if we can't enrich account. + return d.enrichAccount(ctx, requestUser, nil, account, d.defaultFetchLatest, false) } - // Try to update existing account model - enriched, err := d.enrichAccount(ctx, requestUser, nil, account, false, block) + // We knew about this account already; + // try to update existing account model. + enriched, err := d.enrichAccount(ctx, requestUser, nil, account, d.defaultFetchLatest, false) if err != nil { log.Errorf(ctx, "error enriching account from remote: %v", err) return account, nil // fall back to returning unchanged existing account model @@ -120,12 +125,62 @@ func (d *deref) GetAccountByUsernameDomain(ctx context.Context, requestUser stri return enriched, nil } -func (d *deref) UpdateAccount(ctx context.Context, requestUser string, account *gtsmodel.Account, force bool) (*gtsmodel.Account, error) { - return d.enrichAccount(ctx, requestUser, nil, account, force, false) +func (d *deref) RefreshAccount(ctx context.Context, requestUser string, accountable ap.Accountable, account *gtsmodel.Account) (*gtsmodel.Account, error) { + // To avoid unnecessarily refetching multiple times from remote, + // we can just pass in the Accountable object that we received, + // if it was defined. If not, fall back to default fetch func. + var f fetchLatest + if accountable != nil { + f = func( + _ context.Context, + _ transport.Transport, + _ *url.URL, + _ string, + ) (ap.Accountable, *gtsmodel.Account, error) { + return accountable, account, nil + } + } else { + f = d.defaultFetchLatest + } + + // Set 'force' to 'true' to always fetch latest media etc. + return d.enrichAccount(ctx, requestUser, nil, account, f, true) +} + +// fetchLatest defines a function for using a transport and uri to fetch the fetchLatest +// version of an account (and its AP representation) from a remote instance. +type fetchLatest func(ctx context.Context, transport transport.Transport, uri *url.URL, accountDomain string) (ap.Accountable, *gtsmodel.Account, error) + +// defaultFetchLatest deduplicates latest fetching code that is used in several +// different functions. It simply calls the remote uri using the given transport, +// parses a returned AP representation into an account, and then returns both. +func (d *deref) defaultFetchLatest(ctx context.Context, transport transport.Transport, uri *url.URL, accountDomain string) (ap.Accountable, *gtsmodel.Account, error) { + // Dereference this account to get the latest available. + apubAcc, err := d.dereferenceAccountable(ctx, transport, uri) + if err != nil { + return nil, nil, fmt.Errorf("error dereferencing account %s: %w", uri, err) + } + + // Convert the dereferenced AP account object to our GTS model. + latestAcc, err := d.typeConverter.ASRepresentationToAccount( + ctx, apubAcc, accountDomain, + ) + if err != nil { + return nil, nil, fmt.Errorf("error converting accountable to gts model for account %s: %w", uri, err) + } + + return apubAcc, latestAcc, nil } // enrichAccount will ensure the given account is the most up-to-date model of the account, re-webfingering and re-dereferencing if necessary. -func (d *deref) enrichAccount(ctx context.Context, requestUser string, uri *url.URL, account *gtsmodel.Account, force, block bool) (*gtsmodel.Account, error) { +func (d *deref) enrichAccount( + ctx context.Context, + requestUser string, + uri *url.URL, + account *gtsmodel.Account, + f fetchLatest, + force bool, +) (*gtsmodel.Account, error) { if account.IsLocal() { // Can't update local accounts. return account, nil @@ -205,18 +260,10 @@ func (d *deref) enrichAccount(ctx context.Context, requestUser string, uri *url. d.startHandshake(requestUser, uri) defer d.stopHandshake(requestUser, uri) - // Dereference this account to get the latest available. - apubAcc, err := d.dereferenceAccountable(ctx, transport, uri) + // Fetch latest version of the account, dereferencing if necessary. + apubAcc, latestAcc, err := f(ctx, transport, uri, account.Domain) if err != nil { - return nil, fmt.Errorf("enrichAccount: error dereferencing account %s: %w", uri, err) - } - - // Convert the dereferenced AP account object to our GTS model. - latestAcc, err := d.typeConverter.ASRepresentationToAccount( - ctx, apubAcc, account.Domain, - ) - if err != nil { - return nil, fmt.Errorf("enrichAccount: error converting accountable to gts model for account %s: %w", uri, err) + return nil, fmt.Errorf("enrichAccount: error calling fetchLatest function: %w", err) } if account.Username == "" { @@ -256,11 +303,11 @@ func (d *deref) enrichAccount(ctx context.Context, requestUser string, uri *url. latestAcc.ID = account.ID latestAcc.FetchedAt = time.Now() - // Use the existing account media attachments by default. + // Reuse the existing account media attachments by default. latestAcc.AvatarMediaAttachmentID = account.AvatarMediaAttachmentID latestAcc.HeaderMediaAttachmentID = account.HeaderMediaAttachmentID - if latestAcc.AvatarRemoteURL != account.AvatarRemoteURL { + if force || (latestAcc.AvatarRemoteURL != account.AvatarRemoteURL) { // Reset the avatar media ID (handles removed). latestAcc.AvatarMediaAttachmentID = "" @@ -281,7 +328,7 @@ func (d *deref) enrichAccount(ctx context.Context, requestUser string, uri *url. } } - if latestAcc.HeaderRemoteURL != account.HeaderRemoteURL { + if force || (latestAcc.HeaderRemoteURL != account.HeaderRemoteURL) { // Reset the header media ID (handles removed). latestAcc.HeaderMediaAttachmentID = "" diff --git a/internal/federation/dereferencing/account_test.go b/internal/federation/dereferencing/account_test.go index ce399f30..c4b946f5 100644 --- a/internal/federation/dereferencing/account_test.go +++ b/internal/federation/dereferencing/account_test.go @@ -41,7 +41,6 @@ func (suite *AccountTestSuite) TestDereferenceGroup() { context.Background(), fetchingAccount.Username, groupURL, - false, ) suite.NoError(err) suite.NotNil(group) @@ -66,7 +65,6 @@ func (suite *AccountTestSuite) TestDereferenceService() { context.Background(), fetchingAccount.Username, serviceURL, - false, ) suite.NoError(err) suite.NotNil(service) @@ -99,7 +97,6 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountAsRemoteURL() { context.Background(), fetchingAccount.Username, testrig.URLMustParse(targetAccount.URI), - false, ) suite.NoError(err) suite.NotNil(fetchedAccount) @@ -119,7 +116,6 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountAsRemoteURLNoSharedInb context.Background(), fetchingAccount.Username, testrig.URLMustParse(targetAccount.URI), - false, ) suite.NoError(err) suite.NotNil(fetchedAccount) @@ -134,7 +130,6 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountAsUsername() { context.Background(), fetchingAccount.Username, testrig.URLMustParse(targetAccount.URI), - false, ) suite.NoError(err) suite.NotNil(fetchedAccount) @@ -149,7 +144,6 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountAsUsernameDomain() { context.Background(), fetchingAccount.Username, testrig.URLMustParse(targetAccount.URI), - false, ) suite.NoError(err) suite.NotNil(fetchedAccount) @@ -165,7 +159,6 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountAsUsernameDomainAndURL fetchingAccount.Username, targetAccount.Username, config.GetHost(), - false, ) suite.NoError(err) suite.NotNil(fetchedAccount) @@ -180,7 +173,6 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountWithUnknownUsername() fetchingAccount.Username, "thisaccountdoesnotexist", config.GetHost(), - false, ) var errNotRetrievable *dereferencing.ErrNotRetrievable suite.ErrorAs(err, &errNotRetrievable) @@ -196,7 +188,6 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountWithUnknownUsernameDom fetchingAccount.Username, "thisaccountdoesnotexist", "localhost:8080", - false, ) var errNotRetrievable *dereferencing.ErrNotRetrievable suite.ErrorAs(err, &errNotRetrievable) @@ -211,7 +202,6 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountWithUnknownUserURI() { context.Background(), fetchingAccount.Username, testrig.URLMustParse("http://localhost:8080/users/thisaccountdoesnotexist"), - false, ) var errNotRetrievable *dereferencing.ErrNotRetrievable suite.ErrorAs(err, &errNotRetrievable) diff --git a/internal/federation/dereferencing/dereferencer.go b/internal/federation/dereferencing/dereferencer.go index 7c00ceec..181196ca 100644 --- a/internal/federation/dereferencing/dereferencer.go +++ b/internal/federation/dereferencing/dereferencer.go @@ -35,14 +35,15 @@ import ( type Dereferencer interface { // GetAccountByURI will attempt to fetch an account by its URI, first checking the database and in the case of a remote account will either check the // last_fetched (and updating if beyond fetch interval) or dereferencing for the first-time if this remote account has never been encountered before. - GetAccountByURI(ctx context.Context, requestUser string, uri *url.URL, block bool) (*gtsmodel.Account, error) + GetAccountByURI(ctx context.Context, requestUser string, uri *url.URL) (*gtsmodel.Account, error) // GetAccountByUsernameDomain will attempt to fetch an account by username@domain, first checking the database and in the case of a remote account will either // check the last_fetched (and updating if beyond fetch interval) or dereferencing for the first-time if this remote account has never been encountered before. - GetAccountByUsernameDomain(ctx context.Context, requestUser string, username string, domain string, block bool) (*gtsmodel.Account, error) + GetAccountByUsernameDomain(ctx context.Context, requestUser string, username string, domain string) (*gtsmodel.Account, error) - // UpdateAccount updates the given account if last_fetched is beyond fetch interval (or if force is set). An updated account model is returned, any media fetching is done async. - UpdateAccount(ctx context.Context, requestUser string, account *gtsmodel.Account, force bool) (*gtsmodel.Account, error) + // RefreshAccount forces a refresh of the given account by fetching the current/latest state of the account from the remote instance. + // An updated account model is returned, but not yet inserted/updated in the database; this is the caller's responsibility. + RefreshAccount(ctx context.Context, requestUser string, accountable ap.Accountable, account *gtsmodel.Account) (*gtsmodel.Account, error) GetStatus(ctx context.Context, username string, remoteStatusID *url.URL, refetch, includeParent bool) (*gtsmodel.Status, ap.Statusable, error) diff --git a/internal/federation/dereferencing/status.go b/internal/federation/dereferencing/status.go index fe07be23..8e130393 100644 --- a/internal/federation/dereferencing/status.go +++ b/internal/federation/dereferencing/status.go @@ -125,7 +125,7 @@ func (d *deref) GetStatus(ctx context.Context, username string, statusURI *url.U } // we need to get the author of the status else we can't serialize it properly - if _, err = d.GetAccountByURI(ctx, username, accountURI, true); err != nil { + if _, err = d.GetAccountByURI(ctx, username, accountURI); err != nil { return nil, nil, newErrOther(fmt.Errorf("GetRemoteStatus: couldn't get status author: %s", err)) } @@ -278,7 +278,7 @@ func (d *deref) populateStatusMentions(ctx context.Context, status *gtsmodel.Sta if targetAccount == nil { // we didn't find the account in our database already // check if we can get the account remotely (dereference it) - if a, err := d.GetAccountByURI(ctx, requestingUsername, targetAccountURI, false); err != nil { + if a, err := d.GetAccountByURI(ctx, requestingUsername, targetAccountURI); err != nil { errs = append(errs, err.Error()) } else { log.Debugf(ctx, "got target account %s with id %s through GetRemoteAccount", targetAccountURI, a.ID) diff --git a/internal/federation/federatingactor.go b/internal/federation/federatingactor.go index 18cdf210..33ae3822 100644 --- a/internal/federation/federatingactor.go +++ b/internal/federation/federatingactor.go @@ -59,11 +59,11 @@ type federatingActor struct { // implements the pub.FederatingActor interface. func newFederatingActor(c pub.CommonBehavior, s2s pub.FederatingProtocol, db pub.Database, clock pub.Clock) pub.FederatingActor { sideEffectActor := pub.NewSideEffectActor(c, s2s, nil, db, clock) - customActor := pub.NewCustomActor(sideEffectActor, false, true, clock) + sideEffectActor.Serialize = ap.Serialize // hook in our own custom Serialize function return &federatingActor{ sideEffectActor: sideEffectActor, - wrapped: customActor, + wrapped: pub.NewCustomActor(sideEffectActor, false, true, clock), } } @@ -165,7 +165,8 @@ func (f *federatingActor) PostInboxScheme(ctx context.Context, w http.ResponseWr // If activity Object is a Statusable, we'll want to replace the // parsed `content` value with the value from the raw JSON instead. // See https://github.com/superseriousbusiness/gotosocial/issues/1661 - ap.NormalizeActivityObject(activity, rawActivity) + // Likewise, if it's an Accountable, we'll normalize some fields on it. + ap.NormalizeIncomingActivityObject(activity, rawActivity) // Allow server implementations to set context data with a hook. ctx, err = f.sideEffectActor.PostInboxRequestBodyHook(ctx, r, activity) diff --git a/internal/federation/federatingdb/followers_test.go b/internal/federation/federatingdb/followers_test.go index fb660d14..f6297ec8 100644 --- a/internal/federation/federatingdb/followers_test.go +++ b/internal/federation/federatingdb/followers_test.go @@ -23,7 +23,7 @@ import ( "testing" "github.com/stretchr/testify/suite" - "github.com/superseriousbusiness/activity/streams" + "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/testrig" ) @@ -37,7 +37,7 @@ func (suite *FollowersTestSuite) TestGetFollowers() { f, err := suite.federatingDB.Followers(context.Background(), testrig.URLMustParse(testAccount.URI)) suite.NoError(err) - fi, err := streams.Serialize(f) + fi, err := ap.Serialize(f) suite.NoError(err) fJson, err := json.MarshalIndent(fi, "", " ") diff --git a/internal/federation/federatingdb/following_test.go b/internal/federation/federatingdb/following_test.go index ae616b39..83d1a72b 100644 --- a/internal/federation/federatingdb/following_test.go +++ b/internal/federation/federatingdb/following_test.go @@ -23,7 +23,7 @@ import ( "testing" "github.com/stretchr/testify/suite" - "github.com/superseriousbusiness/activity/streams" + "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/testrig" ) @@ -37,7 +37,7 @@ func (suite *FollowingTestSuite) TestGetFollowing() { f, err := suite.federatingDB.Following(context.Background(), testrig.URLMustParse(testAccount.URI)) suite.NoError(err) - fi, err := streams.Serialize(f) + fi, err := ap.Serialize(f) suite.NoError(err) fJson, err := json.MarshalIndent(fi, "", " ") diff --git a/internal/federation/federatingdb/update.go b/internal/federation/federatingdb/update.go index 5121418e..5c8785c0 100644 --- a/internal/federation/federatingdb/update.go +++ b/internal/federation/federatingdb/update.go @@ -54,96 +54,69 @@ func (f *federatingDB) Update(ctx context.Context, asType vocab.Type) error { receivingAccount, _ := extractFromCtx(ctx) if receivingAccount == nil { - // If the receiving account wasn't set on the context, that means this request didn't pass - // through the API, but came from inside GtS as the result of another activity on this instance. That being so, - // we can safely just ignore this activity, since we know we've already processed it elsewhere. + // If the receiving account wasn't set on the context, that means + // this request didn't pass through the API, but came from inside + // GtS as the result of another activity on this instance. As such, + // we must have already processed it in order to reach this stage. return nil } requestingAcctI := ctx.Value(ap.ContextRequestingAccount) if requestingAcctI == nil { - l.Error("UPDATE: requesting account wasn't set on context") + return errors.New("Update: requesting account wasn't set on context") } + requestingAcct, ok := requestingAcctI.(*gtsmodel.Account) if !ok { - l.Error("UPDATE: requesting account was set on context but couldn't be parsed") + return errors.New("Update: requesting account was set on context but couldn't be parsed") } - typeName := asType.GetTypeName() - if typeName == ap.ActorApplication || - typeName == ap.ActorGroup || - typeName == ap.ActorOrganization || - typeName == ap.ActorPerson || - typeName == ap.ActorService { - // it's an UPDATE to some kind of account - var accountable ap.Accountable - switch typeName { - case ap.ActorApplication: - l.Debug("got update for APPLICATION") - i, ok := asType.(vocab.ActivityStreamsApplication) - if !ok { - return errors.New("UPDATE: could not convert type to application") - } - accountable = i - case ap.ActorGroup: - l.Debug("got update for GROUP") - i, ok := asType.(vocab.ActivityStreamsGroup) - if !ok { - return errors.New("UPDATE: could not convert type to group") - } - accountable = i - case ap.ActorOrganization: - l.Debug("got update for ORGANIZATION") - i, ok := asType.(vocab.ActivityStreamsOrganization) - if !ok { - return errors.New("UPDATE: could not convert type to organization") - } - accountable = i - case ap.ActorPerson: - l.Debug("got update for PERSON") - i, ok := asType.(vocab.ActivityStreamsPerson) - if !ok { - return errors.New("UPDATE: could not convert type to person") - } - accountable = i - case ap.ActorService: - l.Debug("got update for SERVICE") - i, ok := asType.(vocab.ActivityStreamsService) - if !ok { - return errors.New("UPDATE: could not convert type to service") - } - accountable = i - } - - updatedAcct, err := f.typeConverter.ASRepresentationToAccount(ctx, accountable, "") - if err != nil { - return fmt.Errorf("UPDATE: error converting to account: %s", err) - } - - if updatedAcct.Domain == config.GetHost() || updatedAcct.Domain == config.GetAccountDomain() { - // no need to update local accounts - // in fact, if we do this will break the shit out of things so do NOT - return nil - } - - if requestingAcct.URI != updatedAcct.URI { - return fmt.Errorf("UPDATE: update for account %s was requested by account %s, this is not valid", updatedAcct.URI, requestingAcct.URI) - } - - // set some fields here on the updatedAccount representation so we don't run into db issues - updatedAcct.CreatedAt = requestingAcct.CreatedAt - updatedAcct.ID = requestingAcct.ID - updatedAcct.Language = requestingAcct.Language - - // pass to the processor for further updating of eg., avatar/header, emojis - // the actual db insert/update will take place a bit later - f.state.Workers.EnqueueFederator(ctx, messages.FromFederator{ - APObjectType: ap.ObjectProfile, - APActivityType: ap.ActivityUpdate, - GTSModel: updatedAcct, - ReceivingAccount: receivingAccount, - }) + switch asType.GetTypeName() { + case ap.ActorApplication, ap.ActorGroup, ap.ActorOrganization, ap.ActorPerson, ap.ActorService: + return f.updateAccountable(ctx, receivingAccount, requestingAcct, asType) } return nil } + +func (f *federatingDB) updateAccountable(ctx context.Context, receivingAcct *gtsmodel.Account, requestingAcct *gtsmodel.Account, asType vocab.Type) error { + accountable, ok := asType.(ap.Accountable) + if !ok { + return errors.New("updateAccountable: could not convert vocab.Type to Accountable") + } + + updatedAcct, err := f.typeConverter.ASRepresentationToAccount(ctx, accountable, "") + if err != nil { + return fmt.Errorf("updateAccountable: error converting to account: %w", err) + } + + if updatedAcct.Domain == config.GetHost() || updatedAcct.Domain == config.GetAccountDomain() { + // No need to update local accounts; in fact, if we try + // this it will break the shit out of things so do NOT. + return nil + } + + if requestingAcct.URI != updatedAcct.URI { + return fmt.Errorf("updateAccountable: update for account %s was requested by account %s, this is not valid", updatedAcct.URI, requestingAcct.URI) + } + + // Set some basic fields on the updated account + // based on what we already know about the requester. + updatedAcct.CreatedAt = requestingAcct.CreatedAt + updatedAcct.ID = requestingAcct.ID + updatedAcct.Language = requestingAcct.Language + updatedAcct.AvatarMediaAttachmentID = requestingAcct.AvatarMediaAttachmentID + updatedAcct.HeaderMediaAttachmentID = requestingAcct.HeaderMediaAttachmentID + + // Pass to the processor for further updating of eg., avatar/header, + // emojis, etc. The actual db insert/update will take place there. + f.state.Workers.EnqueueFederator(ctx, messages.FromFederator{ + APObjectType: ap.ObjectProfile, + APActivityType: ap.ActivityUpdate, + GTSModel: updatedAcct, + APObjectModel: accountable, + ReceivingAccount: receivingAcct, + }) + + return nil +} diff --git a/internal/federation/federatingdb/util.go b/internal/federation/federatingdb/util.go index 5137145f..8e9f67c5 100644 --- a/internal/federation/federatingdb/util.go +++ b/internal/federation/federatingdb/util.go @@ -325,7 +325,7 @@ func extractFromCtx(ctx context.Context) (receivingAccount, requestingAccount *g } func marshalItem(item vocab.Type) (string, error) { - m, err := streams.Serialize(item) + m, err := ap.Serialize(item) if err != nil { return "", err } diff --git a/internal/federation/federatingprotocol.go b/internal/federation/federatingprotocol.go index 7995faa8..e81a409f 100644 --- a/internal/federation/federatingprotocol.go +++ b/internal/federation/federatingprotocol.go @@ -211,7 +211,7 @@ func (f *federator) AuthenticatePostInbox(ctx context.Context, w http.ResponseWr // dereference the remote account (or just get it // from the db if we already have it). requestingAccount, err := f.GetAccountByURI( - gtscontext.SetFastFail(ctx), username, publicKeyOwnerURI, false, + gtscontext.SetFastFail(ctx), username, publicKeyOwnerURI, ) if err != nil { if gtserror.StatusCode(err) == http.StatusGone { diff --git a/internal/gtsmodel/account.go b/internal/gtsmodel/account.go index 2cf7dc9f..bae50a74 100644 --- a/internal/gtsmodel/account.go +++ b/internal/gtsmodel/account.go @@ -47,7 +47,8 @@ type Account struct { DisplayName string `validate:"-" bun:""` // DisplayName for this account. Can be empty, then just the Username will be used for display purposes. EmojiIDs []string `validate:"dive,ulid" bun:"emojis,array"` // Database IDs of any emojis used in this account's bio, display name, etc Emojis []*Emoji `validate:"-" bun:"attached_emojis,m2m:account_to_emojis"` // Emojis corresponding to emojiIDs. https://bun.uptrace.dev/guide/relations.html#many-to-many-relation - Fields []Field `validate:"-"` // a key/value map of fields that this account has added to their profile + Fields []*Field `validate:"-"` // A slice of of fields that this account has added to their profile. + FieldsRaw []*Field `validate:"-"` // The raw (unparsed) content of fields that this account has added to their profile, without conversion to HTML, only available when requester = target Note string `validate:"-" bun:""` // A note that this account has on their profile (ie., the account's bio/description of themselves) NoteRaw string `validate:"-" bun:""` // The raw contents of .Note without conversion to HTML, only available when requester = target Memorial *bool `validate:"-" bun:",default:false"` // Is this a memorial account, ie., has the user passed away? diff --git a/internal/messages/messages.go b/internal/messages/messages.go index 4b80088c..7f9b3f37 100644 --- a/internal/messages/messages.go +++ b/internal/messages/messages.go @@ -34,9 +34,10 @@ type FromClientAPI struct { // FromFederator wraps a message that travels from the federator into the processor. type FromFederator struct { - APObjectType string // what is the object type of this message? eg., Note, Profile etc. - APActivityType string // what is the activity type of this message? eg., Create, Follow etc. - APIri *url.URL // what is the IRI ID of this activity? - GTSModel interface{} // representation of this object if it's already been converted into our internal gts model - ReceivingAccount *gtsmodel.Account // which account owns the inbox that this activity was posted to? + APObjectType string + APActivityType string + APIri *url.URL + APObjectModel interface{} // Optional AP model of the Object of the Activity. Should be Accountable or Statusable. + GTSModel interface{} // Optional GTS model of the Activity or Object. + ReceivingAccount *gtsmodel.Account // Local account which owns the inbox that this Activity was posted to. } diff --git a/internal/processing/account/get.go b/internal/processing/account/get.go index d0ea96ca..c7d271b0 100644 --- a/internal/processing/account/get.go +++ b/internal/processing/account/get.go @@ -96,7 +96,7 @@ func (p *Processor) getFor(ctx context.Context, requestingAccount *gtsmodel.Acco } a, err := p.federator.GetAccountByURI( - gtscontext.SetFastFail(ctx), requestingAccount.Username, targetAccountURI, true, + gtscontext.SetFastFail(ctx), requestingAccount.Username, targetAccountURI, ) if err == nil { targetAccount = a diff --git a/internal/processing/account/update.go b/internal/processing/account/update.go index e88aba63..0baeebb6 100644 --- a/internal/processing/account/update.go +++ b/internal/processing/account/update.go @@ -36,6 +36,14 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/validate" ) +func (p *Processor) selectNoteFormatter(contentType string) text.FormatFunc { + if contentType == "text/markdown" { + return p.formatter.FromMarkdown + } + + return p.formatter.FromPlain +} + // Update processes the update of an account with the given form. func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, form *apimodel.UpdateCredentialsRequest) (*apimodel.Account, gtserror.WithCode) { if form.Discoverable != nil { @@ -46,56 +54,144 @@ func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, form account.Bot = form.Bot } - reparseEmojis := false + // Via the process of updating the account, + // it is possible that the emojis used by + // that account in note/display name/fields + // may change; we need to keep track of this. + var emojisChanged bool if form.DisplayName != nil { - if err := validate.DisplayName(*form.DisplayName); err != nil { - return nil, gtserror.NewErrorBadRequest(err) + displayName := *form.DisplayName + if err := validate.DisplayName(displayName); err != nil { + return nil, gtserror.NewErrorBadRequest(err, err.Error()) } - account.DisplayName = text.SanitizePlaintext(*form.DisplayName) - reparseEmojis = true + + // Parse new display name (always from plaintext). + account.DisplayName = text.SanitizePlaintext(displayName) + + // If display name has changed, account emojis may have also changed. + emojisChanged = true } if form.Note != nil { - if err := validate.Note(*form.Note); err != nil { - return nil, gtserror.NewErrorBadRequest(err) + note := *form.Note + if err := validate.Note(note); err != nil { + return nil, gtserror.NewErrorBadRequest(err, err.Error()) } - // Set the raw note before processing - account.NoteRaw = *form.Note - reparseEmojis = true + // Store raw version of the note for now, + // we'll process the proper version later. + account.NoteRaw = note + + // If note has changed, account emojis may have also changed. + emojisChanged = true } - if reparseEmojis { - // If either DisplayName or Note changed, reparse both, because we - // can't otherwise tell which one each emoji belongs to. - // Deduplicate emojis between the two fields. + if form.FieldsAttributes != nil { + var ( + fieldsAttributes = *form.FieldsAttributes + fieldsLen = len(fieldsAttributes) + fieldsRaw = make([]*gtsmodel.Field, 0, fieldsLen) + ) + + for _, updateField := range fieldsAttributes { + if updateField.Name == nil || updateField.Value == nil { + continue + } + + var ( + name string = *updateField.Name + value string = *updateField.Value + ) + + if name == "" || value == "" { + continue + } + + // Sanitize raw field values. + fieldRaw := >smodel.Field{ + Name: text.SanitizePlaintext(name), + Value: text.SanitizePlaintext(value), + } + fieldsRaw = append(fieldsRaw, fieldRaw) + } + + // Check length of parsed raw fields. + if err := validate.ProfileFields(fieldsRaw); err != nil { + return nil, gtserror.NewErrorBadRequest(err, err.Error()) + } + + // OK, new raw fields are valid. + account.FieldsRaw = fieldsRaw + account.Fields = make([]*gtsmodel.Field, 0, fieldsLen) // process these in a sec + + // If fields have changed, account emojis may also have changed. + emojisChanged = true + } + + if emojisChanged { + // Use map to deduplicate emojis by their ID. emojis := make(map[string]*gtsmodel.Emoji) - formatResult := p.formatter.FromPlainEmojiOnly(ctx, p.parseMention, account.ID, "", account.DisplayName) - for _, emoji := range formatResult.Emojis { + + // Retrieve display name emojis. + for _, emoji := range p.formatter.FromPlainEmojiOnly( + ctx, + p.parseMention, + account.ID, + "", + account.DisplayName, + ).Emojis { emojis[emoji.ID] = emoji } - // Process note to generate a valid HTML representation - var f text.FormatFunc - if account.StatusContentType == "text/markdown" { - f = p.formatter.FromMarkdown - } else { - f = p.formatter.FromPlain - } - formatted := f(ctx, p.parseMention, account.ID, "", account.NoteRaw) + // Format + set note according to user prefs. + f := p.selectNoteFormatter(account.StatusContentType) + formatNoteResult := f(ctx, p.parseMention, account.ID, "", account.NoteRaw) + account.Note = formatNoteResult.HTML - // Set updated HTML-ified note - account.Note = formatted.HTML - for _, emoji := range formatted.Emojis { + // Retrieve note emojis. + for _, emoji := range formatNoteResult.Emojis { emojis[emoji.ID] = emoji } - account.Emojis = []*gtsmodel.Emoji{} - account.EmojiIDs = []string{} - for eid, emoji := range emojis { + // Process the raw fields we stored earlier. + for _, fieldRaw := range account.FieldsRaw { + field := >smodel.Field{} + + // Name stays plain, but we still need to + // see if there are any emojis set in it. + field.Name = fieldRaw.Name + for _, emoji := range p.formatter.FromPlainEmojiOnly( + ctx, + p.parseMention, + account.ID, + "", + fieldRaw.Name, + ).Emojis { + emojis[emoji.ID] = emoji + } + + // Value can be HTML, but we don't want + // to wrap the result in

tags. + fieldFormatValueResult := p.formatter.FromPlainNoParagraph(ctx, p.parseMention, account.ID, "", fieldRaw.Value) + field.Value = fieldFormatValueResult.HTML + + // Retrieve field emojis. + for _, emoji := range fieldFormatValueResult.Emojis { + emojis[emoji.ID] = emoji + } + + // We're done, append the shiny new field. + account.Fields = append(account.Fields, field) + } + + emojisCount := len(emojis) + account.Emojis = make([]*gtsmodel.Emoji, 0, emojisCount) + account.EmojiIDs = make([]string, 0, emojisCount) + + for id, emoji := range emojis { account.Emojis = append(account.Emojis, emoji) - account.EmojiIDs = append(account.EmojiIDs, eid) + account.EmojiIDs = append(account.EmojiIDs, id) } } @@ -164,26 +260,6 @@ func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, form account.EnableRSS = form.EnableRSS } - if form.FieldsAttributes != nil && len(*form.FieldsAttributes) != 0 { - if err := validate.ProfileFieldsCount(*form.FieldsAttributes); err != nil { - return nil, gtserror.NewErrorBadRequest(err) - } - - account.Fields = make([]gtsmodel.Field, 0) // reset fields - for _, f := range *form.FieldsAttributes { - if f.Name != nil && f.Value != nil { - if *f.Name != "" && *f.Value != "" { - field := gtsmodel.Field{} - - field.Name = validate.ProfileField(f.Name) - field.Value = validate.ProfileField(f.Value) - - account.Fields = append(account.Fields, field) - } - } - } - } - err := p.state.DB.UpdateAccount(ctx, account) if err != nil { return nil, gtserror.NewErrorInternalError(fmt.Errorf("could not update account %s: %s", account.ID, err)) diff --git a/internal/processing/account/update_test.go b/internal/processing/account/update_test.go index b8c24565..03a3d870 100644 --- a/internal/processing/account/update_test.go +++ b/internal/processing/account/update_test.go @@ -148,6 +148,86 @@ func (suite *AccountUpdateTestSuite) TestAccountUpdateWithMarkdownNote() { suite.Equal(expectedNote, dbAccount.Note) } +func (suite *AccountUpdateTestSuite) TestAccountUpdateWithFields() { + testAccount := suite.testAccounts["local_account_1"] + + updateFields := []apimodel.UpdateField{ + { + Name: func() *string { s := "favourite emoji"; return &s }(), + Value: func() *string { s := ":rainbow:"; return &s }(), + }, + { + Name: func() *string { s := "my website"; return &s }(), + Value: func() *string { s := "https://example.org"; return &s }(), + }, + } + + form := &apimodel.UpdateCredentialsRequest{ + FieldsAttributes: &updateFields, + } + + // should get no error from the update function, and an api model account returned + apiAccount, errWithCode := suite.accountProcessor.Update(context.Background(), testAccount, form) + + // reset test account to avoid breaking other tests + testAccount.StatusContentType = "text/plain" + suite.NoError(errWithCode) + suite.NotNil(apiAccount) + suite.EqualValues([]apimodel.Field{ + { + Name: "favourite emoji", + Value: ":rainbow:", + VerifiedAt: (*string)(nil), + }, + { + Name: "my website", + Value: "https://example.org", + VerifiedAt: (*string)(nil), + }, + }, apiAccount.Fields) + suite.EqualValues([]apimodel.Field{ + { + Name: "favourite emoji", + Value: ":rainbow:", + VerifiedAt: (*string)(nil), + }, + { + Name: "my website", + Value: "https://example.org", + VerifiedAt: (*string)(nil), + }, + }, apiAccount.Source.Fields) + suite.EqualValues([]apimodel.Emoji{ + { + Shortcode: "rainbow", + URL: "http://localhost:8080/fileserver/01AY6P665V14JJR0AFVRT7311Y/emoji/original/01F8MH9H8E4VG3KDYJR9EGPXCQ.png", + StaticURL: "http://localhost:8080/fileserver/01AY6P665V14JJR0AFVRT7311Y/emoji/static/01F8MH9H8E4VG3KDYJR9EGPXCQ.png", + VisibleInPicker: true, + Category: "reactions", + }, + }, apiAccount.Emojis) + + // we should have an update in the client api channel + msg := <-suite.fromClientAPIChan + suite.Equal(ap.ActivityUpdate, msg.APActivityType) + suite.Equal(ap.ObjectProfile, msg.APObjectType) + suite.NotNil(msg.OriginAccount) + suite.Equal(testAccount.ID, msg.OriginAccount.ID) + suite.Nil(msg.TargetAccount) + + // fields should be updated in the database as well + dbAccount, err := suite.db.GetAccountByID(context.Background(), testAccount.ID) + suite.NoError(err) + suite.Equal("favourite emoji", dbAccount.Fields[0].Name) + suite.Equal(":rainbow:", dbAccount.Fields[0].Value) + suite.Equal("my website", dbAccount.Fields[1].Name) + suite.Equal("https://example.org", dbAccount.Fields[1].Value) + suite.Equal("favourite emoji", dbAccount.FieldsRaw[0].Name) + suite.Equal(":rainbow:", dbAccount.FieldsRaw[0].Value) + suite.Equal("my website", dbAccount.FieldsRaw[1].Name) + suite.Equal("https://example.org", dbAccount.FieldsRaw[1].Value) +} + func TestAccountUpdateTestSuite(t *testing.T) { suite.Run(t, new(AccountUpdateTestSuite)) } diff --git a/internal/processing/fedi/collections.go b/internal/processing/fedi/collections.go index 00367b65..a56b001b 100644 --- a/internal/processing/fedi/collections.go +++ b/internal/processing/fedi/collections.go @@ -24,7 +24,6 @@ import ( "net/http" "net/url" - "github.com/superseriousbusiness/activity/streams" "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtserror" @@ -74,7 +73,7 @@ func (p *Processor) OutboxGet(ctx context.Context, requestedUsername string, pag return nil, gtserror.NewErrorInternalError(err) } - data, err = streams.Serialize(collection) + data, err = ap.Serialize(collection) if err != nil { return nil, gtserror.NewErrorInternalError(err) } @@ -93,7 +92,7 @@ func (p *Processor) OutboxGet(ctx context.Context, requestedUsername string, pag if err != nil { return nil, gtserror.NewErrorInternalError(err) } - data, err = streams.Serialize(outboxPage) + data, err = ap.Serialize(outboxPage) if err != nil { return nil, gtserror.NewErrorInternalError(err) } @@ -119,7 +118,7 @@ func (p *Processor) FollowersGet(ctx context.Context, requestedUsername string) return nil, gtserror.NewErrorInternalError(fmt.Errorf("error fetching followers for uri %s: %s", requestedAccountURI.String(), err)) } - data, err := streams.Serialize(requestedFollowers) + data, err := ap.Serialize(requestedFollowers) if err != nil { return nil, gtserror.NewErrorInternalError(err) } @@ -145,7 +144,7 @@ func (p *Processor) FollowingGet(ctx context.Context, requestedUsername string) return nil, gtserror.NewErrorInternalError(fmt.Errorf("error fetching following for uri %s: %s", requestedAccountURI.String(), err)) } - data, err := streams.Serialize(requestedFollowing) + data, err := ap.Serialize(requestedFollowing) if err != nil { return nil, gtserror.NewErrorInternalError(err) } @@ -173,7 +172,7 @@ func (p *Processor) FeaturedCollectionGet(ctx context.Context, requestedUsername return nil, gtserror.NewErrorInternalError(err) } - data, err := ap.SerializeOrderedCollection(collection) + data, err := ap.Serialize(collection) if err != nil { return nil, gtserror.NewErrorInternalError(err) } diff --git a/internal/processing/fedi/common.go b/internal/processing/fedi/common.go index 3fade397..093a9d76 100644 --- a/internal/processing/fedi/common.go +++ b/internal/processing/fedi/common.go @@ -40,7 +40,7 @@ func (p *Processor) authenticate(ctx context.Context, requestedUsername string) return } - if requestingAccount, err = p.federator.GetAccountByURI(gtscontext.SetFastFail(ctx), requestedUsername, requestingAccountURI, false); err != nil { + if requestingAccount, err = p.federator.GetAccountByURI(gtscontext.SetFastFail(ctx), requestedUsername, requestingAccountURI); err != nil { errWithCode = gtserror.NewErrorUnauthorized(err) return } diff --git a/internal/processing/fedi/emoji.go b/internal/processing/fedi/emoji.go index d1a03566..ea7cb608 100644 --- a/internal/processing/fedi/emoji.go +++ b/internal/processing/fedi/emoji.go @@ -21,7 +21,7 @@ import ( "context" "fmt" - "github.com/superseriousbusiness/activity/streams" + "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/gtserror" ) @@ -49,7 +49,7 @@ func (p *Processor) EmojiGet(ctx context.Context, requestedEmojiID string) (inte return nil, gtserror.NewErrorInternalError(fmt.Errorf("error converting gtsmodel emoji with id %s to ap emoji: %s", requestedEmojiID, err)) } - data, err := streams.Serialize(apEmoji) + data, err := ap.Serialize(apEmoji) if err != nil { return nil, gtserror.NewErrorInternalError(err) } diff --git a/internal/processing/fedi/status.go b/internal/processing/fedi/status.go index 072ff6aa..a9b3e1ee 100644 --- a/internal/processing/fedi/status.go +++ b/internal/processing/fedi/status.go @@ -22,7 +22,7 @@ import ( "fmt" "net/url" - "github.com/superseriousbusiness/activity/streams" + "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/gtserror" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" ) @@ -57,7 +57,7 @@ func (p *Processor) StatusGet(ctx context.Context, requestedUsername string, req return nil, gtserror.NewErrorInternalError(err) } - data, err := streams.Serialize(asStatus) + data, err := ap.Serialize(asStatus) if err != nil { return nil, gtserror.NewErrorInternalError(err) } @@ -105,7 +105,7 @@ func (p *Processor) StatusRepliesGet(ctx context.Context, requestedUsername stri return nil, gtserror.NewErrorInternalError(err) } - data, err = streams.Serialize(collection) + data, err = ap.Serialize(collection) if err != nil { return nil, gtserror.NewErrorInternalError(err) } @@ -117,7 +117,7 @@ func (p *Processor) StatusRepliesGet(ctx context.Context, requestedUsername stri return nil, gtserror.NewErrorInternalError(err) } // but only return the first page - data, err = streams.Serialize(collection.GetActivityStreamsFirst().GetActivityStreamsCollectionPage()) + data, err = ap.Serialize(collection.GetActivityStreamsFirst().GetActivityStreamsCollectionPage()) if err != nil { return nil, gtserror.NewErrorInternalError(err) } @@ -166,7 +166,7 @@ func (p *Processor) StatusRepliesGet(ctx context.Context, requestedUsername stri if err != nil { return nil, gtserror.NewErrorInternalError(err) } - data, err = streams.Serialize(repliesPage) + data, err = ap.Serialize(repliesPage) if err != nil { return nil, gtserror.NewErrorInternalError(err) } diff --git a/internal/processing/fedi/user.go b/internal/processing/fedi/user.go index 28dc3c85..b78f6de9 100644 --- a/internal/processing/fedi/user.go +++ b/internal/processing/fedi/user.go @@ -22,8 +22,8 @@ import ( "fmt" "net/url" - "github.com/superseriousbusiness/activity/streams" "github.com/superseriousbusiness/activity/streams/vocab" + "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/gtscontext" "github.com/superseriousbusiness/gotosocial/internal/gtserror" "github.com/superseriousbusiness/gotosocial/internal/uris" @@ -56,7 +56,7 @@ func (p *Processor) UserGet(ctx context.Context, requestedUsername string, reque // if we're not already handshaking/dereferencing a remote account, dereference it now if !p.federator.Handshaking(requestedUsername, requestingAccountURI) { requestingAccount, err := p.federator.GetAccountByURI( - gtscontext.SetFastFail(ctx), requestedUsername, requestingAccountURI, false, + gtscontext.SetFastFail(ctx), requestedUsername, requestingAccountURI, ) if err != nil { return nil, gtserror.NewErrorUnauthorized(err) @@ -78,7 +78,7 @@ func (p *Processor) UserGet(ctx context.Context, requestedUsername string, reque } } - data, err := streams.Serialize(requestedPerson) + data, err := ap.Serialize(requestedPerson) if err != nil { return nil, gtserror.NewErrorInternalError(err) } diff --git a/internal/processing/fromfederator.go b/internal/processing/fromfederator.go index 929ef824..82e08060 100644 --- a/internal/processing/fromfederator.go +++ b/internal/processing/fromfederator.go @@ -145,7 +145,7 @@ func (p *Processor) processCreateStatusFromFederator(ctx context.Context, federa status.Account = a } - // do a BLOCKING get of the remote account to make sure the avi and header are cached + // Get the remote account to make sure the avi and header are cached. if status.Account.Domain != "" { remoteAccountID, err := url.Parse(status.Account.URI) if err != nil { @@ -155,7 +155,6 @@ func (p *Processor) processCreateStatusFromFederator(ctx context.Context, federa a, err := p.federator.GetAccountByURI(ctx, federatorMsg.ReceivingAccount.Username, remoteAccountID, - true, ) if err != nil { return err @@ -187,7 +186,7 @@ func (p *Processor) processCreateFaveFromFederator(ctx context.Context, federato incomingFave.Account = a } - // do a BLOCKING get of the remote account to make sure the avi and header are cached + // Get the remote account to make sure the avi and header are cached. if incomingFave.Account.Domain != "" { remoteAccountID, err := url.Parse(incomingFave.Account.URI) if err != nil { @@ -197,7 +196,6 @@ func (p *Processor) processCreateFaveFromFederator(ctx context.Context, federato a, err := p.federator.GetAccountByURI(ctx, federatorMsg.ReceivingAccount.Username, remoteAccountID, - true, ) if err != nil { return err @@ -229,7 +227,7 @@ func (p *Processor) processCreateFollowRequestFromFederator(ctx context.Context, followRequest.Account = a } - // do a BLOCKING get of the remote account to make sure the avi and header are cached + // Get the remote account to make sure the avi and header are cached. if followRequest.Account.Domain != "" { remoteAccountID, err := url.Parse(followRequest.Account.URI) if err != nil { @@ -239,7 +237,6 @@ func (p *Processor) processCreateFollowRequestFromFederator(ctx context.Context, a, err := p.federator.GetAccountByURI(ctx, federatorMsg.ReceivingAccount.Username, remoteAccountID, - true, ) if err != nil { return err @@ -290,7 +287,7 @@ func (p *Processor) processCreateAnnounceFromFederator(ctx context.Context, fede incomingAnnounce.Account = a } - // do a BLOCKING get of the remote account to make sure the avi and header are cached + // Get the remote account to make sure the avi and header are cached. if incomingAnnounce.Account.Domain != "" { remoteAccountID, err := url.Parse(incomingAnnounce.Account.URI) if err != nil { @@ -300,7 +297,6 @@ func (p *Processor) processCreateAnnounceFromFederator(ctx context.Context, fede a, err := p.federator.GetAccountByURI(ctx, federatorMsg.ReceivingAccount.Username, remoteAccountID, - true, ) if err != nil { return err @@ -370,16 +366,28 @@ func (p *Processor) processCreateFlagFromFederator(ctx context.Context, federato func (p *Processor) processUpdateAccountFromFederator(ctx context.Context, federatorMsg messages.FromFederator) error { incomingAccount, ok := federatorMsg.GTSModel.(*gtsmodel.Account) if !ok { - return errors.New("profile was not parseable as *gtsmodel.Account") + return errors.New("*gtsmodel.Account was not parseable on update account message") } - // Call UpdateAccount with force to reflect that - // we want to fetch new bio, avatar, header, etc. - if _, err := p.federator.UpdateAccount(ctx, + // Because this was an Update, the new AP Object should be set on the message. + incomingAccountable, ok := federatorMsg.APObjectModel.(ap.Accountable) + if !ok { + return errors.New("Accountable was not parseable on update account message") + } + + // Call RefreshAccount to fetch up-to-date bio, avatar, header, etc. + updatedAccount, err := p.federator.RefreshAccount( + ctx, federatorMsg.ReceivingAccount.Username, + incomingAccountable, incomingAccount, - true, - ); err != nil { + ) + if err != nil { + return fmt.Errorf("error enriching updated account from federator: %s", err) + } + + // RefreshAccount doesn't make DB update calls, so do that here. + if err := p.state.DB.UpdateAccount(ctx, updatedAccount); err != nil { return fmt.Errorf("error enriching updated account from federator: %s", err) } diff --git a/internal/processing/search.go b/internal/processing/search.go index 624537b6..c8dc5832 100644 --- a/internal/processing/search.go +++ b/internal/processing/search.go @@ -270,7 +270,7 @@ func (p *Processor) searchAccountByURI(ctx context.Context, authed *oauth.Auth, return p.federator.GetAccountByURI( gtscontext.SetFastFail(ctx), authed.Account.Username, - uri, false, + uri, ) } @@ -297,6 +297,6 @@ func (p *Processor) searchAccountByUsernameDomain(ctx context.Context, authed *o return p.federator.GetAccountByUsernameDomain( gtscontext.SetFastFail(ctx), authed.Account.Username, - username, domain, false, + username, domain, ) } diff --git a/internal/processing/util.go b/internal/processing/util.go index 967c03f9..601d8c4d 100644 --- a/internal/processing/util.go +++ b/internal/processing/util.go @@ -62,7 +62,6 @@ func GetParseMentionFunc(dbConn db.DB, federator federation.Federator) gtsmodel. requestingUsername, username, domain, - false, ) if err != nil { return nil, fmt.Errorf("parseMentionFunc: error fetching account: %s", err) diff --git a/internal/text/formatter.go b/internal/text/formatter.go index 212d2b58..0e5e0b55 100644 --- a/internal/text/formatter.go +++ b/internal/text/formatter.go @@ -30,6 +30,8 @@ import ( type Formatter interface { // FromPlain parses an HTML text from a plaintext. FromPlain(ctx context.Context, pmf gtsmodel.ParseMentionFunc, authorID string, statusID string, plain string) *FormatResult + // FromPlainNoParagraph parses an HTML text from a plaintext, without wrapping the resulting text in

tags. + FromPlainNoParagraph(ctx context.Context, pmf gtsmodel.ParseMentionFunc, authorID string, statusID string, plain string) *FormatResult // FromMarkdown parses an HTML text from a markdown-formatted text. FromMarkdown(ctx context.Context, pmf gtsmodel.ParseMentionFunc, authorID string, statusID string, md string) *FormatResult // FromPlainEmojiOnly parses an HTML text from a plaintext, only parsing emojis and not mentions etc. diff --git a/internal/text/formatter_test.go b/internal/text/formatter_test.go index 8498a640..403ba8e8 100644 --- a/internal/text/formatter_test.go +++ b/internal/text/formatter_test.go @@ -92,3 +92,7 @@ func (suite *TextStandardTestSuite) FromMarkdown(text string) *text.FormatResult func (suite *TextStandardTestSuite) FromPlain(text string) *text.FormatResult { return suite.formatter.FromPlain(context.Background(), suite.parseMention, suite.testAccounts["local_account_1"].ID, "status_ID", text) } + +func (suite *TextStandardTestSuite) FromPlainNoParagraph(text string) *text.FormatResult { + return suite.formatter.FromPlainNoParagraph(context.Background(), suite.parseMention, suite.testAccounts["local_account_1"].ID, "status_ID", text) +} diff --git a/internal/text/goldmark_plaintext.go b/internal/text/goldmark_plaintext.go index 6f841920..635fdfc3 100644 --- a/internal/text/goldmark_plaintext.go +++ b/internal/text/goldmark_plaintext.go @@ -60,3 +60,41 @@ func (b *plaintextParser) CanInterruptParagraph() bool { func (b *plaintextParser) CanAcceptIndentedLine() bool { return true } + +// plaintextParserNoParagraph implements goldmark.parser.BlockParser +type plaintextParserNoParagraph struct{} + +var defaultPlaintextParserNoParagraph = &plaintextParserNoParagraph{} + +func newPlaintextParserNoParagraph() parser.BlockParser { + return defaultPlaintextParserNoParagraph +} + +func (b *plaintextParserNoParagraph) Trigger() []byte { + return nil +} + +func (b *plaintextParserNoParagraph) Open(parent ast.Node, reader text.Reader, pc parser.Context) (ast.Node, parser.State) { + _, segment := reader.PeekLine() + node := ast.NewDocument() + node.Lines().Append(segment) + reader.Advance(segment.Len() - 1) + return node, parser.NoChildren +} + +func (b *plaintextParserNoParagraph) Continue(node ast.Node, reader text.Reader, pc parser.Context) parser.State { + _, segment := reader.PeekLine() + node.Lines().Append(segment) + reader.Advance(segment.Len() - 1) + return parser.Continue | parser.NoChildren +} + +func (b *plaintextParserNoParagraph) Close(node ast.Node, reader text.Reader, pc parser.Context) {} + +func (b *plaintextParserNoParagraph) CanInterruptParagraph() bool { + return false +} + +func (b *plaintextParserNoParagraph) CanAcceptIndentedLine() bool { + return true +} diff --git a/internal/text/plain.go b/internal/text/plain.go index 80916dfa..b1c2a2c3 100644 --- a/internal/text/plain.go +++ b/internal/text/plain.go @@ -30,26 +30,28 @@ import ( "github.com/yuin/goldmark/util" ) -func (f *formatter) FromPlain(ctx context.Context, pmf gtsmodel.ParseMentionFunc, authorID string, statusID string, plain string) *FormatResult { +func (f *formatter) fromPlain( + ctx context.Context, + ptParser parser.Parser, + pmf gtsmodel.ParseMentionFunc, + authorID string, + statusID string, + plain string, +) *FormatResult { result := &FormatResult{ Mentions: []*gtsmodel.Mention{}, Tags: []*gtsmodel.Tag{}, Emojis: []*gtsmodel.Emoji{}, } - // parse markdown text into html, using custom renderer to add hashtag/mention links + // Parse markdown into html, using custom renderer + // to add hashtag/mention links and emoji images. md := goldmark.New( goldmark.WithRendererOptions( html.WithXHTML(), html.WithHardWraps(), ), - goldmark.WithParser( - parser.NewParser( - parser.WithBlockParsers( - util.Prioritized(newPlaintextParser(), 500), - ), - ), - ), + goldmark.WithParser(ptParser), // use parser we were passed goldmark.WithExtensions( &customRenderer{f, ctx, pmf, authorID, statusID, false, result}, extension.Linkify, // turns URLs into links @@ -57,20 +59,40 @@ func (f *formatter) FromPlain(ctx context.Context, pmf gtsmodel.ParseMentionFunc ) var htmlContentBytes bytes.Buffer - err := md.Convert([]byte(plain), &htmlContentBytes) - if err != nil { + if err := md.Convert([]byte(plain), &htmlContentBytes); err != nil { log.Errorf(ctx, "error formatting plaintext to HTML: %s", err) } result.HTML = htmlContentBytes.String() - // clean anything dangerous out of the HTML + // Clean anything dangerous out of resulting HTML. result.HTML = SanitizeHTML(result.HTML) - // shrink ray - result.HTML, err = m.String("text/html", result.HTML) - if err != nil { + // Shrink ray! + var err error + if result.HTML, err = m.String("text/html", result.HTML); err != nil { log.Errorf(ctx, "error minifying HTML: %s", err) } return result } + +func (f *formatter) FromPlain(ctx context.Context, pmf gtsmodel.ParseMentionFunc, authorID string, statusID string, plain string) *FormatResult { + ptParser := parser.NewParser( + parser.WithBlockParsers( + util.Prioritized(newPlaintextParser(), 500), + ), + ) + + return f.fromPlain(ctx, ptParser, pmf, authorID, statusID, plain) +} + +func (f *formatter) FromPlainNoParagraph(ctx context.Context, pmf gtsmodel.ParseMentionFunc, authorID string, statusID string, plain string) *FormatResult { + ptParser := parser.NewParser( + parser.WithBlockParsers( + // Initialize block parser that doesn't wrap in

tags. + util.Prioritized(newPlaintextParserNoParagraph(), 500), + ), + ) + + return f.fromPlain(ctx, ptParser, pmf, authorID, statusID, plain) +} diff --git a/internal/text/plain_test.go b/internal/text/plain_test.go index c00ae70c..5a291856 100644 --- a/internal/text/plain_test.go +++ b/internal/text/plain_test.go @@ -25,14 +25,16 @@ import ( ) const ( - simple = "this is a plain and simple status" - simpleExpected = "

this is a plain and simple status

" - withTag = "here's a simple status that uses hashtag #welcome!" - withTagExpected = "

here's a simple status that uses hashtag #welcome!

" - withHTML = "
blah this should just be html escaped blah
" - withHTMLExpected = "

<div>blah this should just be html escaped blah</div>

" - moreComplex = "Another test @foss_satan@fossbros-anonymous.io\n\n#Hashtag\n\nText\n\n:rainbow:" - moreComplexExpected = "

Another test @foss_satan

#Hashtag

Text

:rainbow:

" + simple = "this is a plain and simple status" + simpleExpected = "

this is a plain and simple status

" + simpleExpectedNoParagraph = "this is a plain and simple status" + withTag = "here's a simple status that uses hashtag #welcome!" + withTagExpected = "

here's a simple status that uses hashtag #welcome!

" + withTagExpectedNoParagraph = "here's a simple status that uses hashtag #welcome!" + withHTML = "
blah this should just be html escaped blah
" + withHTMLExpected = "

<div>blah this should just be html escaped blah</div>

" + moreComplex = "Another test @foss_satan@fossbros-anonymous.io\n\n#Hashtag\n\nText\n\n:rainbow:" + moreComplexExpected = "

Another test @foss_satan

#Hashtag

Text

:rainbow:

" ) type PlainTestSuite struct { @@ -44,11 +46,21 @@ func (suite *PlainTestSuite) TestParseSimple() { suite.Equal(simpleExpected, formatted.HTML) } +func (suite *PlainTestSuite) TestParseSimpleNoParagraph() { + formatted := suite.FromPlainNoParagraph(simple) + suite.Equal(simpleExpectedNoParagraph, formatted.HTML) +} + func (suite *PlainTestSuite) TestParseWithTag() { formatted := suite.FromPlain(withTag) suite.Equal(withTagExpected, formatted.HTML) } +func (suite *PlainTestSuite) TestParseWithTagNoParagraph() { + formatted := suite.FromPlainNoParagraph(withTag) + suite.Equal(withTagExpectedNoParagraph, formatted.HTML) +} + func (suite *PlainTestSuite) TestParseWithHTML() { formatted := suite.FromPlain(withHTML) suite.Equal(withHTMLExpected, formatted.HTML) diff --git a/internal/transport/controller.go b/internal/transport/controller.go index f77fbbb9..83fad803 100644 --- a/internal/transport/controller.go +++ b/internal/transport/controller.go @@ -29,7 +29,7 @@ import ( "codeberg.org/gruf/go-byteutil" "codeberg.org/gruf/go-cache/v3" "github.com/superseriousbusiness/activity/pub" - "github.com/superseriousbusiness/activity/streams" + "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/federation/federatingdb" "github.com/superseriousbusiness/gotosocial/internal/httpclient" @@ -157,7 +157,7 @@ func (c *controller) dereferenceLocalFollowers(ctx context.Context, iri *url.URL return nil, err } - i, err := streams.Serialize(followers) + i, err := ap.Serialize(followers) if err != nil { return nil, err } @@ -175,7 +175,7 @@ func (c *controller) dereferenceLocalUser(ctx context.Context, iri *url.URL) ([] return nil, err } - i, err := streams.Serialize(user) + i, err := ap.Serialize(user) if err != nil { return nil, err } diff --git a/internal/typeutils/astointernal.go b/internal/typeutils/astointernal.go index f94ac128..7c0b60ad 100644 --- a/internal/typeutils/astointernal.go +++ b/internal/typeutils/astointernal.go @@ -86,7 +86,8 @@ func (c *converter) ASRepresentationToAccount(ctx context.Context, accountable a acct.Emojis = emojis } - // TODO: fields aka attachment array + // fields aka attachment array + acct.Fields = ap.ExtractFields(accountable) // note aka summary acct.Note = ap.ExtractSummary(accountable) diff --git a/internal/typeutils/internaltoas.go b/internal/typeutils/internaltoas.go index ceff1cb4..3c1615cf 100644 --- a/internal/typeutils/internaltoas.go +++ b/internal/typeutils/internaltoas.go @@ -240,7 +240,25 @@ func (c *converter) AccountToAS(ctx context.Context, a *gtsmodel.Account) (vocab // attachment // Used for profile fields. - // TODO: The PropertyValue type has to be added: https://schema.org/PropertyValue + if len(a.Fields) != 0 { + attachmentProp := streams.NewActivityStreamsAttachmentProperty() + + for _, field := range a.Fields { + propertyValue := streams.NewSchemaPropertyValue() + + nameProp := streams.NewActivityStreamsNameProperty() + nameProp.AppendXMLSchemaString(field.Name) + propertyValue.SetActivityStreamsName(nameProp) + + valueProp := streams.NewSchemaValueProperty() + valueProp.Set(field.Value) + propertyValue.SetSchemaValue(valueProp) + + attachmentProp.AppendSchemaPropertyValue(propertyValue) + } + + person.SetActivityStreamsAttachment(attachmentProp) + } // endpoints // NOT IMPLEMENTED -- this is for shared inbox which we don't use diff --git a/internal/typeutils/internaltoas_test.go b/internal/typeutils/internaltoas_test.go index 48686616..60c59326 100644 --- a/internal/typeutils/internaltoas_test.go +++ b/internal/typeutils/internaltoas_test.go @@ -21,11 +21,11 @@ import ( "context" "encoding/json" "errors" + "fmt" "strings" "testing" "github.com/stretchr/testify/suite" - "github.com/superseriousbusiness/activity/streams" "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" @@ -43,7 +43,7 @@ func (suite *InternalToASTestSuite) TestAccountToAS() { asPerson, err := suite.typeconverter.AccountToAS(context.Background(), testAccount) suite.NoError(err) - ser, err := streams.Serialize(asPerson) + ser, err := ap.Serialize(asPerson) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -85,6 +85,107 @@ func (suite *InternalToASTestSuite) TestAccountToAS() { }`, trimmed) } +func (suite *InternalToASTestSuite) TestAccountToASWithFields() { + testAccount := >smodel.Account{} + *testAccount = *suite.testAccounts["local_account_2"] + + asPerson, err := suite.typeconverter.AccountToAS(context.Background(), testAccount) + suite.NoError(err) + + ser, err := ap.Serialize(asPerson) + suite.NoError(err) + + bytes, err := json.MarshalIndent(ser, "", " ") + suite.NoError(err) + + // trim off everything up to 'attachment'; + // this is necessary because the order of multiple 'context' entries is not determinate + trimmed := strings.Split(string(bytes), "\"attachment\"")[1] + + fmt.Printf("\n\n\n%s\n\n\n", string(bytes)) + + suite.Equal(`: [ + { + "name": "should you follow me?", + "type": "PropertyValue", + "value": "maybe!" + }, + { + "name": "age", + "type": "PropertyValue", + "value": "120" + } + ], + "discoverable": false, + "featured": "http://localhost:8080/users/1happyturtle/collections/featured", + "followers": "http://localhost:8080/users/1happyturtle/followers", + "following": "http://localhost:8080/users/1happyturtle/following", + "id": "http://localhost:8080/users/1happyturtle", + "inbox": "http://localhost:8080/users/1happyturtle/inbox", + "manuallyApprovesFollowers": true, + "name": "happy little turtle :3", + "outbox": "http://localhost:8080/users/1happyturtle/outbox", + "preferredUsername": "1happyturtle", + "publicKey": { + "id": "http://localhost:8080/users/1happyturtle#main-key", + "owner": "http://localhost:8080/users/1happyturtle", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtTc6Jpg6LrRPhVQG4KLz\n2+YqEUUtZPd4YR+TKXuCnwEG9ZNGhgP046xa9h3EWzrZXaOhXvkUQgJuRqPrAcfN\nvc8jBHV2xrUeD8pu/MWKEabAsA/tgCv3nUC47HQ3/c12aHfYoPz3ufWsGGnrkhci\nv8PaveJ3LohO5vjCn1yZ00v6osMJMViEZvZQaazyE9A8FwraIexXabDpoy7tkHRg\nA1fvSkg4FeSG1XMcIz2NN7xyUuFACD+XkuOk7UqzRd4cjPUPLxiDwIsTlcgGOd3E\nUFMWVlPxSGjY2hIKa3lEHytaYK9IMYdSuyCsJshd3/yYC9LqxZY2KdlKJ80VOVyh\nyQIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "summary": "\u003cp\u003ei post about things that concern me\u003c/p\u003e", + "tag": [], + "type": "Person", + "url": "http://localhost:8080/@1happyturtle" +}`, trimmed) +} + +func (suite *InternalToASTestSuite) TestAccountToASWithOneField() { + testAccount := >smodel.Account{} + *testAccount = *suite.testAccounts["local_account_2"] + testAccount.Fields = testAccount.Fields[0:1] // Take only one field. + + asPerson, err := suite.typeconverter.AccountToAS(context.Background(), testAccount) + suite.NoError(err) + + ser, err := ap.Serialize(asPerson) + suite.NoError(err) + + bytes, err := json.MarshalIndent(ser, "", " ") + suite.NoError(err) + + // trim off everything up to 'attachment'; + // this is necessary because the order of multiple 'context' entries is not determinate + trimmed := strings.Split(string(bytes), "\"attachment\"")[1] + + // Despite only one field being set, attachments should still be a slice/array. + suite.Equal(`: [ + { + "name": "should you follow me?", + "type": "PropertyValue", + "value": "maybe!" + } + ], + "discoverable": false, + "featured": "http://localhost:8080/users/1happyturtle/collections/featured", + "followers": "http://localhost:8080/users/1happyturtle/followers", + "following": "http://localhost:8080/users/1happyturtle/following", + "id": "http://localhost:8080/users/1happyturtle", + "inbox": "http://localhost:8080/users/1happyturtle/inbox", + "manuallyApprovesFollowers": true, + "name": "happy little turtle :3", + "outbox": "http://localhost:8080/users/1happyturtle/outbox", + "preferredUsername": "1happyturtle", + "publicKey": { + "id": "http://localhost:8080/users/1happyturtle#main-key", + "owner": "http://localhost:8080/users/1happyturtle", + "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtTc6Jpg6LrRPhVQG4KLz\n2+YqEUUtZPd4YR+TKXuCnwEG9ZNGhgP046xa9h3EWzrZXaOhXvkUQgJuRqPrAcfN\nvc8jBHV2xrUeD8pu/MWKEabAsA/tgCv3nUC47HQ3/c12aHfYoPz3ufWsGGnrkhci\nv8PaveJ3LohO5vjCn1yZ00v6osMJMViEZvZQaazyE9A8FwraIexXabDpoy7tkHRg\nA1fvSkg4FeSG1XMcIz2NN7xyUuFACD+XkuOk7UqzRd4cjPUPLxiDwIsTlcgGOd3E\nUFMWVlPxSGjY2hIKa3lEHytaYK9IMYdSuyCsJshd3/yYC9LqxZY2KdlKJ80VOVyh\nyQIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "summary": "\u003cp\u003ei post about things that concern me\u003c/p\u003e", + "tag": [], + "type": "Person", + "url": "http://localhost:8080/@1happyturtle" +}`, trimmed) +} + func (suite *InternalToASTestSuite) TestAccountToASWithEmoji() { testAccount := >smodel.Account{} *testAccount = *suite.testAccounts["local_account_1"] // take zork for this test @@ -93,7 +194,7 @@ func (suite *InternalToASTestSuite) TestAccountToASWithEmoji() { asPerson, err := suite.typeconverter.AccountToAS(context.Background(), testAccount) suite.NoError(err) - ser, err := streams.Serialize(asPerson) + ser, err := ap.Serialize(asPerson) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -154,7 +255,7 @@ func (suite *InternalToASTestSuite) TestAccountToASWithSharedInbox() { asPerson, err := suite.typeconverter.AccountToAS(context.Background(), testAccount) suite.NoError(err) - ser, err := streams.Serialize(asPerson) + ser, err := ap.Serialize(asPerson) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -206,7 +307,7 @@ func (suite *InternalToASTestSuite) TestOutboxToASCollection() { collection, err := suite.typeconverter.OutboxToASCollection(ctx, testAccount.OutboxURI) suite.NoError(err) - ser, err := streams.Serialize(collection) + ser, err := ap.Serialize(collection) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -227,7 +328,7 @@ func (suite *InternalToASTestSuite) TestStatusToAS() { asStatus, err := suite.typeconverter.StatusToAS(ctx, testStatus) suite.NoError(err) - ser, err := streams.Serialize(asStatus) + ser, err := ap.Serialize(asStatus) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -268,7 +369,7 @@ func (suite *InternalToASTestSuite) TestStatusWithTagsToASWithIDs() { asStatus, err := suite.typeconverter.StatusToAS(ctx, testStatus) suite.NoError(err) - ser, err := streams.Serialize(asStatus) + ser, err := ap.Serialize(asStatus) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -328,7 +429,7 @@ func (suite *InternalToASTestSuite) TestStatusWithTagsToASFromDB() { asStatus, err := suite.typeconverter.StatusToAS(ctx, testStatus) suite.NoError(err) - ser, err := streams.Serialize(asStatus) + ser, err := ap.Serialize(asStatus) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -389,7 +490,7 @@ func (suite *InternalToASTestSuite) TestStatusToASWithMentions() { asStatus, err := suite.typeconverter.StatusToAS(ctx, testStatus) suite.NoError(err) - ser, err := streams.Serialize(asStatus) + ser, err := ap.Serialize(asStatus) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -437,7 +538,7 @@ func (suite *InternalToASTestSuite) TestStatusToASDeletePublicReply() { asDelete, err := suite.typeconverter.StatusToASDelete(ctx, testStatus) suite.NoError(err) - ser, err := streams.Serialize(asDelete) + ser, err := ap.Serialize(asDelete) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -475,7 +576,7 @@ func (suite *InternalToASTestSuite) TestStatusToASDeletePublicReplyOriginalDelet asDelete, err := suite.typeconverter.StatusToASDelete(ctx, testStatus) suite.NoError(err) - ser, err := streams.Serialize(asDelete) + ser, err := ap.Serialize(asDelete) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -501,7 +602,7 @@ func (suite *InternalToASTestSuite) TestStatusToASDeletePublic() { asDelete, err := suite.typeconverter.StatusToASDelete(ctx, testStatus) suite.NoError(err) - ser, err := streams.Serialize(asDelete) + ser, err := ap.Serialize(asDelete) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -524,7 +625,7 @@ func (suite *InternalToASTestSuite) TestStatusToASDeleteDirectMessage() { asDelete, err := suite.typeconverter.StatusToASDelete(ctx, testStatus) suite.NoError(err) - ser, err := streams.Serialize(asDelete) + ser, err := ap.Serialize(asDelete) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -551,7 +652,7 @@ func (suite *InternalToASTestSuite) TestStatusesToASOutboxPage() { page, err := suite.typeconverter.StatusesToASOutboxPage(ctx, testAccount.OutboxURI, "", "", statuses) suite.NoError(err) - ser, err := streams.Serialize(page) + ser, err := ap.Serialize(page) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -604,7 +705,7 @@ func (suite *InternalToASTestSuite) TestSelfBoostFollowersOnlyToAS() { asBoost, err := suite.typeconverter.BoostToAS(ctx, boostWrapperStatus, testAccount, testAccount) suite.NoError(err) - ser, err := streams.Serialize(asBoost) + ser, err := ap.Serialize(asBoost) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -637,7 +738,7 @@ func (suite *InternalToASTestSuite) TestReportToAS() { flag, err := suite.typeconverter.ReportToASFlag(ctx, testReport) suite.NoError(err) - ser, err := streams.Serialize(flag) + ser, err := ap.Serialize(flag) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -670,7 +771,7 @@ func (suite *InternalToASTestSuite) TestPinnedStatusesToASSomeItems() { suite.FailNow(err.Error()) } - ser, err := ap.SerializeOrderedCollection(collection) + ser, err := ap.Serialize(collection) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -702,7 +803,7 @@ func (suite *InternalToASTestSuite) TestPinnedStatusesToASNoItems() { suite.FailNow(err.Error()) } - ser, err := ap.SerializeOrderedCollection(collection) + ser, err := ap.Serialize(collection) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") @@ -731,7 +832,7 @@ func (suite *InternalToASTestSuite) TestPinnedStatusesToASOneItem() { suite.FailNow(err.Error()) } - ser, err := ap.SerializeOrderedCollection(collection) + ser, err := ap.Serialize(collection) suite.NoError(err) bytes, err := json.MarshalIndent(ser, "", " ") diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index 88646c31..1e5fb024 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -77,7 +77,7 @@ func (c *converter) AccountToAPIAccountSensitive(ctx context.Context, a *gtsmode Language: a.Language, StatusContentType: statusContentType, Note: a.NoteRaw, - Fields: apiAccount.Fields, + Fields: c.fieldsToAPIFields(a.FieldsRaw), FollowRequestsCount: frc, } @@ -131,7 +131,6 @@ func (c *converter) AccountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A aviURLStatic string headerURL string headerURLStatic string - fields = make([]apimodel.Field, len(a.Fields)) ) if a.AvatarMediaAttachment != nil { @@ -144,19 +143,8 @@ func (c *converter) AccountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A headerURLStatic = a.HeaderMediaAttachment.Thumbnail.URL } - // GTS model fields -> frontend. - for i, field := range a.Fields { - mField := apimodel.Field{ - Name: field.Name, - Value: field.Value, - } - - if !field.VerifiedAt.IsZero() { - mField.VerifiedAt = util.FormatISO8601(field.VerifiedAt) - } - - fields[i] = mField - } + // convert account gts model fields to front api model fields + fields := c.fieldsToAPIFields(a.Fields) // GTS model emojis -> frontend. apiEmojis, err := c.convertEmojisToAPIEmojis(ctx, a.Emojis, a.EmojiIDs) @@ -239,6 +227,25 @@ func (c *converter) AccountToAPIAccountPublic(ctx context.Context, a *gtsmodel.A return accountFrontend, nil } +func (c *converter) fieldsToAPIFields(f []*gtsmodel.Field) []apimodel.Field { + fields := make([]apimodel.Field, len(f)) + + for i, field := range f { + mField := apimodel.Field{ + Name: field.Name, + Value: field.Value, + } + + if !field.VerifiedAt.IsZero() { + mField.VerifiedAt = func() *string { s := util.FormatISO8601(field.VerifiedAt); return &s }() + } + + fields[i] = mField + } + + return fields +} + func (c *converter) AccountToAPIAccountBlocked(ctx context.Context, a *gtsmodel.Account) (*apimodel.Account, error) { var ( acct string diff --git a/internal/typeutils/internaltofrontend_test.go b/internal/typeutils/internaltofrontend_test.go index c8ab5a8e..558d3ace 100644 --- a/internal/typeutils/internaltofrontend_test.go +++ b/internal/typeutils/internaltofrontend_test.go @@ -873,7 +873,18 @@ func (suite *InternalToFrontendTestSuite) TestReportToFrontend2() { "statuses_count": 7, "last_status_at": "2021-10-20T10:40:37.000Z", "emojis": [], - "fields": [], + "fields": [ + { + "name": "should you follow me?", + "value": "maybe!", + "verified_at": null + }, + { + "name": "age", + "value": "120", + "verified_at": null + } + ], "role": { "name": "user" } @@ -977,7 +988,18 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend1() { "statuses_count": 7, "last_status_at": "2021-10-20T10:40:37.000Z", "emojis": [], - "fields": [], + "fields": [ + { + "name": "should you follow me?", + "value": "maybe!", + "verified_at": null + }, + { + "name": "age", + "value": "120", + "verified_at": null + } + ], "role": { "name": "user" } @@ -1137,7 +1159,18 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend2() { "statuses_count": 7, "last_status_at": "2021-10-20T10:40:37.000Z", "emojis": [], - "fields": [], + "fields": [ + { + "name": "should you follow me?", + "value": "maybe!", + "verified_at": null + }, + { + "name": "age", + "value": "120", + "verified_at": null + } + ], "role": { "name": "user" } diff --git a/internal/typeutils/wrap_test.go b/internal/typeutils/wrap_test.go index 2978a025..46d28f5c 100644 --- a/internal/typeutils/wrap_test.go +++ b/internal/typeutils/wrap_test.go @@ -23,7 +23,7 @@ import ( "testing" "github.com/stretchr/testify/suite" - "github.com/superseriousbusiness/activity/streams" + "github.com/superseriousbusiness/gotosocial/internal/ap" ) type WrapTestSuite struct { @@ -40,7 +40,7 @@ func (suite *WrapTestSuite) TestWrapNoteInCreateIRIOnly() { suite.NoError(err) suite.NotNil(create) - createI, err := streams.Serialize(create) + createI, err := ap.Serialize(create) suite.NoError(err) bytes, err := json.MarshalIndent(createI, "", " ") @@ -68,7 +68,7 @@ func (suite *WrapTestSuite) TestWrapNoteInCreate() { suite.NoError(err) suite.NotNil(create) - createI, err := streams.Serialize(create) + createI, err := ap.Serialize(create) suite.NoError(err) bytes, err := json.MarshalIndent(createI, "", " ") diff --git a/internal/validate/account_test.go b/internal/validate/account_test.go index 5a785549..57f0f490 100644 --- a/internal/validate/account_test.go +++ b/internal/validate/account_test.go @@ -50,7 +50,7 @@ func happyAccount() *gtsmodel.Account { HeaderMediaAttachment: nil, HeaderRemoteURL: "", DisplayName: "original zork (he/they)", - Fields: []gtsmodel.Field{}, + Fields: []*gtsmodel.Field{}, Note: "hey yo this is my profile!", Memorial: testrig.FalseBool(), AlsoKnownAs: "", diff --git a/internal/validate/formvalidation.go b/internal/validate/formvalidation.go index dd392557..20d4aa78 100644 --- a/internal/validate/formvalidation.go +++ b/internal/validate/formvalidation.go @@ -25,6 +25,7 @@ import ( apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" "github.com/superseriousbusiness/gotosocial/internal/config" + "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/regexes" pwv "github.com/wagslane/go-password-validator" "golang.org/x/text/language" @@ -43,7 +44,7 @@ const ( maximumCustomCSSLength = 5000 maximumEmojiCategoryLength = 64 maximumProfileFieldLength = 255 - maximumProfileFields = 4 + maximumProfileFields = 6 ) // NewPassword returns an error if the given password is not sufficiently strong, or nil if it's ok. @@ -233,19 +234,26 @@ func ULID(i string) bool { return regexes.ULID.MatchString(i) } -func ProfileFieldsCount(fields []apimodel.UpdateField) error { - if length := len(fields); length > maximumProfileFields { +// ProfileFields validates the length of provided fields slice, +// and also iterates through the fields and trims each name + value +// to maximumProfileFieldLength, if they were above. +func ProfileFields(fields []*gtsmodel.Field) error { + if len(fields) > maximumProfileFields { return fmt.Errorf("cannot have more than %d profile fields", maximumProfileFields) } + // Trim each field name + value to maximum allowed length. + for _, field := range fields { + n := []rune(field.Name) + if len(n) > maximumProfileFieldLength { + field.Name = string(n[:maximumProfileFieldLength]) + } + + v := []rune(field.Value) + if len(v) > maximumProfileFieldLength { + field.Value = string(v[:maximumProfileFieldLength]) + } + } + return nil } - -func ProfileField(f *string) string { - s := []rune(*f) - if len(s) > maximumProfileFieldLength { - return string(s[:maximumProfileFieldLength]) // trim profile field to maximum allowed length - } - - return string(*f) -} diff --git a/internal/validate/formvalidation_test.go b/internal/validate/formvalidation_test.go index fa59977b..9cfa0770 100644 --- a/internal/validate/formvalidation_test.go +++ b/internal/validate/formvalidation_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" - "github.com/superseriousbusiness/gotosocial/internal/api/model" + "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/validate" ) @@ -268,37 +268,34 @@ func (suite *ValidationTestSuite) TestValidateReason() { } } -func (suite *ValidationTestSuite) TestValidateProfileFieldsCount() { - noFields := []model.UpdateField{} - fewFields := []model.UpdateField{{}, {}} - tooManyFields := []model.UpdateField{{}, {}, {}, {}, {}} - err := validate.ProfileFieldsCount(tooManyFields) - if assert.Error(suite.T(), err) { - assert.Equal(suite.T(), errors.New("cannot have more than 4 profile fields"), err) - } - - err = validate.ProfileFieldsCount(noFields) - assert.NoError(suite.T(), err) - - err = validate.ProfileFieldsCount(fewFields) - assert.NoError(suite.T(), err) -} - func (suite *ValidationTestSuite) TestValidateProfileField() { - shortProfileField := "pronouns" - tooLongProfileField := "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer eu bibendum elit. Sed ac interdum nisi. Vestibulum vulputate eros quis euismod imperdiet. Nulla sit amet dui sit amet lorem consectetur iaculis. Mauris eget lacinia metus. Curabitur nec dui eleifend massa nunc." - trimmedProfileField := "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer eu bibendum elit. Sed ac interdum nisi. Vestibulum vulputate eros quis euismod imperdiet. Nulla sit amet dui sit amet lorem consectetur iaculis. Mauris eget lacinia metus. Curabitur nec dui " + var ( + shortProfileField = "pronouns" + tooLongProfileField = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer eu bibendum elit. Sed ac interdum nisi. Vestibulum vulputate eros quis euismod imperdiet. Nulla sit amet dui sit amet lorem consectetur iaculis. Mauris eget lacinia metus. Curabitur nec dui eleifend massa nunc." + trimmedProfileField = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer eu bibendum elit. Sed ac interdum nisi. Vestibulum vulputate eros quis euismod imperdiet. Nulla sit amet dui sit amet lorem consectetur iaculis. Mauris eget lacinia metus. Curabitur nec dui " + err error + ) - validated := validate.ProfileField(&shortProfileField) - assert.Equal(suite.T(), shortProfileField, validated) + okFields := []*gtsmodel.Field{ + { + Name: "example", + Value: shortProfileField, + }, + } + err = validate.ProfileFields(okFields) + suite.NoError(err) + suite.Equal(shortProfileField, okFields[0].Value) - validated = validate.ProfileField(&tooLongProfileField) - assert.Len(suite.T(), validated, 255) - assert.Equal(suite.T(), trimmedProfileField, validated) - - validated = validate.ProfileField(&trimmedProfileField) - assert.Len(suite.T(), validated, 255) - assert.Equal(suite.T(), trimmedProfileField, validated) + dodgyFields := []*gtsmodel.Field{ + { + Name: "example", + Value: tooLongProfileField, + }, + } + err = validate.ProfileFields(dodgyFields) + suite.NoError(err) + suite.Equal(trimmedProfileField, dodgyFields[0].Value) + suite.Len(dodgyFields[0].Value, 255) } func TestValidationTestSuite(t *testing.T) { diff --git a/testrig/testmodels.go b/testrig/testmodels.go index 9d7654dd..60c4b919 100644 --- a/testrig/testmodels.go +++ b/testrig/testmodels.go @@ -317,7 +317,7 @@ func NewTestAccounts() map[string]*gtsmodel.Account { AvatarMediaAttachmentID: "", HeaderMediaAttachmentID: "", DisplayName: "", - Fields: []gtsmodel.Field{}, + Fields: []*gtsmodel.Field{}, Note: "", NoteRaw: "", Memorial: FalseBool(), @@ -357,7 +357,7 @@ func NewTestAccounts() map[string]*gtsmodel.Account { AvatarMediaAttachmentID: "", HeaderMediaAttachmentID: "", DisplayName: "", - Fields: []gtsmodel.Field{}, + Fields: []*gtsmodel.Field{}, Note: "", Memorial: FalseBool(), MovedToAccountID: "", @@ -395,7 +395,7 @@ func NewTestAccounts() map[string]*gtsmodel.Account { AvatarMediaAttachmentID: "", HeaderMediaAttachmentID: "", DisplayName: "", - Fields: []gtsmodel.Field{}, + Fields: []*gtsmodel.Field{}, Note: "", NoteRaw: "", Memorial: FalseBool(), @@ -435,7 +435,7 @@ func NewTestAccounts() map[string]*gtsmodel.Account { AvatarMediaAttachmentID: "01F8MH58A357CV5K7R7TJMSH6S", HeaderMediaAttachmentID: "01PFPMWK2FF0D9WMHEJHR07C3Q", DisplayName: "original zork (he/they)", - Fields: []gtsmodel.Field{}, + Fields: []*gtsmodel.Field{}, Note: "

hey yo this is my profile!

", NoteRaw: "hey yo this is my profile!", Memorial: FalseBool(), @@ -475,45 +475,64 @@ func NewTestAccounts() map[string]*gtsmodel.Account { AvatarMediaAttachmentID: "", HeaderMediaAttachmentID: "", DisplayName: "happy little turtle :3", - Fields: []gtsmodel.Field{}, - Note: "

i post about things that concern me

", - NoteRaw: "i post about things that concern me", - Memorial: FalseBool(), - MovedToAccountID: "", - CreatedAt: TimeMustParse("2022-06-04T13:12:00Z"), - UpdatedAt: TimeMustParse("2022-06-04T13:12:00Z"), - Bot: FalseBool(), - Reason: "", - Locked: TrueBool(), - Discoverable: FalseBool(), - Privacy: gtsmodel.VisibilityFollowersOnly, - Sensitive: TrueBool(), - Language: "fr", - URI: "http://localhost:8080/users/1happyturtle", - URL: "http://localhost:8080/@1happyturtle", - FetchedAt: time.Time{}, - InboxURI: "http://localhost:8080/users/1happyturtle/inbox", - OutboxURI: "http://localhost:8080/users/1happyturtle/outbox", - FollowersURI: "http://localhost:8080/users/1happyturtle/followers", - FollowingURI: "http://localhost:8080/users/1happyturtle/following", - FeaturedCollectionURI: "http://localhost:8080/users/1happyturtle/collections/featured", - ActorType: ap.ActorPerson, - AlsoKnownAs: "", - PrivateKey: &rsa.PrivateKey{}, - PublicKey: &rsa.PublicKey{}, - PublicKeyURI: "http://localhost:8080/users/1happyturtle#main-key", - SensitizedAt: time.Time{}, - SilencedAt: time.Time{}, - SuspendedAt: time.Time{}, - HideCollections: FalseBool(), - SuspensionOrigin: "", + Fields: []*gtsmodel.Field{ + { + Name: "should you follow me?", + Value: "maybe!", + }, + { + Name: "age", + Value: "120", + }, + }, + FieldsRaw: []*gtsmodel.Field{ + { + Name: "should you follow me?", + Value: "maybe!", + }, + { + Name: "age", + Value: "120", + }, + }, + Note: "

i post about things that concern me

", + NoteRaw: "i post about things that concern me", + Memorial: FalseBool(), + MovedToAccountID: "", + CreatedAt: TimeMustParse("2022-06-04T13:12:00Z"), + UpdatedAt: TimeMustParse("2022-06-04T13:12:00Z"), + Bot: FalseBool(), + Reason: "", + Locked: TrueBool(), + Discoverable: FalseBool(), + Privacy: gtsmodel.VisibilityFollowersOnly, + Sensitive: TrueBool(), + Language: "fr", + URI: "http://localhost:8080/users/1happyturtle", + URL: "http://localhost:8080/@1happyturtle", + FetchedAt: time.Time{}, + InboxURI: "http://localhost:8080/users/1happyturtle/inbox", + OutboxURI: "http://localhost:8080/users/1happyturtle/outbox", + FollowersURI: "http://localhost:8080/users/1happyturtle/followers", + FollowingURI: "http://localhost:8080/users/1happyturtle/following", + FeaturedCollectionURI: "http://localhost:8080/users/1happyturtle/collections/featured", + ActorType: ap.ActorPerson, + AlsoKnownAs: "", + PrivateKey: &rsa.PrivateKey{}, + PublicKey: &rsa.PublicKey{}, + PublicKeyURI: "http://localhost:8080/users/1happyturtle#main-key", + SensitizedAt: time.Time{}, + SilencedAt: time.Time{}, + SuspendedAt: time.Time{}, + HideCollections: FalseBool(), + SuspensionOrigin: "", }, "remote_account_1": { ID: "01F8MH5ZK5VRH73AKHQM6Y9VNX", Username: "foss_satan", Domain: "fossbros-anonymous.io", DisplayName: "big gerald", - Fields: []gtsmodel.Field{}, + Fields: []*gtsmodel.Field{}, Note: "i post about like, i dunno, stuff, or whatever!!!!", Memorial: FalseBool(), MovedToAccountID: "", @@ -549,7 +568,7 @@ func NewTestAccounts() map[string]*gtsmodel.Account { Username: "Some_User", Domain: "example.org", DisplayName: "some user", - Fields: []gtsmodel.Field{}, + Fields: []*gtsmodel.Field{}, Note: "i'm a real son of a gun", Memorial: FalseBool(), MovedToAccountID: "", @@ -585,7 +604,7 @@ func NewTestAccounts() map[string]*gtsmodel.Account { Username: "her_fuckin_maj", Domain: "thequeenisstillalive.technology", DisplayName: "lizzzieeeeeeeeeeee", - Fields: []gtsmodel.Field{}, + Fields: []*gtsmodel.Field{}, Note: "if i die blame charles don't let that fuck become king", Memorial: FalseBool(), MovedToAccountID: "", diff --git a/vendor/github.com/superseriousbusiness/activity/pub/side_effect_actor.go b/vendor/github.com/superseriousbusiness/activity/pub/side_effect_actor.go index 123e248f..4fe30083 100644 --- a/vendor/github.com/superseriousbusiness/activity/pub/side_effect_actor.go +++ b/vendor/github.com/superseriousbusiness/activity/pub/side_effect_actor.go @@ -21,7 +21,25 @@ var _ DelegateActor = &SideEffectActor{} // Note that when using the SideEffectActor with an application that good-faith // implements its required interfaces, the ActivityPub specification is // guaranteed to be correctly followed. +// +// When doing deliveries to remote servers via the s2s protocol, the side effect +// actor will by default use the Serialize function from the streams package. +// However, this can be overridden after the side effect actor is intantiated, +// by setting the exposed Serialize function on the struct. For example: +// +// a := NewSideEffectActor(...) +// a.Serialize = func(a vocab.Type) (m map[string]interface{}, e error) { +// // Put your custom serializer logic here. +// } +// +// Note that you should only do this *immediately* after instantiating the side +// effect actor -- never while your application is already running, as this will +// likely cause race conditions or other problems! In most cases, you will never +// need to change this; it's provided solely to allow easier customization by +// applications. type SideEffectActor struct { + Serialize func(a vocab.Type) (m map[string]interface{}, e error) + common CommonBehavior s2s FederatingProtocol c2s SocialProtocol @@ -38,18 +56,19 @@ type SideEffectActor struct { // // If you are using the returned SideEffectActor for federation, ensure that s2s // is not nil. Likewise, if you are using it for the social protocol, ensure -// that c2s is not nil. +// that c2s is not nil. func NewSideEffectActor(c CommonBehavior, s2s FederatingProtocol, c2s SocialProtocol, db Database, clock Clock) *SideEffectActor { return &SideEffectActor{ - common: c, - s2s: s2s, - c2s: c2s, - db: db, - clock: clock, + Serialize: streams.Serialize, + common: c, + s2s: s2s, + c2s: c2s, + db: db, + clock: clock, } } @@ -451,18 +470,23 @@ func (a *SideEffectActor) WrapInCreate(c context.Context, obj vocab.Type, outbox // deliverToRecipients will take a prepared Activity and send it to specific // recipients on behalf of an actor. func (a *SideEffectActor) deliverToRecipients(c context.Context, boxIRI *url.URL, activity Activity, recipients []*url.URL) error { - m, err := streams.Serialize(activity) + // Call whichever serializer is + // set on the side effect actor. + m, err := a.Serialize(activity) if err != nil { return err } + b, err := json.Marshal(m) if err != nil { return err } + tp, err := a.common.NewTransport(c, boxIRI, goFedUserAgent()) if err != nil { return err } + return tp.BatchDeliver(c, b, recipients) } diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_consts.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_consts.go index a6445580..de91e3f6 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/gen_consts.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_consts.go @@ -137,6 +137,9 @@ var ActivityStreamsPlaceName string = "Place" // ActivityStreamsProfileName is the string literal of the name for the Profile type in the ActivityStreams vocabulary. var ActivityStreamsProfileName string = "Profile" +// SchemaPropertyValueName is the string literal of the name for the PropertyValue type in the Schema vocabulary. +var SchemaPropertyValueName string = "PropertyValue" + // W3IDSecurityV1PublicKeyName is the string literal of the name for the PublicKey type in the W3IDSecurityV1 vocabulary. var W3IDSecurityV1PublicKeyName string = "PublicKey" @@ -509,6 +512,9 @@ var ActivityStreamsUpdatedPropertyName string = "updated" // ActivityStreamsUrlPropertyName is the string literal of the name for the url property in the ActivityStreams vocabulary. var ActivityStreamsUrlPropertyName string = "url" +// SchemaValuePropertyName is the string literal of the name for the value property in the Schema vocabulary. +var SchemaValuePropertyName string = "value" + // TootVotersCountPropertyName is the string literal of the name for the votersCount property in the Toot vocabulary. var TootVotersCountPropertyName string = "votersCount" diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_init.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_init.go index 334fdfe5..79e730e4 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/gen_init.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_init.go @@ -158,6 +158,8 @@ import ( typerepository "github.com/superseriousbusiness/activity/streams/impl/forgefed/type_repository" typeticket "github.com/superseriousbusiness/activity/streams/impl/forgefed/type_ticket" typeticketdependency "github.com/superseriousbusiness/activity/streams/impl/forgefed/type_ticketdependency" + propertyvalue "github.com/superseriousbusiness/activity/streams/impl/schema/property_value" + typepropertyvalue "github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue" propertyblurhash "github.com/superseriousbusiness/activity/streams/impl/toot/property_blurhash" propertydiscoverable "github.com/superseriousbusiness/activity/streams/impl/toot/property_discoverable" propertyfeatured "github.com/superseriousbusiness/activity/streams/impl/toot/property_featured" @@ -340,6 +342,8 @@ func init() { typerepository.SetManager(mgr) typeticket.SetManager(mgr) typeticketdependency.SetManager(mgr) + propertyvalue.SetManager(mgr) + typepropertyvalue.SetManager(mgr) propertyblurhash.SetManager(mgr) propertydiscoverable.SetManager(mgr) propertyfeatured.SetManager(mgr) @@ -413,6 +417,7 @@ func init() { typerepository.SetTypePropertyConstructor(NewJSONLDTypeProperty) typeticket.SetTypePropertyConstructor(NewJSONLDTypeProperty) typeticketdependency.SetTypePropertyConstructor(NewJSONLDTypeProperty) + typepropertyvalue.SetTypePropertyConstructor(NewJSONLDTypeProperty) typeemoji.SetTypePropertyConstructor(NewJSONLDTypeProperty) typeidentityproof.SetTypePropertyConstructor(NewJSONLDTypeProperty) typepublickey.SetTypePropertyConstructor(NewJSONLDTypeProperty) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_json_resolver.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_json_resolver.go index a0758533..a2cb36d0 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/gen_json_resolver.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_json_resolver.go @@ -121,6 +121,8 @@ func NewJSONResolver(callbacks ...interface{}) (*JSONResolver, error) { // Do nothing, this callback has a correct signature. case func(context.Context, vocab.ActivityStreamsProfile) error: // Do nothing, this callback has a correct signature. + case func(context.Context, vocab.SchemaPropertyValue) error: + // Do nothing, this callback has a correct signature. case func(context.Context, vocab.W3IDSecurityV1PublicKey) error: // Do nothing, this callback has a correct signature. case func(context.Context, vocab.ForgeFedPush) error: @@ -252,6 +254,13 @@ func (this JSONResolver) Resolve(ctx context.Context, m map[string]interface{}) if len(TootAlias) > 0 { TootAlias += ":" } + SchemaAlias, ok := aliasMap["https://schema.org"] + if !ok { + SchemaAlias = aliasMap["http://schema.org"] + } + if len(SchemaAlias) > 0 { + SchemaAlias += ":" + } W3IDSecurityV1Alias, ok := aliasMap["https://w3id.org/security/v1"] if !ok { W3IDSecurityV1Alias = aliasMap["http://w3id.org/security/v1"] @@ -755,6 +764,17 @@ func (this JSONResolver) Resolve(ctx context.Context, m map[string]interface{}) } } return ErrNoCallbackMatch + } else if typeString == SchemaAlias+"PropertyValue" { + v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap) + if err != nil { + return err + } + for _, i := range this.callbacks { + if fn, ok := i.(func(context.Context, vocab.SchemaPropertyValue) error); ok { + return fn(ctx, v) + } + } + return ErrNoCallbackMatch } else if typeString == W3IDSecurityV1Alias+"PublicKey" { v, err := mgr.DeserializePublicKeyW3IDSecurityV1()(m, aliasMap) if err != nil { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_manager.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_manager.go index 902f13d4..b93a0069 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/gen_manager.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_manager.go @@ -160,6 +160,8 @@ import ( typeticketdependency "github.com/superseriousbusiness/activity/streams/impl/forgefed/type_ticketdependency" propertyid "github.com/superseriousbusiness/activity/streams/impl/jsonld/property_id" propertytype "github.com/superseriousbusiness/activity/streams/impl/jsonld/property_type" + propertyvalue "github.com/superseriousbusiness/activity/streams/impl/schema/property_value" + typepropertyvalue "github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue" propertyblurhash "github.com/superseriousbusiness/activity/streams/impl/toot/property_blurhash" propertydiscoverable "github.com/superseriousbusiness/activity/streams/impl/toot/property_discoverable" propertyfeatured "github.com/superseriousbusiness/activity/streams/impl/toot/property_featured" @@ -1693,6 +1695,18 @@ func (this Manager) DeserializeProfileActivityStreams() func(map[string]interfac } } +// DeserializePropertyValueSchema returns the deserialization method for the +// "SchemaPropertyValue" non-functional property in the vocabulary "Schema" +func (this Manager) DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) { + return func(m map[string]interface{}, aliasMap map[string]string) (vocab.SchemaPropertyValue, error) { + i, err := typepropertyvalue.DeserializePropertyValue(m, aliasMap) + if i == nil { + return nil, err + } + return i, err + } +} + // DeserializePublicKeyPemPropertyW3IDSecurityV1 returns the deserialization // method for the "W3IDSecurityV1PublicKeyPemProperty" non-functional property // in the vocabulary "W3IDSecurityV1" @@ -2311,6 +2325,18 @@ func (this Manager) DeserializeUrlPropertyActivityStreams() func(map[string]inte } } +// DeserializeValuePropertySchema returns the deserialization method for the +// "SchemaValueProperty" non-functional property in the vocabulary "Schema" +func (this Manager) DeserializeValuePropertySchema() func(map[string]interface{}, map[string]string) (vocab.SchemaValueProperty, error) { + return func(m map[string]interface{}, aliasMap map[string]string) (vocab.SchemaValueProperty, error) { + i, err := propertyvalue.DeserializeValueProperty(m, aliasMap) + if i == nil { + return nil, err + } + return i, err + } +} + // DeserializeVideoActivityStreams returns the deserialization method for the // "ActivityStreamsVideo" non-functional property in the vocabulary // "ActivityStreams" diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_disjoint.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_disjoint.go new file mode 100644 index 00000000..eec41b10 --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_disjoint.go @@ -0,0 +1,14 @@ +// Code generated by astool. DO NOT EDIT. + +package streams + +import ( + typepropertyvalue "github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue" + vocab "github.com/superseriousbusiness/activity/streams/vocab" +) + +// SchemaPropertyValueIsDisjointWith returns true if PropertyValue is disjoint +// with the other's type. +func SchemaPropertyValueIsDisjointWith(other vocab.Type) bool { + return typepropertyvalue.PropertyValueIsDisjointWith(other) +} diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_extendedby.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_extendedby.go new file mode 100644 index 00000000..0ce468fd --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_extendedby.go @@ -0,0 +1,15 @@ +// Code generated by astool. DO NOT EDIT. + +package streams + +import ( + typepropertyvalue "github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue" + vocab "github.com/superseriousbusiness/activity/streams/vocab" +) + +// SchemaPropertyValueIsExtendedBy returns true if the other's type extends from +// PropertyValue. Note that it returns false if the types are the same; see +// the "IsOrExtends" variant instead. +func SchemaPropertyValueIsExtendedBy(other vocab.Type) bool { + return typepropertyvalue.PropertyValueIsExtendedBy(other) +} diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_extends.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_extends.go new file mode 100644 index 00000000..03ff6824 --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_extends.go @@ -0,0 +1,14 @@ +// Code generated by astool. DO NOT EDIT. + +package streams + +import ( + typepropertyvalue "github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue" + vocab "github.com/superseriousbusiness/activity/streams/vocab" +) + +// SchemaSchemaPropertyValueExtends returns true if PropertyValue extends from the +// other's type. +func SchemaSchemaPropertyValueExtends(other vocab.Type) bool { + return typepropertyvalue.SchemaPropertyValueExtends(other) +} diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_isorextends.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_isorextends.go new file mode 100644 index 00000000..d72bf547 --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_isorextends.go @@ -0,0 +1,14 @@ +// Code generated by astool. DO NOT EDIT. + +package streams + +import ( + typepropertyvalue "github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue" + vocab "github.com/superseriousbusiness/activity/streams/vocab" +) + +// IsOrExtendsSchemaPropertyValue returns true if the other provided type is the +// PropertyValue type or extends from the PropertyValue type. +func IsOrExtendsSchemaPropertyValue(other vocab.Type) bool { + return typepropertyvalue.IsOrExtendsPropertyValue(other) +} diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_property_constructors.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_property_constructors.go new file mode 100644 index 00000000..ef9beb5b --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_property_constructors.go @@ -0,0 +1,13 @@ +// Code generated by astool. DO NOT EDIT. + +package streams + +import ( + propertyvalue "github.com/superseriousbusiness/activity/streams/impl/schema/property_value" + vocab "github.com/superseriousbusiness/activity/streams/vocab" +) + +// NewSchemaSchemaValueProperty creates a new SchemaValueProperty +func NewSchemaValueProperty() vocab.SchemaValueProperty { + return propertyvalue.NewSchemaValueProperty() +} diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_type_constructors.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_type_constructors.go new file mode 100644 index 00000000..9679b7b7 --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_pkg_schema_type_constructors.go @@ -0,0 +1,13 @@ +// Code generated by astool. DO NOT EDIT. + +package streams + +import ( + typepropertyvalue "github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue" + vocab "github.com/superseriousbusiness/activity/streams/vocab" +) + +// NewSchemaPropertyValue creates a new SchemaPropertyValue +func NewSchemaPropertyValue() vocab.SchemaPropertyValue { + return typepropertyvalue.NewSchemaPropertyValue() +} diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_resolver_utils.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_resolver_utils.go index 39508fc4..0b9bfbb1 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/gen_resolver_utils.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_resolver_utils.go @@ -181,6 +181,9 @@ func ToType(c context.Context, m map[string]interface{}) (t vocab.Type, err erro }, func(ctx context.Context, i vocab.ActivityStreamsProfile) error { t = i return nil + }, func(ctx context.Context, i vocab.SchemaPropertyValue) error { + t = i + return nil }, func(ctx context.Context, i vocab.W3IDSecurityV1PublicKey) error { t = i return nil diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_type_predicated_resolver.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_type_predicated_resolver.go index 017617ea..95a33a85 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/gen_type_predicated_resolver.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_type_predicated_resolver.go @@ -119,6 +119,8 @@ func NewTypePredicatedResolver(delegate Resolver, predicate interface{}) (*TypeP // Do nothing, this predicate has a correct signature. case func(context.Context, vocab.ActivityStreamsProfile) (bool, error): // Do nothing, this predicate has a correct signature. + case func(context.Context, vocab.SchemaPropertyValue) (bool, error): + // Do nothing, this predicate has a correct signature. case func(context.Context, vocab.W3IDSecurityV1PublicKey) (bool, error): // Do nothing, this predicate has a correct signature. case func(context.Context, vocab.ForgeFedPush) (bool, error): @@ -671,6 +673,17 @@ func (this TypePredicatedResolver) Apply(ctx context.Context, o ActivityStreamsI } else { return false, ErrPredicateUnmatched } + } else if o.VocabularyURI() == "http://schema.org" && o.GetTypeName() == "PropertyValue" { + if fn, ok := this.predicate.(func(context.Context, vocab.SchemaPropertyValue) (bool, error)); ok { + if v, ok := o.(vocab.SchemaPropertyValue); ok { + predicatePasses, err = fn(ctx, v) + } else { + // This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code. + return false, errCannotTypeAssertType + } + } else { + return false, ErrPredicateUnmatched + } } else if o.VocabularyURI() == "https://w3id.org/security/v1" && o.GetTypeName() == "PublicKey" { if fn, ok := this.predicate.(func(context.Context, vocab.W3IDSecurityV1PublicKey) (bool, error)); ok { if v, ok := o.(vocab.W3IDSecurityV1PublicKey); ok { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/gen_type_resolver.go b/vendor/github.com/superseriousbusiness/activity/streams/gen_type_resolver.go index a4df062e..1af01f9c 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/gen_type_resolver.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/gen_type_resolver.go @@ -118,6 +118,8 @@ func NewTypeResolver(callbacks ...interface{}) (*TypeResolver, error) { // Do nothing, this callback has a correct signature. case func(context.Context, vocab.ActivityStreamsProfile) error: // Do nothing, this callback has a correct signature. + case func(context.Context, vocab.SchemaPropertyValue) error: + // Do nothing, this callback has a correct signature. case func(context.Context, vocab.W3IDSecurityV1PublicKey) error: // Do nothing, this callback has a correct signature. case func(context.Context, vocab.ForgeFedPush) error: @@ -576,6 +578,15 @@ func (this TypeResolver) Resolve(ctx context.Context, o ActivityStreamsInterface return errCannotTypeAssertType } } + } else if o.VocabularyURI() == "http://schema.org" && o.GetTypeName() == "PropertyValue" { + if fn, ok := i.(func(context.Context, vocab.SchemaPropertyValue) error); ok { + if v, ok := o.(vocab.SchemaPropertyValue); ok { + return fn(ctx, v) + } else { + // This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code. + return errCannotTypeAssertType + } + } } else if o.VocabularyURI() == "https://w3id.org/security/v1" && o.GetTypeName() == "PublicKey" { if fn, ok := i.(func(context.Context, vocab.W3IDSecurityV1PublicKey) error); ok { if v, ok := o.(vocab.W3IDSecurityV1PublicKey); ok { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_actor/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_actor/gen_pkg.go index 997746e6..d5a862f2 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_actor/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_actor/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_actor/gen_property_activitystreams_actor.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_actor/gen_property_activitystreams_actor.go index 06b06d1c..aa8eee20 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_actor/gen_property_activitystreams_actor.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_actor/gen_property_activitystreams_actor.go @@ -58,6 +58,7 @@ type ActivityStreamsActorPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsActorPropertyIterator(i interface{}, aliasMap map alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsActorPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsActorPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsActorPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsActorPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsActorPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsActorPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsActorPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsActorPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsActorPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsActorPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsActorPropertyIterator) JSONLDContext() map[string]stri child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsActorPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsActorPropertyIterator) LessThan(o vocab.ActivityStream return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsActorPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsActorPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsActorPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsActorPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsActorPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsActorPropertyIterator) serialize() (interface{}, error return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3771,6 +3817,18 @@ func (this *ActivityStreamsActorProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "actor". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsActorProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsActorPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "actor". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsActorProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4875,6 +4933,23 @@ func (this *ActivityStreamsActorProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "actor". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsActorProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsActorPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "actor". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5147,74 +5222,78 @@ func (this ActivityStreamsActorProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6112,6 +6191,20 @@ func (this *ActivityStreamsActorProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "actor". Invalidates all iterators. +func (this *ActivityStreamsActorProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsActorPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "actor". Invalidates all iterators. func (this *ActivityStreamsActorProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6983,6 +7076,19 @@ func (this *ActivityStreamsActorProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "actor". Panics if the index is out of bounds. Invalidates +// all iterators. +func (this *ActivityStreamsActorProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsActorPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "actor". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsActorProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_anyof/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_anyof/gen_pkg.go index 3a48c6b7..eec69e1e 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_anyof/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_anyof/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_anyof/gen_property_activitystreams_anyOf.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_anyof/gen_property_activitystreams_anyOf.go index 7077ecdf..b1541b3c 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_anyof/gen_property_activitystreams_anyOf.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_anyof/gen_property_activitystreams_anyOf.go @@ -58,6 +58,7 @@ type ActivityStreamsAnyOfPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsAnyOfPropertyIterator(i interface{}, aliasMap map alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsAnyOfPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsAnyOfPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsAnyOfPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsAnyOfPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsAnyOfPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsAnyOfPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsAnyOfPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsAnyOfPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsAnyOfPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsAnyOfPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsAnyOfPropertyIterator) JSONLDContext() map[string]stri child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsAnyOfPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsAnyOfPropertyIterator) LessThan(o vocab.ActivityStream return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsAnyOfPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsAnyOfPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsAnyOfPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsAnyOfPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsAnyOfPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsAnyOfPropertyIterator) serialize() (interface{}, error return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3771,6 +3817,18 @@ func (this *ActivityStreamsAnyOfProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "anyOf". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsAnyOfProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsAnyOfPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "anyOf". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsAnyOfProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4875,6 +4933,23 @@ func (this *ActivityStreamsAnyOfProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "anyOf". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsAnyOfProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsAnyOfPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "anyOf". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5147,74 +5222,78 @@ func (this ActivityStreamsAnyOfProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6112,6 +6191,20 @@ func (this *ActivityStreamsAnyOfProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "anyOf". Invalidates all iterators. +func (this *ActivityStreamsAnyOfProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsAnyOfPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "anyOf". Invalidates all iterators. func (this *ActivityStreamsAnyOfProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6983,6 +7076,19 @@ func (this *ActivityStreamsAnyOfProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "anyOf". Panics if the index is out of bounds. Invalidates +// all iterators. +func (this *ActivityStreamsAnyOfProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsAnyOfPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "anyOf". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsAnyOfProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attachment/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attachment/gen_pkg.go index 82cd30ca..5fe6b5df 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attachment/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attachment/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attachment/gen_property_activitystreams_attachment.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attachment/gen_property_activitystreams_attachment.go index ce58868c..78943e5f 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attachment/gen_property_activitystreams_attachment.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attachment/gen_property_activitystreams_attachment.go @@ -58,6 +58,7 @@ type ActivityStreamsAttachmentPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsAttachmentPropertyIterator(i interface{}, aliasMa alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsAttachmentPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsAttachmentPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsAttachmentPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsAttachmentPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsAttachmentPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsAttachmentPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsAttachmentPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsAttachmentPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsAttachmentPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsAttachmentPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsAttachmentPropertyIterator) JSONLDContext() map[string child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsAttachmentPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsAttachmentPropertyIterator) LessThan(o vocab.ActivityS return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsAttachmentPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsAttachmentPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsAttachmentPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsAttachmentPropertyIterator) SetType(t vocab.Type) err this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsAttachmentPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsAttachmentPropertyIterator) serialize() (interface{}, return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3782,6 +3828,18 @@ func (this *ActivityStreamsAttachmentProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "attachment". Invalidates iterators that are traversing +// using Prev. +func (this *ActivityStreamsAttachmentProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsAttachmentPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "attachment". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsAttachmentProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4888,6 +4946,23 @@ func (this *ActivityStreamsAttachmentProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "attachment". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsAttachmentProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsAttachmentPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "attachment". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5160,74 +5235,78 @@ func (this ActivityStreamsAttachmentProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6126,6 +6205,20 @@ func (this *ActivityStreamsAttachmentProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "attachment". Invalidates all iterators. +func (this *ActivityStreamsAttachmentProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsAttachmentPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "attachment". Invalidates all iterators. func (this *ActivityStreamsAttachmentProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6998,6 +7091,19 @@ func (this *ActivityStreamsAttachmentProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "attachment". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsAttachmentProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsAttachmentPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "attachment". Panics if the index is out of bounds. Invalidates all // iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attributedto/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attributedto/gen_pkg.go index 029e8167..e7ea074e 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attributedto/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attributedto/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attributedto/gen_property_activitystreams_attributedTo.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attributedto/gen_property_activitystreams_attributedTo.go index e3bc6a06..6d71eef8 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attributedto/gen_property_activitystreams_attributedTo.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_attributedto/gen_property_activitystreams_attributedTo.go @@ -58,6 +58,7 @@ type ActivityStreamsAttributedToPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsAttributedToPropertyIterator(i interface{}, alias alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsAttributedToPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsAttributedToPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsAttributedToPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsAttributedToPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsAttributedToPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsAttributedToPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsAttributedToPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsAttributedToPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsAttributedToPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsAttributedToPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsAttributedToPropertyIterator) JSONLDContext() map[stri child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsAttributedToPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsAttributedToPropertyIterator) LessThan(o vocab.Activit return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsAttributedToPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsAttributedToPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsAttributedToPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsAttributedToPropertyIterator) SetType(t vocab.Type) e this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsAttributedToPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsAttributedToPropertyIterator) serialize() (interface{} return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3821,6 +3867,18 @@ func (this *ActivityStreamsAttributedToProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "attributedTo". Invalidates iterators that are traversing +// using Prev. +func (this *ActivityStreamsAttributedToProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsAttributedToPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "attributedTo". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsAttributedToProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4928,6 +4986,23 @@ func (this *ActivityStreamsAttributedToProperty) InsertIRI(idx int, v *url.URL) } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "attributedTo". Existing elements at that index and higher +// are shifted back once. Invalidates all iterators. +func (this *ActivityStreamsAttributedToProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsAttributedToPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "attributedTo". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5200,74 +5275,78 @@ func (this ActivityStreamsAttributedToProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6167,6 +6246,20 @@ func (this *ActivityStreamsAttributedToProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "attributedTo". Invalidates all iterators. +func (this *ActivityStreamsAttributedToProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsAttributedToPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "attributedTo". Invalidates all iterators. func (this *ActivityStreamsAttributedToProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -7039,6 +7132,19 @@ func (this *ActivityStreamsAttributedToProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "attributedTo". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsAttributedToProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsAttributedToPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "attributedTo". Panics if the index is out of bounds. Invalidates all // iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_audience/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_audience/gen_pkg.go index abca9b36..0b8cdff2 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_audience/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_audience/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_audience/gen_property_activitystreams_audience.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_audience/gen_property_activitystreams_audience.go index 5fd83545..a850ea83 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_audience/gen_property_activitystreams_audience.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_audience/gen_property_activitystreams_audience.go @@ -58,6 +58,7 @@ type ActivityStreamsAudiencePropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsAudiencePropertyIterator(i interface{}, aliasMap alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsAudiencePropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsAudiencePropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsAudiencePropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsAudiencePropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsAudiencePropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsAudiencePropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsAudiencePropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsAudiencePropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsAudiencePropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsAudiencePropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsAudiencePropertyIterator) JSONLDContext() map[string]s child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsAudiencePropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsAudiencePropertyIterator) LessThan(o vocab.ActivityStr return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsAudiencePropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsAudiencePropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsAudiencePropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsAudiencePropertyIterator) SetType(t vocab.Type) error this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsAudiencePropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsAudiencePropertyIterator) serialize() (interface{}, er return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3781,6 +3827,18 @@ func (this *ActivityStreamsAudienceProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "audience". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsAudienceProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsAudiencePropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "audience". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsAudienceProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4886,6 +4944,23 @@ func (this *ActivityStreamsAudienceProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "audience". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsAudienceProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsAudiencePropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "audience". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5158,74 +5233,78 @@ func (this ActivityStreamsAudienceProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6124,6 +6203,20 @@ func (this *ActivityStreamsAudienceProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "audience". Invalidates all iterators. +func (this *ActivityStreamsAudienceProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsAudiencePropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "audience". Invalidates all iterators. func (this *ActivityStreamsAudienceProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6995,6 +7088,19 @@ func (this *ActivityStreamsAudienceProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "audience". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsAudienceProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsAudiencePropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "audience". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsAudienceProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bcc/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bcc/gen_pkg.go index 7f8df194..a2b73e35 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bcc/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bcc/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bcc/gen_property_activitystreams_bcc.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bcc/gen_property_activitystreams_bcc.go index 2f491276..a7e12e32 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bcc/gen_property_activitystreams_bcc.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bcc/gen_property_activitystreams_bcc.go @@ -58,6 +58,7 @@ type ActivityStreamsBccPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -372,6 +373,12 @@ func deserializeActivityStreamsBccPropertyIterator(i interface{}, aliasMap map[s alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsBccPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsBccPropertyIterator{ alias: alias, @@ -911,6 +918,13 @@ func (this ActivityStreamsBccPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsBccPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsBccPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1059,6 +1073,9 @@ func (this ActivityStreamsBccPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1163,6 +1180,7 @@ func (this ActivityStreamsBccPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1615,6 +1633,13 @@ func (this ActivityStreamsBccPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsBccPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsBccPropertyIterator) IsTootEmoji() bool { @@ -1722,6 +1747,8 @@ func (this ActivityStreamsBccPropertyIterator) JSONLDContext() map[string]string child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1906,60 +1933,63 @@ func (this ActivityStreamsBccPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2065,6 +2095,8 @@ func (this ActivityStreamsBccPropertyIterator) LessThan(o vocab.ActivityStreamsB return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2560,6 +2592,13 @@ func (this *ActivityStreamsBccPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsBccPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsBccPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2753,6 +2792,10 @@ func (this *ActivityStreamsBccPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2876,6 +2919,7 @@ func (this *ActivityStreamsBccPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2991,6 +3035,8 @@ func (this ActivityStreamsBccPropertyIterator) serialize() (interface{}, error) return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3769,6 +3815,17 @@ func (this *ActivityStreamsBccProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "bcc". Invalidates iterators that are traversing using Prev. +func (this *ActivityStreamsBccProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsBccPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "bcc". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsBccProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4873,6 +4930,23 @@ func (this *ActivityStreamsBccProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "bcc". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsBccProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsBccPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "bcc". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5145,74 +5219,78 @@ func (this ActivityStreamsBccProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6110,6 +6188,20 @@ func (this *ActivityStreamsBccProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "bcc". Invalidates all iterators. +func (this *ActivityStreamsBccProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsBccPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "bcc". Invalidates all iterators. func (this *ActivityStreamsBccProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6981,6 +7073,19 @@ func (this *ActivityStreamsBccProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "bcc". Panics if the index is out of bounds. Invalidates +// all iterators. +func (this *ActivityStreamsBccProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsBccPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "bcc". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsBccProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bto/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bto/gen_pkg.go index deeb59f2..e3dfa4b1 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bto/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bto/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bto/gen_property_activitystreams_bto.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bto/gen_property_activitystreams_bto.go index 1faa683f..a8b32142 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bto/gen_property_activitystreams_bto.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_bto/gen_property_activitystreams_bto.go @@ -58,6 +58,7 @@ type ActivityStreamsBtoPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -372,6 +373,12 @@ func deserializeActivityStreamsBtoPropertyIterator(i interface{}, aliasMap map[s alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsBtoPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsBtoPropertyIterator{ alias: alias, @@ -911,6 +918,13 @@ func (this ActivityStreamsBtoPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsBtoPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsBtoPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1059,6 +1073,9 @@ func (this ActivityStreamsBtoPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1163,6 +1180,7 @@ func (this ActivityStreamsBtoPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1615,6 +1633,13 @@ func (this ActivityStreamsBtoPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsBtoPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsBtoPropertyIterator) IsTootEmoji() bool { @@ -1722,6 +1747,8 @@ func (this ActivityStreamsBtoPropertyIterator) JSONLDContext() map[string]string child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1906,60 +1933,63 @@ func (this ActivityStreamsBtoPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2065,6 +2095,8 @@ func (this ActivityStreamsBtoPropertyIterator) LessThan(o vocab.ActivityStreamsB return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2560,6 +2592,13 @@ func (this *ActivityStreamsBtoPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsBtoPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsBtoPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2753,6 +2792,10 @@ func (this *ActivityStreamsBtoPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2876,6 +2919,7 @@ func (this *ActivityStreamsBtoPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2991,6 +3035,8 @@ func (this ActivityStreamsBtoPropertyIterator) serialize() (interface{}, error) return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3769,6 +3815,17 @@ func (this *ActivityStreamsBtoProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "bto". Invalidates iterators that are traversing using Prev. +func (this *ActivityStreamsBtoProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsBtoPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "bto". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsBtoProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4873,6 +4930,23 @@ func (this *ActivityStreamsBtoProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "bto". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsBtoProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsBtoPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "bto". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5145,74 +5219,78 @@ func (this ActivityStreamsBtoProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6110,6 +6188,20 @@ func (this *ActivityStreamsBtoProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "bto". Invalidates all iterators. +func (this *ActivityStreamsBtoProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsBtoPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "bto". Invalidates all iterators. func (this *ActivityStreamsBtoProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6981,6 +7073,19 @@ func (this *ActivityStreamsBtoProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "bto". Panics if the index is out of bounds. Invalidates +// all iterators. +func (this *ActivityStreamsBtoProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsBtoPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "bto". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsBtoProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_pkg.go index 707dcaaa..9df4925e 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_property_activitystreams_cc.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_property_activitystreams_cc.go index e13b3b7d..2560ec0a 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_property_activitystreams_cc.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_property_activitystreams_cc.go @@ -58,6 +58,7 @@ type ActivityStreamsCcPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -372,6 +373,12 @@ func deserializeActivityStreamsCcPropertyIterator(i interface{}, aliasMap map[st alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsCcPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsCcPropertyIterator{ alias: alias, @@ -911,6 +918,13 @@ func (this ActivityStreamsCcPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsCcPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsCcPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1059,6 +1073,9 @@ func (this ActivityStreamsCcPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1163,6 +1180,7 @@ func (this ActivityStreamsCcPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1615,6 +1633,13 @@ func (this ActivityStreamsCcPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsCcPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsCcPropertyIterator) IsTootEmoji() bool { @@ -1722,6 +1747,8 @@ func (this ActivityStreamsCcPropertyIterator) JSONLDContext() map[string]string child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1906,60 +1933,63 @@ func (this ActivityStreamsCcPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2065,6 +2095,8 @@ func (this ActivityStreamsCcPropertyIterator) LessThan(o vocab.ActivityStreamsCc return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2560,6 +2592,13 @@ func (this *ActivityStreamsCcPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsCcPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsCcPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2753,6 +2792,10 @@ func (this *ActivityStreamsCcPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2876,6 +2919,7 @@ func (this *ActivityStreamsCcPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2991,6 +3035,8 @@ func (this ActivityStreamsCcPropertyIterator) serialize() (interface{}, error) { return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3769,6 +3815,17 @@ func (this *ActivityStreamsCcProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "cc". Invalidates iterators that are traversing using Prev. +func (this *ActivityStreamsCcProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsCcPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "cc". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsCcProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4873,6 +4930,23 @@ func (this *ActivityStreamsCcProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "cc". Existing elements at that index and higher are shifted +// back once. Invalidates all iterators. +func (this *ActivityStreamsCcProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsCcPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "cc". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5145,74 +5219,78 @@ func (this ActivityStreamsCcProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6110,6 +6188,20 @@ func (this *ActivityStreamsCcProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "cc". Invalidates all iterators. +func (this *ActivityStreamsCcProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsCcPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "cc". Invalidates all iterators. func (this *ActivityStreamsCcProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6981,6 +7073,19 @@ func (this *ActivityStreamsCcProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "cc". Panics if the index is out of bounds. Invalidates +// all iterators. +func (this *ActivityStreamsCcProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsCcPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "cc". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsCcProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_pkg.go index 2d7436e2..808cbdf5 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_property_activitystreams_closed.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_property_activitystreams_closed.go index c4ab13fc..76c758a4 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_property_activitystreams_closed.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_property_activitystreams_closed.go @@ -65,6 +65,7 @@ type ActivityStreamsClosedPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -380,6 +381,12 @@ func deserializeActivityStreamsClosedPropertyIterator(i interface{}, aliasMap ma alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsClosedPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsClosedPropertyIterator{ alias: alias, @@ -934,6 +941,13 @@ func (this ActivityStreamsClosedPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsClosedPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsClosedPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1082,6 +1096,9 @@ func (this ActivityStreamsClosedPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1201,6 +1218,7 @@ func (this ActivityStreamsClosedPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1653,6 +1671,13 @@ func (this ActivityStreamsClosedPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsClosedPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsClosedPropertyIterator) IsTootEmoji() bool { @@ -1774,6 +1799,8 @@ func (this ActivityStreamsClosedPropertyIterator) JSONLDContext() map[string]str child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1964,60 +1991,63 @@ func (this ActivityStreamsClosedPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 45 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 46 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 47 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 48 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 49 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 50 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 51 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 52 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 53 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 54 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 55 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 56 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 57 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 58 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 59 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 60 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 61 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 62 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 63 } + if this.IsActivityStreamsView() { + return 64 + } if this.IsIRI() { return -2 } @@ -2127,6 +2157,8 @@ func (this ActivityStreamsClosedPropertyIterator) LessThan(o vocab.ActivityStrea return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2622,6 +2654,13 @@ func (this *ActivityStreamsClosedPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsClosedPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsClosedPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2815,6 +2854,10 @@ func (this *ActivityStreamsClosedPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2956,6 +2999,7 @@ func (this *ActivityStreamsClosedPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -3075,6 +3119,8 @@ func (this ActivityStreamsClosedPropertyIterator) serialize() (interface{}, erro return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3854,6 +3900,18 @@ func (this *ActivityStreamsClosedProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "closed". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsClosedProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsClosedPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "closed". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsClosedProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4982,6 +5040,23 @@ func (this *ActivityStreamsClosedProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "closed". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsClosedProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsClosedPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "closed". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5298,74 +5373,78 @@ func (this ActivityStreamsClosedProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 46 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 47 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 62 { + } else if idx1 == 63 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 63 { + } else if idx1 == 64 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6264,6 +6343,20 @@ func (this *ActivityStreamsClosedProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "closed". Invalidates all iterators. +func (this *ActivityStreamsClosedProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsClosedPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "closed". Invalidates all iterators. func (this *ActivityStreamsClosedProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -7165,6 +7258,19 @@ func (this *ActivityStreamsClosedProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "closed". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsClosedProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsClosedPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "closed". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsClosedProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_context/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_context/gen_pkg.go index 54f1feea..61ed1419 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_context/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_context/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_context/gen_property_activitystreams_context.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_context/gen_property_activitystreams_context.go index d862bac0..6562267c 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_context/gen_property_activitystreams_context.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_context/gen_property_activitystreams_context.go @@ -58,6 +58,7 @@ type ActivityStreamsContextPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsContextPropertyIterator(i interface{}, aliasMap m alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsContextPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsContextPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsContextPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsContextPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsContextPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsContextPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsContextPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsContextPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsContextPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsContextPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsContextPropertyIterator) JSONLDContext() map[string]st child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsContextPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsContextPropertyIterator) LessThan(o vocab.ActivityStre return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsContextPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsContextPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsContextPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsContextPropertyIterator) SetType(t vocab.Type) error this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsContextPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsContextPropertyIterator) serialize() (interface{}, err return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3781,6 +3827,18 @@ func (this *ActivityStreamsContextProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "context". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsContextProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsContextPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "context". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsContextProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4886,6 +4944,23 @@ func (this *ActivityStreamsContextProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "context". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsContextProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsContextPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "context". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5158,74 +5233,78 @@ func (this ActivityStreamsContextProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6124,6 +6203,20 @@ func (this *ActivityStreamsContextProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "context". Invalidates all iterators. +func (this *ActivityStreamsContextProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsContextPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "context". Invalidates all iterators. func (this *ActivityStreamsContextProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6995,6 +7088,19 @@ func (this *ActivityStreamsContextProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "context". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsContextProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsContextPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "context". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsContextProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_describes/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_describes/gen_pkg.go index 2504c2e7..7a7da574 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_describes/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_describes/gen_pkg.go @@ -177,6 +177,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_describes/gen_property_activitystreams_describes.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_describes/gen_property_activitystreams_describes.go index bb480a1b..88ce28ca 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_describes/gen_property_activitystreams_describes.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_describes/gen_property_activitystreams_describes.go @@ -56,6 +56,7 @@ type ActivityStreamsDescribesProperty struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -359,6 +360,12 @@ func DeserializeDescribesProperty(m map[string]interface{}, aliasMap map[string] alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsDescribesProperty{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsDescribesProperty{ alias: alias, @@ -528,6 +535,7 @@ func (this *ActivityStreamsDescribesProperty) Clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -958,6 +966,13 @@ func (this ActivityStreamsDescribesProperty) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsDescribesProperty) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsDescribesProperty) GetTootEmoji() vocab.TootEmoji { @@ -1100,6 +1115,9 @@ func (this ActivityStreamsDescribesProperty) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1202,6 +1220,7 @@ func (this ActivityStreamsDescribesProperty) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1640,6 +1659,13 @@ func (this ActivityStreamsDescribesProperty) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsDescribesProperty) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsDescribesProperty) IsTootEmoji() bool { @@ -1743,6 +1769,8 @@ func (this ActivityStreamsDescribesProperty) JSONLDContext() map[string]string { child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1921,60 +1949,63 @@ func (this ActivityStreamsDescribesProperty) KindIndex() int { if this.IsActivityStreamsProfile() { return 41 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 42 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 43 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 44 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 45 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 46 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 47 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 48 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 49 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 50 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 51 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 52 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 53 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 54 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 55 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 56 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 57 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 58 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 59 } + if this.IsActivityStreamsView() { + return 60 + } if this.IsIRI() { return -2 } @@ -2076,6 +2107,8 @@ func (this ActivityStreamsDescribesProperty) LessThan(o vocab.ActivityStreamsDes return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2216,6 +2249,8 @@ func (this ActivityStreamsDescribesProperty) Serialize() (interface{}, error) { return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -2670,6 +2705,13 @@ func (this *ActivityStreamsDescribesProperty) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsDescribesProperty) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.Clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsDescribesProperty) SetTootEmoji(v vocab.TootEmoji) { @@ -2855,6 +2897,10 @@ func (this *ActivityStreamsDescribesProperty) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_formertype/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_formertype/gen_pkg.go index 4fb353de..4c0c3cb4 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_formertype/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_formertype/gen_pkg.go @@ -177,6 +177,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_formertype/gen_property_activitystreams_formerType.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_formertype/gen_property_activitystreams_formerType.go index 89563d54..bed08ca9 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_formertype/gen_property_activitystreams_formerType.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_formertype/gen_property_activitystreams_formerType.go @@ -59,6 +59,7 @@ type ActivityStreamsFormerTypePropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -362,6 +363,12 @@ func deserializeActivityStreamsFormerTypePropertyIterator(i interface{}, aliasMa alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsFormerTypePropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsFormerTypePropertyIterator{ alias: alias, @@ -895,6 +902,13 @@ func (this ActivityStreamsFormerTypePropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsFormerTypePropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsFormerTypePropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1037,6 +1051,9 @@ func (this ActivityStreamsFormerTypePropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1146,6 +1163,7 @@ func (this ActivityStreamsFormerTypePropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1584,6 +1602,13 @@ func (this ActivityStreamsFormerTypePropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsFormerTypePropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsFormerTypePropertyIterator) IsTootEmoji() bool { @@ -1694,6 +1719,8 @@ func (this ActivityStreamsFormerTypePropertyIterator) JSONLDContext() map[string child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1875,60 +1902,63 @@ func (this ActivityStreamsFormerTypePropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 42 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 43 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 44 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 45 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 46 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 47 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 48 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 49 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 50 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 51 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 52 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 53 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 54 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 55 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 56 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 57 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 58 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 59 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 60 } + if this.IsActivityStreamsView() { + return 61 + } if this.IsIRI() { return -2 } @@ -2032,6 +2062,8 @@ func (this ActivityStreamsFormerTypePropertyIterator) LessThan(o vocab.ActivityS return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2513,6 +2545,13 @@ func (this *ActivityStreamsFormerTypePropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsFormerTypePropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsFormerTypePropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2698,6 +2737,10 @@ func (this *ActivityStreamsFormerTypePropertyIterator) SetType(t vocab.Type) err this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2828,6 +2871,7 @@ func (this *ActivityStreamsFormerTypePropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2941,6 +2985,8 @@ func (this ActivityStreamsFormerTypePropertyIterator) serialize() (interface{}, return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3708,6 +3754,18 @@ func (this *ActivityStreamsFormerTypeProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "formerType". Invalidates iterators that are traversing +// using Prev. +func (this *ActivityStreamsFormerTypeProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsFormerTypePropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "formerType". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsFormerTypeProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4792,6 +4850,23 @@ func (this *ActivityStreamsFormerTypeProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "formerType". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsFormerTypeProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsFormerTypePropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "formerType". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5078,74 +5153,78 @@ func (this ActivityStreamsFormerTypeProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 43 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 44 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 44 { + } else if idx1 == 45 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6016,6 +6095,20 @@ func (this *ActivityStreamsFormerTypeProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "formerType". Invalidates all iterators. +func (this *ActivityStreamsFormerTypeProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsFormerTypePropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "formerType". Invalidates all iterators. func (this *ActivityStreamsFormerTypeProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6877,6 +6970,19 @@ func (this *ActivityStreamsFormerTypeProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "formerType". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsFormerTypeProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsFormerTypePropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "formerType". Panics if the index is out of bounds. Invalidates all // iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_generator/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_generator/gen_pkg.go index 42417f03..a5fa2401 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_generator/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_generator/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_generator/gen_property_activitystreams_generator.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_generator/gen_property_activitystreams_generator.go index e876b321..86de2932 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_generator/gen_property_activitystreams_generator.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_generator/gen_property_activitystreams_generator.go @@ -58,6 +58,7 @@ type ActivityStreamsGeneratorPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsGeneratorPropertyIterator(i interface{}, aliasMap alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsGeneratorPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsGeneratorPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsGeneratorPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsGeneratorPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsGeneratorPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsGeneratorPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsGeneratorPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsGeneratorPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsGeneratorPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsGeneratorPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsGeneratorPropertyIterator) JSONLDContext() map[string] child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsGeneratorPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsGeneratorPropertyIterator) LessThan(o vocab.ActivitySt return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsGeneratorPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsGeneratorPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsGeneratorPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsGeneratorPropertyIterator) SetType(t vocab.Type) erro this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsGeneratorPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsGeneratorPropertyIterator) serialize() (interface{}, e return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3781,6 +3827,18 @@ func (this *ActivityStreamsGeneratorProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "generator". Invalidates iterators that are traversing +// using Prev. +func (this *ActivityStreamsGeneratorProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsGeneratorPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "generator". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsGeneratorProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4886,6 +4944,23 @@ func (this *ActivityStreamsGeneratorProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "generator". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsGeneratorProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsGeneratorPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "generator". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5158,74 +5233,78 @@ func (this ActivityStreamsGeneratorProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6124,6 +6203,20 @@ func (this *ActivityStreamsGeneratorProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "generator". Invalidates all iterators. +func (this *ActivityStreamsGeneratorProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsGeneratorPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "generator". Invalidates all iterators. func (this *ActivityStreamsGeneratorProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6996,6 +7089,19 @@ func (this *ActivityStreamsGeneratorProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "generator". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsGeneratorProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsGeneratorPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "generator". Panics if the index is out of bounds. Invalidates all // iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_inreplyto/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_inreplyto/gen_pkg.go index 1832a063..5d02a13c 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_inreplyto/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_inreplyto/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_inreplyto/gen_property_activitystreams_inReplyTo.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_inreplyto/gen_property_activitystreams_inReplyTo.go index 5766c3b0..e8317747 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_inreplyto/gen_property_activitystreams_inReplyTo.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_inreplyto/gen_property_activitystreams_inReplyTo.go @@ -58,6 +58,7 @@ type ActivityStreamsInReplyToPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsInReplyToPropertyIterator(i interface{}, aliasMap alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsInReplyToPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsInReplyToPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsInReplyToPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsInReplyToPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsInReplyToPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsInReplyToPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsInReplyToPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsInReplyToPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsInReplyToPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsInReplyToPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsInReplyToPropertyIterator) JSONLDContext() map[string] child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsInReplyToPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsInReplyToPropertyIterator) LessThan(o vocab.ActivitySt return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsInReplyToPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsInReplyToPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsInReplyToPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsInReplyToPropertyIterator) SetType(t vocab.Type) erro this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsInReplyToPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsInReplyToPropertyIterator) serialize() (interface{}, e return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3781,6 +3827,18 @@ func (this *ActivityStreamsInReplyToProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "inReplyTo". Invalidates iterators that are traversing +// using Prev. +func (this *ActivityStreamsInReplyToProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsInReplyToPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "inReplyTo". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsInReplyToProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4886,6 +4944,23 @@ func (this *ActivityStreamsInReplyToProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "inReplyTo". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsInReplyToProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsInReplyToPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "inReplyTo". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5158,74 +5233,78 @@ func (this ActivityStreamsInReplyToProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6124,6 +6203,20 @@ func (this *ActivityStreamsInReplyToProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "inReplyTo". Invalidates all iterators. +func (this *ActivityStreamsInReplyToProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsInReplyToPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "inReplyTo". Invalidates all iterators. func (this *ActivityStreamsInReplyToProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6996,6 +7089,19 @@ func (this *ActivityStreamsInReplyToProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "inReplyTo". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsInReplyToProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsInReplyToPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "inReplyTo". Panics if the index is out of bounds. Invalidates all // iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_instrument/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_instrument/gen_pkg.go index d7d008d7..8437a443 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_instrument/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_instrument/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_instrument/gen_property_activitystreams_instrument.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_instrument/gen_property_activitystreams_instrument.go index b0f0070b..b73e0739 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_instrument/gen_property_activitystreams_instrument.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_instrument/gen_property_activitystreams_instrument.go @@ -58,6 +58,7 @@ type ActivityStreamsInstrumentPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsInstrumentPropertyIterator(i interface{}, aliasMa alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsInstrumentPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsInstrumentPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsInstrumentPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsInstrumentPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsInstrumentPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsInstrumentPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsInstrumentPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsInstrumentPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsInstrumentPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsInstrumentPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsInstrumentPropertyIterator) JSONLDContext() map[string child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsInstrumentPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsInstrumentPropertyIterator) LessThan(o vocab.ActivityS return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsInstrumentPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsInstrumentPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsInstrumentPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsInstrumentPropertyIterator) SetType(t vocab.Type) err this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsInstrumentPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsInstrumentPropertyIterator) serialize() (interface{}, return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3782,6 +3828,18 @@ func (this *ActivityStreamsInstrumentProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "instrument". Invalidates iterators that are traversing +// using Prev. +func (this *ActivityStreamsInstrumentProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsInstrumentPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "instrument". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsInstrumentProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4888,6 +4946,23 @@ func (this *ActivityStreamsInstrumentProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "instrument". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsInstrumentProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsInstrumentPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "instrument". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5160,74 +5235,78 @@ func (this ActivityStreamsInstrumentProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6126,6 +6205,20 @@ func (this *ActivityStreamsInstrumentProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "instrument". Invalidates all iterators. +func (this *ActivityStreamsInstrumentProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsInstrumentPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "instrument". Invalidates all iterators. func (this *ActivityStreamsInstrumentProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6998,6 +7091,19 @@ func (this *ActivityStreamsInstrumentProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "instrument". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsInstrumentProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsInstrumentPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "instrument". Panics if the index is out of bounds. Invalidates all // iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_pkg.go index 311a3816..3227d852 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_property_activitystreams_items.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_property_activitystreams_items.go index 7944a454..c0dccff4 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_property_activitystreams_items.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_property_activitystreams_items.go @@ -58,6 +58,7 @@ type ActivityStreamsItemsPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsItemsPropertyIterator(i interface{}, aliasMap map alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsItemsPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsItemsPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsItemsPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsItemsPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsItemsPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsItemsPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsItemsPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsItemsPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsItemsPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsItemsPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsItemsPropertyIterator) JSONLDContext() map[string]stri child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsItemsPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsItemsPropertyIterator) LessThan(o vocab.ActivityStream return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsItemsPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsItemsPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsItemsPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsItemsPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsItemsPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsItemsPropertyIterator) serialize() (interface{}, error return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3771,6 +3817,18 @@ func (this *ActivityStreamsItemsProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "items". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsItemsProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsItemsPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "items". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsItemsProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4875,6 +4933,23 @@ func (this *ActivityStreamsItemsProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "items". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsItemsProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsItemsPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "items". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5147,74 +5222,78 @@ func (this ActivityStreamsItemsProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6112,6 +6191,20 @@ func (this *ActivityStreamsItemsProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "items". Invalidates all iterators. +func (this *ActivityStreamsItemsProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsItemsPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "items". Invalidates all iterators. func (this *ActivityStreamsItemsProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6983,6 +7076,19 @@ func (this *ActivityStreamsItemsProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "items". Panics if the index is out of bounds. Invalidates +// all iterators. +func (this *ActivityStreamsItemsProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsItemsPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "items". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsItemsProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_location/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_location/gen_pkg.go index de04e27b..2150f847 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_location/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_location/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_location/gen_property_activitystreams_location.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_location/gen_property_activitystreams_location.go index eef781bb..cc21513b 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_location/gen_property_activitystreams_location.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_location/gen_property_activitystreams_location.go @@ -58,6 +58,7 @@ type ActivityStreamsLocationPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsLocationPropertyIterator(i interface{}, aliasMap alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsLocationPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsLocationPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsLocationPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsLocationPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsLocationPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsLocationPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsLocationPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsLocationPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsLocationPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsLocationPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsLocationPropertyIterator) JSONLDContext() map[string]s child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsLocationPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsLocationPropertyIterator) LessThan(o vocab.ActivityStr return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsLocationPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsLocationPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsLocationPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsLocationPropertyIterator) SetType(t vocab.Type) error this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsLocationPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsLocationPropertyIterator) serialize() (interface{}, er return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3781,6 +3827,18 @@ func (this *ActivityStreamsLocationProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "location". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsLocationProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsLocationPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "location". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsLocationProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4886,6 +4944,23 @@ func (this *ActivityStreamsLocationProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "location". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsLocationProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsLocationPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "location". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5158,74 +5233,78 @@ func (this ActivityStreamsLocationProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6124,6 +6203,20 @@ func (this *ActivityStreamsLocationProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "location". Invalidates all iterators. +func (this *ActivityStreamsLocationProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsLocationPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "location". Invalidates all iterators. func (this *ActivityStreamsLocationProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6995,6 +7088,19 @@ func (this *ActivityStreamsLocationProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "location". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsLocationProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsLocationPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "location". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsLocationProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_object/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_object/gen_pkg.go index 962ed946..d5a67da4 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_object/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_object/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_object/gen_property_activitystreams_object.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_object/gen_property_activitystreams_object.go index 23807ad6..300c62a5 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_object/gen_property_activitystreams_object.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_object/gen_property_activitystreams_object.go @@ -58,6 +58,7 @@ type ActivityStreamsObjectPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsObjectPropertyIterator(i interface{}, aliasMap ma alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsObjectPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsObjectPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsObjectPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsObjectPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsObjectPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsObjectPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsObjectPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsObjectPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsObjectPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsObjectPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsObjectPropertyIterator) JSONLDContext() map[string]str child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsObjectPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsObjectPropertyIterator) LessThan(o vocab.ActivityStrea return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsObjectPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsObjectPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsObjectPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsObjectPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsObjectPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsObjectPropertyIterator) serialize() (interface{}, erro return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3771,6 +3817,18 @@ func (this *ActivityStreamsObjectProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "object". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsObjectProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsObjectPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "object". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsObjectProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4875,6 +4933,23 @@ func (this *ActivityStreamsObjectProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "object". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsObjectProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsObjectPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "object". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5147,74 +5222,78 @@ func (this ActivityStreamsObjectProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6113,6 +6192,20 @@ func (this *ActivityStreamsObjectProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "object". Invalidates all iterators. +func (this *ActivityStreamsObjectProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsObjectPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "object". Invalidates all iterators. func (this *ActivityStreamsObjectProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6984,6 +7077,19 @@ func (this *ActivityStreamsObjectProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "object". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsObjectProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsObjectPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "object". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsObjectProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_oneof/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_oneof/gen_pkg.go index 67ce556c..efff9b2a 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_oneof/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_oneof/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_oneof/gen_property_activitystreams_oneOf.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_oneof/gen_property_activitystreams_oneOf.go index abb3b6b2..91133573 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_oneof/gen_property_activitystreams_oneOf.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_oneof/gen_property_activitystreams_oneOf.go @@ -58,6 +58,7 @@ type ActivityStreamsOneOfPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsOneOfPropertyIterator(i interface{}, aliasMap map alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsOneOfPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsOneOfPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsOneOfPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsOneOfPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsOneOfPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsOneOfPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsOneOfPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsOneOfPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsOneOfPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsOneOfPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsOneOfPropertyIterator) JSONLDContext() map[string]stri child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsOneOfPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsOneOfPropertyIterator) LessThan(o vocab.ActivityStream return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsOneOfPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsOneOfPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsOneOfPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsOneOfPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsOneOfPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsOneOfPropertyIterator) serialize() (interface{}, error return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3771,6 +3817,18 @@ func (this *ActivityStreamsOneOfProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "oneOf". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsOneOfProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsOneOfPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "oneOf". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsOneOfProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4875,6 +4933,23 @@ func (this *ActivityStreamsOneOfProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "oneOf". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsOneOfProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsOneOfPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "oneOf". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5147,74 +5222,78 @@ func (this ActivityStreamsOneOfProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6112,6 +6191,20 @@ func (this *ActivityStreamsOneOfProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "oneOf". Invalidates all iterators. +func (this *ActivityStreamsOneOfProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsOneOfPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "oneOf". Invalidates all iterators. func (this *ActivityStreamsOneOfProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6983,6 +7076,19 @@ func (this *ActivityStreamsOneOfProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "oneOf". Panics if the index is out of bounds. Invalidates +// all iterators. +func (this *ActivityStreamsOneOfProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsOneOfPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "oneOf". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsOneOfProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_ordereditems/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_ordereditems/gen_pkg.go index 44dc09f6..7ff68874 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_ordereditems/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_ordereditems/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_ordereditems/gen_property_activitystreams_orderedItems.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_ordereditems/gen_property_activitystreams_orderedItems.go index f3b4fb2e..7b02ca38 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_ordereditems/gen_property_activitystreams_orderedItems.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_ordereditems/gen_property_activitystreams_orderedItems.go @@ -58,6 +58,7 @@ type ActivityStreamsOrderedItemsPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsOrderedItemsPropertyIterator(i interface{}, alias alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsOrderedItemsPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsOrderedItemsPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsOrderedItemsPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsOrderedItemsPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsOrderedItemsPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsOrderedItemsPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsOrderedItemsPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsOrderedItemsPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsOrderedItemsPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsOrderedItemsPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsOrderedItemsPropertyIterator) JSONLDContext() map[stri child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsOrderedItemsPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsOrderedItemsPropertyIterator) LessThan(o vocab.Activit return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsOrderedItemsPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsOrderedItemsPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsOrderedItemsPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsOrderedItemsPropertyIterator) SetType(t vocab.Type) e this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsOrderedItemsPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsOrderedItemsPropertyIterator) serialize() (interface{} return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3821,6 +3867,18 @@ func (this *ActivityStreamsOrderedItemsProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "orderedItems". Invalidates iterators that are traversing +// using Prev. +func (this *ActivityStreamsOrderedItemsProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsOrderedItemsPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "orderedItems". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsOrderedItemsProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4928,6 +4986,23 @@ func (this *ActivityStreamsOrderedItemsProperty) InsertIRI(idx int, v *url.URL) } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "orderedItems". Existing elements at that index and higher +// are shifted back once. Invalidates all iterators. +func (this *ActivityStreamsOrderedItemsProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsOrderedItemsPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "orderedItems". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5200,74 +5275,78 @@ func (this ActivityStreamsOrderedItemsProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6167,6 +6246,20 @@ func (this *ActivityStreamsOrderedItemsProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "orderedItems". Invalidates all iterators. +func (this *ActivityStreamsOrderedItemsProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsOrderedItemsPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "orderedItems". Invalidates all iterators. func (this *ActivityStreamsOrderedItemsProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -7039,6 +7132,19 @@ func (this *ActivityStreamsOrderedItemsProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "orderedItems". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsOrderedItemsProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsOrderedItemsPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "orderedItems". Panics if the index is out of bounds. Invalidates all // iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_origin/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_origin/gen_pkg.go index a571a665..7430de0e 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_origin/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_origin/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_origin/gen_property_activitystreams_origin.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_origin/gen_property_activitystreams_origin.go index 34237f5d..b74a2162 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_origin/gen_property_activitystreams_origin.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_origin/gen_property_activitystreams_origin.go @@ -58,6 +58,7 @@ type ActivityStreamsOriginPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsOriginPropertyIterator(i interface{}, aliasMap ma alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsOriginPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsOriginPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsOriginPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsOriginPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsOriginPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsOriginPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsOriginPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsOriginPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsOriginPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsOriginPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsOriginPropertyIterator) JSONLDContext() map[string]str child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsOriginPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsOriginPropertyIterator) LessThan(o vocab.ActivityStrea return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsOriginPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsOriginPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsOriginPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsOriginPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsOriginPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsOriginPropertyIterator) serialize() (interface{}, erro return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3771,6 +3817,18 @@ func (this *ActivityStreamsOriginProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "origin". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsOriginProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsOriginPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "origin". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsOriginProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4875,6 +4933,23 @@ func (this *ActivityStreamsOriginProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "origin". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsOriginProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsOriginPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "origin". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5147,74 +5222,78 @@ func (this ActivityStreamsOriginProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6113,6 +6192,20 @@ func (this *ActivityStreamsOriginProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "origin". Invalidates all iterators. +func (this *ActivityStreamsOriginProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsOriginPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "origin". Invalidates all iterators. func (this *ActivityStreamsOriginProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6984,6 +7077,19 @@ func (this *ActivityStreamsOriginProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "origin". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsOriginProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsOriginPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "origin". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsOriginProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_preview/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_preview/gen_pkg.go index f2ce41e5..1805ec7e 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_preview/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_preview/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_preview/gen_property_activitystreams_preview.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_preview/gen_property_activitystreams_preview.go index 24406772..9782ef25 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_preview/gen_property_activitystreams_preview.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_preview/gen_property_activitystreams_preview.go @@ -58,6 +58,7 @@ type ActivityStreamsPreviewPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsPreviewPropertyIterator(i interface{}, aliasMap m alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsPreviewPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsPreviewPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsPreviewPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsPreviewPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsPreviewPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsPreviewPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsPreviewPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsPreviewPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsPreviewPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsPreviewPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsPreviewPropertyIterator) JSONLDContext() map[string]st child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsPreviewPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsPreviewPropertyIterator) LessThan(o vocab.ActivityStre return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsPreviewPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsPreviewPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsPreviewPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsPreviewPropertyIterator) SetType(t vocab.Type) error this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsPreviewPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsPreviewPropertyIterator) serialize() (interface{}, err return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3781,6 +3827,18 @@ func (this *ActivityStreamsPreviewProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "preview". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsPreviewProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsPreviewPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "preview". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsPreviewProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4886,6 +4944,23 @@ func (this *ActivityStreamsPreviewProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "preview". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsPreviewProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsPreviewPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "preview". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5158,74 +5233,78 @@ func (this ActivityStreamsPreviewProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6124,6 +6203,20 @@ func (this *ActivityStreamsPreviewProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "preview". Invalidates all iterators. +func (this *ActivityStreamsPreviewProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsPreviewPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "preview". Invalidates all iterators. func (this *ActivityStreamsPreviewProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6995,6 +7088,19 @@ func (this *ActivityStreamsPreviewProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "preview". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsPreviewProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsPreviewPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "preview". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsPreviewProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_pkg.go index 7e3c3021..d7c16c04 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_pkg.go @@ -177,6 +177,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_property_activitystreams_relationship.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_property_activitystreams_relationship.go index f36234e6..e1ddc6a2 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_property_activitystreams_relationship.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_property_activitystreams_relationship.go @@ -56,6 +56,7 @@ type ActivityStreamsRelationshipPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -359,6 +360,12 @@ func deserializeActivityStreamsRelationshipPropertyIterator(i interface{}, alias alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsRelationshipPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsRelationshipPropertyIterator{ alias: alias, @@ -884,6 +891,13 @@ func (this ActivityStreamsRelationshipPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsRelationshipPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsRelationshipPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1026,6 +1040,9 @@ func (this ActivityStreamsRelationshipPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1128,6 +1145,7 @@ func (this ActivityStreamsRelationshipPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1566,6 +1584,13 @@ func (this ActivityStreamsRelationshipPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsRelationshipPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsRelationshipPropertyIterator) IsTootEmoji() bool { @@ -1669,6 +1694,8 @@ func (this ActivityStreamsRelationshipPropertyIterator) JSONLDContext() map[stri child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1847,60 +1874,63 @@ func (this ActivityStreamsRelationshipPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 41 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 42 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 43 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 44 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 45 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 46 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 47 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 48 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 49 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 50 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 51 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 52 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 53 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 54 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 55 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 56 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 57 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 58 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 59 } + if this.IsActivityStreamsView() { + return 60 + } if this.IsIRI() { return -2 } @@ -2002,6 +2032,8 @@ func (this ActivityStreamsRelationshipPropertyIterator) LessThan(o vocab.Activit return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2483,6 +2515,13 @@ func (this *ActivityStreamsRelationshipPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsRelationshipPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsRelationshipPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2668,6 +2707,10 @@ func (this *ActivityStreamsRelationshipPropertyIterator) SetType(t vocab.Type) e this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2789,6 +2832,7 @@ func (this *ActivityStreamsRelationshipPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2900,6 +2944,8 @@ func (this ActivityStreamsRelationshipPropertyIterator) serialize() (interface{} return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3705,6 +3751,18 @@ func (this *ActivityStreamsRelationshipProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "relationship". Invalidates iterators that are traversing +// using Prev. +func (this *ActivityStreamsRelationshipProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsRelationshipPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "relationship". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsRelationshipProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4778,6 +4836,23 @@ func (this *ActivityStreamsRelationshipProperty) InsertIRI(idx int, v *url.URL) } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "relationship". Existing elements at that index and higher +// are shifted back once. Invalidates all iterators. +func (this *ActivityStreamsRelationshipProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsRelationshipPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "relationship". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5042,74 +5117,78 @@ func (this ActivityStreamsRelationshipProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 42 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 43 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 43 { + } else if idx1 == 44 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 44 { + } else if idx1 == 45 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -5981,6 +6060,20 @@ func (this *ActivityStreamsRelationshipProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "relationship". Invalidates all iterators. +func (this *ActivityStreamsRelationshipProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsRelationshipPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "relationship". Invalidates all iterators. func (this *ActivityStreamsRelationshipProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6827,6 +6920,19 @@ func (this *ActivityStreamsRelationshipProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "relationship". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsRelationshipProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsRelationshipPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "relationship". Panics if the index is out of bounds. Invalidates all // iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_result/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_result/gen_pkg.go index 1cdcaae7..b4da9eb2 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_result/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_result/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_result/gen_property_activitystreams_result.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_result/gen_property_activitystreams_result.go index 3e967d0c..ac8a047a 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_result/gen_property_activitystreams_result.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_result/gen_property_activitystreams_result.go @@ -58,6 +58,7 @@ type ActivityStreamsResultPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsResultPropertyIterator(i interface{}, aliasMap ma alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsResultPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsResultPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsResultPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsResultPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsResultPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsResultPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsResultPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsResultPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsResultPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsResultPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsResultPropertyIterator) JSONLDContext() map[string]str child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsResultPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsResultPropertyIterator) LessThan(o vocab.ActivityStrea return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsResultPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsResultPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsResultPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsResultPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsResultPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsResultPropertyIterator) serialize() (interface{}, erro return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3771,6 +3817,18 @@ func (this *ActivityStreamsResultProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "result". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsResultProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsResultPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "result". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsResultProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4875,6 +4933,23 @@ func (this *ActivityStreamsResultProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "result". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsResultProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsResultPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "result". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5147,74 +5222,78 @@ func (this ActivityStreamsResultProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6113,6 +6192,20 @@ func (this *ActivityStreamsResultProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "result". Invalidates all iterators. +func (this *ActivityStreamsResultProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsResultPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "result". Invalidates all iterators. func (this *ActivityStreamsResultProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6984,6 +7077,19 @@ func (this *ActivityStreamsResultProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "result". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsResultProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsResultPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "result". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsResultProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_source/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_source/gen_pkg.go index 9088fda6..f84d1a42 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_source/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_source/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_source/gen_property_activitystreams_source.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_source/gen_property_activitystreams_source.go index 486041ea..5cc532d2 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_source/gen_property_activitystreams_source.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_source/gen_property_activitystreams_source.go @@ -58,6 +58,7 @@ type ActivityStreamsSourceProperty struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func DeserializeSourceProperty(m map[string]interface{}, aliasMap map[string]str alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsSourceProperty{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsSourceProperty{ alias: alias, @@ -544,6 +551,7 @@ func (this *ActivityStreamsSourceProperty) Clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -988,6 +996,13 @@ func (this ActivityStreamsSourceProperty) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsSourceProperty) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsSourceProperty) GetTootEmoji() vocab.TootEmoji { @@ -1136,6 +1151,9 @@ func (this ActivityStreamsSourceProperty) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1240,6 +1258,7 @@ func (this ActivityStreamsSourceProperty) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1692,6 +1711,13 @@ func (this ActivityStreamsSourceProperty) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsSourceProperty) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsSourceProperty) IsTootEmoji() bool { @@ -1799,6 +1825,8 @@ func (this ActivityStreamsSourceProperty) JSONLDContext() map[string]string { child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1983,60 +2011,63 @@ func (this ActivityStreamsSourceProperty) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2142,6 +2173,8 @@ func (this ActivityStreamsSourceProperty) LessThan(o vocab.ActivityStreamsSource return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2286,6 +2319,8 @@ func (this ActivityStreamsSourceProperty) Serialize() (interface{}, error) { return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -2754,6 +2789,13 @@ func (this *ActivityStreamsSourceProperty) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsSourceProperty) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.Clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsSourceProperty) SetTootEmoji(v vocab.TootEmoji) { @@ -2947,6 +2989,10 @@ func (this *ActivityStreamsSourceProperty) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_subject/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_subject/gen_pkg.go index 893da0b2..9708e08a 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_subject/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_subject/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_subject/gen_property_activitystreams_subject.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_subject/gen_property_activitystreams_subject.go index fc7cdb82..9904c54d 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_subject/gen_property_activitystreams_subject.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_subject/gen_property_activitystreams_subject.go @@ -58,6 +58,7 @@ type ActivityStreamsSubjectProperty struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func DeserializeSubjectProperty(m map[string]interface{}, aliasMap map[string]st alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsSubjectProperty{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsSubjectProperty{ alias: alias, @@ -544,6 +551,7 @@ func (this *ActivityStreamsSubjectProperty) Clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -988,6 +996,13 @@ func (this ActivityStreamsSubjectProperty) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsSubjectProperty) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsSubjectProperty) GetTootEmoji() vocab.TootEmoji { @@ -1136,6 +1151,9 @@ func (this ActivityStreamsSubjectProperty) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1240,6 +1258,7 @@ func (this ActivityStreamsSubjectProperty) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1692,6 +1711,13 @@ func (this ActivityStreamsSubjectProperty) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsSubjectProperty) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsSubjectProperty) IsTootEmoji() bool { @@ -1799,6 +1825,8 @@ func (this ActivityStreamsSubjectProperty) JSONLDContext() map[string]string { child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1983,60 +2011,63 @@ func (this ActivityStreamsSubjectProperty) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2142,6 +2173,8 @@ func (this ActivityStreamsSubjectProperty) LessThan(o vocab.ActivityStreamsSubje return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2286,6 +2319,8 @@ func (this ActivityStreamsSubjectProperty) Serialize() (interface{}, error) { return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -2754,6 +2789,13 @@ func (this *ActivityStreamsSubjectProperty) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsSubjectProperty) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.Clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsSubjectProperty) SetTootEmoji(v vocab.TootEmoji) { @@ -2947,6 +2989,10 @@ func (this *ActivityStreamsSubjectProperty) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_tag/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_tag/gen_pkg.go index 7fc5026e..cde7aa8d 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_tag/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_tag/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_tag/gen_property_activitystreams_tag.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_tag/gen_property_activitystreams_tag.go index 68d7ce03..d72c3890 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_tag/gen_property_activitystreams_tag.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_tag/gen_property_activitystreams_tag.go @@ -58,6 +58,7 @@ type ActivityStreamsTagPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -372,6 +373,12 @@ func deserializeActivityStreamsTagPropertyIterator(i interface{}, aliasMap map[s alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsTagPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsTagPropertyIterator{ alias: alias, @@ -911,6 +918,13 @@ func (this ActivityStreamsTagPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsTagPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsTagPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1059,6 +1073,9 @@ func (this ActivityStreamsTagPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1163,6 +1180,7 @@ func (this ActivityStreamsTagPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1615,6 +1633,13 @@ func (this ActivityStreamsTagPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsTagPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsTagPropertyIterator) IsTootEmoji() bool { @@ -1722,6 +1747,8 @@ func (this ActivityStreamsTagPropertyIterator) JSONLDContext() map[string]string child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1906,60 +1933,63 @@ func (this ActivityStreamsTagPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2065,6 +2095,8 @@ func (this ActivityStreamsTagPropertyIterator) LessThan(o vocab.ActivityStreamsT return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2560,6 +2592,13 @@ func (this *ActivityStreamsTagPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsTagPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsTagPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2753,6 +2792,10 @@ func (this *ActivityStreamsTagPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2876,6 +2919,7 @@ func (this *ActivityStreamsTagPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2991,6 +3035,8 @@ func (this ActivityStreamsTagPropertyIterator) serialize() (interface{}, error) return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3769,6 +3815,17 @@ func (this *ActivityStreamsTagProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "tag". Invalidates iterators that are traversing using Prev. +func (this *ActivityStreamsTagProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsTagPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "tag". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsTagProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4873,6 +4930,23 @@ func (this *ActivityStreamsTagProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "tag". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsTagProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsTagPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "tag". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5145,74 +5219,78 @@ func (this ActivityStreamsTagProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6110,6 +6188,20 @@ func (this *ActivityStreamsTagProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "tag". Invalidates all iterators. +func (this *ActivityStreamsTagProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsTagPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "tag". Invalidates all iterators. func (this *ActivityStreamsTagProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6981,6 +7073,19 @@ func (this *ActivityStreamsTagProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "tag". Panics if the index is out of bounds. Invalidates +// all iterators. +func (this *ActivityStreamsTagProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsTagPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "tag". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsTagProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_target/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_target/gen_pkg.go index 47b9a3c2..ce55d83f 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_target/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_target/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_target/gen_property_activitystreams_target.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_target/gen_property_activitystreams_target.go index 67af9c81..02fda0c7 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_target/gen_property_activitystreams_target.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_target/gen_property_activitystreams_target.go @@ -58,6 +58,7 @@ type ActivityStreamsTargetPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -373,6 +374,12 @@ func deserializeActivityStreamsTargetPropertyIterator(i interface{}, aliasMap ma alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsTargetPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsTargetPropertyIterator{ alias: alias, @@ -912,6 +919,13 @@ func (this ActivityStreamsTargetPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsTargetPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsTargetPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1060,6 +1074,9 @@ func (this ActivityStreamsTargetPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1164,6 +1181,7 @@ func (this ActivityStreamsTargetPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1616,6 +1634,13 @@ func (this ActivityStreamsTargetPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsTargetPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsTargetPropertyIterator) IsTootEmoji() bool { @@ -1723,6 +1748,8 @@ func (this ActivityStreamsTargetPropertyIterator) JSONLDContext() map[string]str child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1907,60 +1934,63 @@ func (this ActivityStreamsTargetPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2066,6 +2096,8 @@ func (this ActivityStreamsTargetPropertyIterator) LessThan(o vocab.ActivityStrea return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2561,6 +2593,13 @@ func (this *ActivityStreamsTargetPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsTargetPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsTargetPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2754,6 +2793,10 @@ func (this *ActivityStreamsTargetPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2877,6 +2920,7 @@ func (this *ActivityStreamsTargetPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2992,6 +3036,8 @@ func (this ActivityStreamsTargetPropertyIterator) serialize() (interface{}, erro return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3771,6 +3817,18 @@ func (this *ActivityStreamsTargetProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "target". Invalidates iterators that are traversing using +// Prev. +func (this *ActivityStreamsTargetProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsTargetPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "target". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsTargetProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4875,6 +4933,23 @@ func (this *ActivityStreamsTargetProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "target". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ActivityStreamsTargetProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsTargetPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "target". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5147,74 +5222,78 @@ func (this ActivityStreamsTargetProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6113,6 +6192,20 @@ func (this *ActivityStreamsTargetProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "target". Invalidates all iterators. +func (this *ActivityStreamsTargetProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsTargetPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "target". Invalidates all iterators. func (this *ActivityStreamsTargetProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6984,6 +7077,19 @@ func (this *ActivityStreamsTargetProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "target". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ActivityStreamsTargetProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsTargetPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "target". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsTargetProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_to/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_to/gen_pkg.go index 6d11fa75..02353e9b 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_to/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_to/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_to/gen_property_activitystreams_to.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_to/gen_property_activitystreams_to.go index a56f5024..706ead07 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_to/gen_property_activitystreams_to.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_to/gen_property_activitystreams_to.go @@ -58,6 +58,7 @@ type ActivityStreamsToPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -372,6 +373,12 @@ func deserializeActivityStreamsToPropertyIterator(i interface{}, aliasMap map[st alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsToPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsToPropertyIterator{ alias: alias, @@ -911,6 +918,13 @@ func (this ActivityStreamsToPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ActivityStreamsToPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ActivityStreamsToPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1059,6 +1073,9 @@ func (this ActivityStreamsToPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1163,6 +1180,7 @@ func (this ActivityStreamsToPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1615,6 +1633,13 @@ func (this ActivityStreamsToPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ActivityStreamsToPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ActivityStreamsToPropertyIterator) IsTootEmoji() bool { @@ -1722,6 +1747,8 @@ func (this ActivityStreamsToPropertyIterator) JSONLDContext() map[string]string child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1906,60 +1933,63 @@ func (this ActivityStreamsToPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2065,6 +2095,8 @@ func (this ActivityStreamsToPropertyIterator) LessThan(o vocab.ActivityStreamsTo return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2560,6 +2592,13 @@ func (this *ActivityStreamsToPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsToPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsToPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2753,6 +2792,10 @@ func (this *ActivityStreamsToPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2876,6 +2919,7 @@ func (this *ActivityStreamsToPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2991,6 +3035,8 @@ func (this ActivityStreamsToPropertyIterator) serialize() (interface{}, error) { return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3769,6 +3815,17 @@ func (this *ActivityStreamsToProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "to". Invalidates iterators that are traversing using Prev. +func (this *ActivityStreamsToProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsToPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "to". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsToProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4873,6 +4930,23 @@ func (this *ActivityStreamsToProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "to". Existing elements at that index and higher are shifted +// back once. Invalidates all iterators. +func (this *ActivityStreamsToProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsToPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "to". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5145,74 +5219,78 @@ func (this ActivityStreamsToProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6110,6 +6188,20 @@ func (this *ActivityStreamsToProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "to". Invalidates all iterators. +func (this *ActivityStreamsToProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsToPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "to". Invalidates all iterators. func (this *ActivityStreamsToProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6981,6 +7073,19 @@ func (this *ActivityStreamsToProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "to". Panics if the index is out of bounds. Invalidates +// all iterators. +func (this *ActivityStreamsToProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsToPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "to". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsToProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_link/gen_type_activitystreams_link.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_link/gen_type_activitystreams_link.go index a0b794f2..a72bf4fe 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_link/gen_type_activitystreams_link.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_link/gen_type_activitystreams_link.go @@ -199,7 +199,7 @@ func IsOrExtendsLink(other vocab.Type) bool { // LinkIsDisjointWith returns true if the other provided type is disjoint with the // Link type. func LinkIsDisjointWith(other vocab.Type) bool { - disjointWith := []string{"Accept", "Activity", "Add", "Announce", "Application", "Arrive", "Article", "Audio", "Block", "Branch", "Collection", "CollectionPage", "Commit", "Create", "Delete", "Dislike", "Document", "Emoji", "Event", "Flag", "Follow", "Group", "IdentityProof", "Ignore", "Image", "IntransitiveActivity", "Invite", "Join", "Leave", "Like", "Listen", "Move", "Note", "Object", "Offer", "OrderedCollection", "OrderedCollectionPage", "OrderedCollectionPage", "Organization", "Page", "Person", "Place", "Profile", "Push", "Question", "Read", "Reject", "Relationship", "Remove", "Repository", "Service", "TentativeAccept", "TentativeReject", "Ticket", "TicketDependency", "Tombstone", "Travel", "Undo", "Update", "Video", "View"} + disjointWith := []string{"Accept", "Activity", "Add", "Announce", "Application", "Arrive", "Article", "Audio", "Block", "Branch", "Collection", "CollectionPage", "Commit", "Create", "Delete", "Dislike", "Document", "Emoji", "Event", "Flag", "Follow", "Group", "IdentityProof", "Ignore", "Image", "IntransitiveActivity", "Invite", "Join", "Leave", "Like", "Listen", "Move", "Note", "Object", "Offer", "OrderedCollection", "OrderedCollectionPage", "OrderedCollectionPage", "Organization", "Page", "Person", "Place", "Profile", "PropertyValue", "Push", "Question", "Read", "Reject", "Relationship", "Remove", "Repository", "Service", "TentativeAccept", "TentativeReject", "Ticket", "TicketDependency", "Tombstone", "Travel", "Undo", "Update", "Video", "View"} for _, disjoint := range disjointWith { if disjoint == other.GetTypeName() { return true diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_mention/gen_type_activitystreams_mention.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_mention/gen_type_activitystreams_mention.go index f9c33ee5..40b8b2be 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_mention/gen_type_activitystreams_mention.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_mention/gen_type_activitystreams_mention.go @@ -197,7 +197,7 @@ func IsOrExtendsMention(other vocab.Type) bool { // MentionIsDisjointWith returns true if the other provided type is disjoint with // the Mention type. func MentionIsDisjointWith(other vocab.Type) bool { - disjointWith := []string{"Accept", "Activity", "Add", "Announce", "Application", "Arrive", "Article", "Audio", "Block", "Branch", "Collection", "CollectionPage", "Commit", "Create", "Delete", "Dislike", "Document", "Emoji", "Event", "Flag", "Follow", "Group", "IdentityProof", "Ignore", "Image", "IntransitiveActivity", "Invite", "Join", "Leave", "Like", "Listen", "Move", "Note", "Object", "Offer", "OrderedCollection", "OrderedCollectionPage", "OrderedCollectionPage", "Organization", "Page", "Person", "Place", "Profile", "Push", "Question", "Read", "Reject", "Relationship", "Remove", "Repository", "Service", "TentativeAccept", "TentativeReject", "Ticket", "TicketDependency", "Tombstone", "Travel", "Undo", "Update", "Video", "View"} + disjointWith := []string{"Accept", "Activity", "Add", "Announce", "Application", "Arrive", "Article", "Audio", "Block", "Branch", "Collection", "CollectionPage", "Commit", "Create", "Delete", "Dislike", "Document", "Emoji", "Event", "Flag", "Follow", "Group", "IdentityProof", "Ignore", "Image", "IntransitiveActivity", "Invite", "Join", "Leave", "Like", "Listen", "Move", "Note", "Object", "Offer", "OrderedCollection", "OrderedCollectionPage", "OrderedCollectionPage", "Organization", "Page", "Person", "Place", "Profile", "PropertyValue", "Push", "Question", "Read", "Reject", "Relationship", "Remove", "Repository", "Service", "TentativeAccept", "TentativeReject", "Ticket", "TicketDependency", "Tombstone", "Travel", "Undo", "Update", "Video", "View"} for _, disjoint := range disjointWith { if disjoint == other.GetTypeName() { return true diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_object/gen_type_activitystreams_object.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_object/gen_type_activitystreams_object.go index ee48b651..84b753d2 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_object/gen_type_activitystreams_object.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/type_object/gen_type_activitystreams_object.go @@ -420,7 +420,7 @@ func ObjectIsDisjointWith(other vocab.Type) bool { // Object type. Note that it returns false if the types are the same; see the // "IsOrExtendsObject" variant instead. func ObjectIsExtendedBy(other vocab.Type) bool { - extensions := []string{"Accept", "Activity", "Add", "Announce", "Application", "Arrive", "Article", "Audio", "Block", "Branch", "Collection", "CollectionPage", "Commit", "Create", "Delete", "Dislike", "Document", "Emoji", "Event", "Flag", "Follow", "Group", "IdentityProof", "Ignore", "Image", "IntransitiveActivity", "Invite", "Join", "Leave", "Like", "Listen", "Move", "Note", "Offer", "OrderedCollection", "OrderedCollectionPage", "OrderedCollectionPage", "Organization", "Page", "Person", "Place", "Profile", "Push", "Question", "Read", "Reject", "Relationship", "Remove", "Repository", "Service", "TentativeAccept", "TentativeReject", "Ticket", "TicketDependency", "Tombstone", "Travel", "Undo", "Update", "Video", "View"} + extensions := []string{"Accept", "Activity", "Add", "Announce", "Application", "Arrive", "Article", "Audio", "Block", "Branch", "Collection", "CollectionPage", "Commit", "Create", "Delete", "Dislike", "Document", "Emoji", "Event", "Flag", "Follow", "Group", "IdentityProof", "Ignore", "Image", "IntransitiveActivity", "Invite", "Join", "Leave", "Like", "Listen", "Move", "Note", "Offer", "OrderedCollection", "OrderedCollectionPage", "OrderedCollectionPage", "Organization", "Page", "Person", "Place", "Profile", "PropertyValue", "Push", "Question", "Read", "Reject", "Relationship", "Remove", "Repository", "Service", "TentativeAccept", "TentativeReject", "Ticket", "TicketDependency", "Tombstone", "Travel", "Undo", "Update", "Video", "View"} for _, ext := range extensions { if ext == other.GetTypeName() { return true diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_committedby/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_committedby/gen_pkg.go index 81098ac2..191dbbad 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_committedby/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_committedby/gen_pkg.go @@ -177,6 +177,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_committedby/gen_property_forgefed_committedBy.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_committedby/gen_property_forgefed_committedBy.go index f54cf625..b97f87bd 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_committedby/gen_property_forgefed_committedBy.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_committedby/gen_property_forgefed_committedBy.go @@ -56,6 +56,7 @@ type ForgeFedCommittedByProperty struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -360,6 +361,12 @@ func DeserializeCommittedByProperty(m map[string]interface{}, aliasMap map[strin alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ForgeFedCommittedByProperty{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ForgeFedCommittedByProperty{ alias: alias, @@ -529,6 +536,7 @@ func (this *ForgeFedCommittedByProperty) Clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -959,6 +967,13 @@ func (this ForgeFedCommittedByProperty) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ForgeFedCommittedByProperty) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ForgeFedCommittedByProperty) GetTootEmoji() vocab.TootEmoji { @@ -1101,6 +1116,9 @@ func (this ForgeFedCommittedByProperty) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1203,6 +1221,7 @@ func (this ForgeFedCommittedByProperty) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1641,6 +1660,13 @@ func (this ForgeFedCommittedByProperty) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ForgeFedCommittedByProperty) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ForgeFedCommittedByProperty) IsTootEmoji() bool { @@ -1744,6 +1770,8 @@ func (this ForgeFedCommittedByProperty) JSONLDContext() map[string]string { child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1922,60 +1950,63 @@ func (this ForgeFedCommittedByProperty) KindIndex() int { if this.IsActivityStreamsProfile() { return 41 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 42 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 43 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 44 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 45 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 46 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 47 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 48 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 49 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 50 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 51 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 52 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 53 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 54 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 55 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 56 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 57 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 58 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 59 } + if this.IsActivityStreamsView() { + return 60 + } if this.IsIRI() { return -2 } @@ -2077,6 +2108,8 @@ func (this ForgeFedCommittedByProperty) LessThan(o vocab.ForgeFedCommittedByProp return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2217,6 +2250,8 @@ func (this ForgeFedCommittedByProperty) Serialize() (interface{}, error) { return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -2671,6 +2706,13 @@ func (this *ForgeFedCommittedByProperty) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ForgeFedCommittedByProperty) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.Clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ForgeFedCommittedByProperty) SetTootEmoji(v vocab.TootEmoji) { @@ -2856,6 +2898,10 @@ func (this *ForgeFedCommittedByProperty) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_description/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_description/gen_pkg.go index 4f29ca7b..d28f036c 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_description/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_description/gen_pkg.go @@ -177,6 +177,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_description/gen_property_forgefed_description.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_description/gen_property_forgefed_description.go index 5ffb3e3e..e7fd1970 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_description/gen_property_forgefed_description.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_description/gen_property_forgefed_description.go @@ -56,6 +56,7 @@ type ForgeFedDescriptionProperty struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -360,6 +361,12 @@ func DeserializeDescriptionProperty(m map[string]interface{}, aliasMap map[strin alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ForgeFedDescriptionProperty{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ForgeFedDescriptionProperty{ alias: alias, @@ -529,6 +536,7 @@ func (this *ForgeFedDescriptionProperty) Clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -959,6 +967,13 @@ func (this ForgeFedDescriptionProperty) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ForgeFedDescriptionProperty) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ForgeFedDescriptionProperty) GetTootEmoji() vocab.TootEmoji { @@ -1101,6 +1116,9 @@ func (this ForgeFedDescriptionProperty) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1203,6 +1221,7 @@ func (this ForgeFedDescriptionProperty) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1641,6 +1660,13 @@ func (this ForgeFedDescriptionProperty) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ForgeFedDescriptionProperty) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ForgeFedDescriptionProperty) IsTootEmoji() bool { @@ -1744,6 +1770,8 @@ func (this ForgeFedDescriptionProperty) JSONLDContext() map[string]string { child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1922,60 +1950,63 @@ func (this ForgeFedDescriptionProperty) KindIndex() int { if this.IsActivityStreamsProfile() { return 41 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 42 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 43 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 44 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 45 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 46 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 47 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 48 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 49 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 50 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 51 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 52 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 53 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 54 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 55 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 56 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 57 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 58 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 59 } + if this.IsActivityStreamsView() { + return 60 + } if this.IsIRI() { return -2 } @@ -2077,6 +2108,8 @@ func (this ForgeFedDescriptionProperty) LessThan(o vocab.ForgeFedDescriptionProp return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2217,6 +2250,8 @@ func (this ForgeFedDescriptionProperty) Serialize() (interface{}, error) { return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -2671,6 +2706,13 @@ func (this *ForgeFedDescriptionProperty) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ForgeFedDescriptionProperty) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.Clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ForgeFedDescriptionProperty) SetTootEmoji(v vocab.TootEmoji) { @@ -2856,6 +2898,10 @@ func (this *ForgeFedDescriptionProperty) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_earlyitems/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_earlyitems/gen_pkg.go index 0c9090a3..12c21b0d 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_earlyitems/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_earlyitems/gen_pkg.go @@ -185,6 +185,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_earlyitems/gen_property_forgefed_earlyItems.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_earlyitems/gen_property_forgefed_earlyItems.go index 93c5501d..67182a98 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_earlyitems/gen_property_forgefed_earlyItems.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_earlyitems/gen_property_forgefed_earlyItems.go @@ -58,6 +58,7 @@ type ForgeFedEarlyItemsPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -372,6 +373,12 @@ func deserializeForgeFedEarlyItemsPropertyIterator(i interface{}, aliasMap map[s alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ForgeFedEarlyItemsPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ForgeFedEarlyItemsPropertyIterator{ alias: alias, @@ -911,6 +918,13 @@ func (this ForgeFedEarlyItemsPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ForgeFedEarlyItemsPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ForgeFedEarlyItemsPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1059,6 +1073,9 @@ func (this ForgeFedEarlyItemsPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1163,6 +1180,7 @@ func (this ForgeFedEarlyItemsPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1615,6 +1633,13 @@ func (this ForgeFedEarlyItemsPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ForgeFedEarlyItemsPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ForgeFedEarlyItemsPropertyIterator) IsTootEmoji() bool { @@ -1722,6 +1747,8 @@ func (this ForgeFedEarlyItemsPropertyIterator) JSONLDContext() map[string]string child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1906,60 +1933,63 @@ func (this ForgeFedEarlyItemsPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 43 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 44 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 45 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 46 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 47 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 48 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 49 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 50 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 51 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 52 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 53 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 54 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 55 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 56 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 57 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 58 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 59 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 60 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 61 } + if this.IsActivityStreamsView() { + return 62 + } if this.IsIRI() { return -2 } @@ -2065,6 +2095,8 @@ func (this ForgeFedEarlyItemsPropertyIterator) LessThan(o vocab.ForgeFedEarlyIte return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2560,6 +2592,13 @@ func (this *ForgeFedEarlyItemsPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ForgeFedEarlyItemsPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ForgeFedEarlyItemsPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2753,6 +2792,10 @@ func (this *ForgeFedEarlyItemsPropertyIterator) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2876,6 +2919,7 @@ func (this *ForgeFedEarlyItemsPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2991,6 +3035,8 @@ func (this ForgeFedEarlyItemsPropertyIterator) serialize() (interface{}, error) return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3781,6 +3827,18 @@ func (this *ForgeFedEarlyItemsProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "earlyItems". Invalidates iterators that are traversing +// using Prev. +func (this *ForgeFedEarlyItemsProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ForgeFedEarlyItemsPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "earlyItems". Invalidates iterators that are traversing using Prev. func (this *ForgeFedEarlyItemsProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4887,6 +4945,23 @@ func (this *ForgeFedEarlyItemsProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "earlyItems". Existing elements at that index and higher are +// shifted back once. Invalidates all iterators. +func (this *ForgeFedEarlyItemsProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ForgeFedEarlyItemsPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "earlyItems". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. @@ -5159,74 +5234,78 @@ func (this ForgeFedEarlyItemsProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 44 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 45 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 60 { + } else if idx1 == 61 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 61 { + } else if idx1 == 62 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -6125,6 +6204,20 @@ func (this *ForgeFedEarlyItemsProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "earlyItems". Invalidates all iterators. +func (this *ForgeFedEarlyItemsProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ForgeFedEarlyItemsPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "earlyItems". Invalidates all iterators. func (this *ForgeFedEarlyItemsProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6997,6 +7090,19 @@ func (this *ForgeFedEarlyItemsProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "earlyItems". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ForgeFedEarlyItemsProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ForgeFedEarlyItemsPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "earlyItems". Panics if the index is out of bounds. Invalidates all // iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_ticketstrackedby/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_ticketstrackedby/gen_pkg.go index 9f01a2f6..4fb2a5c4 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_ticketstrackedby/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_ticketstrackedby/gen_pkg.go @@ -177,6 +177,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_ticketstrackedby/gen_property_forgefed_ticketsTrackedBy.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_ticketstrackedby/gen_property_forgefed_ticketsTrackedBy.go index a543a41c..4b16f716 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_ticketstrackedby/gen_property_forgefed_ticketsTrackedBy.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_ticketstrackedby/gen_property_forgefed_ticketsTrackedBy.go @@ -56,6 +56,7 @@ type ForgeFedTicketsTrackedByProperty struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -360,6 +361,12 @@ func DeserializeTicketsTrackedByProperty(m map[string]interface{}, aliasMap map[ alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ForgeFedTicketsTrackedByProperty{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ForgeFedTicketsTrackedByProperty{ alias: alias, @@ -529,6 +536,7 @@ func (this *ForgeFedTicketsTrackedByProperty) Clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -959,6 +967,13 @@ func (this ForgeFedTicketsTrackedByProperty) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ForgeFedTicketsTrackedByProperty) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ForgeFedTicketsTrackedByProperty) GetTootEmoji() vocab.TootEmoji { @@ -1101,6 +1116,9 @@ func (this ForgeFedTicketsTrackedByProperty) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1203,6 +1221,7 @@ func (this ForgeFedTicketsTrackedByProperty) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1641,6 +1660,13 @@ func (this ForgeFedTicketsTrackedByProperty) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ForgeFedTicketsTrackedByProperty) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ForgeFedTicketsTrackedByProperty) IsTootEmoji() bool { @@ -1744,6 +1770,8 @@ func (this ForgeFedTicketsTrackedByProperty) JSONLDContext() map[string]string { child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1922,60 +1950,63 @@ func (this ForgeFedTicketsTrackedByProperty) KindIndex() int { if this.IsActivityStreamsProfile() { return 41 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 42 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 43 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 44 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 45 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 46 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 47 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 48 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 49 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 50 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 51 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 52 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 53 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 54 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 55 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 56 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 57 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 58 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 59 } + if this.IsActivityStreamsView() { + return 60 + } if this.IsIRI() { return -2 } @@ -2077,6 +2108,8 @@ func (this ForgeFedTicketsTrackedByProperty) LessThan(o vocab.ForgeFedTicketsTra return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2217,6 +2250,8 @@ func (this ForgeFedTicketsTrackedByProperty) Serialize() (interface{}, error) { return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -2671,6 +2706,13 @@ func (this *ForgeFedTicketsTrackedByProperty) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ForgeFedTicketsTrackedByProperty) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.Clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ForgeFedTicketsTrackedByProperty) SetTootEmoji(v vocab.TootEmoji) { @@ -2856,6 +2898,10 @@ func (this *ForgeFedTicketsTrackedByProperty) SetType(t vocab.Type) error { this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_tracksticketsfor/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_tracksticketsfor/gen_pkg.go index 0d79a12d..e17fb84b 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_tracksticketsfor/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_tracksticketsfor/gen_pkg.go @@ -177,6 +177,10 @@ type privateManager interface { // for the "ActivityStreamsProfile" non-functional property in the // vocabulary "ActivityStreams" DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error) + // DeserializePropertyValueSchema returns the deserialization method for + // the "SchemaPropertyValue" non-functional property in the vocabulary + // "Schema" + DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error) // DeserializePushForgeFed returns the deserialization method for the // "ForgeFedPush" non-functional property in the vocabulary "ForgeFed" DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_tracksticketsfor/gen_property_forgefed_tracksTicketsFor.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_tracksticketsfor/gen_property_forgefed_tracksTicketsFor.go index 11481688..858a6f25 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_tracksticketsfor/gen_property_forgefed_tracksTicketsFor.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/forgefed/property_tracksticketsfor/gen_property_forgefed_tracksTicketsFor.go @@ -56,6 +56,7 @@ type ForgeFedTracksTicketsForPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -359,6 +360,12 @@ func deserializeForgeFedTracksTicketsForPropertyIterator(i interface{}, aliasMap alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ForgeFedTracksTicketsForPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ForgeFedTracksTicketsForPropertyIterator{ alias: alias, @@ -884,6 +891,13 @@ func (this ForgeFedTracksTicketsForPropertyIterator) GetIRI() *url.URL { return this.iri } +// GetSchemaPropertyValue returns the value of this property. When +// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an +// arbitrary value. +func (this ForgeFedTracksTicketsForPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue { + return this.schemaPropertyValueMember +} + // GetTootEmoji returns the value of this property. When IsTootEmoji returns // false, GetTootEmoji will return an arbitrary value. func (this ForgeFedTracksTicketsForPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1026,6 +1040,9 @@ func (this ForgeFedTracksTicketsForPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1128,6 +1145,7 @@ func (this ForgeFedTracksTicketsForPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1566,6 +1584,13 @@ func (this ForgeFedTracksTicketsForPropertyIterator) IsIRI() bool { return this.iri != nil } +// IsSchemaPropertyValue returns true if this property has a type of +// "PropertyValue". When true, use the GetSchemaPropertyValue and +// SetSchemaPropertyValue methods to access and set this property. +func (this ForgeFedTracksTicketsForPropertyIterator) IsSchemaPropertyValue() bool { + return this.schemaPropertyValueMember != nil +} + // IsTootEmoji returns true if this property has a type of "Emoji". When true, use // the GetTootEmoji and SetTootEmoji methods to access and set this property. func (this ForgeFedTracksTicketsForPropertyIterator) IsTootEmoji() bool { @@ -1669,6 +1694,8 @@ func (this ForgeFedTracksTicketsForPropertyIterator) JSONLDContext() map[string] child = this.GetActivityStreamsPlace().JSONLDContext() } else if this.IsActivityStreamsProfile() { child = this.GetActivityStreamsProfile().JSONLDContext() + } else if this.IsSchemaPropertyValue() { + child = this.GetSchemaPropertyValue().JSONLDContext() } else if this.IsForgeFedPush() { child = this.GetForgeFedPush().JSONLDContext() } else if this.IsActivityStreamsQuestion() { @@ -1847,60 +1874,63 @@ func (this ForgeFedTracksTicketsForPropertyIterator) KindIndex() int { if this.IsActivityStreamsProfile() { return 41 } - if this.IsForgeFedPush() { + if this.IsSchemaPropertyValue() { return 42 } - if this.IsActivityStreamsQuestion() { + if this.IsForgeFedPush() { return 43 } - if this.IsActivityStreamsRead() { + if this.IsActivityStreamsQuestion() { return 44 } - if this.IsActivityStreamsReject() { + if this.IsActivityStreamsRead() { return 45 } - if this.IsActivityStreamsRelationship() { + if this.IsActivityStreamsReject() { return 46 } - if this.IsActivityStreamsRemove() { + if this.IsActivityStreamsRelationship() { return 47 } - if this.IsForgeFedRepository() { + if this.IsActivityStreamsRemove() { return 48 } - if this.IsActivityStreamsService() { + if this.IsForgeFedRepository() { return 49 } - if this.IsActivityStreamsTentativeAccept() { + if this.IsActivityStreamsService() { return 50 } - if this.IsActivityStreamsTentativeReject() { + if this.IsActivityStreamsTentativeAccept() { return 51 } - if this.IsForgeFedTicket() { + if this.IsActivityStreamsTentativeReject() { return 52 } - if this.IsForgeFedTicketDependency() { + if this.IsForgeFedTicket() { return 53 } - if this.IsActivityStreamsTombstone() { + if this.IsForgeFedTicketDependency() { return 54 } - if this.IsActivityStreamsTravel() { + if this.IsActivityStreamsTombstone() { return 55 } - if this.IsActivityStreamsUndo() { + if this.IsActivityStreamsTravel() { return 56 } - if this.IsActivityStreamsUpdate() { + if this.IsActivityStreamsUndo() { return 57 } - if this.IsActivityStreamsVideo() { + if this.IsActivityStreamsUpdate() { return 58 } - if this.IsActivityStreamsView() { + if this.IsActivityStreamsVideo() { return 59 } + if this.IsActivityStreamsView() { + return 60 + } if this.IsIRI() { return -2 } @@ -2002,6 +2032,8 @@ func (this ForgeFedTracksTicketsForPropertyIterator) LessThan(o vocab.ForgeFedTr return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace()) } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile()) + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue()) } else if this.IsForgeFedPush() { return this.GetForgeFedPush().LessThan(o.GetForgeFedPush()) } else if this.IsActivityStreamsQuestion() { @@ -2483,6 +2515,13 @@ func (this *ForgeFedTracksTicketsForPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ForgeFedTracksTicketsForPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ForgeFedTracksTicketsForPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2668,6 +2707,10 @@ func (this *ForgeFedTracksTicketsForPropertyIterator) SetType(t vocab.Type) erro this.SetActivityStreamsProfile(v) return nil } + if v, ok := t.(vocab.SchemaPropertyValue); ok { + this.SetSchemaPropertyValue(v) + return nil + } if v, ok := t.(vocab.ForgeFedPush); ok { this.SetForgeFedPush(v) return nil @@ -2789,6 +2832,7 @@ func (this *ForgeFedTracksTicketsForPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2900,6 +2944,8 @@ func (this ForgeFedTracksTicketsForPropertyIterator) serialize() (interface{}, e return this.GetActivityStreamsPlace().Serialize() } else if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile().Serialize() + } else if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue().Serialize() } else if this.IsForgeFedPush() { return this.GetForgeFedPush().Serialize() } else if this.IsActivityStreamsQuestion() { @@ -3705,6 +3751,18 @@ func (this *ForgeFedTracksTicketsForProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "tracksTicketsFor". Invalidates iterators that are +// traversing using Prev. +func (this *ForgeFedTracksTicketsForProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ForgeFedTracksTicketsForPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "tracksTicketsFor". Invalidates iterators that are traversing using Prev. func (this *ForgeFedTracksTicketsForProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4778,6 +4836,23 @@ func (this *ForgeFedTracksTicketsForProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "tracksTicketsFor". Existing elements at that index and +// higher are shifted back once. Invalidates all iterators. +func (this *ForgeFedTracksTicketsForProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ForgeFedTracksTicketsForPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } + for i := idx; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // InsertTootEmoji inserts a Emoji value at the specified index for a property // "tracksTicketsFor". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. @@ -5042,74 +5117,78 @@ func (this ForgeFedTracksTicketsForProperty) Less(i, j int) bool { rhs := this.properties[j].GetActivityStreamsProfile() return lhs.LessThan(rhs) } else if idx1 == 42 { + lhs := this.properties[i].GetSchemaPropertyValue() + rhs := this.properties[j].GetSchemaPropertyValue() + return lhs.LessThan(rhs) + } else if idx1 == 43 { lhs := this.properties[i].GetForgeFedPush() rhs := this.properties[j].GetForgeFedPush() return lhs.LessThan(rhs) - } else if idx1 == 43 { + } else if idx1 == 44 { lhs := this.properties[i].GetActivityStreamsQuestion() rhs := this.properties[j].GetActivityStreamsQuestion() return lhs.LessThan(rhs) - } else if idx1 == 44 { + } else if idx1 == 45 { lhs := this.properties[i].GetActivityStreamsRead() rhs := this.properties[j].GetActivityStreamsRead() return lhs.LessThan(rhs) - } else if idx1 == 45 { + } else if idx1 == 46 { lhs := this.properties[i].GetActivityStreamsReject() rhs := this.properties[j].GetActivityStreamsReject() return lhs.LessThan(rhs) - } else if idx1 == 46 { + } else if idx1 == 47 { lhs := this.properties[i].GetActivityStreamsRelationship() rhs := this.properties[j].GetActivityStreamsRelationship() return lhs.LessThan(rhs) - } else if idx1 == 47 { + } else if idx1 == 48 { lhs := this.properties[i].GetActivityStreamsRemove() rhs := this.properties[j].GetActivityStreamsRemove() return lhs.LessThan(rhs) - } else if idx1 == 48 { + } else if idx1 == 49 { lhs := this.properties[i].GetForgeFedRepository() rhs := this.properties[j].GetForgeFedRepository() return lhs.LessThan(rhs) - } else if idx1 == 49 { + } else if idx1 == 50 { lhs := this.properties[i].GetActivityStreamsService() rhs := this.properties[j].GetActivityStreamsService() return lhs.LessThan(rhs) - } else if idx1 == 50 { + } else if idx1 == 51 { lhs := this.properties[i].GetActivityStreamsTentativeAccept() rhs := this.properties[j].GetActivityStreamsTentativeAccept() return lhs.LessThan(rhs) - } else if idx1 == 51 { + } else if idx1 == 52 { lhs := this.properties[i].GetActivityStreamsTentativeReject() rhs := this.properties[j].GetActivityStreamsTentativeReject() return lhs.LessThan(rhs) - } else if idx1 == 52 { + } else if idx1 == 53 { lhs := this.properties[i].GetForgeFedTicket() rhs := this.properties[j].GetForgeFedTicket() return lhs.LessThan(rhs) - } else if idx1 == 53 { + } else if idx1 == 54 { lhs := this.properties[i].GetForgeFedTicketDependency() rhs := this.properties[j].GetForgeFedTicketDependency() return lhs.LessThan(rhs) - } else if idx1 == 54 { + } else if idx1 == 55 { lhs := this.properties[i].GetActivityStreamsTombstone() rhs := this.properties[j].GetActivityStreamsTombstone() return lhs.LessThan(rhs) - } else if idx1 == 55 { + } else if idx1 == 56 { lhs := this.properties[i].GetActivityStreamsTravel() rhs := this.properties[j].GetActivityStreamsTravel() return lhs.LessThan(rhs) - } else if idx1 == 56 { + } else if idx1 == 57 { lhs := this.properties[i].GetActivityStreamsUndo() rhs := this.properties[j].GetActivityStreamsUndo() return lhs.LessThan(rhs) - } else if idx1 == 57 { + } else if idx1 == 58 { lhs := this.properties[i].GetActivityStreamsUpdate() rhs := this.properties[j].GetActivityStreamsUpdate() return lhs.LessThan(rhs) - } else if idx1 == 58 { + } else if idx1 == 59 { lhs := this.properties[i].GetActivityStreamsVideo() rhs := this.properties[j].GetActivityStreamsVideo() return lhs.LessThan(rhs) - } else if idx1 == 59 { + } else if idx1 == 60 { lhs := this.properties[i].GetActivityStreamsView() rhs := this.properties[j].GetActivityStreamsView() return lhs.LessThan(rhs) @@ -5984,6 +6063,20 @@ func (this *ForgeFedTracksTicketsForProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "tracksTicketsFor". Invalidates all iterators. +func (this *ForgeFedTracksTicketsForProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ForgeFedTracksTicketsForPropertyIterator{{ + alias: this.alias, + myIdx: 0, + parent: this, + schemaPropertyValueMember: v, + }}, this.properties...) + for i := 1; i < this.Len(); i++ { + (this.properties)[i].myIdx = i + } +} + // PrependTootEmoji prepends a Emoji value to the front of a list of the property // "tracksTicketsFor". Invalidates all iterators. func (this *ForgeFedTracksTicketsForProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6830,6 +6923,19 @@ func (this *ForgeFedTracksTicketsForProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "tracksTicketsFor". Panics if the index is out of bounds. +// Invalidates all iterators. +func (this *ForgeFedTracksTicketsForProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ForgeFedTracksTicketsForPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "tracksTicketsFor". Panics if the index is out of bounds. Invalidates all // iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/property_value/gen_doc.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/property_value/gen_doc.go new file mode 100644 index 00000000..b46eed54 --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/property_value/gen_doc.go @@ -0,0 +1,17 @@ +// Code generated by astool. DO NOT EDIT. + +// Package propertyvalue contains the implementation for the value 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 propertyvalue diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/property_value/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/property_value/gen_pkg.go new file mode 100644 index 00000000..ebfb05bf --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/property_value/gen_pkg.go @@ -0,0 +1,15 @@ +// Code generated by astool. DO NOT EDIT. + +package propertyvalue + +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/superseriousbusiness/activity/streams/impl/schema/property_value/gen_property_schema_value.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/property_value/gen_property_schema_value.go new file mode 100644 index 00000000..2a8a06f4 --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/property_value/gen_property_schema_value.go @@ -0,0 +1,203 @@ +// Code generated by astool. DO NOT EDIT. + +package propertyvalue + +import ( + "fmt" + string1 "github.com/superseriousbusiness/activity/streams/values/string" + vocab "github.com/superseriousbusiness/activity/streams/vocab" + "net/url" +) + +// SchemaValueProperty is the functional property "value". It is permitted to be a +// single default-valued value type. +type SchemaValueProperty struct { + xmlschemaStringMember string + hasStringMember bool + unknown interface{} + iri *url.URL + alias string +} + +// DeserializeValueProperty creates a "value" property from an interface +// representation that has been unmarshalled from a text or binary format. +func DeserializeValueProperty(m map[string]interface{}, aliasMap map[string]string) (*SchemaValueProperty, error) { + alias := "" + if a, ok := aliasMap["http://schema.org"]; ok { + alias = a + } + propName := "value" + if len(alias) > 0 { + // Use alias both to find the property, and set within the property. + propName = fmt.Sprintf("%s:%s", alias, "value") + } + 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 := &SchemaValueProperty{ + alias: alias, + iri: u, + } + return this, nil + } + } + if v, err := string1.DeserializeString(i); err == nil { + this := &SchemaValueProperty{ + alias: alias, + hasStringMember: true, + xmlschemaStringMember: v, + } + return this, nil + } + this := &SchemaValueProperty{ + alias: alias, + unknown: i, + } + return this, nil + } + return nil, nil +} + +// NewSchemaValueProperty creates a new value property. +func NewSchemaValueProperty() *SchemaValueProperty { + return &SchemaValueProperty{alias: ""} +} + +// Clear ensures no value of this property is set. Calling IsXMLSchemaString +// afterwards will return false. +func (this *SchemaValueProperty) Clear() { + this.unknown = nil + this.iri = nil + this.hasStringMember = false +} + +// Get returns the value of this property. When IsXMLSchemaString returns false, +// Get will return any arbitrary value. +func (this SchemaValueProperty) Get() string { + return this.xmlschemaStringMember +} + +// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will +// return any arbitrary value. +func (this SchemaValueProperty) GetIRI() *url.URL { + return this.iri +} + +// HasAny returns true if the value or IRI is set. +func (this SchemaValueProperty) HasAny() bool { + return this.IsXMLSchemaString() || this.iri != nil +} + +// IsIRI returns true if this property is an IRI. +func (this SchemaValueProperty) IsIRI() bool { + return this.iri != nil +} + +// IsXMLSchemaString returns true if this property is set and not an IRI. +func (this SchemaValueProperty) IsXMLSchemaString() bool { + return this.hasStringMember +} + +// 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 SchemaValueProperty) JSONLDContext() map[string]string { + m := map[string]string{"http://schema.org": 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 SchemaValueProperty) KindIndex() int { + if this.IsXMLSchemaString() { + 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 SchemaValueProperty) LessThan(o vocab.SchemaValueProperty) 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.IsXMLSchemaString() && !o.IsXMLSchemaString() { + // Both are unknowns. + return false + } else if this.IsXMLSchemaString() && !o.IsXMLSchemaString() { + // Values are always greater than unknown values. + return false + } else if !this.IsXMLSchemaString() && o.IsXMLSchemaString() { + // Unknowns are always less than known values. + return true + } else { + // Actual comparison. + return string1.LessString(this.Get(), o.Get()) + } +} + +// Name returns the name of this property: "value". +func (this SchemaValueProperty) Name() string { + if len(this.alias) > 0 { + return this.alias + ":" + "value" + } else { + return "value" + } +} + +// 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 SchemaValueProperty) Serialize() (interface{}, error) { + if this.IsXMLSchemaString() { + return string1.SerializeString(this.Get()) + } else if this.IsIRI() { + return this.iri.String(), nil + } + return this.unknown, nil +} + +// Set sets the value of this property. Calling IsXMLSchemaString afterwards will +// return true. +func (this *SchemaValueProperty) Set(v string) { + this.Clear() + this.xmlschemaStringMember = v + this.hasStringMember = true +} + +// SetIRI sets the value of this property. Calling IsIRI afterwards will return +// true. +func (this *SchemaValueProperty) SetIRI(v *url.URL) { + this.Clear() + this.iri = v +} diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_doc.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_doc.go new file mode 100644 index 00000000..f657a11e --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_doc.go @@ -0,0 +1,17 @@ +// Code generated by astool. DO NOT EDIT. + +// Package typepropertyvalue contains the implementation for the PropertyValue +// type. 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 typepropertyvalue diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_pkg.go new file mode 100644 index 00000000..cd6ae4a7 --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_pkg.go @@ -0,0 +1,195 @@ +// Code generated by astool. DO NOT EDIT. + +package typepropertyvalue + +import vocab "github.com/superseriousbusiness/activity/streams/vocab" + +var mgr privateManager + +var typePropertyConstructor func() vocab.JSONLDTypeProperty + +// privateManager abstracts the code-generated manager that provides access to +// concrete implementations. +type privateManager interface { + // DeserializeAltitudePropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsAltitudeProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeAltitudePropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAltitudeProperty, error) + // DeserializeAttachmentPropertyActivityStreams returns the + // deserialization method for the "ActivityStreamsAttachmentProperty" + // non-functional property in the vocabulary "ActivityStreams" + DeserializeAttachmentPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAttachmentProperty, error) + // DeserializeAttributedToPropertyActivityStreams returns the + // deserialization method for the + // "ActivityStreamsAttributedToProperty" non-functional property in + // the vocabulary "ActivityStreams" + DeserializeAttributedToPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAttributedToProperty, error) + // DeserializeAudiencePropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsAudienceProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeAudiencePropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudienceProperty, error) + // DeserializeBccPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsBccProperty" non-functional property + // in the vocabulary "ActivityStreams" + DeserializeBccPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBccProperty, error) + // DeserializeBtoPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsBtoProperty" non-functional property + // in the vocabulary "ActivityStreams" + DeserializeBtoPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBtoProperty, error) + // DeserializeCcPropertyActivityStreams returns the deserialization method + // for the "ActivityStreamsCcProperty" non-functional property in the + // vocabulary "ActivityStreams" + DeserializeCcPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCcProperty, error) + // DeserializeContentPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsContentProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeContentPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsContentProperty, error) + // DeserializeContextPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsContextProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeContextPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsContextProperty, error) + // DeserializeDurationPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsDurationProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeDurationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDurationProperty, error) + // DeserializeEndTimePropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsEndTimeProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeEndTimePropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEndTimeProperty, error) + // DeserializeGeneratorPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsGeneratorProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeGeneratorPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGeneratorProperty, error) + // DeserializeIconPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsIconProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeIconPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIconProperty, error) + // DeserializeIdPropertyJSONLD returns the deserialization method for the + // "JSONLDIdProperty" non-functional property in the vocabulary + // "JSONLD" + DeserializeIdPropertyJSONLD() func(map[string]interface{}, map[string]string) (vocab.JSONLDIdProperty, error) + // DeserializeImagePropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsImageProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeImagePropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImageProperty, error) + // DeserializeInReplyToPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsInReplyToProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeInReplyToPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInReplyToProperty, error) + // DeserializeLikesPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsLikesProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeLikesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLikesProperty, error) + // DeserializeLocationPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsLocationProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeLocationPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLocationProperty, error) + // DeserializeMediaTypePropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsMediaTypeProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeMediaTypePropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMediaTypeProperty, error) + // DeserializeNamePropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsNameProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeNamePropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNameProperty, error) + // DeserializeObjectPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsObjectProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeObjectPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObjectProperty, error) + // DeserializePreviewPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsPreviewProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializePreviewPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPreviewProperty, error) + // DeserializePublishedPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsPublishedProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializePublishedPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPublishedProperty, error) + // DeserializeRepliesPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsRepliesProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeRepliesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRepliesProperty, error) + // DeserializeSensitivePropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsSensitiveProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeSensitivePropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsSensitiveProperty, error) + // DeserializeSharesPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsSharesProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeSharesPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsSharesProperty, error) + // DeserializeSourcePropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsSourceProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeSourcePropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsSourceProperty, error) + // DeserializeStartTimePropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsStartTimeProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeStartTimePropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsStartTimeProperty, error) + // DeserializeSummaryPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsSummaryProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeSummaryPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsSummaryProperty, error) + // DeserializeTagPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsTagProperty" non-functional property + // in the vocabulary "ActivityStreams" + DeserializeTagPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTagProperty, error) + // DeserializeTeamPropertyForgeFed returns the deserialization method for + // the "ForgeFedTeamProperty" non-functional property in the + // vocabulary "ForgeFed" + DeserializeTeamPropertyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTeamProperty, error) + // DeserializeTicketsTrackedByPropertyForgeFed returns the deserialization + // method for the "ForgeFedTicketsTrackedByProperty" non-functional + // property in the vocabulary "ForgeFed" + DeserializeTicketsTrackedByPropertyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketsTrackedByProperty, error) + // DeserializeToPropertyActivityStreams returns the deserialization method + // for the "ActivityStreamsToProperty" non-functional property in the + // vocabulary "ActivityStreams" + DeserializeToPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsToProperty, error) + // DeserializeTracksTicketsForPropertyForgeFed returns the deserialization + // method for the "ForgeFedTracksTicketsForProperty" non-functional + // property in the vocabulary "ForgeFed" + DeserializeTracksTicketsForPropertyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTracksTicketsForProperty, error) + // DeserializeTypePropertyJSONLD returns the deserialization method for + // the "JSONLDTypeProperty" non-functional property in the vocabulary + // "JSONLD" + DeserializeTypePropertyJSONLD() func(map[string]interface{}, map[string]string) (vocab.JSONLDTypeProperty, error) + // DeserializeUpdatedPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsUpdatedProperty" non-functional + // property in the vocabulary "ActivityStreams" + DeserializeUpdatedPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdatedProperty, error) + // DeserializeUrlPropertyActivityStreams returns the deserialization + // method for the "ActivityStreamsUrlProperty" non-functional property + // in the vocabulary "ActivityStreams" + DeserializeUrlPropertyActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUrlProperty, error) + // DeserializeValuePropertySchema returns the deserialization method for + // the "SchemaValueProperty" non-functional property in the vocabulary + // "Schema" + DeserializeValuePropertySchema() func(map[string]interface{}, map[string]string) (vocab.SchemaValueProperty, error) +} + +// jsonldContexter is a private interface to determine the JSON-LD contexts and +// aliases needed for functional and non-functional properties. It is a helper +// interface for this implementation. +type jsonldContexter interface { + // 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. + JSONLDContext() map[string]string +} + +// 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 +} + +// SetTypePropertyConstructor sets the "type" property's constructor in the +// package-global variable. For internal use only, do not use as part of +// Application behavior. Must be called at golang init time. Permits +// ActivityStreams types to correctly set their "type" property at +// construction time, so users don't have to remember to do so each time. It +// is dependency injected so other go-fed compatible implementations could +// inject their own type. +func SetTypePropertyConstructor(f func() vocab.JSONLDTypeProperty) { + typePropertyConstructor = f +} diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_type_schema_propertyvalue.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_type_schema_propertyvalue.go new file mode 100644 index 00000000..c3190b56 --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue/gen_type_schema_propertyvalue.go @@ -0,0 +1,1807 @@ +// Code generated by astool. DO NOT EDIT. + +package typepropertyvalue + +import ( + "fmt" + vocab "github.com/superseriousbusiness/activity/streams/vocab" + "strings" +) + +// A property-value pair, e.g. representing a feature of a product or place. Use +// the 'name' property for the name of the property. +type SchemaPropertyValue 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 + ActivityStreamsDuration vocab.ActivityStreamsDurationProperty + ActivityStreamsEndTime vocab.ActivityStreamsEndTimeProperty + ActivityStreamsGenerator vocab.ActivityStreamsGeneratorProperty + ActivityStreamsIcon vocab.ActivityStreamsIconProperty + JSONLDId vocab.JSONLDIdProperty + ActivityStreamsImage vocab.ActivityStreamsImageProperty + ActivityStreamsInReplyTo vocab.ActivityStreamsInReplyToProperty + ActivityStreamsLikes vocab.ActivityStreamsLikesProperty + ActivityStreamsLocation vocab.ActivityStreamsLocationProperty + ActivityStreamsMediaType vocab.ActivityStreamsMediaTypeProperty + ActivityStreamsName vocab.ActivityStreamsNameProperty + ActivityStreamsObject vocab.ActivityStreamsObjectProperty + ActivityStreamsPreview vocab.ActivityStreamsPreviewProperty + ActivityStreamsPublished vocab.ActivityStreamsPublishedProperty + ActivityStreamsReplies vocab.ActivityStreamsRepliesProperty + ActivityStreamsSensitive vocab.ActivityStreamsSensitiveProperty + ActivityStreamsShares vocab.ActivityStreamsSharesProperty + ActivityStreamsSource vocab.ActivityStreamsSourceProperty + ActivityStreamsStartTime vocab.ActivityStreamsStartTimeProperty + 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 + SchemaValue vocab.SchemaValueProperty + alias string + unknown map[string]interface{} +} + +// DeserializePropertyValue creates a PropertyValue from a map representation that +// has been unmarshalled from a text or binary format. +func DeserializePropertyValue(m map[string]interface{}, aliasMap map[string]string) (*SchemaPropertyValue, error) { + alias := "" + aliasPrefix := "" + if a, ok := aliasMap["http://schema.org"]; ok { + alias = a + aliasPrefix = a + ":" + } + this := &SchemaPropertyValue{ + alias: alias, + unknown: make(map[string]interface{}), + } + if typeValue, ok := m["type"]; !ok { + return nil, fmt.Errorf("no \"type\" property in map") + } else if typeString, ok := typeValue.(string); ok { + typeName := strings.TrimPrefix(typeString, aliasPrefix) + if typeName != "PropertyValue" { + return nil, fmt.Errorf("\"type\" property is not of %q type: %s", "PropertyValue", typeName) + } + // Fall through, success in finding a proper Type + } else if arrType, ok := typeValue.([]interface{}); ok { + found := false + for _, elemVal := range arrType { + if typeString, ok := elemVal.(string); ok && strings.TrimPrefix(typeString, aliasPrefix) == "PropertyValue" { + found = true + break + } + } + if !found { + return nil, fmt.Errorf("could not find a \"type\" property of value %q", "PropertyValue") + } + // Fall through, success in finding a proper Type + } else { + return nil, fmt.Errorf("\"type\" property is unrecognized type: %T", typeValue) + } + // Begin: Known property deserialization + if p, err := mgr.DeserializeAltitudePropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsAltitude = p + } + if p, err := mgr.DeserializeAttachmentPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsAttachment = p + } + if p, err := mgr.DeserializeAttributedToPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsAttributedTo = p + } + if p, err := mgr.DeserializeAudiencePropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsAudience = p + } + if p, err := mgr.DeserializeBccPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsBcc = p + } + if p, err := mgr.DeserializeBtoPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsBto = p + } + if p, err := mgr.DeserializeCcPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsCc = p + } + if p, err := mgr.DeserializeContentPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsContent = p + } + if p, err := mgr.DeserializeContextPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsContext = p + } + if p, err := mgr.DeserializeDurationPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsDuration = p + } + if p, err := mgr.DeserializeEndTimePropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsEndTime = p + } + if p, err := mgr.DeserializeGeneratorPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsGenerator = p + } + if p, err := mgr.DeserializeIconPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsIcon = p + } + if p, err := mgr.DeserializeIdPropertyJSONLD()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.JSONLDId = p + } + if p, err := mgr.DeserializeImagePropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsImage = p + } + if p, err := mgr.DeserializeInReplyToPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsInReplyTo = p + } + if p, err := mgr.DeserializeLikesPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsLikes = p + } + if p, err := mgr.DeserializeLocationPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsLocation = p + } + if p, err := mgr.DeserializeMediaTypePropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsMediaType = p + } + if p, err := mgr.DeserializeNamePropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsName = p + } + if p, err := mgr.DeserializeObjectPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsObject = p + } + if p, err := mgr.DeserializePreviewPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsPreview = p + } + if p, err := mgr.DeserializePublishedPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsPublished = p + } + if p, err := mgr.DeserializeRepliesPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsReplies = p + } + if p, err := mgr.DeserializeSensitivePropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsSensitive = p + } + if p, err := mgr.DeserializeSharesPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsShares = p + } + if p, err := mgr.DeserializeSourcePropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsSource = p + } + if p, err := mgr.DeserializeStartTimePropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsStartTime = p + } + if p, err := mgr.DeserializeSummaryPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsSummary = p + } + if p, err := mgr.DeserializeTagPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsTag = p + } + if p, err := mgr.DeserializeTeamPropertyForgeFed()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ForgeFedTeam = p + } + if p, err := mgr.DeserializeTicketsTrackedByPropertyForgeFed()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ForgeFedTicketsTrackedBy = p + } + if p, err := mgr.DeserializeToPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsTo = p + } + if p, err := mgr.DeserializeTracksTicketsForPropertyForgeFed()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ForgeFedTracksTicketsFor = p + } + if p, err := mgr.DeserializeTypePropertyJSONLD()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.JSONLDType = p + } + if p, err := mgr.DeserializeUpdatedPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsUpdated = p + } + if p, err := mgr.DeserializeUrlPropertyActivityStreams()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.ActivityStreamsUrl = p + } + if p, err := mgr.DeserializeValuePropertySchema()(m, aliasMap); err != nil { + return nil, err + } else if p != nil { + this.SchemaValue = p + } + // End: Known property deserialization + + // Begin: Unknown deserialization + for k, v := range m { + // Begin: Code that ensures a property name is unknown + if k == "altitude" { + continue + } else if k == "attachment" { + continue + } else if k == "attributedTo" { + continue + } else if k == "audience" { + continue + } else if k == "bcc" { + continue + } else if k == "bto" { + continue + } else if k == "cc" { + continue + } else if k == "content" { + continue + } else if k == "contentMap" { + continue + } else if k == "context" { + continue + } else if k == "duration" { + continue + } else if k == "endTime" { + continue + } else if k == "generator" { + continue + } else if k == "icon" { + continue + } else if k == "id" { + continue + } else if k == "image" { + continue + } else if k == "inReplyTo" { + continue + } else if k == "likes" { + continue + } else if k == "location" { + continue + } else if k == "mediaType" { + continue + } else if k == "name" { + continue + } else if k == "nameMap" { + continue + } else if k == "object" { + continue + } else if k == "preview" { + continue + } else if k == "published" { + continue + } else if k == "replies" { + continue + } else if k == "sensitive" { + continue + } else if k == "shares" { + continue + } else if k == "source" { + continue + } else if k == "startTime" { + continue + } else if k == "summary" { + continue + } else if k == "summaryMap" { + continue + } else if k == "tag" { + continue + } else if k == "team" { + continue + } else if k == "ticketsTrackedBy" { + continue + } else if k == "to" { + continue + } else if k == "tracksTicketsFor" { + continue + } else if k == "type" { + continue + } else if k == "updated" { + continue + } else if k == "url" { + continue + } else if k == "value" { + continue + } // End: Code that ensures a property name is unknown + + this.unknown[k] = v + } + // End: Unknown deserialization + + return this, nil +} + +// IsOrExtendsPropertyValue returns true if the other provided type is the +// PropertyValue type or extends from the PropertyValue type. +func IsOrExtendsPropertyValue(other vocab.Type) bool { + if other.GetTypeName() == "PropertyValue" { + return true + } + return PropertyValueIsExtendedBy(other) +} + +// NewSchemaPropertyValue creates a new PropertyValue type +func NewSchemaPropertyValue() *SchemaPropertyValue { + typeProp := typePropertyConstructor() + typeProp.AppendXMLSchemaString("PropertyValue") + return &SchemaPropertyValue{ + JSONLDType: typeProp, + alias: "", + unknown: make(map[string]interface{}), + } +} + +// PropertyValueIsDisjointWith returns true if the other provided type is disjoint +// with the PropertyValue type. +func PropertyValueIsDisjointWith(other vocab.Type) bool { + disjointWith := []string{"Link", "Mention"} + for _, disjoint := range disjointWith { + if disjoint == other.GetTypeName() { + return true + } + } + return false +} + +// PropertyValueIsExtendedBy returns true if the other provided type extends from +// the PropertyValue type. Note that it returns false if the types are the +// same; see the "IsOrExtendsPropertyValue" variant instead. +func PropertyValueIsExtendedBy(other vocab.Type) bool { + // Shortcut implementation: is not extended by anything. + return false +} + +// SchemaPropertyValueExtends returns true if the PropertyValue type extends from +// the other type. +func SchemaPropertyValueExtends(other vocab.Type) bool { + extensions := []string{"Object"} + for _, ext := range extensions { + if ext == other.GetTypeName() { + return true + } + } + return false +} + +// GetActivityStreamsAltitude returns the "altitude" property if it exists, and +// nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsAltitude() vocab.ActivityStreamsAltitudeProperty { + return this.ActivityStreamsAltitude +} + +// GetActivityStreamsAttachment returns the "attachment" property if it exists, +// and nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsAttachment() vocab.ActivityStreamsAttachmentProperty { + return this.ActivityStreamsAttachment +} + +// GetActivityStreamsAttributedTo returns the "attributedTo" property if it +// exists, and nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsAttributedTo() vocab.ActivityStreamsAttributedToProperty { + return this.ActivityStreamsAttributedTo +} + +// GetActivityStreamsAudience returns the "audience" property if it exists, and +// nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsAudience() vocab.ActivityStreamsAudienceProperty { + return this.ActivityStreamsAudience +} + +// GetActivityStreamsBcc returns the "bcc" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsBcc() vocab.ActivityStreamsBccProperty { + return this.ActivityStreamsBcc +} + +// GetActivityStreamsBto returns the "bto" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsBto() vocab.ActivityStreamsBtoProperty { + return this.ActivityStreamsBto +} + +// GetActivityStreamsCc returns the "cc" property if it exists, and nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsCc() vocab.ActivityStreamsCcProperty { + return this.ActivityStreamsCc +} + +// GetActivityStreamsContent returns the "content" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsContent() vocab.ActivityStreamsContentProperty { + return this.ActivityStreamsContent +} + +// GetActivityStreamsContext returns the "context" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsContext() vocab.ActivityStreamsContextProperty { + return this.ActivityStreamsContext +} + +// GetActivityStreamsDuration returns the "duration" property if it exists, and +// nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsDuration() vocab.ActivityStreamsDurationProperty { + return this.ActivityStreamsDuration +} + +// GetActivityStreamsEndTime returns the "endTime" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsEndTime() vocab.ActivityStreamsEndTimeProperty { + return this.ActivityStreamsEndTime +} + +// GetActivityStreamsGenerator returns the "generator" property if it exists, and +// nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsGenerator() vocab.ActivityStreamsGeneratorProperty { + return this.ActivityStreamsGenerator +} + +// GetActivityStreamsIcon returns the "icon" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsIcon() vocab.ActivityStreamsIconProperty { + return this.ActivityStreamsIcon +} + +// GetActivityStreamsImage returns the "image" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsImage() vocab.ActivityStreamsImageProperty { + return this.ActivityStreamsImage +} + +// GetActivityStreamsInReplyTo returns the "inReplyTo" property if it exists, and +// nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsInReplyTo() vocab.ActivityStreamsInReplyToProperty { + return this.ActivityStreamsInReplyTo +} + +// GetActivityStreamsLikes returns the "likes" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsLikes() vocab.ActivityStreamsLikesProperty { + return this.ActivityStreamsLikes +} + +// GetActivityStreamsLocation returns the "location" property if it exists, and +// nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsLocation() vocab.ActivityStreamsLocationProperty { + return this.ActivityStreamsLocation +} + +// GetActivityStreamsMediaType returns the "mediaType" property if it exists, and +// nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty { + return this.ActivityStreamsMediaType +} + +// GetActivityStreamsName returns the "name" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsName() vocab.ActivityStreamsNameProperty { + return this.ActivityStreamsName +} + +// GetActivityStreamsObject returns the "object" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsObject() vocab.ActivityStreamsObjectProperty { + return this.ActivityStreamsObject +} + +// GetActivityStreamsPreview returns the "preview" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsPreview() vocab.ActivityStreamsPreviewProperty { + return this.ActivityStreamsPreview +} + +// GetActivityStreamsPublished returns the "published" property if it exists, and +// nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsPublished() vocab.ActivityStreamsPublishedProperty { + return this.ActivityStreamsPublished +} + +// GetActivityStreamsReplies returns the "replies" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsReplies() vocab.ActivityStreamsRepliesProperty { + return this.ActivityStreamsReplies +} + +// GetActivityStreamsSensitive returns the "sensitive" property if it exists, and +// nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsSensitive() vocab.ActivityStreamsSensitiveProperty { + return this.ActivityStreamsSensitive +} + +// GetActivityStreamsShares returns the "shares" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsShares() vocab.ActivityStreamsSharesProperty { + return this.ActivityStreamsShares +} + +// GetActivityStreamsSource returns the "source" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsSource() vocab.ActivityStreamsSourceProperty { + return this.ActivityStreamsSource +} + +// GetActivityStreamsStartTime returns the "startTime" property if it exists, and +// nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsStartTime() vocab.ActivityStreamsStartTimeProperty { + return this.ActivityStreamsStartTime +} + +// GetActivityStreamsSummary returns the "summary" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsSummary() vocab.ActivityStreamsSummaryProperty { + return this.ActivityStreamsSummary +} + +// GetActivityStreamsTag returns the "tag" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsTag() vocab.ActivityStreamsTagProperty { + return this.ActivityStreamsTag +} + +// GetActivityStreamsTo returns the "to" property if it exists, and nil otherwise. +func (this SchemaPropertyValue) GetActivityStreamsTo() vocab.ActivityStreamsToProperty { + return this.ActivityStreamsTo +} + +// GetActivityStreamsUpdated returns the "updated" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsUpdated() vocab.ActivityStreamsUpdatedProperty { + return this.ActivityStreamsUpdated +} + +// GetActivityStreamsUrl returns the "url" property if it exists, and nil +// otherwise. +func (this SchemaPropertyValue) GetActivityStreamsUrl() vocab.ActivityStreamsUrlProperty { + return this.ActivityStreamsUrl +} + +// GetForgeFedTeam returns the "team" property if it exists, and nil otherwise. +func (this SchemaPropertyValue) GetForgeFedTeam() vocab.ForgeFedTeamProperty { + return this.ForgeFedTeam +} + +// GetForgeFedTicketsTrackedBy returns the "ticketsTrackedBy" property if it +// exists, and nil otherwise. +func (this SchemaPropertyValue) GetForgeFedTicketsTrackedBy() vocab.ForgeFedTicketsTrackedByProperty { + return this.ForgeFedTicketsTrackedBy +} + +// GetForgeFedTracksTicketsFor returns the "tracksTicketsFor" property if it +// exists, and nil otherwise. +func (this SchemaPropertyValue) GetForgeFedTracksTicketsFor() vocab.ForgeFedTracksTicketsForProperty { + return this.ForgeFedTracksTicketsFor +} + +// GetJSONLDId returns the "id" property if it exists, and nil otherwise. +func (this SchemaPropertyValue) GetJSONLDId() vocab.JSONLDIdProperty { + return this.JSONLDId +} + +// GetJSONLDType returns the "type" property if it exists, and nil otherwise. +func (this SchemaPropertyValue) GetJSONLDType() vocab.JSONLDTypeProperty { + return this.JSONLDType +} + +// GetSchemaValue returns the "value" property if it exists, and nil otherwise. +func (this SchemaPropertyValue) GetSchemaValue() vocab.SchemaValueProperty { + return this.SchemaValue +} + +// GetTypeName returns the name of this type. +func (this SchemaPropertyValue) GetTypeName() string { + return "PropertyValue" +} + +// GetUnknownProperties returns the unknown properties for the PropertyValue type. +// Note that this should not be used by app developers. It is only used to +// help determine which implementation is LessThan the other. Developers who +// are creating a different implementation of this type's interface can use +// this method in their LessThan implementation, but routine ActivityPub +// applications should not use this to bypass the code generation tool. +func (this SchemaPropertyValue) GetUnknownProperties() map[string]interface{} { + return this.unknown +} + +// IsExtending returns true if the PropertyValue type extends from the other type. +func (this SchemaPropertyValue) IsExtending(other vocab.Type) bool { + return SchemaPropertyValueExtends(other) +} + +// JSONLDContext returns the JSONLD URIs required in the context string for this +// type and the specific properties that are set. The value in the map is the +// alias used to import the type and its properties. +func (this SchemaPropertyValue) JSONLDContext() map[string]string { + m := map[string]string{"http://schema.org": this.alias} + m = this.helperJSONLDContext(this.ActivityStreamsAltitude, m) + m = this.helperJSONLDContext(this.ActivityStreamsAttachment, m) + m = this.helperJSONLDContext(this.ActivityStreamsAttributedTo, m) + m = this.helperJSONLDContext(this.ActivityStreamsAudience, m) + m = this.helperJSONLDContext(this.ActivityStreamsBcc, m) + m = this.helperJSONLDContext(this.ActivityStreamsBto, m) + m = this.helperJSONLDContext(this.ActivityStreamsCc, m) + m = this.helperJSONLDContext(this.ActivityStreamsContent, m) + m = this.helperJSONLDContext(this.ActivityStreamsContext, m) + m = this.helperJSONLDContext(this.ActivityStreamsDuration, m) + m = this.helperJSONLDContext(this.ActivityStreamsEndTime, m) + m = this.helperJSONLDContext(this.ActivityStreamsGenerator, m) + m = this.helperJSONLDContext(this.ActivityStreamsIcon, m) + m = this.helperJSONLDContext(this.JSONLDId, m) + m = this.helperJSONLDContext(this.ActivityStreamsImage, m) + m = this.helperJSONLDContext(this.ActivityStreamsInReplyTo, m) + m = this.helperJSONLDContext(this.ActivityStreamsLikes, m) + m = this.helperJSONLDContext(this.ActivityStreamsLocation, m) + m = this.helperJSONLDContext(this.ActivityStreamsMediaType, m) + m = this.helperJSONLDContext(this.ActivityStreamsName, m) + m = this.helperJSONLDContext(this.ActivityStreamsObject, m) + m = this.helperJSONLDContext(this.ActivityStreamsPreview, m) + m = this.helperJSONLDContext(this.ActivityStreamsPublished, m) + m = this.helperJSONLDContext(this.ActivityStreamsReplies, m) + m = this.helperJSONLDContext(this.ActivityStreamsSensitive, m) + m = this.helperJSONLDContext(this.ActivityStreamsShares, m) + m = this.helperJSONLDContext(this.ActivityStreamsSource, m) + m = this.helperJSONLDContext(this.ActivityStreamsStartTime, m) + m = this.helperJSONLDContext(this.ActivityStreamsSummary, m) + m = this.helperJSONLDContext(this.ActivityStreamsTag, m) + m = this.helperJSONLDContext(this.ForgeFedTeam, m) + m = this.helperJSONLDContext(this.ForgeFedTicketsTrackedBy, m) + m = this.helperJSONLDContext(this.ActivityStreamsTo, m) + m = this.helperJSONLDContext(this.ForgeFedTracksTicketsFor, m) + m = this.helperJSONLDContext(this.JSONLDType, m) + m = this.helperJSONLDContext(this.ActivityStreamsUpdated, m) + m = this.helperJSONLDContext(this.ActivityStreamsUrl, m) + m = this.helperJSONLDContext(this.SchemaValue, m) + + return m +} + +// LessThan computes if this PropertyValue is lesser, with an arbitrary but stable +// determination. +func (this SchemaPropertyValue) LessThan(o vocab.SchemaPropertyValue) bool { + // Begin: Compare known properties + // Compare property "altitude" + if lhs, rhs := this.ActivityStreamsAltitude, o.GetActivityStreamsAltitude(); 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 "attachment" + if lhs, rhs := this.ActivityStreamsAttachment, o.GetActivityStreamsAttachment(); 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 "attributedTo" + if lhs, rhs := this.ActivityStreamsAttributedTo, o.GetActivityStreamsAttributedTo(); 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 "audience" + if lhs, rhs := this.ActivityStreamsAudience, o.GetActivityStreamsAudience(); 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 "bcc" + if lhs, rhs := this.ActivityStreamsBcc, o.GetActivityStreamsBcc(); 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 "bto" + if lhs, rhs := this.ActivityStreamsBto, o.GetActivityStreamsBto(); 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 "cc" + if lhs, rhs := this.ActivityStreamsCc, o.GetActivityStreamsCc(); 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 "content" + if lhs, rhs := this.ActivityStreamsContent, o.GetActivityStreamsContent(); 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 "context" + if lhs, rhs := this.ActivityStreamsContext, o.GetActivityStreamsContext(); 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 "duration" + if lhs, rhs := this.ActivityStreamsDuration, o.GetActivityStreamsDuration(); 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 "endTime" + if lhs, rhs := this.ActivityStreamsEndTime, o.GetActivityStreamsEndTime(); 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 "generator" + if lhs, rhs := this.ActivityStreamsGenerator, o.GetActivityStreamsGenerator(); 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 "icon" + if lhs, rhs := this.ActivityStreamsIcon, o.GetActivityStreamsIcon(); 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 "id" + if lhs, rhs := this.JSONLDId, o.GetJSONLDId(); 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 "image" + if lhs, rhs := this.ActivityStreamsImage, o.GetActivityStreamsImage(); 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 "inReplyTo" + if lhs, rhs := this.ActivityStreamsInReplyTo, o.GetActivityStreamsInReplyTo(); 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 "likes" + if lhs, rhs := this.ActivityStreamsLikes, o.GetActivityStreamsLikes(); 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 "location" + if lhs, rhs := this.ActivityStreamsLocation, o.GetActivityStreamsLocation(); 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) { + 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 "name" + if lhs, rhs := this.ActivityStreamsName, o.GetActivityStreamsName(); 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 "object" + if lhs, rhs := this.ActivityStreamsObject, o.GetActivityStreamsObject(); 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 "preview" + if lhs, rhs := this.ActivityStreamsPreview, o.GetActivityStreamsPreview(); 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 "published" + if lhs, rhs := this.ActivityStreamsPublished, o.GetActivityStreamsPublished(); 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 "replies" + if lhs, rhs := this.ActivityStreamsReplies, o.GetActivityStreamsReplies(); 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 "sensitive" + if lhs, rhs := this.ActivityStreamsSensitive, o.GetActivityStreamsSensitive(); 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 "shares" + if lhs, rhs := this.ActivityStreamsShares, o.GetActivityStreamsShares(); 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 "source" + if lhs, rhs := this.ActivityStreamsSource, o.GetActivityStreamsSource(); 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 "startTime" + if lhs, rhs := this.ActivityStreamsStartTime, o.GetActivityStreamsStartTime(); 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 "summary" + if lhs, rhs := this.ActivityStreamsSummary, o.GetActivityStreamsSummary(); 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 "tag" + if lhs, rhs := this.ActivityStreamsTag, o.GetActivityStreamsTag(); 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 "team" + if lhs, rhs := this.ForgeFedTeam, o.GetForgeFedTeam(); 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 "ticketsTrackedBy" + if lhs, rhs := this.ForgeFedTicketsTrackedBy, o.GetForgeFedTicketsTrackedBy(); 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 "to" + if lhs, rhs := this.ActivityStreamsTo, o.GetActivityStreamsTo(); 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 "tracksTicketsFor" + if lhs, rhs := this.ForgeFedTracksTicketsFor, o.GetForgeFedTracksTicketsFor(); 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 "type" + if lhs, rhs := this.JSONLDType, o.GetJSONLDType(); 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 "updated" + if lhs, rhs := this.ActivityStreamsUpdated, o.GetActivityStreamsUpdated(); 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 "url" + if lhs, rhs := this.ActivityStreamsUrl, o.GetActivityStreamsUrl(); 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 "value" + if lhs, rhs := this.SchemaValue, o.GetSchemaValue(); 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 + // End: Compare known properties + + // Begin: Compare unknown properties (only by number of them) + if len(this.unknown) < len(o.GetUnknownProperties()) { + return true + } else if len(o.GetUnknownProperties()) < len(this.unknown) { + return false + } // End: Compare unknown properties (only by number of them) + + // All properties are the same. + return false +} + +// Serialize converts this into an interface representation suitable for +// marshalling into a text or binary format. +func (this SchemaPropertyValue) Serialize() (map[string]interface{}, error) { + m := make(map[string]interface{}) + typeName := "PropertyValue" + if len(this.alias) > 0 { + typeName = this.alias + ":" + "PropertyValue" + } + m["type"] = typeName + // Begin: Serialize known properties + // Maybe serialize property "altitude" + if this.ActivityStreamsAltitude != nil { + if i, err := this.ActivityStreamsAltitude.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsAltitude.Name()] = i + } + } + // Maybe serialize property "attachment" + if this.ActivityStreamsAttachment != nil { + if i, err := this.ActivityStreamsAttachment.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsAttachment.Name()] = i + } + } + // Maybe serialize property "attributedTo" + if this.ActivityStreamsAttributedTo != nil { + if i, err := this.ActivityStreamsAttributedTo.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsAttributedTo.Name()] = i + } + } + // Maybe serialize property "audience" + if this.ActivityStreamsAudience != nil { + if i, err := this.ActivityStreamsAudience.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsAudience.Name()] = i + } + } + // Maybe serialize property "bcc" + if this.ActivityStreamsBcc != nil { + if i, err := this.ActivityStreamsBcc.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsBcc.Name()] = i + } + } + // Maybe serialize property "bto" + if this.ActivityStreamsBto != nil { + if i, err := this.ActivityStreamsBto.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsBto.Name()] = i + } + } + // Maybe serialize property "cc" + if this.ActivityStreamsCc != nil { + if i, err := this.ActivityStreamsCc.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsCc.Name()] = i + } + } + // Maybe serialize property "content" + if this.ActivityStreamsContent != nil { + if i, err := this.ActivityStreamsContent.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsContent.Name()] = i + } + } + // Maybe serialize property "context" + if this.ActivityStreamsContext != nil { + if i, err := this.ActivityStreamsContext.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsContext.Name()] = i + } + } + // Maybe serialize property "duration" + if this.ActivityStreamsDuration != nil { + if i, err := this.ActivityStreamsDuration.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsDuration.Name()] = i + } + } + // Maybe serialize property "endTime" + if this.ActivityStreamsEndTime != nil { + if i, err := this.ActivityStreamsEndTime.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsEndTime.Name()] = i + } + } + // Maybe serialize property "generator" + if this.ActivityStreamsGenerator != nil { + if i, err := this.ActivityStreamsGenerator.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsGenerator.Name()] = i + } + } + // Maybe serialize property "icon" + if this.ActivityStreamsIcon != nil { + if i, err := this.ActivityStreamsIcon.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsIcon.Name()] = i + } + } + // Maybe serialize property "id" + if this.JSONLDId != nil { + if i, err := this.JSONLDId.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.JSONLDId.Name()] = i + } + } + // Maybe serialize property "image" + if this.ActivityStreamsImage != nil { + if i, err := this.ActivityStreamsImage.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsImage.Name()] = i + } + } + // Maybe serialize property "inReplyTo" + if this.ActivityStreamsInReplyTo != nil { + if i, err := this.ActivityStreamsInReplyTo.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsInReplyTo.Name()] = i + } + } + // Maybe serialize property "likes" + if this.ActivityStreamsLikes != nil { + if i, err := this.ActivityStreamsLikes.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsLikes.Name()] = i + } + } + // Maybe serialize property "location" + if this.ActivityStreamsLocation != nil { + if i, err := this.ActivityStreamsLocation.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsLocation.Name()] = i + } + } + // Maybe serialize property "mediaType" + if this.ActivityStreamsMediaType != nil { + if i, err := this.ActivityStreamsMediaType.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsMediaType.Name()] = i + } + } + // Maybe serialize property "name" + if this.ActivityStreamsName != nil { + if i, err := this.ActivityStreamsName.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsName.Name()] = i + } + } + // Maybe serialize property "object" + if this.ActivityStreamsObject != nil { + if i, err := this.ActivityStreamsObject.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsObject.Name()] = i + } + } + // Maybe serialize property "preview" + if this.ActivityStreamsPreview != nil { + if i, err := this.ActivityStreamsPreview.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsPreview.Name()] = i + } + } + // Maybe serialize property "published" + if this.ActivityStreamsPublished != nil { + if i, err := this.ActivityStreamsPublished.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsPublished.Name()] = i + } + } + // Maybe serialize property "replies" + if this.ActivityStreamsReplies != nil { + if i, err := this.ActivityStreamsReplies.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsReplies.Name()] = i + } + } + // Maybe serialize property "sensitive" + if this.ActivityStreamsSensitive != nil { + if i, err := this.ActivityStreamsSensitive.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsSensitive.Name()] = i + } + } + // Maybe serialize property "shares" + if this.ActivityStreamsShares != nil { + if i, err := this.ActivityStreamsShares.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsShares.Name()] = i + } + } + // Maybe serialize property "source" + if this.ActivityStreamsSource != nil { + if i, err := this.ActivityStreamsSource.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsSource.Name()] = i + } + } + // Maybe serialize property "startTime" + if this.ActivityStreamsStartTime != nil { + if i, err := this.ActivityStreamsStartTime.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsStartTime.Name()] = i + } + } + // Maybe serialize property "summary" + if this.ActivityStreamsSummary != nil { + if i, err := this.ActivityStreamsSummary.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsSummary.Name()] = i + } + } + // Maybe serialize property "tag" + if this.ActivityStreamsTag != nil { + if i, err := this.ActivityStreamsTag.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsTag.Name()] = i + } + } + // Maybe serialize property "team" + if this.ForgeFedTeam != nil { + if i, err := this.ForgeFedTeam.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ForgeFedTeam.Name()] = i + } + } + // Maybe serialize property "ticketsTrackedBy" + if this.ForgeFedTicketsTrackedBy != nil { + if i, err := this.ForgeFedTicketsTrackedBy.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ForgeFedTicketsTrackedBy.Name()] = i + } + } + // Maybe serialize property "to" + if this.ActivityStreamsTo != nil { + if i, err := this.ActivityStreamsTo.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsTo.Name()] = i + } + } + // Maybe serialize property "tracksTicketsFor" + if this.ForgeFedTracksTicketsFor != nil { + if i, err := this.ForgeFedTracksTicketsFor.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ForgeFedTracksTicketsFor.Name()] = i + } + } + // Maybe serialize property "type" + if this.JSONLDType != nil { + if i, err := this.JSONLDType.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.JSONLDType.Name()] = i + } + } + // Maybe serialize property "updated" + if this.ActivityStreamsUpdated != nil { + if i, err := this.ActivityStreamsUpdated.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsUpdated.Name()] = i + } + } + // Maybe serialize property "url" + if this.ActivityStreamsUrl != nil { + if i, err := this.ActivityStreamsUrl.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.ActivityStreamsUrl.Name()] = i + } + } + // Maybe serialize property "value" + if this.SchemaValue != nil { + if i, err := this.SchemaValue.Serialize(); err != nil { + return nil, err + } else if i != nil { + m[this.SchemaValue.Name()] = i + } + } + // End: Serialize known properties + + // Begin: Serialize unknown properties + for k, v := range this.unknown { + // To be safe, ensure we aren't overwriting a known property + if _, has := m[k]; !has { + m[k] = v + } + } + // End: Serialize unknown properties + + return m, nil +} + +// SetActivityStreamsAltitude sets the "altitude" property. +func (this *SchemaPropertyValue) SetActivityStreamsAltitude(i vocab.ActivityStreamsAltitudeProperty) { + this.ActivityStreamsAltitude = i +} + +// SetActivityStreamsAttachment sets the "attachment" property. +func (this *SchemaPropertyValue) SetActivityStreamsAttachment(i vocab.ActivityStreamsAttachmentProperty) { + this.ActivityStreamsAttachment = i +} + +// SetActivityStreamsAttributedTo sets the "attributedTo" property. +func (this *SchemaPropertyValue) SetActivityStreamsAttributedTo(i vocab.ActivityStreamsAttributedToProperty) { + this.ActivityStreamsAttributedTo = i +} + +// SetActivityStreamsAudience sets the "audience" property. +func (this *SchemaPropertyValue) SetActivityStreamsAudience(i vocab.ActivityStreamsAudienceProperty) { + this.ActivityStreamsAudience = i +} + +// SetActivityStreamsBcc sets the "bcc" property. +func (this *SchemaPropertyValue) SetActivityStreamsBcc(i vocab.ActivityStreamsBccProperty) { + this.ActivityStreamsBcc = i +} + +// SetActivityStreamsBto sets the "bto" property. +func (this *SchemaPropertyValue) SetActivityStreamsBto(i vocab.ActivityStreamsBtoProperty) { + this.ActivityStreamsBto = i +} + +// SetActivityStreamsCc sets the "cc" property. +func (this *SchemaPropertyValue) SetActivityStreamsCc(i vocab.ActivityStreamsCcProperty) { + this.ActivityStreamsCc = i +} + +// SetActivityStreamsContent sets the "content" property. +func (this *SchemaPropertyValue) SetActivityStreamsContent(i vocab.ActivityStreamsContentProperty) { + this.ActivityStreamsContent = i +} + +// SetActivityStreamsContext sets the "context" property. +func (this *SchemaPropertyValue) SetActivityStreamsContext(i vocab.ActivityStreamsContextProperty) { + this.ActivityStreamsContext = i +} + +// SetActivityStreamsDuration sets the "duration" property. +func (this *SchemaPropertyValue) SetActivityStreamsDuration(i vocab.ActivityStreamsDurationProperty) { + this.ActivityStreamsDuration = i +} + +// SetActivityStreamsEndTime sets the "endTime" property. +func (this *SchemaPropertyValue) SetActivityStreamsEndTime(i vocab.ActivityStreamsEndTimeProperty) { + this.ActivityStreamsEndTime = i +} + +// SetActivityStreamsGenerator sets the "generator" property. +func (this *SchemaPropertyValue) SetActivityStreamsGenerator(i vocab.ActivityStreamsGeneratorProperty) { + this.ActivityStreamsGenerator = i +} + +// SetActivityStreamsIcon sets the "icon" property. +func (this *SchemaPropertyValue) SetActivityStreamsIcon(i vocab.ActivityStreamsIconProperty) { + this.ActivityStreamsIcon = i +} + +// SetActivityStreamsImage sets the "image" property. +func (this *SchemaPropertyValue) SetActivityStreamsImage(i vocab.ActivityStreamsImageProperty) { + this.ActivityStreamsImage = i +} + +// SetActivityStreamsInReplyTo sets the "inReplyTo" property. +func (this *SchemaPropertyValue) SetActivityStreamsInReplyTo(i vocab.ActivityStreamsInReplyToProperty) { + this.ActivityStreamsInReplyTo = i +} + +// SetActivityStreamsLikes sets the "likes" property. +func (this *SchemaPropertyValue) SetActivityStreamsLikes(i vocab.ActivityStreamsLikesProperty) { + this.ActivityStreamsLikes = i +} + +// SetActivityStreamsLocation sets the "location" property. +func (this *SchemaPropertyValue) SetActivityStreamsLocation(i vocab.ActivityStreamsLocationProperty) { + this.ActivityStreamsLocation = i +} + +// SetActivityStreamsMediaType sets the "mediaType" property. +func (this *SchemaPropertyValue) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty) { + this.ActivityStreamsMediaType = i +} + +// SetActivityStreamsName sets the "name" property. +func (this *SchemaPropertyValue) SetActivityStreamsName(i vocab.ActivityStreamsNameProperty) { + this.ActivityStreamsName = i +} + +// SetActivityStreamsObject sets the "object" property. +func (this *SchemaPropertyValue) SetActivityStreamsObject(i vocab.ActivityStreamsObjectProperty) { + this.ActivityStreamsObject = i +} + +// SetActivityStreamsPreview sets the "preview" property. +func (this *SchemaPropertyValue) SetActivityStreamsPreview(i vocab.ActivityStreamsPreviewProperty) { + this.ActivityStreamsPreview = i +} + +// SetActivityStreamsPublished sets the "published" property. +func (this *SchemaPropertyValue) SetActivityStreamsPublished(i vocab.ActivityStreamsPublishedProperty) { + this.ActivityStreamsPublished = i +} + +// SetActivityStreamsReplies sets the "replies" property. +func (this *SchemaPropertyValue) SetActivityStreamsReplies(i vocab.ActivityStreamsRepliesProperty) { + this.ActivityStreamsReplies = i +} + +// SetActivityStreamsSensitive sets the "sensitive" property. +func (this *SchemaPropertyValue) SetActivityStreamsSensitive(i vocab.ActivityStreamsSensitiveProperty) { + this.ActivityStreamsSensitive = i +} + +// SetActivityStreamsShares sets the "shares" property. +func (this *SchemaPropertyValue) SetActivityStreamsShares(i vocab.ActivityStreamsSharesProperty) { + this.ActivityStreamsShares = i +} + +// SetActivityStreamsSource sets the "source" property. +func (this *SchemaPropertyValue) SetActivityStreamsSource(i vocab.ActivityStreamsSourceProperty) { + this.ActivityStreamsSource = i +} + +// SetActivityStreamsStartTime sets the "startTime" property. +func (this *SchemaPropertyValue) SetActivityStreamsStartTime(i vocab.ActivityStreamsStartTimeProperty) { + this.ActivityStreamsStartTime = i +} + +// SetActivityStreamsSummary sets the "summary" property. +func (this *SchemaPropertyValue) SetActivityStreamsSummary(i vocab.ActivityStreamsSummaryProperty) { + this.ActivityStreamsSummary = i +} + +// SetActivityStreamsTag sets the "tag" property. +func (this *SchemaPropertyValue) SetActivityStreamsTag(i vocab.ActivityStreamsTagProperty) { + this.ActivityStreamsTag = i +} + +// SetActivityStreamsTo sets the "to" property. +func (this *SchemaPropertyValue) SetActivityStreamsTo(i vocab.ActivityStreamsToProperty) { + this.ActivityStreamsTo = i +} + +// SetActivityStreamsUpdated sets the "updated" property. +func (this *SchemaPropertyValue) SetActivityStreamsUpdated(i vocab.ActivityStreamsUpdatedProperty) { + this.ActivityStreamsUpdated = i +} + +// SetActivityStreamsUrl sets the "url" property. +func (this *SchemaPropertyValue) SetActivityStreamsUrl(i vocab.ActivityStreamsUrlProperty) { + this.ActivityStreamsUrl = i +} + +// SetForgeFedTeam sets the "team" property. +func (this *SchemaPropertyValue) SetForgeFedTeam(i vocab.ForgeFedTeamProperty) { + this.ForgeFedTeam = i +} + +// SetForgeFedTicketsTrackedBy sets the "ticketsTrackedBy" property. +func (this *SchemaPropertyValue) SetForgeFedTicketsTrackedBy(i vocab.ForgeFedTicketsTrackedByProperty) { + this.ForgeFedTicketsTrackedBy = i +} + +// SetForgeFedTracksTicketsFor sets the "tracksTicketsFor" property. +func (this *SchemaPropertyValue) SetForgeFedTracksTicketsFor(i vocab.ForgeFedTracksTicketsForProperty) { + this.ForgeFedTracksTicketsFor = i +} + +// SetJSONLDId sets the "id" property. +func (this *SchemaPropertyValue) SetJSONLDId(i vocab.JSONLDIdProperty) { + this.JSONLDId = i +} + +// SetJSONLDType sets the "type" property. +func (this *SchemaPropertyValue) SetJSONLDType(i vocab.JSONLDTypeProperty) { + this.JSONLDType = i +} + +// SetSchemaValue sets the "value" property. +func (this *SchemaPropertyValue) SetSchemaValue(i vocab.SchemaValueProperty) { + this.SchemaValue = i +} + +// VocabularyURI returns the vocabulary's URI as a string. +func (this SchemaPropertyValue) VocabularyURI() string { + return "http://schema.org" +} + +// helperJSONLDContext obtains the context uris and their aliases from a property, +// if it is not nil. +func (this SchemaPropertyValue) helperJSONLDContext(i jsonldContexter, toMerge map[string]string) map[string]string { + if i == nil { + return toMerge + } + for k, v := range i.JSONLDContext() { + /* + 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. + */ + toMerge[k] = v + } + return toMerge +} diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_actor_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_actor_interface.go index f72626e3..5cef4415 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_actor_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_actor_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsActorPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsActorPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsActorPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1031,6 +1042,10 @@ type ActivityStreamsActorProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "actor" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "actor". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "actor". Invalidates iterators that are traversing using // Prev. @@ -1307,6 +1322,10 @@ type ActivityStreamsActorProperty interface { // "actor". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "actor". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "actor". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1531,6 +1550,9 @@ type ActivityStreamsActorProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "actor". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "actor". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "actor". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1794,6 +1816,10 @@ type ActivityStreamsActorProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "actor". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "actor". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "actor". Panics if the index is out of bounds. Invalidates // all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_anyOf_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_anyOf_interface.go index eb4332f4..500d4383 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_anyOf_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_anyOf_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsAnyOfPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsAnyOfPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsAnyOfPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1012,6 +1023,10 @@ type ActivityStreamsAnyOfProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "anyOf" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "anyOf". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "anyOf". Invalidates iterators that are traversing using // Prev. @@ -1288,6 +1303,10 @@ type ActivityStreamsAnyOfProperty interface { // "anyOf". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "anyOf". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "anyOf". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1512,6 +1531,9 @@ type ActivityStreamsAnyOfProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "anyOf". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "anyOf". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "anyOf". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1775,6 +1797,10 @@ type ActivityStreamsAnyOfProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "anyOf". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "anyOf". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "anyOf". Panics if the index is out of bounds. Invalidates // all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_attachment_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_attachment_interface.go index 2773f913..013ff4c3 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_attachment_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_attachment_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsAttachmentPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsAttachmentPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsAttachmentPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1007,6 +1018,10 @@ type ActivityStreamsAttachmentProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "attachment" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "attachment". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "attachment". Invalidates iterators that are traversing // using Prev. @@ -1289,6 +1304,11 @@ type ActivityStreamsAttachmentProperty interface { // "attachment". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "attachment". Existing elements at + // that index and higher are shifted back once. Invalidates all + // iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "attachment". Existing elements at that index and higher // are shifted back once. Invalidates all iterators. @@ -1518,6 +1538,9 @@ type ActivityStreamsAttachmentProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "attachment". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "attachment". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "attachment". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1781,6 +1804,10 @@ type ActivityStreamsAttachmentProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "attachment". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "attachment". Panics if the index + // is out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "attachment". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_attributedTo_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_attributedTo_interface.go index 21fc973c..5aadf8a1 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_attributedTo_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_attributedTo_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsAttributedToPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsAttributedToPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsAttributedToPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1023,6 +1034,10 @@ type ActivityStreamsAttributedToProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "attributedTo" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "attributedTo". Invalidates iterators that + // are traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "attributedTo". Invalidates iterators that are traversing // using Prev. @@ -1305,6 +1320,11 @@ type ActivityStreamsAttributedToProperty interface { // "attributedTo". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "attributedTo". Existing elements at + // that index and higher are shifted back once. Invalidates all + // iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "attributedTo". Existing elements at that index and higher // are shifted back once. Invalidates all iterators. @@ -1534,6 +1554,9 @@ type ActivityStreamsAttributedToProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "attributedTo". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "attributedTo". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "attributedTo". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1797,6 +1820,10 @@ type ActivityStreamsAttributedToProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "attributedTo". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "attributedTo". Panics if the + // index is out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "attributedTo". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_audience_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_audience_interface.go index 4cab3548..2016ef6b 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_audience_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_audience_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsAudiencePropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsAudiencePropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsAudiencePropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1007,6 +1018,10 @@ type ActivityStreamsAudienceProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "audience" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "audience". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "audience". Invalidates iterators that are traversing // using Prev. @@ -1289,6 +1304,11 @@ type ActivityStreamsAudienceProperty interface { // "audience". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "audience". Existing elements at + // that index and higher are shifted back once. Invalidates all + // iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "audience". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1517,6 +1537,9 @@ type ActivityStreamsAudienceProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "audience". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "audience". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "audience". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1780,6 +1803,10 @@ type ActivityStreamsAudienceProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "audience". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "audience". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "audience". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_bcc_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_bcc_interface.go index 8ba50913..baa883be 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_bcc_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_bcc_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsBccPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsBccPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsBccPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1005,6 +1016,10 @@ type ActivityStreamsBccProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "bcc" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "bcc". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "bcc". Invalidates iterators that are traversing using // Prev. @@ -1278,6 +1293,10 @@ type ActivityStreamsBccProperty interface { // "bcc". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "bcc". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "bcc". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1502,6 +1521,9 @@ type ActivityStreamsBccProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "bcc". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "bcc". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "bcc". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1765,6 +1787,10 @@ type ActivityStreamsBccProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "bcc". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "bcc". Panics if the index is out + // of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "bcc". Panics if the index is out of bounds. Invalidates // all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_bto_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_bto_interface.go index db61aac2..bb58d069 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_bto_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_bto_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsBtoPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsBtoPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsBtoPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1005,6 +1016,10 @@ type ActivityStreamsBtoProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "bto" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "bto". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "bto". Invalidates iterators that are traversing using // Prev. @@ -1278,6 +1293,10 @@ type ActivityStreamsBtoProperty interface { // "bto". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "bto". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "bto". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1502,6 +1521,9 @@ type ActivityStreamsBtoProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "bto". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "bto". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "bto". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1765,6 +1787,10 @@ type ActivityStreamsBtoProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "bto". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "bto". Panics if the index is out + // of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "bto". Panics if the index is out of bounds. Invalidates // all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_cc_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_cc_interface.go index 121769e0..588b2390 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_cc_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_cc_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsCcPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsCcPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsCcPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1004,6 +1015,10 @@ type ActivityStreamsCcProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "cc" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "cc". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "cc". Invalidates iterators that are traversing using Prev. AppendTootEmoji(v TootEmoji) @@ -1276,6 +1291,10 @@ type ActivityStreamsCcProperty interface { // Existing elements at that index and higher are shifted back once. // Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "cc". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "cc". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1498,6 +1517,9 @@ type ActivityStreamsCcProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "cc". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "cc". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "cc". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1761,6 +1783,10 @@ type ActivityStreamsCcProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "cc". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "cc". Panics if the index is out + // of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "cc". Panics if the index is out of bounds. Invalidates // all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_closed_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_closed_interface.go index d76858c2..b5b7964f 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_closed_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_closed_interface.go @@ -254,6 +254,10 @@ type ActivityStreamsClosedPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -535,6 +539,10 @@ type ActivityStreamsClosedPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -757,6 +765,9 @@ type ActivityStreamsClosedPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1026,6 +1037,10 @@ type ActivityStreamsClosedProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "closed" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "closed". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "closed". Invalidates iterators that are traversing using // Prev. @@ -1310,6 +1325,10 @@ type ActivityStreamsClosedProperty interface { // "closed". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "closed". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "closed". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1542,6 +1561,9 @@ type ActivityStreamsClosedProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "closed". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "closed". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "closed". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1811,6 +1833,10 @@ type ActivityStreamsClosedProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "closed". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "closed". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "closed". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_context_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_context_interface.go index f3c9aacd..164aae96 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_context_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_context_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsContextPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsContextPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsContextPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1019,6 +1030,10 @@ type ActivityStreamsContextProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "context" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "context". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "context". Invalidates iterators that are traversing using // Prev. @@ -1295,6 +1310,10 @@ type ActivityStreamsContextProperty interface { // "context". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "context". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "context". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1523,6 +1542,9 @@ type ActivityStreamsContextProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "context". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "context". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "context". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1786,6 +1808,10 @@ type ActivityStreamsContextProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "context". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "context". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "context". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_describes_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_describes_interface.go index 777dc121..e07bf2ce 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_describes_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_describes_interface.go @@ -257,6 +257,10 @@ type ActivityStreamsDescribesProperty interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -522,6 +526,10 @@ type ActivityStreamsDescribesProperty interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -731,6 +739,9 @@ type ActivityStreamsDescribesProperty interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_formerType_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_formerType_interface.go index 61a066c3..c1d93587 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_formerType_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_formerType_interface.go @@ -243,6 +243,10 @@ type ActivityStreamsFormerTypePropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -512,6 +516,10 @@ type ActivityStreamsFormerTypePropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -724,6 +732,9 @@ type ActivityStreamsFormerTypePropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -984,6 +995,10 @@ type ActivityStreamsFormerTypeProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "formerType" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "formerType". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "formerType". Invalidates iterators that are traversing // using Prev. @@ -1262,6 +1277,11 @@ type ActivityStreamsFormerTypeProperty interface { // "formerType". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "formerType". Existing elements at + // that index and higher are shifted back once. Invalidates all + // iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "formerType". Existing elements at that index and higher // are shifted back once. Invalidates all iterators. @@ -1489,6 +1509,9 @@ type ActivityStreamsFormerTypeProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "formerType". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "formerType". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "formerType". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1747,6 +1770,10 @@ type ActivityStreamsFormerTypeProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "formerType". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "formerType". Panics if the index + // is out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "formerType". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_generator_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_generator_interface.go index 0f9059d1..3b421df7 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_generator_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_generator_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsGeneratorPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsGeneratorPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsGeneratorPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1005,6 +1016,10 @@ type ActivityStreamsGeneratorProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "generator" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "generator". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "generator". Invalidates iterators that are traversing // using Prev. @@ -1287,6 +1302,11 @@ type ActivityStreamsGeneratorProperty interface { // "generator". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "generator". Existing elements at + // that index and higher are shifted back once. Invalidates all + // iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "generator". Existing elements at that index and higher // are shifted back once. Invalidates all iterators. @@ -1516,6 +1536,9 @@ type ActivityStreamsGeneratorProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "generator". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "generator". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "generator". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1779,6 +1802,10 @@ type ActivityStreamsGeneratorProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "generator". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "generator". Panics if the index + // is out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "generator". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_inReplyTo_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_inReplyTo_interface.go index fbd95d13..942f304f 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_inReplyTo_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_inReplyTo_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsInReplyToPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsInReplyToPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsInReplyToPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1014,6 +1025,10 @@ type ActivityStreamsInReplyToProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "inReplyTo" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "inReplyTo". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "inReplyTo". Invalidates iterators that are traversing // using Prev. @@ -1296,6 +1311,11 @@ type ActivityStreamsInReplyToProperty interface { // "inReplyTo". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "inReplyTo". Existing elements at + // that index and higher are shifted back once. Invalidates all + // iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "inReplyTo". Existing elements at that index and higher // are shifted back once. Invalidates all iterators. @@ -1525,6 +1545,9 @@ type ActivityStreamsInReplyToProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "inReplyTo". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "inReplyTo". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "inReplyTo". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1788,6 +1811,10 @@ type ActivityStreamsInReplyToProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "inReplyTo". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "inReplyTo". Panics if the index + // is out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "inReplyTo". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_instrument_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_instrument_interface.go index d89ec620..c8d5a27a 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_instrument_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_instrument_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsInstrumentPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsInstrumentPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsInstrumentPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1011,6 +1022,10 @@ type ActivityStreamsInstrumentProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "instrument" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "instrument". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "instrument". Invalidates iterators that are traversing // using Prev. @@ -1293,6 +1308,11 @@ type ActivityStreamsInstrumentProperty interface { // "instrument". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "instrument". Existing elements at + // that index and higher are shifted back once. Invalidates all + // iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "instrument". Existing elements at that index and higher // are shifted back once. Invalidates all iterators. @@ -1522,6 +1542,9 @@ type ActivityStreamsInstrumentProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "instrument". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "instrument". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "instrument". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1785,6 +1808,10 @@ type ActivityStreamsInstrumentProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "instrument". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "instrument". Panics if the index + // is out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "instrument". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_items_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_items_interface.go index f5b0ee06..1d118715 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_items_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_items_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsItemsPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsItemsPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsItemsPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1012,6 +1023,10 @@ type ActivityStreamsItemsProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "items" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "items". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "items". Invalidates iterators that are traversing using // Prev. @@ -1288,6 +1303,10 @@ type ActivityStreamsItemsProperty interface { // "items". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "items". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "items". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1512,6 +1531,9 @@ type ActivityStreamsItemsProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "items". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "items". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "items". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1775,6 +1797,10 @@ type ActivityStreamsItemsProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "items". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "items". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "items". Panics if the index is out of bounds. Invalidates // all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_location_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_location_interface.go index ca310a43..9b10c82d 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_location_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_location_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsLocationPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsLocationPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsLocationPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1009,6 +1020,10 @@ type ActivityStreamsLocationProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "location" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "location". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "location". Invalidates iterators that are traversing // using Prev. @@ -1291,6 +1306,11 @@ type ActivityStreamsLocationProperty interface { // "location". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "location". Existing elements at + // that index and higher are shifted back once. Invalidates all + // iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "location". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1519,6 +1539,9 @@ type ActivityStreamsLocationProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "location". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "location". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "location". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1782,6 +1805,10 @@ type ActivityStreamsLocationProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "location". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "location". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "location". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_object_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_object_interface.go index 6feaa13b..663219b4 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_object_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_object_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsObjectPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsObjectPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsObjectPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1030,6 +1041,10 @@ type ActivityStreamsObjectProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "object" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "object". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "object". Invalidates iterators that are traversing using // Prev. @@ -1306,6 +1321,10 @@ type ActivityStreamsObjectProperty interface { // "object". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "object". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "object". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1530,6 +1549,9 @@ type ActivityStreamsObjectProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "object". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "object". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "object". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1793,6 +1815,10 @@ type ActivityStreamsObjectProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "object". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "object". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "object". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_oneOf_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_oneOf_interface.go index e8c8fa9c..36bb9668 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_oneOf_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_oneOf_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsOneOfPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsOneOfPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsOneOfPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1012,6 +1023,10 @@ type ActivityStreamsOneOfProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "oneOf" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "oneOf". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "oneOf". Invalidates iterators that are traversing using // Prev. @@ -1288,6 +1303,10 @@ type ActivityStreamsOneOfProperty interface { // "oneOf". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "oneOf". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "oneOf". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1512,6 +1531,9 @@ type ActivityStreamsOneOfProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "oneOf". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "oneOf". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "oneOf". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1775,6 +1797,10 @@ type ActivityStreamsOneOfProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "oneOf". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "oneOf". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "oneOf". Panics if the index is out of bounds. Invalidates // all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_orderedItems_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_orderedItems_interface.go index a5ef17c0..928bfe3b 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_orderedItems_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_orderedItems_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsOrderedItemsPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsOrderedItemsPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsOrderedItemsPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1013,6 +1024,10 @@ type ActivityStreamsOrderedItemsProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "orderedItems" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "orderedItems". Invalidates iterators that + // are traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "orderedItems". Invalidates iterators that are traversing // using Prev. @@ -1295,6 +1310,11 @@ type ActivityStreamsOrderedItemsProperty interface { // "orderedItems". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "orderedItems". Existing elements at + // that index and higher are shifted back once. Invalidates all + // iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "orderedItems". Existing elements at that index and higher // are shifted back once. Invalidates all iterators. @@ -1524,6 +1544,9 @@ type ActivityStreamsOrderedItemsProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "orderedItems". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "orderedItems". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "orderedItems". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1787,6 +1810,10 @@ type ActivityStreamsOrderedItemsProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "orderedItems". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "orderedItems". Panics if the + // index is out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "orderedItems". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_origin_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_origin_interface.go index 3fb7edc5..8e4d31ba 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_origin_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_origin_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsOriginPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsOriginPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsOriginPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1013,6 +1024,10 @@ type ActivityStreamsOriginProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "origin" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "origin". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "origin". Invalidates iterators that are traversing using // Prev. @@ -1289,6 +1304,10 @@ type ActivityStreamsOriginProperty interface { // "origin". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "origin". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "origin". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1513,6 +1532,9 @@ type ActivityStreamsOriginProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "origin". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "origin". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "origin". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1776,6 +1798,10 @@ type ActivityStreamsOriginProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "origin". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "origin". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "origin". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_preview_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_preview_interface.go index d7045f9c..f314a773 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_preview_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_preview_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsPreviewPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsPreviewPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsPreviewPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1010,6 +1021,10 @@ type ActivityStreamsPreviewProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "preview" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "preview". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "preview". Invalidates iterators that are traversing using // Prev. @@ -1286,6 +1301,10 @@ type ActivityStreamsPreviewProperty interface { // "preview". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "preview". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "preview". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1514,6 +1533,9 @@ type ActivityStreamsPreviewProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "preview". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "preview". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "preview". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1777,6 +1799,10 @@ type ActivityStreamsPreviewProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "preview". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "preview". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "preview". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_relationship_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_relationship_interface.go index 25aeb00e..ff545174 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_relationship_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_relationship_interface.go @@ -243,6 +243,10 @@ type ActivityStreamsRelationshipPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -508,6 +512,10 @@ type ActivityStreamsRelationshipPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -716,6 +724,9 @@ type ActivityStreamsRelationshipPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -982,6 +993,10 @@ type ActivityStreamsRelationshipProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "relationship" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "relationship". Invalidates iterators that + // are traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "relationship". Invalidates iterators that are traversing // using Prev. @@ -1256,6 +1271,11 @@ type ActivityStreamsRelationshipProperty interface { // "relationship". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "relationship". Existing elements at + // that index and higher are shifted back once. Invalidates all + // iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "relationship". Existing elements at that index and higher // are shifted back once. Invalidates all iterators. @@ -1479,6 +1499,9 @@ type ActivityStreamsRelationshipProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "relationship". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "relationship". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "relationship". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1734,6 +1757,10 @@ type ActivityStreamsRelationshipProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "relationship". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "relationship". Panics if the + // index is out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "relationship". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_result_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_result_interface.go index d028b6b4..864dd90a 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_result_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_result_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsResultPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsResultPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsResultPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1011,6 +1022,10 @@ type ActivityStreamsResultProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "result" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "result". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "result". Invalidates iterators that are traversing using // Prev. @@ -1287,6 +1302,10 @@ type ActivityStreamsResultProperty interface { // "result". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "result". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "result". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1511,6 +1530,9 @@ type ActivityStreamsResultProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "result". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "result". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "result". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1774,6 +1796,10 @@ type ActivityStreamsResultProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "result". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "result". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "result". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_source_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_source_interface.go index 546bfe82..4aad0ba0 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_source_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_source_interface.go @@ -273,6 +273,10 @@ type ActivityStreamsSourceProperty interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -546,6 +550,10 @@ type ActivityStreamsSourceProperty interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -761,6 +769,9 @@ type ActivityStreamsSourceProperty interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_subject_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_subject_interface.go index 897cb325..3e7e806a 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_subject_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_subject_interface.go @@ -270,6 +270,10 @@ type ActivityStreamsSubjectProperty interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -543,6 +547,10 @@ type ActivityStreamsSubjectProperty interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -758,6 +766,9 @@ type ActivityStreamsSubjectProperty interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_tag_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_tag_interface.go index 9b6d5b85..e41fe686 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_tag_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_tag_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsTagPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsTagPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsTagPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1009,6 +1020,10 @@ type ActivityStreamsTagProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "tag" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "tag". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "tag". Invalidates iterators that are traversing using // Prev. @@ -1282,6 +1297,10 @@ type ActivityStreamsTagProperty interface { // "tag". Existing elements at that index and higher are shifted back // once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "tag". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "tag". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1506,6 +1525,9 @@ type ActivityStreamsTagProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "tag". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "tag". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "tag". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1769,6 +1791,10 @@ type ActivityStreamsTagProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "tag". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "tag". Panics if the index is out + // of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "tag". Panics if the index is out of bounds. Invalidates // all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_target_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_target_interface.go index 4d84262c..9cf387cf 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_target_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_target_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsTargetPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsTargetPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsTargetPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1019,6 +1030,10 @@ type ActivityStreamsTargetProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "target" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "target". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "target". Invalidates iterators that are traversing using // Prev. @@ -1295,6 +1310,10 @@ type ActivityStreamsTargetProperty interface { // "target". Existing elements at that index and higher are shifted // back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "target". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "target". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1519,6 +1538,9 @@ type ActivityStreamsTargetProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "target". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "target". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "target". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1782,6 +1804,10 @@ type ActivityStreamsTargetProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "target". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "target". Panics if the index is + // out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "target". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_to_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_to_interface.go index 8c7ffc0f..c8681805 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_to_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_activitystreams_to_interface.go @@ -251,6 +251,10 @@ type ActivityStreamsToPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ActivityStreamsToPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ActivityStreamsToPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1004,6 +1015,10 @@ type ActivityStreamsToProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "to" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "to". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "to". Invalidates iterators that are traversing using Prev. AppendTootEmoji(v TootEmoji) @@ -1276,6 +1291,10 @@ type ActivityStreamsToProperty interface { // Existing elements at that index and higher are shifted back once. // Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "to". Existing elements at that + // index and higher are shifted back once. Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "to". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. @@ -1498,6 +1517,9 @@ type ActivityStreamsToProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "to". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "to". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "to". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1761,6 +1783,10 @@ type ActivityStreamsToProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "to". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "to". Panics if the index is out + // of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "to". Panics if the index is out of bounds. Invalidates // all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_committedBy_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_committedBy_interface.go index c7a896ec..daba6d95 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_committedBy_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_committedBy_interface.go @@ -252,6 +252,10 @@ type ForgeFedCommittedByProperty interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -517,6 +521,10 @@ type ForgeFedCommittedByProperty interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -726,6 +734,9 @@ type ForgeFedCommittedByProperty interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_description_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_description_interface.go index 5ceba68d..28905f64 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_description_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_description_interface.go @@ -266,6 +266,10 @@ type ForgeFedDescriptionProperty interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -531,6 +535,10 @@ type ForgeFedDescriptionProperty interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -740,6 +748,9 @@ type ForgeFedDescriptionProperty interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_earlyItems_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_earlyItems_interface.go index df1ef96f..dea754ea 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_earlyItems_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_earlyItems_interface.go @@ -251,6 +251,10 @@ type ForgeFedEarlyItemsPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ForgeFedEarlyItemsPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -738,6 +746,9 @@ type ForgeFedEarlyItemsPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -1020,6 +1031,10 @@ type ForgeFedEarlyItemsProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "earlyItems" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "earlyItems". Invalidates iterators that are + // traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "earlyItems". Invalidates iterators that are traversing // using Prev. @@ -1302,6 +1317,11 @@ type ForgeFedEarlyItemsProperty interface { // "earlyItems". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "earlyItems". Existing elements at + // that index and higher are shifted back once. Invalidates all + // iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "earlyItems". Existing elements at that index and higher // are shifted back once. Invalidates all iterators. @@ -1531,6 +1551,9 @@ type ForgeFedEarlyItemsProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "earlyItems". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "earlyItems". Invalidates all iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "earlyItems". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1794,6 +1817,10 @@ type ForgeFedEarlyItemsProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "earlyItems". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "earlyItems". Panics if the index + // is out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "earlyItems". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_ticketsTrackedBy_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_ticketsTrackedBy_interface.go index 3ca4a901..6d69339e 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_ticketsTrackedBy_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_ticketsTrackedBy_interface.go @@ -259,6 +259,10 @@ type ForgeFedTicketsTrackedByProperty interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -524,6 +528,10 @@ type ForgeFedTicketsTrackedByProperty interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -733,6 +741,9 @@ type ForgeFedTicketsTrackedByProperty interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_tracksTicketsFor_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_tracksTicketsFor_interface.go index 65471e63..ca18d16b 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_tracksTicketsFor_interface.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_forgefed_tracksTicketsFor_interface.go @@ -243,6 +243,10 @@ type ForgeFedTracksTicketsForPropertyIterator interface { // GetIRI returns the IRI of this property. When IsIRI returns false, // GetIRI will return an arbitrary value. GetIRI() *url.URL + // GetSchemaPropertyValue returns the value of this property. When + // IsSchemaPropertyValue returns false, GetSchemaPropertyValue will + // return an arbitrary value. + GetSchemaPropertyValue() SchemaPropertyValue // GetTootEmoji returns the value of this property. When IsTootEmoji // returns false, GetTootEmoji will return an arbitrary value. GetTootEmoji() TootEmoji @@ -508,6 +512,10 @@ type ForgeFedTracksTicketsForPropertyIterator interface { // IsIRI returns true if this property is an IRI. When true, use GetIRI // and SetIRI to access and set this property IsIRI() bool + // IsSchemaPropertyValue returns true if this property has a type of + // "PropertyValue". When true, use the GetSchemaPropertyValue and + // SetSchemaPropertyValue methods to access and set this property. + IsSchemaPropertyValue() bool // IsTootEmoji returns true if this property has a type of "Emoji". When // true, use the GetTootEmoji and SetTootEmoji methods to access and // set this property. @@ -716,6 +724,9 @@ type ForgeFedTracksTicketsForPropertyIterator interface { // SetIRI sets the value of this property. Calling IsIRI afterwards // returns true. SetIRI(v *url.URL) + // SetSchemaPropertyValue sets the value of this property. Calling + // IsSchemaPropertyValue afterwards returns true. + SetSchemaPropertyValue(v SchemaPropertyValue) // SetTootEmoji sets the value of this property. Calling IsTootEmoji // afterwards returns true. SetTootEmoji(v TootEmoji) @@ -982,6 +993,10 @@ type ForgeFedTracksTicketsForProperty interface { // AppendIRI appends an IRI value to the back of a list of the property // "tracksTicketsFor" AppendIRI(v *url.URL) + // AppendSchemaPropertyValue appends a PropertyValue value to the back of + // a list of the property "tracksTicketsFor". Invalidates iterators + // that are traversing using Prev. + AppendSchemaPropertyValue(v SchemaPropertyValue) // AppendTootEmoji appends a Emoji value to the back of a list of the // property "tracksTicketsFor". Invalidates iterators that are // traversing using Prev. @@ -1256,6 +1271,11 @@ type ForgeFedTracksTicketsForProperty interface { // "tracksTicketsFor". Existing elements at that index and higher are // shifted back once. Invalidates all iterators. InsertIRI(idx int, v *url.URL) + // InsertSchemaPropertyValue inserts a PropertyValue value at the + // specified index for a property "tracksTicketsFor". Existing + // elements at that index and higher are shifted back once. + // Invalidates all iterators. + InsertSchemaPropertyValue(idx int, v SchemaPropertyValue) // InsertTootEmoji inserts a Emoji value at the specified index for a // property "tracksTicketsFor". Existing elements at that index and // higher are shifted back once. Invalidates all iterators. @@ -1489,6 +1509,10 @@ type ForgeFedTracksTicketsForProperty interface { // PrependIRI prepends an IRI value to the front of a list of the property // "tracksTicketsFor". PrependIRI(v *url.URL) + // PrependSchemaPropertyValue prepends a PropertyValue value to the front + // of a list of the property "tracksTicketsFor". Invalidates all + // iterators. + PrependSchemaPropertyValue(v SchemaPropertyValue) // PrependTootEmoji prepends a Emoji value to the front of a list of the // property "tracksTicketsFor". Invalidates all iterators. PrependTootEmoji(v TootEmoji) @@ -1747,6 +1771,10 @@ type ForgeFedTracksTicketsForProperty interface { // SetIRI sets an IRI value to be at the specified index for the property // "tracksTicketsFor". Panics if the index is out of bounds. SetIRI(idx int, v *url.URL) + // SetSchemaPropertyValue sets a PropertyValue value to be at the + // specified index for the property "tracksTicketsFor". Panics if the + // index is out of bounds. Invalidates all iterators. + SetSchemaPropertyValue(idx int, v SchemaPropertyValue) // SetTootEmoji sets a Emoji value to be at the specified index for the // property "tracksTicketsFor". Panics if the index is out of bounds. // Invalidates all iterators. diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_schema_value_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_schema_value_interface.go new file mode 100644 index 00000000..dbfb75a4 --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_property_schema_value_interface.go @@ -0,0 +1,52 @@ +// Code generated by astool. DO NOT EDIT. + +package vocab + +import "net/url" + +// The value of the quantitative value or property value node. +type SchemaValueProperty interface { + // Clear ensures no value of this property is set. Calling + // IsXMLSchemaString afterwards will return false. + Clear() + // Get returns the value of this property. When IsXMLSchemaString returns + // false, Get will return any arbitrary value. + Get() string + // GetIRI returns the IRI of this property. When IsIRI returns false, + // GetIRI will return any arbitrary value. + GetIRI() *url.URL + // HasAny returns true if the value or IRI is set. + HasAny() bool + // IsIRI returns true if this property is an IRI. + IsIRI() bool + // IsXMLSchemaString returns true if this property is set and not an IRI. + IsXMLSchemaString() bool + // 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. + JSONLDContext() map[string]string + // 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. + KindIndex() int + // 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. + LessThan(o SchemaValueProperty) bool + // Name returns the name of this property: "value". + Name() string + // 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. + Serialize() (interface{}, error) + // Set sets the value of this property. Calling IsXMLSchemaString + // afterwards will return true. + Set(v string) + // SetIRI sets the value of this property. Calling IsIRI afterwards will + // return true. + SetIRI(v *url.URL) +} diff --git a/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_type_schema_propertyvalue_interface.go b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_type_schema_propertyvalue_interface.go new file mode 100644 index 00000000..a4cc6f90 --- /dev/null +++ b/vendor/github.com/superseriousbusiness/activity/streams/vocab/gen_type_schema_propertyvalue_interface.go @@ -0,0 +1,222 @@ +// Code generated by astool. DO NOT EDIT. + +package vocab + +// A property-value pair, e.g. representing a feature of a product or place. Use +// the 'name' property for the name of the property. +type SchemaPropertyValue interface { + // GetActivityStreamsAltitude returns the "altitude" property if it + // exists, and nil otherwise. + GetActivityStreamsAltitude() ActivityStreamsAltitudeProperty + // GetActivityStreamsAttachment returns the "attachment" property if it + // exists, and nil otherwise. + GetActivityStreamsAttachment() ActivityStreamsAttachmentProperty + // GetActivityStreamsAttributedTo returns the "attributedTo" property if + // it exists, and nil otherwise. + GetActivityStreamsAttributedTo() ActivityStreamsAttributedToProperty + // GetActivityStreamsAudience returns the "audience" property if it + // exists, and nil otherwise. + GetActivityStreamsAudience() ActivityStreamsAudienceProperty + // GetActivityStreamsBcc returns the "bcc" property if it exists, and nil + // otherwise. + GetActivityStreamsBcc() ActivityStreamsBccProperty + // GetActivityStreamsBto returns the "bto" property if it exists, and nil + // otherwise. + GetActivityStreamsBto() ActivityStreamsBtoProperty + // GetActivityStreamsCc returns the "cc" property if it exists, and nil + // otherwise. + GetActivityStreamsCc() ActivityStreamsCcProperty + // GetActivityStreamsContent returns the "content" property if it exists, + // and nil otherwise. + GetActivityStreamsContent() ActivityStreamsContentProperty + // GetActivityStreamsContext returns the "context" property if it exists, + // and nil otherwise. + GetActivityStreamsContext() ActivityStreamsContextProperty + // GetActivityStreamsDuration returns the "duration" property if it + // exists, and nil otherwise. + GetActivityStreamsDuration() ActivityStreamsDurationProperty + // GetActivityStreamsEndTime returns the "endTime" property if it exists, + // and nil otherwise. + GetActivityStreamsEndTime() ActivityStreamsEndTimeProperty + // GetActivityStreamsGenerator returns the "generator" property if it + // exists, and nil otherwise. + GetActivityStreamsGenerator() ActivityStreamsGeneratorProperty + // GetActivityStreamsIcon returns the "icon" property if it exists, and + // nil otherwise. + GetActivityStreamsIcon() ActivityStreamsIconProperty + // GetActivityStreamsImage returns the "image" property if it exists, and + // nil otherwise. + GetActivityStreamsImage() ActivityStreamsImageProperty + // GetActivityStreamsInReplyTo returns the "inReplyTo" property if it + // exists, and nil otherwise. + GetActivityStreamsInReplyTo() ActivityStreamsInReplyToProperty + // GetActivityStreamsLikes returns the "likes" property if it exists, and + // nil otherwise. + GetActivityStreamsLikes() ActivityStreamsLikesProperty + // GetActivityStreamsLocation returns the "location" property if it + // exists, and nil otherwise. + GetActivityStreamsLocation() ActivityStreamsLocationProperty + // GetActivityStreamsMediaType returns the "mediaType" property if it + // exists, and nil otherwise. + GetActivityStreamsMediaType() ActivityStreamsMediaTypeProperty + // GetActivityStreamsName returns the "name" property if it exists, and + // nil otherwise. + GetActivityStreamsName() ActivityStreamsNameProperty + // GetActivityStreamsObject returns the "object" property if it exists, + // and nil otherwise. + GetActivityStreamsObject() ActivityStreamsObjectProperty + // GetActivityStreamsPreview returns the "preview" property if it exists, + // and nil otherwise. + GetActivityStreamsPreview() ActivityStreamsPreviewProperty + // GetActivityStreamsPublished returns the "published" property if it + // exists, and nil otherwise. + GetActivityStreamsPublished() ActivityStreamsPublishedProperty + // GetActivityStreamsReplies returns the "replies" property if it exists, + // and nil otherwise. + GetActivityStreamsReplies() ActivityStreamsRepliesProperty + // GetActivityStreamsSensitive returns the "sensitive" property if it + // exists, and nil otherwise. + GetActivityStreamsSensitive() ActivityStreamsSensitiveProperty + // GetActivityStreamsShares returns the "shares" property if it exists, + // and nil otherwise. + GetActivityStreamsShares() ActivityStreamsSharesProperty + // GetActivityStreamsSource returns the "source" property if it exists, + // and nil otherwise. + GetActivityStreamsSource() ActivityStreamsSourceProperty + // GetActivityStreamsStartTime returns the "startTime" property if it + // exists, and nil otherwise. + GetActivityStreamsStartTime() ActivityStreamsStartTimeProperty + // GetActivityStreamsSummary returns the "summary" property if it exists, + // and nil otherwise. + GetActivityStreamsSummary() ActivityStreamsSummaryProperty + // GetActivityStreamsTag returns the "tag" property if it exists, and nil + // otherwise. + GetActivityStreamsTag() ActivityStreamsTagProperty + // GetActivityStreamsTo returns the "to" property if it exists, and nil + // otherwise. + GetActivityStreamsTo() ActivityStreamsToProperty + // GetActivityStreamsUpdated returns the "updated" property if it exists, + // and nil otherwise. + GetActivityStreamsUpdated() ActivityStreamsUpdatedProperty + // GetActivityStreamsUrl returns the "url" property if it exists, and nil + // otherwise. + GetActivityStreamsUrl() ActivityStreamsUrlProperty + // GetForgeFedTeam returns the "team" property if it exists, and nil + // otherwise. + GetForgeFedTeam() ForgeFedTeamProperty + // GetForgeFedTicketsTrackedBy returns the "ticketsTrackedBy" property if + // it exists, and nil otherwise. + GetForgeFedTicketsTrackedBy() ForgeFedTicketsTrackedByProperty + // GetForgeFedTracksTicketsFor returns the "tracksTicketsFor" property if + // it exists, and nil otherwise. + GetForgeFedTracksTicketsFor() ForgeFedTracksTicketsForProperty + // GetJSONLDId returns the "id" property if it exists, and nil otherwise. + GetJSONLDId() JSONLDIdProperty + // GetJSONLDType returns the "type" property if it exists, and nil + // otherwise. + GetJSONLDType() JSONLDTypeProperty + // GetSchemaValue returns the "value" property if it exists, and nil + // otherwise. + GetSchemaValue() SchemaValueProperty + // GetTypeName returns the name of this type. + GetTypeName() string + // GetUnknownProperties returns the unknown properties for the + // PropertyValue type. Note that this should not be used by app + // developers. It is only used to help determine which implementation + // is LessThan the other. Developers who are creating a different + // implementation of this type's interface can use this method in + // their LessThan implementation, but routine ActivityPub applications + // should not use this to bypass the code generation tool. + GetUnknownProperties() map[string]interface{} + // IsExtending returns true if the PropertyValue type extends from the + // other type. + IsExtending(other Type) bool + // JSONLDContext returns the JSONLD URIs required in the context string + // for this type and the specific properties that are set. The value + // in the map is the alias used to import the type and its properties. + JSONLDContext() map[string]string + // LessThan computes if this PropertyValue is lesser, with an arbitrary + // but stable determination. + LessThan(o SchemaPropertyValue) bool + // Serialize converts this into an interface representation suitable for + // marshalling into a text or binary format. + Serialize() (map[string]interface{}, error) + // SetActivityStreamsAltitude sets the "altitude" property. + SetActivityStreamsAltitude(i ActivityStreamsAltitudeProperty) + // SetActivityStreamsAttachment sets the "attachment" property. + SetActivityStreamsAttachment(i ActivityStreamsAttachmentProperty) + // SetActivityStreamsAttributedTo sets the "attributedTo" property. + SetActivityStreamsAttributedTo(i ActivityStreamsAttributedToProperty) + // SetActivityStreamsAudience sets the "audience" property. + SetActivityStreamsAudience(i ActivityStreamsAudienceProperty) + // SetActivityStreamsBcc sets the "bcc" property. + SetActivityStreamsBcc(i ActivityStreamsBccProperty) + // SetActivityStreamsBto sets the "bto" property. + SetActivityStreamsBto(i ActivityStreamsBtoProperty) + // SetActivityStreamsCc sets the "cc" property. + SetActivityStreamsCc(i ActivityStreamsCcProperty) + // SetActivityStreamsContent sets the "content" property. + SetActivityStreamsContent(i ActivityStreamsContentProperty) + // SetActivityStreamsContext sets the "context" property. + SetActivityStreamsContext(i ActivityStreamsContextProperty) + // SetActivityStreamsDuration sets the "duration" property. + SetActivityStreamsDuration(i ActivityStreamsDurationProperty) + // SetActivityStreamsEndTime sets the "endTime" property. + SetActivityStreamsEndTime(i ActivityStreamsEndTimeProperty) + // SetActivityStreamsGenerator sets the "generator" property. + SetActivityStreamsGenerator(i ActivityStreamsGeneratorProperty) + // SetActivityStreamsIcon sets the "icon" property. + SetActivityStreamsIcon(i ActivityStreamsIconProperty) + // SetActivityStreamsImage sets the "image" property. + SetActivityStreamsImage(i ActivityStreamsImageProperty) + // SetActivityStreamsInReplyTo sets the "inReplyTo" property. + SetActivityStreamsInReplyTo(i ActivityStreamsInReplyToProperty) + // SetActivityStreamsLikes sets the "likes" property. + SetActivityStreamsLikes(i ActivityStreamsLikesProperty) + // SetActivityStreamsLocation sets the "location" property. + SetActivityStreamsLocation(i ActivityStreamsLocationProperty) + // SetActivityStreamsMediaType sets the "mediaType" property. + SetActivityStreamsMediaType(i ActivityStreamsMediaTypeProperty) + // SetActivityStreamsName sets the "name" property. + SetActivityStreamsName(i ActivityStreamsNameProperty) + // SetActivityStreamsObject sets the "object" property. + SetActivityStreamsObject(i ActivityStreamsObjectProperty) + // SetActivityStreamsPreview sets the "preview" property. + SetActivityStreamsPreview(i ActivityStreamsPreviewProperty) + // SetActivityStreamsPublished sets the "published" property. + SetActivityStreamsPublished(i ActivityStreamsPublishedProperty) + // SetActivityStreamsReplies sets the "replies" property. + SetActivityStreamsReplies(i ActivityStreamsRepliesProperty) + // SetActivityStreamsSensitive sets the "sensitive" property. + SetActivityStreamsSensitive(i ActivityStreamsSensitiveProperty) + // SetActivityStreamsShares sets the "shares" property. + SetActivityStreamsShares(i ActivityStreamsSharesProperty) + // SetActivityStreamsSource sets the "source" property. + SetActivityStreamsSource(i ActivityStreamsSourceProperty) + // SetActivityStreamsStartTime sets the "startTime" property. + SetActivityStreamsStartTime(i ActivityStreamsStartTimeProperty) + // SetActivityStreamsSummary sets the "summary" property. + SetActivityStreamsSummary(i ActivityStreamsSummaryProperty) + // SetActivityStreamsTag sets the "tag" property. + SetActivityStreamsTag(i ActivityStreamsTagProperty) + // SetActivityStreamsTo sets the "to" property. + SetActivityStreamsTo(i ActivityStreamsToProperty) + // SetActivityStreamsUpdated sets the "updated" property. + SetActivityStreamsUpdated(i ActivityStreamsUpdatedProperty) + // SetActivityStreamsUrl sets the "url" property. + SetActivityStreamsUrl(i ActivityStreamsUrlProperty) + // SetForgeFedTeam sets the "team" property. + SetForgeFedTeam(i ForgeFedTeamProperty) + // SetForgeFedTicketsTrackedBy sets the "ticketsTrackedBy" property. + SetForgeFedTicketsTrackedBy(i ForgeFedTicketsTrackedByProperty) + // SetForgeFedTracksTicketsFor sets the "tracksTicketsFor" property. + SetForgeFedTracksTicketsFor(i ForgeFedTracksTicketsForProperty) + // SetJSONLDId sets the "id" property. + SetJSONLDId(i JSONLDIdProperty) + // SetJSONLDType sets the "type" property. + SetJSONLDType(i JSONLDTypeProperty) + // SetSchemaValue sets the "value" property. + SetSchemaValue(i SchemaValueProperty) + // VocabularyURI returns the vocabulary's URI as a string. + VocabularyURI() string +} diff --git a/vendor/modules.txt b/vendor/modules.txt index bdb46673..379ac1e8 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -445,7 +445,7 @@ github.com/stretchr/testify/suite # github.com/subosito/gotenv v1.4.2 ## explicit; go 1.18 github.com/subosito/gotenv -# github.com/superseriousbusiness/activity v1.2.2-gts +# github.com/superseriousbusiness/activity v1.3.0-gts ## explicit; go 1.18 github.com/superseriousbusiness/activity/pub github.com/superseriousbusiness/activity/streams @@ -606,6 +606,8 @@ github.com/superseriousbusiness/activity/streams/impl/forgefed/type_ticket github.com/superseriousbusiness/activity/streams/impl/forgefed/type_ticketdependency github.com/superseriousbusiness/activity/streams/impl/jsonld/property_id github.com/superseriousbusiness/activity/streams/impl/jsonld/property_type +github.com/superseriousbusiness/activity/streams/impl/schema/property_value +github.com/superseriousbusiness/activity/streams/impl/schema/type_propertyvalue github.com/superseriousbusiness/activity/streams/impl/toot/property_blurhash github.com/superseriousbusiness/activity/streams/impl/toot/property_discoverable github.com/superseriousbusiness/activity/streams/impl/toot/property_featured