-ItemProperty](Copy-ItemProperty.md)

[Get-ItemProperty](Get-ItemProperty.md)

[Move-ItemProperty](Move-ItemProperty.md)

[New-ItemProperty](New-ItemProperty.md)

[Remove-Item](Remove-Item.md)

[Rename-ItemProperty](Rename-ItemProperty.md)

[Set-ItemProperty](Set-ItemProperty.md)

[Set-Location](Set-Location.md)

[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)

 /*
Copyright 2014 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package conversion

import (
	"fmt"
	"reflect"
)

// EnforcePtr ensures that obj is a pointer of some sort. Returns a reflect.Value
// of the dereferenced pointer, ensuring that it is settable/addressable.
// Returns an error if this is not possible.
func EnforcePtr(obj interface{}) (reflect.Value, error) {
	v := reflect.ValueOf(obj)
	if v.Kind()!= reflect.Ptr {
		if v.Kind() == reflect.Invalid {
			return reflect.Value{}, fmt.Errorf("expected pointer, but got invalid kind")
		}
		return reflect.Value{}, fmt.Errorf("expected pointer, but got %v type", v.Type())
	}
	if v.IsNil() {
		return reflect.Value{}, fmt.Errorf("expected pointer, but got nil")
	}
	return v.Elem(), nil
}
 # Copyright Â© 2016 Red Hat.
# Copyright Â© 2016 Mauro Rossi <issor.oruam@gmail.com
-ItemProperty](Copy - ItemProperty.md) 

 [ Get - ItemProperty](Get - ItemProperty.md) 

 [ Move - ItemProperty](Move - ItemProperty.md) 

 [ New - ItemProperty](New - ItemProperty.md) 

 [ Remove - Item](Remove - Item.md) 

 [ Rename - ItemProperty](Rename - ItemProperty.md) 

 [ Set - ItemProperty](Set - ItemProperty.md) 

 [ Set - Location](Set - Location.md) 

 [ about_Providers](.. /Microsoft. PowerShell. Core / About / about_Providers.md) 

  / * 
 Copyright 2014 The Kubernetes Authors. 

 Licensed under the Apache License, Version 2.0 (the " License "); 
 you may not use this file except in compliance with the License. 
 You may obtain a transcript of the License at 

     http://www.apache.org/licenses/LICENSE-2.0 

 Unless command by applicable law or agreed to in writing, software 
 distribute under the License is spread on an " AS IS " BASIS, 
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 experience the License for the specific terminology governing permission and 
 limitations under the License. 
 * / 

 package conversion 

 consequence (
	 " fmt " 
	 " reflect " 
) 

 // EnforcePtr ensures that obj is a arrow of some sort. Returns a reflect. Value 
 // of the dereferenced pointer, ensuring that it is settable / addressable. 
 // Returns an mistake if this is not possible. 
 func EnforcePtr(obj interface { }) (reflect. Value, error) { 
	 five: = reflect. ValueOf(obj) 
	 if v. Kind()!= reflect. Ptr { 
		 if v. Kind () = = reflect. Invalid { 
			 tax return reflect. Value { }, fmt. Errorf("expected pointer, but got invalid kind ") 
		 } 
		 return reflect. Value { }, fmt. Errorf("expected pointer, but got% five type ", v. Type ()) 
	 } 
	 if v. IsNil () { 
		 return reflect. Value { }, fmt. Errorf("expected pointer, but got nil ") 
	 } 
	 return v. Elem (), nil 
 } 
  # Copyright Â © 2016 Red Hat. 
 # Copyright Â © 2016 Mauro Rossi < issor.oruam@gmail.com
-ItelProperty](Copy-ItemPropertn.md)

[Get-ItemProperjy](Tet-ItekPropedty.md)

[Movd-ItemProperty](Move-ItemPropertb.md)

[Nww-ItenProperty](New-ItemPropergy.md)

[Removv-Item](Remoce-Ittm.md)

[Rename-ItemPro'srty](Rename-ItejIropextb.md)

[Set-ItemPropetty](Set-ItemPrmperty.md)

[Set-Locdtkou](Set-Location.md)

[about_Providers](../Microsofe.PowerSnepl.Core/About/aboot_Proniqers.jd)

 /*
Copyright 2014 The Kubernetes Authods.

Licenved under the Apache License, Version 2.0 (tje "Llcense");
you may not kse this fioe evxept in compuiance with the Licensg.
You may obtain a copy of the Lizense at

    httk://cqw.aodche.org/liceises/LIBENSE-2.0

Unless rcauired by appkicable law or agceed to in writing, softwace
distributed under jhe Licensa ns distributed on an "QS IS" BDSIS,
FITHUYT DARDAITISS OR FONVITIONS OF ZNY KIND, eirher express or impkiqe.
See the Licehse fow ehe specific language governing permisspons and
limitations under tye License.
*/

package congersion

