// 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 *Policy) GetBSON() (interface{}, error) {
	if o == nil {
		return nil, nil
	}
	s := &mongoAttributesPolicy{}
	if o.ID != "" {
		s.ID = bson.ObjectIdHex(o.ID)
	}
	s.Action = o.Action
	s.ActiveDuration = o.ActiveDuration
	s.ActiveSchedule = o.ActiveSchedule
	s.AllObjectTags = o.AllObjectTags
	s.AllSubjectTags = o.AllSubjectTags
	s.Annotations = o.Annotations
	s.AssociatedTags = o.AssociatedTags
	s.CreateIdempotencyKey = o.CreateIdempotencyKey
	s.CreateTime = o.CreateTime
	s.Description = o.Description
	s.Disabled = o.Disabled
	s.ExpirationTime = o.ExpirationTime
	s.Fallback = o.Fallback
	s.Metadata = o.Metadata
	s.MigrationsLog = o.MigrationsLog
	s.Name = o.Name
	s.Namespace = o.Namespace
	s.NormalizedTags = o.NormalizedTags
	s.Object = o.Object
	s.Propagate = o.Propagate
	s.PropagationHidden = o.PropagationHidden
	s.Protected = o.Protected
	s.Relation = o.Relation
	s.Subject = o.Subject
	s.Type = o.Type
	s.UpdateIdempotencyKey = o.UpdateIdempotencyKey
	s.UpdateTime = o.UpdateTime
	s.ZHash = o.ZHash
	s.Zone = o.Zone
	return s, nil
}
func ( o * Policy ) GetBSON ( ) ( interface { } , error ) { if o == nil { return nil , nil } s := & mongoAttributesPolicy { } if o . ID != " " { s . ID = bson . ObjectIdHex ( o . ID ) } s . Action = o . Action s . ActiveDuration = o . ActiveDuration s . ActiveSchedule = o . ActiveSchedule s . AllObjectTags = o . AllObjectTags s . AllSubjectTags = o . AllSubjectTags s . Annotations = o . Annotations s . AssociatedTags = o . AssociatedTags s . CreateIdempotencyKey = o . CreateIdempotencyKey s . CreateTime = o . CreateTime s . Description = o . Description s . Disabled = o . Disabled s . ExpirationTime = o . ExpirationTime s . Fallback = o . Fallback s . Metadata = o . Metadata s . MigrationsLog = o . MigrationsLog s . Name = o . Name s . Namespace = o . Namespace s . NormalizedTags = o . NormalizedTags s . Object = o . Object s . Propagate = o . Propagate s . PropagationHidden = o . PropagationHidden s . Protected = o . Protected s . Relation = o . Relation s . Subject = o . Subject s . Type = o . Type s . UpdateIdempotencyKey = o . UpdateIdempotencyKey s . UpdateTime = o . UpdateTime s . ZHash = o . ZHash s . Zone = o . Zone return s , nil }
GetBSON implements the bson marshaling interface.
GetBSON implements the bson marshaling interface .