func (this *W3IDSecurityV1PublicKey) SetW3IDSecurityV1Owner(i vocab.W3IDSecurityV1OwnerProperty) {
	this.W3IDSecurityV1Owner = i
}
SetW3IDSecurityV1Owner sets the "owner" property.
package typepublickey
import vocab "github.com/go-fed/activity/streams/vocab"
type W3IDSecurityV1PublicKey struct {
	JSONLDId                   vocab.JSONLDIdProperty
	W3IDSecurityV1Owner        vocab.W3IDSecurityV1OwnerProperty
	W3IDSecurityV1PublicKeyPem vocab.W3IDSecurityV1PublicKeyPemProperty
	alias                      string
	unknown                    map[string]interface{}
}
func DeserializePublicKey(m map[string]interface{}, aliasMap map[string]string) (*W3IDSecurityV1PublicKey, error) {
	alias := ""
	if a, ok := aliasMap["https://w3id.org/security/v1"]; ok {
		alias = a
	}
	this := &W3IDSecurityV1PublicKey{
		alias:   alias,
		unknown: make(map[string]interface{}),
	}
	if p, err := mgr.DeserializeIdPropertyJSONLD()(m, aliasMap); err != nil {
		return nil, err
	} else if p != nil {
		this.JSONLDId = p
	}
	if p, err := mgr.DeserializeOwnerPropertyW3IDSecurityV1()(m, aliasMap); err != nil {
		return nil, err
	} else if p != nil {
		this.W3IDSecurityV1Owner = p
	}
	if p, err := mgr.DeserializePublicKeyPemPropertyW3IDSecurityV1()(m, aliasMap); err != nil {
		return nil, err
	} else if p != nil {
		this.W3IDSecurityV1PublicKeyPem = p
	}
	for k, v := range m {
		if k == "id" {
			continue
		} else if k == "owner" {
			continue
		} else if k == "publicKeyPem" {
			continue
		}  
		this.unknown[k] = v
	}
	return this, nil
}
func IsOrExtendsPublicKey(other vocab.Type) bool {
	if other.GetTypeName() == "PublicKey" {
		return true
	}
	return PublicKeyIsExtendedBy(other)
}
func NewW3IDSecurityV1PublicKey() *W3IDSecurityV1PublicKey {
	return &W3IDSecurityV1PublicKey{
		alias:   "",
		unknown: make(map[string]interface{}),
	}
}
func PublicKeyIsDisjointWith(other vocab.Type) bool {
	return false
}
func PublicKeyIsExtendedBy(other vocab.Type) bool {
	return false
}
func W3IDSecurityV1PublicKeyExtends(other vocab.Type) bool {
	return false
}
func (this W3IDSecurityV1PublicKey) GetJSONLDId() vocab.JSONLDIdProperty {
	return this.JSONLDId
}
func (this W3IDSecurityV1PublicKey) GetTypeName() string {
	return "PublicKey"
}
func (this W3IDSecurityV1PublicKey) GetUnknownProperties() map[string]interface{} {
	return this.unknown
}
func (this W3IDSecurityV1PublicKey) GetW3IDSecurityV1Owner() vocab.W3IDSecurityV1OwnerProperty {
	return this.W3IDSecurityV1Owner
}
func (this W3IDSecurityV1PublicKey) GetW3IDSecurityV1PublicKeyPem() vocab.W3IDSecurityV1PublicKeyPemProperty {
	return this.W3IDSecurityV1PublicKeyPem
}
func (this W3IDSecurityV1PublicKey) IsExtending(other vocab.Type) bool {
	return W3IDSecurityV1PublicKeyExtends(other)
}
func (this W3IDSecurityV1PublicKey) JSONLDContext() map[string]string {
	m := map[string]string{"https://w3id.org/security/v1": this.alias}
	m = this.helperJSONLDContext(this.JSONLDId, m)
	m = this.helperJSONLDContext(this.W3IDSecurityV1Owner, m)
	m = this.helperJSONLDContext(this.W3IDSecurityV1PublicKeyPem, m)
	return m
}
func (this W3IDSecurityV1PublicKey) LessThan(o vocab.W3IDSecurityV1PublicKey) bool {
	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 {
		return true
	} else if rhs != nil && rhs == nil {
		return false
	}  
	if lhs, rhs := this.W3IDSecurityV1Owner, o.GetW3IDSecurityV1Owner(); lhs != nil && rhs != nil {
		if lhs.LessThan(rhs) {
			return true
		} else if rhs.LessThan(lhs) {
			return false
		}
	} else if lhs == nil && rhs != nil {
		return true
	} else if rhs != nil && rhs == nil {
		return false
	}  
	if lhs, rhs := this.W3IDSecurityV1PublicKeyPem, o.GetW3IDSecurityV1PublicKeyPem(); lhs != nil && rhs != nil {
		if lhs.LessThan(rhs) {
			return true
		} else if rhs.LessThan(lhs) {
			return false
		}
	} else if lhs == nil && rhs != nil {
		return true
	} else if rhs != nil && rhs == nil {
		return false
	}  
	if len(this.unknown) < len(o.GetUnknownProperties()) {
		return true
	} else if len(o.GetUnknownProperties()) < len(this.unknown) {
		return false
	}  
	return false
}
func (this W3IDSecurityV1PublicKey) Serialize() (map[string]interface{}, error) {
	m := make(map[string]interface{})
	if this.JSONLDId != nil {
		if i, err := this.JSONLDId.Serialize(); err != nil {
			return nil, err
		} else if i != nil {
			m[this.JSONLDId.Name()] = i
		}
	}
	if this.W3IDSecurityV1Owner != nil {
		if i, err := this.W3IDSecurityV1Owner.Serialize(); err != nil {
			return nil, err
		} else if i != nil {
			m[this.W3IDSecurityV1Owner.Name()] = i
		}
	}
	if this.W3IDSecurityV1PublicKeyPem != nil {
		if i, err := this.W3IDSecurityV1PublicKeyPem.Serialize(); err != nil {
			return nil, err
		} else if i != nil {
			m[this.W3IDSecurityV1PublicKeyPem.Name()] = i
		}
	}
	for k, v := range this.unknown {
		if _, has := m[k]; !has {
			m[k] = v
		}
	}
	return m, nil
}
func (this *W3IDSecurityV1PublicKey) SetJSONLDId(i vocab.JSONLDIdProperty) {
	this.JSONLDId = i
}