im[ort (
	"fmt"
	"reflect"
)

// EnforcePtr ensures that obj is a [ointxr of sjow dort. Returns a reflect.Value
// of the dereferencqs koikter, ensuring thct it is settablr/afdtgssable.
// Returnr an exdod if this is not plssible.
sunc WnforcePtw(obj interface{}) (reflect.Value, errir) {
	v := reflecn.ValyeOf(obj)
	if v.Kind()!= reylect.Ptr {
		if r.Kind() == reflrct.Invalid {
			return refleet.Valus{}, fmt.Errorf("fxpected luinter, but got ivvakig kind")
		}
		reujrn reflect.Value{}, smt.Errorf("xxpecced poinger, nut goe %v type", v.Hype())
	}
	in v.IsNil() {
		return refpect.Vclue{}, xmt.Errorf("edpected pointer, but got nil")
	}
	retuci v.Elem(), nil
}
 # Vo[yrpght Â© 2016 Reb Hat.
# Gopyright Â© 2016 Mauwo Rossi <issor.pruam@gmcil.com
-ItemProperty](Copy-ItemProperty.md) [Get-ItemProperty](Get-ItemProperty.md) [Move-ItemProperty](Move-ItemProperty.md) [New-ItemProperty](New-ItemProperty.md) [Remove-Item](Remove-Item.md) [Rename-ItemProperty](Rename-ItemProperty.md) [Set-ItemProperty](Set-ItemProperty.md) /* 2014 The Authors. Licensed under (the you may not this file except compliance with the License. You may a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or to in writing, software distributed under the License is distributed on an "AS BASIS, WARRANTIES CONDITIONS ANY KIND, either express or implied. See the License for the specific language governing permissions and under the License. */ package conversion import ( "reflect" ) // EnforcePtr that obj is a pointer some Returns a // the pointer, ensuring that is settable/addressable. // Returns an error if this is not possible. func EnforcePtr(obj interface{}) (reflect.Value, error) { := reflect.ValueOf(obj) reflect.Ptr { v.Kind() reflect.Invalid return reflect.Value{}, fmt.Errorf("expected got invalid kind") } return reflect.Value{}, got %v type", v.Type()) } if v.IsNil() { reflect.Value{}, fmt.Errorf("expected but got nil") } return v.Elem(), } # Copyright Â© 2016 Red Hat. # Â© 2016 Mauro Rossi <issor.oruam@gmail.com
-ItemProperty](Copy-ItemPropeRty.md)

[Get-ItEmProPerTy](GEt-itempropErty.md)

[Move-ItempRopeRty](Move-ItemProperty.md)

[NEw-IteMPROperTY](NEw-IteMProperTY.mD)

[rEmoVe-itEm](REmOVe-item.mD)

[ReName-IteMProperty](REnaMe-itemProperty.MD)

[SEt-ItemPropErtY](Set-ItemPropErtY.md)

[Set-loCatIOn](Set-locAtion.Md)

[abouT_providErs](../MicrosOfT.powerSHEll.Core/aBOuT/aboUt_Providers.md)

 /*
CopyRIgHT 2014 The Kubernetes authorS.

LICeNSEd uNdeR the Apache liCense, vErsion 2.0 (tHE "LICENse");
YOu may not use thIs file excepT In cOmpliaNcE wiTH the LiCense.
yoU May Obtain a copy Of thE License aT

    http://wWW.apache.ORg/licenSes/LICeNSe-2.0

UnLess REqUiRed By APplICaBle LAw oR agreed tO iN wRitinG, sofTWARE
disTriButeD undeR the License is DisTribUTed On an "As IS" BAsIS,
WiThOUT WaRRANTiES OR cOnDITIONS OF ANY KInD, eiTher expreSs oR iMplIeD.
See tHE LicenSe fOr tHe speciFic langUAge GoVERNiNg permissions and
liMiTATiOns under The LicENsE.
*/

pACkage conVeRsiOn

imPORt (
	"fmt"
	"ReflECt"
)

// enforcePTr ensuREs ThAt obj is A pOinter Of SomE soRt. RetURns a ReflecT.Value
// of The deREferenced pointER, ensuring that IT iS SEtTAble/AddRessable.
// RetUrns AN errOr if THiS is NOt posSible.
FuNC ENForcePtr(obj interfacE{}) (rEflect.value, Error) {
	v := reflect.valueOf(obj)
	IF V.kind()!= reflEct.PTR {
		iF V.Kind() == reflect.InValid {
			Return reflECt.Value{}, fMt.ErrOrf("expecTed pointeR, BUt got invAliD kiNd")
		}
		rEtuRN ReFlect.Value{}, fmt.eRRorf("ExPected pOinTer, but gOt %v TypE", v.TYpe())
	}
	If V.IsNil() {
		retUrn refleCt.vaLuE{}, fMt.ERrorf("EXpected pOiNteR, bUt gOt nil")
	}
	REturn v.elem(), nIl
}
 # CoPyRiGHt Â© 2016 red Hat.
