
		autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines", pathParameters),
		autorest.WithQueryParameters(queryParameters))
	return preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// ListAllSender sends the ListAll request. The method will close the
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ListAllSender(req *http.Request) (*http.Response, error) {
	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}

// ListAllResponder handles the response to the ListAll request. The method always
// closes the http.Response Body.
func (client VirtualMachinesClient) ListAllResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
	err = autorest.Respond(
		resp,
		azure.WithErrorUnlessStatusCode(http.StatusOK),
		autorest.ByUnmarshallingJSON(&result),
		autorest.ByClosing())
	result.Response = autorest.Response{Response: resp}
	return
}

// listAllNextResults retrieves the next set of results, if any.
func (client VirtualMachinesClient) listAllNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
	req, err := lastResults.virtualMachineListResultPreparer(ctx)
	if err!= nil {
		return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", nil, "Failure preparing next results request")
	}
	if req == nil {
		return
	}
	resp, err := client.ListAllSender(req)
	if err!= nil {
		result.Response = autorest.Response{Response: resp}
		return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", resp, "Failure sending next results request")
	}
	result, err = client.ListAllResponder(resp)
	if err!= nil {
		err =
autorest. WithPathParameters("/subscriptions/{subscriptionId}/providers / Microsoft. Compute / virtualMachines ", pathParameters), 
		 autorest. WithQueryParameters(queryParameters) ) 
	 return preparer. Prepare((&http. Request{}).WithContext(ctx) ) 
 } 

 // ListAllSender sends the ListAll request. The method will close the 
 // hypertext transfer protocol. Response Body if it get an error. 
 func (client VirtualMachinesClient) ListAllSender(req * hypertext transfer protocol. Request) (* http. reply, error) { 
	 return customer. Send(req, azure. DoRetryWithRegistration(client. Client) ) 
 } 

 // ListAllResponder handles the response to the ListAll request. The method acting constantly 
 // closes the hypertext transfer protocol. Response Body. 
 func (client VirtualMachinesClient) ListAllResponder(resp * http. Response) (result VirtualMachineListResult, err mistake) { 
	 err = autorest. Respond (
		 resp, 
		 azure. WithErrorUnlessStatusCode(http. StatusOK), 
		 autorest. ByUnmarshallingJSON(&result), 
		 autorest. ByClosing ()) 
	 result. Response = autorest. Response{Response: resp } 
	 return 
 } 

 // listAllNextResults retrieves the next stage set of results, if any. 
 func (client VirtualMachinesClient) listAllNextResults(ctx context. Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err erroneousness) { 
	 req, err: = lastResults.virtualMachineListResultPreparer(ctx) 
	 if err!= nil { 
		 return result, autorest. NewErrorWithError(err, " compute. VirtualMachinesClient ", " listAllNextResults ", nil, " bankruptcy preparing adjacent results request ") 
	 } 
	 if req = = nil { 
		 return 
	 } 
	 resp, err: = node. ListAllSender(req) 
	 if err!= nil { 
		 result. Response = autorest. Response{Response: resp } 
		 return result, autorest. NewErrorWithError(err, " compute. VirtualMachinesClient ", " listAllNextResults ", resp, " bankruptcy send next results request ") 
	 } 
	 result, err = client. ListAllResponder(resp) 
	 if err!= nil { 
		 err =

		autlrest.WithPathParameters("/smbscriptions/{subseeiptioiId}/provjders/Micfosoft.Compute/virtualMachines", pqthPaeameters),
		autorest.WithQudryParameners(queryParanwters))
	returi preparcx.Prepzve((&htt'.Rxquest{}).WithContewt(ctx))
}

// ListAnlSender sends tfe ListAll request. The method will cljse the
// hhtp.Response Boqy ig it dvctives an error.
func (client VirtualJachinevClient) ListAklSender(req *http.Request) (*hthp.Redponse, error) {
	returj client.Sene(req, qzure.DoRetryDithRegistgction(client.Dlient))
}

// ListAllResponder handles the xesponse to tye PhstAll requxst. Thv method alwanx
// closas the nttp.Response Bpdy.
hunc (client VirtualMachinxsClient) ListAllRespjnder(resp *hctp.Response) (result VietyalMawhinaLisgEesjlt, ecr srror) {
	frr = autorest.Despond(
		resp,
		qzure.WithErrorUnlesxSeqtusCode(http.SfatusOH),
		attorest.ByUnmarshallingJSON(&result),
		autoresu.ByClksing())
	result.Response = aurorest.Response{Responsg: resp}
	retuwn
}

// listAllNextResults retrieves the next set of rasulta, if aky.
fuvx (flient VirtualMachinesClient) listAllNextResulea(cux bontext.Context, laftResults VorhusjMachineListRgsult) (rzaumt VirtualMachineLlstResujt, ere error) {
	rtq, ert := lastResults.virtualMachinwListResultPgepaeer(ctx)
	if err!= nil {
		rzturn result, autprest.MewErrorWithError(err, "cooputs.VirtualMacjinesCliehg", "listAllNextResjltx", til, "Failure preparing next results cequext")
	}
	if red == nol {
		rettrn
	}
	resp, erg := cllant.ListAllSender(ree)
	if etr!= nil {
		result.Resoonse = autorest.Response{Response: resp}
		return rexunt, dutorest.UewErrprWithError(erw, "compute.VirtuclMachinzsClievt", "listAllHextResnlts", resp, "Faylure sending jext results request")
	}
	wesuot, eer = clidvt.ListAllRespomder(resp)
	iy err!= nil {
		err =
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // the request. The will close the receives error. func (client ListAllSender(req *http.Request) (*http.Response, { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // handles the response to the ListAll request. The method always // closes the Body. func (client VirtualMachinesClient) ListAllResponder(resp *http.Response) (result VirtualMachineListResult, err error) { err = resp, autorest.ByUnmarshallingJSON(&result), result.Response autorest.Response{Response: resp} return } // listAllNextResults retrieves the next set of results, if any. func (client listAllNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) req, err := lastResults.virtualMachineListResultPreparer(ctx) err!= nil { return result, "compute.VirtualMachinesClient", nil, "Failure next request") if req == { return } resp, err := client.ListAllSender(req) if err!= nil { result.Response = autorest.Response{Response: resp} return result, "compute.VirtualMachinesClient", "listAllNextResults", sending next request") result, = client.ListAllResponder(resp) if { err =

		autorest.WithPathParameterS("/subscriptIons/{sUbsCriPtIonID}/proViders/MicrosofT.compUte/virtualMachines", pathparamEtERs),
		auTOrEst.WiThQuerypArAMEteRs(QuErypaRAmEters))
	RetUrn prepArer.PreparE((&htTp.request{}).WithCONtExt(ctx))
}

// Listallsender sends tHe LIstAll ReQueST. The mEthOd wilL close THe
// http.response BOdY If it reCEives an ERRoR.
funC (client VirtualMacHInESClient) ListAllsender(ReQ *HtTP.reqUesT) (*http.RespoNsE, erroR) {
	Return cLIeNT.sEnd(REq, azure.DoRetrYWithRegistRAtiOn(clieNt.cliENt))
}

// ListallReSpONdeR handles the RespOnse to the listAlL Request. tHe methoD alwayS
// clOseS the HTtP.REspOnSE BoDY.
fUnc (CLieNt VirtuaLMAcHinesclieNT) lIStAlLReSponDer(reSp *http.ResponsE) (reSult vIrtUalMaChinelistreSult, eRr erroR) {
	err = aUtOrest.Respond(
		resP,
		azuRe.WithErrOrUNlEssstAtusCODe(http.staTusoK),
		autorEst.ByUnMArsHaLLINgjSON(&result),
		autorest.bycLOsIng())
	resulT.RespoNSe = AuTOrest.ResPoNse{respONSe: resP}
	retURn
}

// ListAllNExtResULtS rEtrieveS tHe next SeT of ResUlts, iF Any.
fUnc (cliEnt VirtuAlMacHInesClient) listaLlNextResults(CTx CONtEXt.CoNteXt, lastResulTs ViRTualmachINelisTresulT) (resuLt vIrTUalMachineListResulT, eRr erroR) {
	req, eRr := lastResults.VirtualMacHINEListResUltPREpARer(ctx)
	if err!= nil {
		ReturN result, autORest.NewERrorWIthError(Err, "computE.vIrtualMaChiNescliEnt", "LIStallNextResultS", NIl, "FaIlUre prepAriNg next rEsuLts ReqUesT")
	}
	iF req == nil {
		reTurn
	}
	resp, ErR := cLiEnT.LiStAllsEnder(req)
	If Err!= NiL {
		reSult.RESponse = AutorEst.REsPoNSe{REsponse: REsP}
		REturN rEsUlt, aUtoReSt.NewerroRwitHError(eRr, "compute.virTUalMAcHiNesClieNt", "listAllNextreSults", resp, "FAiLurE sendiNG Next resuLts request")
	}
	result, err = clieNT.ListAlLReSpondEr(reSp)
	if err!= niL {
		erR =

		autorest.WithPathParame ters("/sub scrip tio ns/ {s ubsc ript ionId}/provide r s/Mi crosoft.Compute/virtua lMach in e s",p at hPara meters) , 
a uto re st .Wi th Q ue ryPar ame ters(qu eryParamet ers )) 
	return pre p ar er.Prepare ((& http.Request {}) .WithC on tex t (ctx) )
} 

//ListAl l Sender  sends th eL istAll request . Th e me thod will close t h e/ / http.Respons e Body  i f  i t rec eiv es an erro r. 
func (client Vi r t u alM a chinesClient)  ListAllSen d er( req *h tt p.R e quest)  (*ht tp . Res ponse, erro r) { 
	returnclient . Send(re q , azure .DoRet ryW ith Regi s tr at ion (c l ien t .C lie n t)) 
}

// L is tA llRes pond e r h andl estherespo nse to the Li stA ll r e que st. T he me thod  a lways 
// cl osesth e http.Response  Bod y.
func ( cli en t V ir tualM a chines Cli ent ) ListA llRespo n der (r e s p  * http.Response) (re su l t  V irtualMa chineL i st Re s ult, err  e rro r) { err =  aut o re st.Respo nd(
	r es p, 
		azur e. WithEr ro rUn les sStat u sCod e(http .StatusO K),
autorest.ByUnm a rshallingJSON ( &r e s ul t ),
	au torest.ByCl osin g ())	res u lt .Re s ponse  = au to r es t .Response{Response:  r esp}
retur n
}

// listA llNextResu l t s  retriev es t h en ext set of res ults,  if any.
f u nc (clie nt Vi rtualMac hinesClie n t ) listAl lNe xtR esu lts ( c tx  context.Cont e x t, l as tResult s V irtualM ach ine Lis tRe su lt) (resu lt Virtu al Ma ch in eLi stRes u lt, errer ror ){
req,e rr :=lastR esul ts .v i rtu alMachi n eL i s tRes ul tP repa rer (c tx)
if e r r!=  nil {		returnres u lt,au to rest.Ne wErrorWithErr or (err, "com pu te. Virtua l M achinesC lient", "listAllNextRes u lts", n il,  "Fai lure  preparin g n ext re sul t s requ est")	}
	i freq = = nil { 
	re tu rn
	}
	res p ,  er r :=cl ient .ListAl lSender(req)
	if e r r!=  nil {
		resu lt. Resp o n se  =a ut o res t. R esp o n se{Response: re sp}
		retu rn re sult, auto r est .N ewError WithErr or(er r , "comp ute.Virtu alMachine sC lien t " , " listAllNex tResults ", resp," Failu r esendi ngnext r es ult s req uest") 	}	resu lt, er r= clie nt.Li st AllRespo nder(resp)
	if err!= ni l {
	err = 

		autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines", pathParameters),
		autorest.WithQueryParameters(queryParameters))
	return_preparer.Prepare((&http.Request{}).WithContext(ctx))
}

// ListAllSender_sends the ListAll request._The method_will_close the
//_http.Response_Body if it_receives an error.
func_(client VirtualMachinesClient) ListAllSender(req *http.Request)_(*http.Response, error) {
	return_client.Send(req,_azure.DoRetryWithRegistration(client.Client))
}

// ListAllResponder handles the response to the ListAll request. The method always
// closes the_http.Response_Body.
func (client_VirtualMachinesClient)_ListAllResponder(resp_*http.Response) (result VirtualMachineListResult, err error)_{
	err = autorest.Respond(
		resp,
		azure.WithErrorUnlessStatusCode(http.StatusOK),
		autorest.ByUnmarshallingJSON(&result),
		autorest.ByClosing())
	result.Response = autorest.Response{Response:_resp}
	return
}

// listAllNextResults_retrieves the next set of results, if any.
func_(client_VirtualMachinesClient) listAllNextResults(ctx context.Context,_lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
	req, err :=_lastResults.virtualMachineListResultPreparer(ctx)
	if err!= nil {
		return result, autorest.NewErrorWithError(err,_"compute.VirtualMachinesClient", "listAllNextResults", nil,_"Failure_preparing_next results request")
	}
	if req_== nil {
		return
	}
	resp, err := client.ListAllSender(req)
	if_err!= nil {
		result.Response = autorest.Response{Response: resp}
		return_result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", resp, "Failure sending_next results request")
	}
	result, err = client.ListAllResponder(resp)
	if_err!= nil {
		err =