// Patch apply the non nil value of a *SparsePolicy to the object.
Patch apply the non nil value of a *SparsePolicy to the object.
// Patch apply the non nil value of a * SparsePolicy to the object .
func (o *Policy) Patch(sparse elemental.SparseIdentifiable) {
	if !sparse.Identity().IsEqual(o.Identity()) {
		panic("cannot patch from a parse with different identity")
	}
	so := sparse.(*SparsePolicy)
	if so.ID != nil {
		o.ID = *so.ID
	}
	if so.Action != nil {
		o.Action = *so.Action
	}
	if so.ActiveDuration != nil {
		o.ActiveDuration = *so.ActiveDuration
	}
	if so.ActiveSchedule != nil {
		o.ActiveSchedule = *so.ActiveSchedule
	}
	if so.AllObjectTags != nil {
		o.AllObjectTags = *so.AllObjectTags
	}
	if so.AllSubjectTags != nil {
		o.AllSubjectTags = *so.AllSubjectTags
	}
	if so.Annotations != nil {
		o.Annotations = *so.Annotations
	}
	if so.AssociatedTags != nil {
		o.AssociatedTags = *so.AssociatedTags
	}
	if so.CreateIdempotencyKey != nil {
		o.CreateIdempotencyKey = *so.CreateIdempotencyKey
	}
	if so.CreateTime != nil {
		o.CreateTime = *so.CreateTime
	}
	if so.Description != nil {
		o.Description = *so.Description
	}
	if so.Disabled != nil {
		o.Disabled = *so.Disabled
	}
	if so.ExpirationTime != nil {
		o.ExpirationTime = *so.ExpirationTime
	}
	if so.Fallback != nil {
		o.Fallback = *so.Fallback
	}
	if so.Metadata != nil {
		o.Metadata = *so.Metadata
	}
	if so.MigrationsLog != nil {
		o.MigrationsLog = *so.MigrationsLog
	}
	if so.Name != nil {
		o.Name = *so.Name
	}
	if so.Namespace != nil {
		o.Namespace = *so.Namespace
	}
	if so.NormalizedTags != nil {
		o.NormalizedTags = *so.NormalizedTags
	}
	if so.Object != nil {
		o.Object = *so.Object
	}
	if so.Propagate != nil {
		o.Propagate = *so.Propagate
	}
	if so.PropagationHidden != nil {
		o.PropagationHidden = *so.PropagationHidden
	}
	if so.Protected != nil {
		o.Protected = *so.Protected
	}
	if so.Relation != nil {
		o.Relation = *so.Relation
	}
	if so.Subject != nil {
		o.Subject = *so.Subject
	}
	if so.Type != nil {
		o.Type = *so.Type
	}
	if so.UpdateIdempotencyKey != nil {
		o.UpdateIdempotencyKey = *so.UpdateIdempotencyKey
	}
	if so.UpdateTime != nil {
		o.UpdateTime = *so.UpdateTime
	}
	if so.ZHash != nil {
		o.ZHash = *so.ZHash
	}
	if so.Zone != nil {
		o.Zone = *so.Zone
	}
}
func ( o * Policy ) Patch ( sparse elemental . SparseIdentifiable ) { if ! sparse . Identity ( ) . IsEqual ( o . Identity ( ) ) { panic ( " " ) } so := sparse . ( * SparsePolicy ) if so . ID != nil { o . ID = * so . ID } if so . Action != nil { o . Action = * so . Action } if so . ActiveDuration != nil { o . ActiveDuration = * so . ActiveDuration } if so . ActiveSchedule != nil { o . ActiveSchedule = * so . ActiveSchedule } if so . AllObjectTags != nil { o . AllObjectTags = * so . AllObjectTags } if so . AllSubjectTags != nil { o . AllSubjectTags = * so . AllSubjectTags } if so . Annotations != nil { o . Annotations = * so . Annotations } if so . AssociatedTags != nil { o . AssociatedTags = * so . AssociatedTags } if so . CreateIdempotencyKey != nil { o . CreateIdempotencyKey = * so . CreateIdempotencyKey } if so . CreateTime != nil { o . CreateTime = * so . CreateTime } if so . Description != nil { o . Description = * so . Description } if so . Disabled != nil { o . Disabled = * so . Disabled } if so . ExpirationTime != nil { o . ExpirationTime = * so . ExpirationTime } if so . Fallback != nil { o . Fallback = * so . Fallback } if so . Metadata != nil { o . Metadata = * so . Metadata } if so . MigrationsLog != nil { o . MigrationsLog = * so . MigrationsLog } if so . Name != nil { o . Name = * so . Name } if so . Namespace != nil { o . Namespace = * so . Namespace } if so . NormalizedTags != nil { o . NormalizedTags = * so . NormalizedTags } if so . Object != nil { o . Object = * so . Object } if so . Propagate != nil { o . Propagate = * so . Propagate } if so . PropagationHidden != nil { o . PropagationHidden = * so . PropagationHidden } if so . Protected != nil { o . Protected = * so . Protected } if so . Relation != nil { o . Relation = * so . Relation } if so . Subject != nil { o . Subject = * so . Subject } if so . Type != nil { o . Type = * so . Type } if so . UpdateIdempotencyKey != nil { o . UpdateIdempotencyKey = * so . UpdateIdempotencyKey } if so . UpdateTime != nil { o . UpdateTime = * so . UpdateTime } if so . ZHash != nil { o . ZHash = * so . ZHash } if so . Zone != nil { o . Zone = * so . Zone } }
Patch apply the non nil value of a *SparsePolicy to the object.
Patch apply the non nil value of a * SparsePolicy to the object .