func (o *Authority) GetBSON() (interface{}, error) {

	if o == nil {
		return nil, nil
	}

	s := &mongoAttributesAuthority{}

	if o.ID != "" {
		s.ID = bson.ObjectIdHex(o.ID)
	}
	s.Algorithm = o.Algorithm
	s.Certificate = o.Certificate
	s.CommonName = o.CommonName
	s.ExpirationDate = o.ExpirationDate
	s.Key = o.Key
	s.MigrationsLog = o.MigrationsLog
	s.Organization = o.Organization
	s.SerialNumber = o.SerialNumber
	s.Type = o.Type
	s.ZHash = o.ZHash
	s.Zone = o.Zone

	return s, nil
}
// GetBSON implements the bson marshaling interface.
// This is used to transparently convert ID to MongoDBID as ObectID.
GetBSON implements the bson marshaling interface.
This is used to transparently convert ID to MongoDBID as ObectID.
// GetBSON implements the bson marshaling interface . // This is used to transparently convert ID to MongoDBID as ObectID .
func (o *Authority) GetBSON() (interface{}, error) {
	if o == nil {
		return nil, nil
	}
	s := &mongoAttributesAuthority{}
	if o.ID != "" {
		s.ID = bson.ObjectIdHex(o.ID)
	}
	s.Algorithm = o.Algorithm
	s.Certificate = o.Certificate
	s.CommonName = o.CommonName
	s.ExpirationDate = o.ExpirationDate
	s.Key = o.Key
	s.MigrationsLog = o.MigrationsLog
	s.Organization = o.Organization
	s.SerialNumber = o.SerialNumber
	s.Type = o.Type
	s.ZHash = o.ZHash
	s.Zone = o.Zone
	return s, nil
}
func ( o * Authority ) GetBSON ( ) ( interface { } , error ) { if o == nil { return nil , nil } s := & mongoAttributesAuthority { } if o . ID != " " { s . ID = bson . ObjectIdHex ( o . ID ) } s . Algorithm = o . Algorithm s . Certificate = o . Certificate s . CommonName = o . CommonName s . ExpirationDate = o . ExpirationDate s . Key = o . Key s . MigrationsLog = o . MigrationsLog s . Organization = o . Organization s . SerialNumber = o . SerialNumber s . Type = o . Type s . ZHash = o . ZHash s . Zone = o . Zone return s , nil }
GetBSON implements the bson marshaling interface.
GetBSON implements the bson marshaling interface .