func (this ActivityStreamsSummaryProperty) At(index int) vocab.ActivityStreamsSummaryPropertyIterator {
	return this.properties[index]
}
At returns the property value for the specified index. Panics if the index is
out of bounds.
package propertysummary
import (
	"fmt"
	langstring "github.com/go-fed/activity/streams/values/langString"
	string1 "github.com/go-fed/activity/streams/values/string"
	vocab "github.com/go-fed/activity/streams/vocab"
	"net/url"
)
type ActivityStreamsSummaryPropertyIterator struct {
	xmlschemaStringMember string
	hasStringMember       bool
	rdfLangStringMember   map[string]string
	unknown               interface{}
	iri                   *url.URL
	alias                 string
	myIdx                 int
	parent                vocab.ActivityStreamsSummaryProperty
}
func NewActivityStreamsSummaryPropertyIterator() *ActivityStreamsSummaryPropertyIterator {
	return &ActivityStreamsSummaryPropertyIterator{alias: ""}
}
func deserializeActivityStreamsSummaryPropertyIterator(i interface{}, aliasMap map[string]string) (*ActivityStreamsSummaryPropertyIterator, error) {
	alias := ""
	if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
		alias = a
	}
	if s, ok := i.(string); ok {
		u, err := url.Parse(s)
		if err == nil && len(u.Scheme) > 0 {
			this := &ActivityStreamsSummaryPropertyIterator{
				alias: alias,
				iri:   u,
			}
			return this, nil
		}
	}
	if v, err := string1.DeserializeString(i); err == nil {
		this := &ActivityStreamsSummaryPropertyIterator{
			alias:                 alias,
			hasStringMember:       true,
			xmlschemaStringMember: v,
		}
		return this, nil
	} else if v, err := langstring.DeserializeLangString(i); err == nil {
		this := &ActivityStreamsSummaryPropertyIterator{
			alias:               alias,
			rdfLangStringMember: v,
		}
		return this, nil
	}
	this := &ActivityStreamsSummaryPropertyIterator{
		alias:   alias,
		unknown: i,
	}
	return this, nil
}
func (this ActivityStreamsSummaryPropertyIterator) GetIRI() *url.URL {
	return this.iri
}
func (this ActivityStreamsSummaryPropertyIterator) GetLanguage(bcp47 string) string {
	if this.rdfLangStringMember == nil {
		return ""
	} else if v, ok := this.rdfLangStringMember[bcp47]; ok {
		return v
	} else {
		return ""
	}
}
func (this ActivityStreamsSummaryPropertyIterator) GetRDFLangString() map[string]string {
	return this.rdfLangStringMember
}
func (this ActivityStreamsSummaryPropertyIterator) GetXMLSchemaString() string {
	return this.xmlschemaStringMember
}
func (this ActivityStreamsSummaryPropertyIterator) HasAny() bool {
	return this.IsXMLSchemaString() ||
		this.IsRDFLangString() ||
		this.iri != nil
}
func (this ActivityStreamsSummaryPropertyIterator) HasLanguage(bcp47 string) bool {
	if this.rdfLangStringMember == nil {
		return false
	} else {
		_, ok := this.rdfLangStringMember[bcp47]
		return ok
	}
}
func (this ActivityStreamsSummaryPropertyIterator) IsIRI() bool {
	return this.iri != nil
}
func (this ActivityStreamsSummaryPropertyIterator) IsRDFLangString() bool {
	return this.rdfLangStringMember != nil
}
func (this ActivityStreamsSummaryPropertyIterator) IsXMLSchemaString() bool {
	return this.hasStringMember
}
func (this ActivityStreamsSummaryPropertyIterator) JSONLDContext() map[string]string {
	m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
	var child map[string]string
	for k, v := range child {
		m[k] = v
	}
	return m
}
func (this ActivityStreamsSummaryPropertyIterator) KindIndex() int {
	if this.IsXMLSchemaString() {
		return 0
	}
	if this.IsRDFLangString() {
		return 1
	}
	if this.IsIRI() {
		return -2
	}
	return -1
}
func (this ActivityStreamsSummaryPropertyIterator) LessThan(o vocab.ActivityStreamsSummaryPropertyIterator) bool {
	idx1 := this.KindIndex()
	idx2 := o.KindIndex()
	if idx1 < idx2 {
		return true
	} else if idx1 > idx2 {
		return false
	} else if this.IsXMLSchemaString() {
		return string1.LessString(this.GetXMLSchemaString(), o.GetXMLSchemaString())
	} else if this.IsRDFLangString() {
		return langstring.LessLangString(this.GetRDFLangString(), o.GetRDFLangString())
	} else if this.IsIRI() {
		return this.iri.String() < o.GetIRI().String()
	}
	return false
}
func (this ActivityStreamsSummaryPropertyIterator) Name() string {
	if this.IsRDFLangString() {
		return "ActivityStreamsSummaryMap"
	} else {
		return "ActivityStreamsSummary"
	}
}
func (this ActivityStreamsSummaryPropertyIterator) Next() vocab.ActivityStreamsSummaryPropertyIterator {
	if this.myIdx+1 >= this.parent.Len() {
		return nil
	} else {
		return this.parent.At(this.myIdx + 1)
	}
}
func (this ActivityStreamsSummaryPropertyIterator) Prev() vocab.ActivityStreamsSummaryPropertyIterator {
	if this.myIdx-1 < 0 {
		return nil
	} else {
		return this.parent.At(this.myIdx - 1)
	}
}
func (this *ActivityStreamsSummaryPropertyIterator) SetIRI(v *url.URL) {
	this.clear()
	this.iri = v
}
func (this *ActivityStreamsSummaryPropertyIterator) SetLanguage(bcp47, value string) {
	this.hasStringMember = false
	this.rdfLangStringMember = nil
	this.unknown = nil
	this.iri = nil
	if this.rdfLangStringMember == nil {
		this.rdfLangStringMember = make(map[string]string)
	}
	this.rdfLangStringMember[bcp47] = value
}
func (this *ActivityStreamsSummaryPropertyIterator) SetRDFLangString(v map[string]string) {
	this.clear()
	this.rdfLangStringMember = v
}
func (this *ActivityStreamsSummaryPropertyIterator) SetXMLSchemaString(v string) {
	this.clear()
	this.xmlschemaStringMember = v
	this.hasStringMember = true
}
func (this *ActivityStreamsSummaryPropertyIterator) clear() {
	this.hasStringMember = false
	this.rdfLangStringMember = nil
	this.unknown = nil
	this.iri = nil
	this.rdfLangStringMember = nil
}
func (this ActivityStreamsSummaryPropertyIterator) serialize() (interface{}, error) {
	if this.IsXMLSchemaString() {
		return string1.SerializeString(this.GetXMLSchemaString())
	} else if this.IsRDFLangString() {
		return langstring.SerializeLangString(this.GetRDFLangString())
	} else if this.IsIRI() {
		return this.iri.String(), nil
	}
	return this.unknown, nil
}
type ActivityStreamsSummaryProperty struct {
	properties []*ActivityStreamsSummaryPropertyIterator
	alias      string
}
func DeserializeSummaryProperty(m map[string]interface{}, aliasMap map[string]string) (vocab.ActivityStreamsSummaryProperty, error) {
	alias := ""
	if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
		alias = a
	}
	propName := "summary"
	if len(alias) > 0 {
		propName = fmt.Sprintf("%s:%s", alias, "summary")
	}
	i, ok := m[propName]
	if !ok {
		i, ok = m[propName+"Map"]
	}
	if ok {
		this := &ActivityStreamsSummaryProperty{
			alias:      alias,
			properties: []*ActivityStreamsSummaryPropertyIterator{},
		}
		if list, ok := i.([]interface{}); ok {
			for _, iterator := range list {
				if p, err := deserializeActivityStreamsSummaryPropertyIterator(iterator, aliasMap); err != nil {
					return this, err
				} else if p != nil {
					this.properties = append(this.properties, p)
				}
			}
		} else {
			if p, err := deserializeActivityStreamsSummaryPropertyIterator(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 NewActivityStreamsSummaryProperty() *ActivityStreamsSummaryProperty {
	return &ActivityStreamsSummaryProperty{alias: ""}
}
func (this *ActivityStreamsSummaryProperty) AppendIRI(v *url.URL) {
	this.properties = append(this.properties, &ActivityStreamsSummaryPropertyIterator{
		alias:  this.alias,
		iri:    v,
		myIdx:  this.Len(),
		parent: this,
	})
}
func (this *ActivityStreamsSummaryProperty) AppendRDFLangString(v map[string]string) {
	this.properties = append(this.properties, &ActivityStreamsSummaryPropertyIterator{
		alias:               this.alias,
		myIdx:               this.Len(),
		parent:              this,
		rdfLangStringMember: v,
	})
}
func (this *ActivityStreamsSummaryProperty) AppendXMLSchemaString(v string) {
	this.properties = append(this.properties, &ActivityStreamsSummaryPropertyIterator{
		alias:                 this.alias,
		hasStringMember:       true,
		myIdx:                 this.Len(),
		parent:                this,
		xmlschemaStringMember: v,
	})
}