func (this *ForgeFedDependedByProperty) InsertForgeFedTicket(idx int, v vocab.ForgeFedTicket) {
	this.properties = append(this.properties, nil)
	copy(this.properties[idx+1:], this.properties[idx:])
	this.properties[idx] = &ForgeFedDependedByPropertyIterator{
		alias:                this.alias,
		forgefedTicketMember: v,
		myIdx:                idx,
		parent:               this,
	}
	for i := idx; i < this.Len(); i++ {
		(this.properties)[i].myIdx = i
	}
}
InsertForgeFedTicket inserts a Ticket value at the specified index for a
property "dependedBy". Existing elements at that index and higher are
shifted back once. Invalidates all iterators.
package propertydependedby
import (
	"fmt"
	vocab "github.com/go-fed/activity/streams/vocab"
	"net/url"
)
type ForgeFedDependedByPropertyIterator struct {
	forgefedTicketMember vocab.ForgeFedTicket
	unknown              interface{}
	iri                  *url.URL
	alias                string
	myIdx                int
	parent               vocab.ForgeFedDependedByProperty
}
func NewForgeFedDependedByPropertyIterator() *ForgeFedDependedByPropertyIterator {
	return &ForgeFedDependedByPropertyIterator{alias: ""}
}
func deserializeForgeFedDependedByPropertyIterator(i interface{}, aliasMap map[string]string) (*ForgeFedDependedByPropertyIterator, error) {
	alias := ""
	if a, ok := aliasMap["https://forgefed.peers.community/ns"]; ok {
		alias = a
	}
	if s, ok := i.(string); ok {
		u, err := url.Parse(s)
		if err == nil && len(u.Scheme) > 0 {
			this := &ForgeFedDependedByPropertyIterator{
				alias: alias,
				iri:   u,
			}
			return this, nil
		}
	}
	if m, ok := i.(map[string]interface{}); ok {
		if v, err := mgr.DeserializeTicketForgeFed()(m, aliasMap); err == nil {
			this := &ForgeFedDependedByPropertyIterator{
				alias:                alias,
				forgefedTicketMember: v,
			}
			return this, nil
		}
	}
	this := &ForgeFedDependedByPropertyIterator{
		alias:   alias,
		unknown: i,
	}
	return this, nil
}
func (this ForgeFedDependedByPropertyIterator) Get() vocab.ForgeFedTicket {
	return this.forgefedTicketMember
}
func (this ForgeFedDependedByPropertyIterator) GetIRI() *url.URL {
	return this.iri
}
func (this ForgeFedDependedByPropertyIterator) GetType() vocab.Type {
	if this.IsForgeFedTicket() {
		return this.Get()
	}
	return nil
}
func (this ForgeFedDependedByPropertyIterator) HasAny() bool {
	return this.IsForgeFedTicket() || this.iri != nil
}
func (this ForgeFedDependedByPropertyIterator) IsForgeFedTicket() bool {
	return this.forgefedTicketMember != nil
}
func (this ForgeFedDependedByPropertyIterator) IsIRI() bool {
	return this.iri != nil
}
func (this ForgeFedDependedByPropertyIterator) JSONLDContext() map[string]string {
	m := map[string]string{"https://forgefed.peers.community/ns": this.alias}
	var child map[string]string
	if this.IsForgeFedTicket() {
		child = this.Get().JSONLDContext()
	}
	for k, v := range child {
		m[k] = v
	}
	return m
}
func (this ForgeFedDependedByPropertyIterator) KindIndex() int {
	if this.IsForgeFedTicket() {
		return 0
	}
	if this.IsIRI() {
		return -2
	}
	return -1
}
func (this ForgeFedDependedByPropertyIterator) LessThan(o vocab.ForgeFedDependedByPropertyIterator) bool {
	if this.IsIRI() && o.IsIRI() {
		return this.iri.String() < o.GetIRI().String()
	} else if this.IsIRI() {
		return true
	} else if o.IsIRI() {
		return false
	}
	if !this.IsForgeFedTicket() && !o.IsForgeFedTicket() {
		return false
	} else if this.IsForgeFedTicket() && !o.IsForgeFedTicket() {
		return false
	} else if !this.IsForgeFedTicket() && o.IsForgeFedTicket() {
		return true
	} else {
		return this.Get().LessThan(o.Get())
	}
}
func (this ForgeFedDependedByPropertyIterator) Name() string {
	if len(this.alias) > 0 {
		return this.alias + ":" + "ForgeFedDependedBy"
	} else {
		return "ForgeFedDependedBy"
	}
}
func (this ForgeFedDependedByPropertyIterator) Next() vocab.ForgeFedDependedByPropertyIterator {
	if this.myIdx+1 >= this.parent.Len() {
		return nil
	} else {
		return this.parent.At(this.myIdx + 1)
	}
}
func (this ForgeFedDependedByPropertyIterator) Prev() vocab.ForgeFedDependedByPropertyIterator {
	if this.myIdx-1 < 0 {
		return nil
	} else {
		return this.parent.At(this.myIdx - 1)
	}
}
func (this *ForgeFedDependedByPropertyIterator) Set(v vocab.ForgeFedTicket) {
	this.clear()
	this.forgefedTicketMember = v
}
func (this *ForgeFedDependedByPropertyIterator) SetIRI(v *url.URL) {
	this.clear()
	this.iri = v
}
func (this *ForgeFedDependedByPropertyIterator) SetType(t vocab.Type) error {
	if v, ok := t.(vocab.ForgeFedTicket); ok {
		this.Set(v)
		return nil
	}
	return fmt.Errorf("illegal type to set on ForgeFedDependedBy property: %T", t)
}
func (this *ForgeFedDependedByPropertyIterator) clear() {
	this.unknown = nil
	this.iri = nil
	this.forgefedTicketMember = nil
}
func (this ForgeFedDependedByPropertyIterator) serialize() (interface{}, error) {
	if this.IsForgeFedTicket() {
		return this.Get().Serialize()
	} else if this.IsIRI() {
		return this.iri.String(), nil
	}
	return this.unknown, nil
}
type ForgeFedDependedByProperty struct {
	properties []*ForgeFedDependedByPropertyIterator
	alias      string
}
func DeserializeDependedByProperty(m map[string]interface{}, aliasMap map[string]string) (vocab.ForgeFedDependedByProperty, error) {
	alias := ""
	if a, ok := aliasMap["https://forgefed.peers.community/ns"]; ok {
		alias = a
	}
	propName := "dependedBy"
	if len(alias) > 0 {
		propName = fmt.Sprintf("%s:%s", alias, "dependedBy")
	}
	i, ok := m[propName]
	if ok {
		this := &ForgeFedDependedByProperty{
			alias:      alias,
			properties: []*ForgeFedDependedByPropertyIterator{},
		}
		if list, ok := i.([]interface{}); ok {
			for _, iterator := range list {
				if p, err := deserializeForgeFedDependedByPropertyIterator(iterator, aliasMap); err != nil {
					return this, err
				} else if p != nil {
					this.properties = append(this.properties, p)
				}
			}
		} else {
			if p, err := deserializeForgeFedDependedByPropertyIterator(i, aliasMap); err != nil {
				return this, err
			} else if p != nil {
				this.properties = append(this.properties, p)
			}
		}
		for idx, ele := range this.properties {
			ele.parent = this
			ele.myIdx = idx
		}
		return this, nil
	}
	return nil, nil
}
func NewForgeFedDependedByProperty() *ForgeFedDependedByProperty {
	return &ForgeFedDependedByProperty{alias: ""}
}
func (this *ForgeFedDependedByProperty) AppendForgeFedTicket(v vocab.ForgeFedTicket) {
	this.properties = append(this.properties, &ForgeFedDependedByPropertyIterator{
		alias:                this.alias,
		forgefedTicketMember: v,
		myIdx:                this.Len(),
		parent:               this,
	})
}
func (this *ForgeFedDependedByProperty) AppendIRI(v *url.URL) {
	this.properties = append(this.properties, &ForgeFedDependedByPropertyIterator{
		alias:  this.alias,
		iri:    v,
		myIdx:  this.Len(),
		parent: this,
	})
}
func (this *ForgeFedDependedByProperty) AppendType(t vocab.Type) error {
	n := &ForgeFedDependedByPropertyIterator{
		alias:  this.alias,
		myIdx:  this.Len(),
		parent: this,
	}
	if err := n.SetType(t); err != nil {
		return err
	}
	this.properties = append(this.properties, n)
	return nil
}
func (this ForgeFedDependedByProperty) At(index int) vocab.ForgeFedDependedByPropertyIterator {
	return this.properties[index]
}
func (this ForgeFedDependedByProperty) Begin() vocab.ForgeFedDependedByPropertyIterator {
	if this.Empty() {
		return nil
	} else {
		return this.properties[0]
	}
}
func (this ForgeFedDependedByProperty) Empty() bool {
	return this.Len() == 0
}
func (this ForgeFedDependedByProperty) End() vocab.ForgeFedDependedByPropertyIterator {
	return nil
}