// GetGeneration retrieves the object of the given generation from the
// ResourceInstance, or returns nil if there is no such object.
//
// If the given generation is nil or invalid, this method will panic.
GetGeneration retrieves the object of the given generation from the
ResourceInstance, or returns nil if there is no such object.

If the given generation is nil or invalid, this method will panic.
// GetGeneration retrieves the object of the given generation from the // ResourceInstance or returns nil if there is no such object . // // If the given generation is nil or invalid this method will panic .
func (i *ResourceInstance) GetGeneration(gen Generation) *ResourceInstanceObjectSrc {
	if gen == CurrentGen {
		return i.Current
	}
	if dk, ok := gen.(DeposedKey); ok {
		return i.Deposed[dk]
	}
	if gen == nil {
		panic(fmt.Sprintf("get with nil Generation"))
	}
	panic(fmt.Sprintf("get invalid Generation %#v", gen))
}
func ( i * ResourceInstance ) GetGeneration ( gen Generation ) * ResourceInstanceObjectSrc { if gen == CurrentGen { return i . Current } if dk , ok := gen . ( DeposedKey ) ; ok { return i . Deposed [ dk ] } if gen == nil { panic ( fmt . Sprintf ( " " ) ) } panic ( fmt . Sprintf ( " " , gen ) ) }
GetGeneration retrieves the object of the given generation from the
ResourceInstance, or returns nil if there is no such object.
GetGeneration retrieves the object of the given generation from the ResourceInstance or returns nil if there is no such object .
// Should never fall out here, since the above covers all possible // Generation values.