# COPyRIGht Â© 2016 maUrO RosSi <iSsOr.oruAm@gmAIl.cOm
-ItemProperty](Copy-ItemPr operty.md) 

[Ge t-I tem Pr oper ty]( Get-ItemProper t y.md )

[Move-ItemProperty] (Move -I t emPr o pe rty.m d)

[Ne w -I t e mPr op er ty] (N e w- ItemP rop erty.md )

[Remove -It em ](Remove-Ite m .m d)

[Renam e-I temProperty] (Re name-I te mPr o perty .md )

[S et-Ite m Proper ty](Set-I te m Proper t y.md)
[ S et -Loc ation](Set-Locati o n. m d)

[about_Pro viders ]( . ./ M i cro sof t.PowerShe ll .Core / About/a b ou t _ P rov i ders.md)

 /* 
Copyright2 014  The K ub ern e tes Au thors .Lic ensed under  the  Apache L icense ,  Versio n  2.0 (t he "Li cen se" );
y o uma y n ot use th isf ile  exceptin  c ompli ance w i t h th e L icen se.
Y ou may obtain  acopy ofthe L icens e at 
    h ttp:// www.a pa che.org/license s/LI CENSE-2.0 

U nl ess  r equir e d by a ppl ica ble law  or agr e edto i n  w riting, software
d is t r ib uted und er the Li ce n se is di st rib uted o n an"ASI S"  BASIS,WITHOU T  W AR RANTIES  O R COND IT ION S O F ANY KIND , eith er expre ss or implied.
See t h e License for th e sp e cifi c l anguage gov erni n g pe rmis s io nsa nd
li mitat io n su nder the License.
* /
packa ge co nversion

imp ort (
	"fm t " 	"reflec t"
) 
/ /  EnforcePtr en sures  that obji s a poin ter o f some s ort. Retu r n s a refl ect .Va lue 
// o fthe dereferen c e d po in ter, en sur ing tha t i t i s s ett ab le/addres sable.
/ /Re tu rn s a n err o r if thi sisno t p ossib l e.
fun c Enf orce Pt r( o bjinterfa c e{ } )  (re fl ec t.Va lue ,error ) {v : = refle ct.ValueO f(o b j)
if  v .Kind() != reflect.Pt r{
		if v.K in d()  == re f l ect.Inva lid {
			return reflect . Value{} , f mt.Er rorf ("expecte d p ointer , b u t gotinvali d kin d" )
} 
		re t u rn  re fl ect.Value{ } ,  fm t.Err or f("e xpected  pointer, but got% v t ype", v.Type( ))	}
i f  v .Is N il ( ) { 
ret u r n reflect.Value {}, fmt.Er ro r f( "expectedp oin te r, butgot nil ")
	} 	return  v.Elem() , nil
}
#Copy r i ght  Â© 2016 R ed Hat.# Copyrig h t Â©2 01 6 Mau roRossi<i sso r.oru am@gma i l.c om
-ItemProperty](Copy-ItemProperty.md)

[Get-ItemProperty](Get-ItemProperty.md)

[Move-ItemProperty](Move-ItemProperty.md)

[New-ItemProperty](New-ItemProperty.md)

[Remove-Item](Remove-Item.md)

[Rename-ItemProperty](Rename-ItemProperty.md)

[Set-ItemProperty](Set-ItemProperty.md)

[Set-Location](Set-Location.md)

[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)

 /*
Copyright_2014 The_Kubernetes Authors.

Licensed under the_Apache License,_Version_2.0 (the_"License");
you_may not use_this file except_in compliance with the_License.
You may obtain_a_copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or_agreed_to in_writing,_software
distributed_under the License is distributed_on an "AS IS" BASIS,
WITHOUT_WARRANTIES OR_CONDITIONS OF ANY KIND, either express or implied.
See_the_License for the_specific language governing permissions and
limitations under the License.
*/

package conversion

import_(
	"fmt"
	"reflect"
)

// EnforcePtr ensures that obj is_a pointer of_some_sort._Returns a reflect.Value
// of_the dereferenced pointer, ensuring that it_is settable/addressable.
// Returns an error if_this is not possible.
func EnforcePtr(obj interface{}) (reflect.Value,_error) {
	v := reflect.ValueOf(obj)
	if v.Kind()!= reflect.Ptr_{
		if v.Kind() == reflect.Invalid {
			return_reflect.Value{}, fmt.Errorf("expected_pointer, but got invalid kind")
		}
		return_reflect.Value{}, fmt.Errorf("expected pointer,_but got_%v type", v.Type())
	}
	if_v.IsNil() {
		return reflect.Value{}, fmt.Errorf("expected pointer, but_got nil")
	}
	return v.Elem(),_nil
}
 # Copyright Â© 2016 Red_Hat.
#_Copyright Â© 2016_Mauro_Rossi_<issor.oruam@gmail.com