1package web
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"github.com/Azure/go-autorest/autorest"
12	"github.com/Azure/go-autorest/autorest/azure"
13	"github.com/Azure/go-autorest/autorest/validation"
14	"github.com/Azure/go-autorest/tracing"
15	"net/http"
16)
17
18// AppsClient is the webSite Management Client
19type AppsClient struct {
20	BaseClient
21}
22
23// NewAppsClient creates an instance of the AppsClient client.
24func NewAppsClient(subscriptionID string) AppsClient {
25	return NewAppsClientWithBaseURI(DefaultBaseURI, subscriptionID)
26}
27
28// NewAppsClientWithBaseURI creates an instance of the AppsClient client using a custom endpoint.  Use this when
29// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
30func NewAppsClientWithBaseURI(baseURI string, subscriptionID string) AppsClient {
31	return AppsClient{NewWithBaseURI(baseURI, subscriptionID)}
32}
33
34// AddPremierAddOn updates a named add-on of an app.
35// Parameters:
36// resourceGroupName - name of the resource group to which the resource belongs.
37// name - name of the app.
38// premierAddOnName - add-on name.
39// premierAddOn - a JSON representation of the edited premier add-on.
40func (client AppsClient) AddPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn) (result PremierAddOn, err error) {
41	if tracing.IsEnabled() {
42		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.AddPremierAddOn")
43		defer func() {
44			sc := -1
45			if result.Response.Response != nil {
46				sc = result.Response.Response.StatusCode
47			}
48			tracing.EndSpan(ctx, sc, err)
49		}()
50	}
51	if err := validation.Validate([]validation.Validation{
52		{TargetValue: resourceGroupName,
53			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
54				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
55				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
56		return result, validation.NewError("web.AppsClient", "AddPremierAddOn", err.Error())
57	}
58
59	req, err := client.AddPremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName, premierAddOn)
60	if err != nil {
61		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOn", nil, "Failure preparing request")
62		return
63	}
64
65	resp, err := client.AddPremierAddOnSender(req)
66	if err != nil {
67		result.Response = autorest.Response{Response: resp}
68		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOn", resp, "Failure sending request")
69		return
70	}
71
72	result, err = client.AddPremierAddOnResponder(resp)
73	if err != nil {
74		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOn", resp, "Failure responding to request")
75		return
76	}
77
78	return
79}
80
81// AddPremierAddOnPreparer prepares the AddPremierAddOn request.
82func (client AppsClient) AddPremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn) (*http.Request, error) {
83	pathParameters := map[string]interface{}{
84		"name":              autorest.Encode("path", name),
85		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
86		"resourceGroupName": autorest.Encode("path", resourceGroupName),
87		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
88	}
89
90	const APIVersion = "2018-02-01"
91	queryParameters := map[string]interface{}{
92		"api-version": APIVersion,
93	}
94
95	preparer := autorest.CreatePreparer(
96		autorest.AsContentType("application/json; charset=utf-8"),
97		autorest.AsPut(),
98		autorest.WithBaseURL(client.BaseURI),
99		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters),
100		autorest.WithJSON(premierAddOn),
101		autorest.WithQueryParameters(queryParameters))
102	return preparer.Prepare((&http.Request{}).WithContext(ctx))
103}
104
105// AddPremierAddOnSender sends the AddPremierAddOn request. The method will close the
106// http.Response Body if it receives an error.
107func (client AppsClient) AddPremierAddOnSender(req *http.Request) (*http.Response, error) {
108	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
109}
110
111// AddPremierAddOnResponder handles the response to the AddPremierAddOn request. The method always
112// closes the http.Response Body.
113func (client AppsClient) AddPremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) {
114	err = autorest.Respond(
115		resp,
116		azure.WithErrorUnlessStatusCode(http.StatusOK),
117		autorest.ByUnmarshallingJSON(&result),
118		autorest.ByClosing())
119	result.Response = autorest.Response{Response: resp}
120	return
121}
122
123// AddPremierAddOnSlot updates a named add-on of an app.
124// Parameters:
125// resourceGroupName - name of the resource group to which the resource belongs.
126// name - name of the app.
127// premierAddOnName - add-on name.
128// premierAddOn - a JSON representation of the edited premier add-on.
129// slot - name of the deployment slot. If a slot is not specified, the API will update the named add-on for the
130// production slot.
131func (client AppsClient) AddPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn, slot string) (result PremierAddOn, err error) {
132	if tracing.IsEnabled() {
133		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.AddPremierAddOnSlot")
134		defer func() {
135			sc := -1
136			if result.Response.Response != nil {
137				sc = result.Response.Response.StatusCode
138			}
139			tracing.EndSpan(ctx, sc, err)
140		}()
141	}
142	if err := validation.Validate([]validation.Validation{
143		{TargetValue: resourceGroupName,
144			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
145				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
146				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
147		return result, validation.NewError("web.AppsClient", "AddPremierAddOnSlot", err.Error())
148	}
149
150	req, err := client.AddPremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, premierAddOn, slot)
151	if err != nil {
152		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOnSlot", nil, "Failure preparing request")
153		return
154	}
155
156	resp, err := client.AddPremierAddOnSlotSender(req)
157	if err != nil {
158		result.Response = autorest.Response{Response: resp}
159		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOnSlot", resp, "Failure sending request")
160		return
161	}
162
163	result, err = client.AddPremierAddOnSlotResponder(resp)
164	if err != nil {
165		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOnSlot", resp, "Failure responding to request")
166		return
167	}
168
169	return
170}
171
172// AddPremierAddOnSlotPreparer prepares the AddPremierAddOnSlot request.
173func (client AppsClient) AddPremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn, slot string) (*http.Request, error) {
174	pathParameters := map[string]interface{}{
175		"name":              autorest.Encode("path", name),
176		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
177		"resourceGroupName": autorest.Encode("path", resourceGroupName),
178		"slot":              autorest.Encode("path", slot),
179		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
180	}
181
182	const APIVersion = "2018-02-01"
183	queryParameters := map[string]interface{}{
184		"api-version": APIVersion,
185	}
186
187	preparer := autorest.CreatePreparer(
188		autorest.AsContentType("application/json; charset=utf-8"),
189		autorest.AsPut(),
190		autorest.WithBaseURL(client.BaseURI),
191		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters),
192		autorest.WithJSON(premierAddOn),
193		autorest.WithQueryParameters(queryParameters))
194	return preparer.Prepare((&http.Request{}).WithContext(ctx))
195}
196
197// AddPremierAddOnSlotSender sends the AddPremierAddOnSlot request. The method will close the
198// http.Response Body if it receives an error.
199func (client AppsClient) AddPremierAddOnSlotSender(req *http.Request) (*http.Response, error) {
200	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
201}
202
203// AddPremierAddOnSlotResponder handles the response to the AddPremierAddOnSlot request. The method always
204// closes the http.Response Body.
205func (client AppsClient) AddPremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) {
206	err = autorest.Respond(
207		resp,
208		azure.WithErrorUnlessStatusCode(http.StatusOK),
209		autorest.ByUnmarshallingJSON(&result),
210		autorest.ByClosing())
211	result.Response = autorest.Response{Response: resp}
212	return
213}
214
215// AnalyzeCustomHostname analyze a custom hostname.
216// Parameters:
217// resourceGroupName - name of the resource group to which the resource belongs.
218// name - name of web app.
219// hostName - custom hostname.
220func (client AppsClient) AnalyzeCustomHostname(ctx context.Context, resourceGroupName string, name string, hostName string) (result CustomHostnameAnalysisResult, err error) {
221	if tracing.IsEnabled() {
222		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.AnalyzeCustomHostname")
223		defer func() {
224			sc := -1
225			if result.Response.Response != nil {
226				sc = result.Response.Response.StatusCode
227			}
228			tracing.EndSpan(ctx, sc, err)
229		}()
230	}
231	if err := validation.Validate([]validation.Validation{
232		{TargetValue: resourceGroupName,
233			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
234				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
235				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
236		return result, validation.NewError("web.AppsClient", "AnalyzeCustomHostname", err.Error())
237	}
238
239	req, err := client.AnalyzeCustomHostnamePreparer(ctx, resourceGroupName, name, hostName)
240	if err != nil {
241		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostname", nil, "Failure preparing request")
242		return
243	}
244
245	resp, err := client.AnalyzeCustomHostnameSender(req)
246	if err != nil {
247		result.Response = autorest.Response{Response: resp}
248		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostname", resp, "Failure sending request")
249		return
250	}
251
252	result, err = client.AnalyzeCustomHostnameResponder(resp)
253	if err != nil {
254		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostname", resp, "Failure responding to request")
255		return
256	}
257
258	return
259}
260
261// AnalyzeCustomHostnamePreparer prepares the AnalyzeCustomHostname request.
262func (client AppsClient) AnalyzeCustomHostnamePreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) {
263	pathParameters := map[string]interface{}{
264		"name":              autorest.Encode("path", name),
265		"resourceGroupName": autorest.Encode("path", resourceGroupName),
266		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
267	}
268
269	const APIVersion = "2018-02-01"
270	queryParameters := map[string]interface{}{
271		"api-version": APIVersion,
272	}
273	if len(hostName) > 0 {
274		queryParameters["hostName"] = autorest.Encode("query", hostName)
275	}
276
277	preparer := autorest.CreatePreparer(
278		autorest.AsGet(),
279		autorest.WithBaseURL(client.BaseURI),
280		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname", pathParameters),
281		autorest.WithQueryParameters(queryParameters))
282	return preparer.Prepare((&http.Request{}).WithContext(ctx))
283}
284
285// AnalyzeCustomHostnameSender sends the AnalyzeCustomHostname request. The method will close the
286// http.Response Body if it receives an error.
287func (client AppsClient) AnalyzeCustomHostnameSender(req *http.Request) (*http.Response, error) {
288	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
289}
290
291// AnalyzeCustomHostnameResponder handles the response to the AnalyzeCustomHostname request. The method always
292// closes the http.Response Body.
293func (client AppsClient) AnalyzeCustomHostnameResponder(resp *http.Response) (result CustomHostnameAnalysisResult, err error) {
294	err = autorest.Respond(
295		resp,
296		azure.WithErrorUnlessStatusCode(http.StatusOK),
297		autorest.ByUnmarshallingJSON(&result),
298		autorest.ByClosing())
299	result.Response = autorest.Response{Response: resp}
300	return
301}
302
303// AnalyzeCustomHostnameSlot analyze a custom hostname.
304// Parameters:
305// resourceGroupName - name of the resource group to which the resource belongs.
306// name - name of web app.
307// slot - name of web app slot. If not specified then will default to production slot.
308// hostName - custom hostname.
309func (client AppsClient) AnalyzeCustomHostnameSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result CustomHostnameAnalysisResult, err error) {
310	if tracing.IsEnabled() {
311		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.AnalyzeCustomHostnameSlot")
312		defer func() {
313			sc := -1
314			if result.Response.Response != nil {
315				sc = result.Response.Response.StatusCode
316			}
317			tracing.EndSpan(ctx, sc, err)
318		}()
319	}
320	if err := validation.Validate([]validation.Validation{
321		{TargetValue: resourceGroupName,
322			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
323				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
324				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
325		return result, validation.NewError("web.AppsClient", "AnalyzeCustomHostnameSlot", err.Error())
326	}
327
328	req, err := client.AnalyzeCustomHostnameSlotPreparer(ctx, resourceGroupName, name, slot, hostName)
329	if err != nil {
330		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostnameSlot", nil, "Failure preparing request")
331		return
332	}
333
334	resp, err := client.AnalyzeCustomHostnameSlotSender(req)
335	if err != nil {
336		result.Response = autorest.Response{Response: resp}
337		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostnameSlot", resp, "Failure sending request")
338		return
339	}
340
341	result, err = client.AnalyzeCustomHostnameSlotResponder(resp)
342	if err != nil {
343		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostnameSlot", resp, "Failure responding to request")
344		return
345	}
346
347	return
348}
349
350// AnalyzeCustomHostnameSlotPreparer prepares the AnalyzeCustomHostnameSlot request.
351func (client AppsClient) AnalyzeCustomHostnameSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) {
352	pathParameters := map[string]interface{}{
353		"name":              autorest.Encode("path", name),
354		"resourceGroupName": autorest.Encode("path", resourceGroupName),
355		"slot":              autorest.Encode("path", slot),
356		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
357	}
358
359	const APIVersion = "2018-02-01"
360	queryParameters := map[string]interface{}{
361		"api-version": APIVersion,
362	}
363	if len(hostName) > 0 {
364		queryParameters["hostName"] = autorest.Encode("query", hostName)
365	}
366
367	preparer := autorest.CreatePreparer(
368		autorest.AsGet(),
369		autorest.WithBaseURL(client.BaseURI),
370		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname", pathParameters),
371		autorest.WithQueryParameters(queryParameters))
372	return preparer.Prepare((&http.Request{}).WithContext(ctx))
373}
374
375// AnalyzeCustomHostnameSlotSender sends the AnalyzeCustomHostnameSlot request. The method will close the
376// http.Response Body if it receives an error.
377func (client AppsClient) AnalyzeCustomHostnameSlotSender(req *http.Request) (*http.Response, error) {
378	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
379}
380
381// AnalyzeCustomHostnameSlotResponder handles the response to the AnalyzeCustomHostnameSlot request. The method always
382// closes the http.Response Body.
383func (client AppsClient) AnalyzeCustomHostnameSlotResponder(resp *http.Response) (result CustomHostnameAnalysisResult, err error) {
384	err = autorest.Respond(
385		resp,
386		azure.WithErrorUnlessStatusCode(http.StatusOK),
387		autorest.ByUnmarshallingJSON(&result),
388		autorest.ByClosing())
389	result.Response = autorest.Response{Response: resp}
390	return
391}
392
393// ApplySlotConfigToProduction applies the configuration settings from the target slot onto the current slot.
394// Parameters:
395// resourceGroupName - name of the resource group to which the resource belongs.
396// name - name of the app.
397// slotSwapEntity - JSON object that contains the target slot name. See example.
398func (client AppsClient) ApplySlotConfigToProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result autorest.Response, err error) {
399	if tracing.IsEnabled() {
400		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ApplySlotConfigToProduction")
401		defer func() {
402			sc := -1
403			if result.Response != nil {
404				sc = result.Response.StatusCode
405			}
406			tracing.EndSpan(ctx, sc, err)
407		}()
408	}
409	if err := validation.Validate([]validation.Validation{
410		{TargetValue: resourceGroupName,
411			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
412				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
413				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
414		{TargetValue: slotSwapEntity,
415			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
416				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
417		return result, validation.NewError("web.AppsClient", "ApplySlotConfigToProduction", err.Error())
418	}
419
420	req, err := client.ApplySlotConfigToProductionPreparer(ctx, resourceGroupName, name, slotSwapEntity)
421	if err != nil {
422		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigToProduction", nil, "Failure preparing request")
423		return
424	}
425
426	resp, err := client.ApplySlotConfigToProductionSender(req)
427	if err != nil {
428		result.Response = resp
429		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigToProduction", resp, "Failure sending request")
430		return
431	}
432
433	result, err = client.ApplySlotConfigToProductionResponder(resp)
434	if err != nil {
435		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigToProduction", resp, "Failure responding to request")
436		return
437	}
438
439	return
440}
441
442// ApplySlotConfigToProductionPreparer prepares the ApplySlotConfigToProduction request.
443func (client AppsClient) ApplySlotConfigToProductionPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (*http.Request, error) {
444	pathParameters := map[string]interface{}{
445		"name":              autorest.Encode("path", name),
446		"resourceGroupName": autorest.Encode("path", resourceGroupName),
447		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
448	}
449
450	const APIVersion = "2018-02-01"
451	queryParameters := map[string]interface{}{
452		"api-version": APIVersion,
453	}
454
455	preparer := autorest.CreatePreparer(
456		autorest.AsContentType("application/json; charset=utf-8"),
457		autorest.AsPost(),
458		autorest.WithBaseURL(client.BaseURI),
459		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig", pathParameters),
460		autorest.WithJSON(slotSwapEntity),
461		autorest.WithQueryParameters(queryParameters))
462	return preparer.Prepare((&http.Request{}).WithContext(ctx))
463}
464
465// ApplySlotConfigToProductionSender sends the ApplySlotConfigToProduction request. The method will close the
466// http.Response Body if it receives an error.
467func (client AppsClient) ApplySlotConfigToProductionSender(req *http.Request) (*http.Response, error) {
468	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
469}
470
471// ApplySlotConfigToProductionResponder handles the response to the ApplySlotConfigToProduction request. The method always
472// closes the http.Response Body.
473func (client AppsClient) ApplySlotConfigToProductionResponder(resp *http.Response) (result autorest.Response, err error) {
474	err = autorest.Respond(
475		resp,
476		azure.WithErrorUnlessStatusCode(http.StatusOK),
477		autorest.ByClosing())
478	result.Response = resp
479	return
480}
481
482// ApplySlotConfigurationSlot applies the configuration settings from the target slot onto the current slot.
483// Parameters:
484// resourceGroupName - name of the resource group to which the resource belongs.
485// name - name of the app.
486// slotSwapEntity - JSON object that contains the target slot name. See example.
487// slot - name of the source slot. If a slot is not specified, the production slot is used as the source slot.
488func (client AppsClient) ApplySlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result autorest.Response, err error) {
489	if tracing.IsEnabled() {
490		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ApplySlotConfigurationSlot")
491		defer func() {
492			sc := -1
493			if result.Response != nil {
494				sc = result.Response.StatusCode
495			}
496			tracing.EndSpan(ctx, sc, err)
497		}()
498	}
499	if err := validation.Validate([]validation.Validation{
500		{TargetValue: resourceGroupName,
501			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
502				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
503				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
504		{TargetValue: slotSwapEntity,
505			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
506				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
507		return result, validation.NewError("web.AppsClient", "ApplySlotConfigurationSlot", err.Error())
508	}
509
510	req, err := client.ApplySlotConfigurationSlotPreparer(ctx, resourceGroupName, name, slotSwapEntity, slot)
511	if err != nil {
512		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigurationSlot", nil, "Failure preparing request")
513		return
514	}
515
516	resp, err := client.ApplySlotConfigurationSlotSender(req)
517	if err != nil {
518		result.Response = resp
519		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigurationSlot", resp, "Failure sending request")
520		return
521	}
522
523	result, err = client.ApplySlotConfigurationSlotResponder(resp)
524	if err != nil {
525		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigurationSlot", resp, "Failure responding to request")
526		return
527	}
528
529	return
530}
531
532// ApplySlotConfigurationSlotPreparer prepares the ApplySlotConfigurationSlot request.
533func (client AppsClient) ApplySlotConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (*http.Request, error) {
534	pathParameters := map[string]interface{}{
535		"name":              autorest.Encode("path", name),
536		"resourceGroupName": autorest.Encode("path", resourceGroupName),
537		"slot":              autorest.Encode("path", slot),
538		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
539	}
540
541	const APIVersion = "2018-02-01"
542	queryParameters := map[string]interface{}{
543		"api-version": APIVersion,
544	}
545
546	preparer := autorest.CreatePreparer(
547		autorest.AsContentType("application/json; charset=utf-8"),
548		autorest.AsPost(),
549		autorest.WithBaseURL(client.BaseURI),
550		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig", pathParameters),
551		autorest.WithJSON(slotSwapEntity),
552		autorest.WithQueryParameters(queryParameters))
553	return preparer.Prepare((&http.Request{}).WithContext(ctx))
554}
555
556// ApplySlotConfigurationSlotSender sends the ApplySlotConfigurationSlot request. The method will close the
557// http.Response Body if it receives an error.
558func (client AppsClient) ApplySlotConfigurationSlotSender(req *http.Request) (*http.Response, error) {
559	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
560}
561
562// ApplySlotConfigurationSlotResponder handles the response to the ApplySlotConfigurationSlot request. The method always
563// closes the http.Response Body.
564func (client AppsClient) ApplySlotConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) {
565	err = autorest.Respond(
566		resp,
567		azure.WithErrorUnlessStatusCode(http.StatusOK),
568		autorest.ByClosing())
569	result.Response = resp
570	return
571}
572
573// Backup creates a backup of an app.
574// Parameters:
575// resourceGroupName - name of the resource group to which the resource belongs.
576// name - name of the app.
577// request - backup configuration. You can use the JSON response from the POST action as input here.
578func (client AppsClient) Backup(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (result BackupItem, err error) {
579	if tracing.IsEnabled() {
580		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Backup")
581		defer func() {
582			sc := -1
583			if result.Response.Response != nil {
584				sc = result.Response.Response.StatusCode
585			}
586			tracing.EndSpan(ctx, sc, err)
587		}()
588	}
589	if err := validation.Validate([]validation.Validation{
590		{TargetValue: resourceGroupName,
591			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
592				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
593				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
594		{TargetValue: request,
595			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
596				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
597					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
598						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
599							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
600							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
601						}},
602				}}}}}); err != nil {
603		return result, validation.NewError("web.AppsClient", "Backup", err.Error())
604	}
605
606	req, err := client.BackupPreparer(ctx, resourceGroupName, name, request)
607	if err != nil {
608		err = autorest.NewErrorWithError(err, "web.AppsClient", "Backup", nil, "Failure preparing request")
609		return
610	}
611
612	resp, err := client.BackupSender(req)
613	if err != nil {
614		result.Response = autorest.Response{Response: resp}
615		err = autorest.NewErrorWithError(err, "web.AppsClient", "Backup", resp, "Failure sending request")
616		return
617	}
618
619	result, err = client.BackupResponder(resp)
620	if err != nil {
621		err = autorest.NewErrorWithError(err, "web.AppsClient", "Backup", resp, "Failure responding to request")
622		return
623	}
624
625	return
626}
627
628// BackupPreparer prepares the Backup request.
629func (client AppsClient) BackupPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (*http.Request, error) {
630	pathParameters := map[string]interface{}{
631		"name":              autorest.Encode("path", name),
632		"resourceGroupName": autorest.Encode("path", resourceGroupName),
633		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
634	}
635
636	const APIVersion = "2018-02-01"
637	queryParameters := map[string]interface{}{
638		"api-version": APIVersion,
639	}
640
641	preparer := autorest.CreatePreparer(
642		autorest.AsContentType("application/json; charset=utf-8"),
643		autorest.AsPost(),
644		autorest.WithBaseURL(client.BaseURI),
645		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup", pathParameters),
646		autorest.WithJSON(request),
647		autorest.WithQueryParameters(queryParameters))
648	return preparer.Prepare((&http.Request{}).WithContext(ctx))
649}
650
651// BackupSender sends the Backup request. The method will close the
652// http.Response Body if it receives an error.
653func (client AppsClient) BackupSender(req *http.Request) (*http.Response, error) {
654	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
655}
656
657// BackupResponder handles the response to the Backup request. The method always
658// closes the http.Response Body.
659func (client AppsClient) BackupResponder(resp *http.Response) (result BackupItem, err error) {
660	err = autorest.Respond(
661		resp,
662		azure.WithErrorUnlessStatusCode(http.StatusOK),
663		autorest.ByUnmarshallingJSON(&result),
664		autorest.ByClosing())
665	result.Response = autorest.Response{Response: resp}
666	return
667}
668
669// BackupSlot creates a backup of an app.
670// Parameters:
671// resourceGroupName - name of the resource group to which the resource belongs.
672// name - name of the app.
673// request - backup configuration. You can use the JSON response from the POST action as input here.
674// slot - name of the deployment slot. If a slot is not specified, the API will create a backup for the
675// production slot.
676func (client AppsClient) BackupSlot(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (result BackupItem, err error) {
677	if tracing.IsEnabled() {
678		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.BackupSlot")
679		defer func() {
680			sc := -1
681			if result.Response.Response != nil {
682				sc = result.Response.Response.StatusCode
683			}
684			tracing.EndSpan(ctx, sc, err)
685		}()
686	}
687	if err := validation.Validate([]validation.Validation{
688		{TargetValue: resourceGroupName,
689			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
690				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
691				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
692		{TargetValue: request,
693			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
694				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
695					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
696						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
697							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
698							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
699						}},
700				}}}}}); err != nil {
701		return result, validation.NewError("web.AppsClient", "BackupSlot", err.Error())
702	}
703
704	req, err := client.BackupSlotPreparer(ctx, resourceGroupName, name, request, slot)
705	if err != nil {
706		err = autorest.NewErrorWithError(err, "web.AppsClient", "BackupSlot", nil, "Failure preparing request")
707		return
708	}
709
710	resp, err := client.BackupSlotSender(req)
711	if err != nil {
712		result.Response = autorest.Response{Response: resp}
713		err = autorest.NewErrorWithError(err, "web.AppsClient", "BackupSlot", resp, "Failure sending request")
714		return
715	}
716
717	result, err = client.BackupSlotResponder(resp)
718	if err != nil {
719		err = autorest.NewErrorWithError(err, "web.AppsClient", "BackupSlot", resp, "Failure responding to request")
720		return
721	}
722
723	return
724}
725
726// BackupSlotPreparer prepares the BackupSlot request.
727func (client AppsClient) BackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (*http.Request, error) {
728	pathParameters := map[string]interface{}{
729		"name":              autorest.Encode("path", name),
730		"resourceGroupName": autorest.Encode("path", resourceGroupName),
731		"slot":              autorest.Encode("path", slot),
732		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
733	}
734
735	const APIVersion = "2018-02-01"
736	queryParameters := map[string]interface{}{
737		"api-version": APIVersion,
738	}
739
740	preparer := autorest.CreatePreparer(
741		autorest.AsContentType("application/json; charset=utf-8"),
742		autorest.AsPost(),
743		autorest.WithBaseURL(client.BaseURI),
744		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup", pathParameters),
745		autorest.WithJSON(request),
746		autorest.WithQueryParameters(queryParameters))
747	return preparer.Prepare((&http.Request{}).WithContext(ctx))
748}
749
750// BackupSlotSender sends the BackupSlot request. The method will close the
751// http.Response Body if it receives an error.
752func (client AppsClient) BackupSlotSender(req *http.Request) (*http.Response, error) {
753	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
754}
755
756// BackupSlotResponder handles the response to the BackupSlot request. The method always
757// closes the http.Response Body.
758func (client AppsClient) BackupSlotResponder(resp *http.Response) (result BackupItem, err error) {
759	err = autorest.Respond(
760		resp,
761		azure.WithErrorUnlessStatusCode(http.StatusOK),
762		autorest.ByUnmarshallingJSON(&result),
763		autorest.ByClosing())
764	result.Response = autorest.Response{Response: resp}
765	return
766}
767
768// CreateDeployment create a deployment for an app, or a deployment slot.
769// Parameters:
770// resourceGroupName - name of the resource group to which the resource belongs.
771// name - name of the app.
772// ID - ID of an existing deployment.
773// deployment - deployment details.
774func (client AppsClient) CreateDeployment(ctx context.Context, resourceGroupName string, name string, ID string, deployment Deployment) (result Deployment, err error) {
775	if tracing.IsEnabled() {
776		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateDeployment")
777		defer func() {
778			sc := -1
779			if result.Response.Response != nil {
780				sc = result.Response.Response.StatusCode
781			}
782			tracing.EndSpan(ctx, sc, err)
783		}()
784	}
785	if err := validation.Validate([]validation.Validation{
786		{TargetValue: resourceGroupName,
787			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
788				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
789				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
790		return result, validation.NewError("web.AppsClient", "CreateDeployment", err.Error())
791	}
792
793	req, err := client.CreateDeploymentPreparer(ctx, resourceGroupName, name, ID, deployment)
794	if err != nil {
795		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeployment", nil, "Failure preparing request")
796		return
797	}
798
799	resp, err := client.CreateDeploymentSender(req)
800	if err != nil {
801		result.Response = autorest.Response{Response: resp}
802		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeployment", resp, "Failure sending request")
803		return
804	}
805
806	result, err = client.CreateDeploymentResponder(resp)
807	if err != nil {
808		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeployment", resp, "Failure responding to request")
809		return
810	}
811
812	return
813}
814
815// CreateDeploymentPreparer prepares the CreateDeployment request.
816func (client AppsClient) CreateDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string, deployment Deployment) (*http.Request, error) {
817	pathParameters := map[string]interface{}{
818		"id":                autorest.Encode("path", ID),
819		"name":              autorest.Encode("path", name),
820		"resourceGroupName": autorest.Encode("path", resourceGroupName),
821		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
822	}
823
824	const APIVersion = "2018-02-01"
825	queryParameters := map[string]interface{}{
826		"api-version": APIVersion,
827	}
828
829	preparer := autorest.CreatePreparer(
830		autorest.AsContentType("application/json; charset=utf-8"),
831		autorest.AsPut(),
832		autorest.WithBaseURL(client.BaseURI),
833		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters),
834		autorest.WithJSON(deployment),
835		autorest.WithQueryParameters(queryParameters))
836	return preparer.Prepare((&http.Request{}).WithContext(ctx))
837}
838
839// CreateDeploymentSender sends the CreateDeployment request. The method will close the
840// http.Response Body if it receives an error.
841func (client AppsClient) CreateDeploymentSender(req *http.Request) (*http.Response, error) {
842	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
843}
844
845// CreateDeploymentResponder handles the response to the CreateDeployment request. The method always
846// closes the http.Response Body.
847func (client AppsClient) CreateDeploymentResponder(resp *http.Response) (result Deployment, err error) {
848	err = autorest.Respond(
849		resp,
850		azure.WithErrorUnlessStatusCode(http.StatusOK),
851		autorest.ByUnmarshallingJSON(&result),
852		autorest.ByClosing())
853	result.Response = autorest.Response{Response: resp}
854	return
855}
856
857// CreateDeploymentSlot create a deployment for an app, or a deployment slot.
858// Parameters:
859// resourceGroupName - name of the resource group to which the resource belongs.
860// name - name of the app.
861// ID - ID of an existing deployment.
862// slot - name of the deployment slot. If a slot is not specified, the API creates a deployment for the
863// production slot.
864// deployment - deployment details.
865func (client AppsClient) CreateDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string, deployment Deployment) (result Deployment, err error) {
866	if tracing.IsEnabled() {
867		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateDeploymentSlot")
868		defer func() {
869			sc := -1
870			if result.Response.Response != nil {
871				sc = result.Response.Response.StatusCode
872			}
873			tracing.EndSpan(ctx, sc, err)
874		}()
875	}
876	if err := validation.Validate([]validation.Validation{
877		{TargetValue: resourceGroupName,
878			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
879				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
880				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
881		return result, validation.NewError("web.AppsClient", "CreateDeploymentSlot", err.Error())
882	}
883
884	req, err := client.CreateDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot, deployment)
885	if err != nil {
886		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeploymentSlot", nil, "Failure preparing request")
887		return
888	}
889
890	resp, err := client.CreateDeploymentSlotSender(req)
891	if err != nil {
892		result.Response = autorest.Response{Response: resp}
893		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeploymentSlot", resp, "Failure sending request")
894		return
895	}
896
897	result, err = client.CreateDeploymentSlotResponder(resp)
898	if err != nil {
899		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeploymentSlot", resp, "Failure responding to request")
900		return
901	}
902
903	return
904}
905
906// CreateDeploymentSlotPreparer prepares the CreateDeploymentSlot request.
907func (client AppsClient) CreateDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string, deployment Deployment) (*http.Request, error) {
908	pathParameters := map[string]interface{}{
909		"id":                autorest.Encode("path", ID),
910		"name":              autorest.Encode("path", name),
911		"resourceGroupName": autorest.Encode("path", resourceGroupName),
912		"slot":              autorest.Encode("path", slot),
913		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
914	}
915
916	const APIVersion = "2018-02-01"
917	queryParameters := map[string]interface{}{
918		"api-version": APIVersion,
919	}
920
921	preparer := autorest.CreatePreparer(
922		autorest.AsContentType("application/json; charset=utf-8"),
923		autorest.AsPut(),
924		autorest.WithBaseURL(client.BaseURI),
925		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters),
926		autorest.WithJSON(deployment),
927		autorest.WithQueryParameters(queryParameters))
928	return preparer.Prepare((&http.Request{}).WithContext(ctx))
929}
930
931// CreateDeploymentSlotSender sends the CreateDeploymentSlot request. The method will close the
932// http.Response Body if it receives an error.
933func (client AppsClient) CreateDeploymentSlotSender(req *http.Request) (*http.Response, error) {
934	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
935}
936
937// CreateDeploymentSlotResponder handles the response to the CreateDeploymentSlot request. The method always
938// closes the http.Response Body.
939func (client AppsClient) CreateDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) {
940	err = autorest.Respond(
941		resp,
942		azure.WithErrorUnlessStatusCode(http.StatusOK),
943		autorest.ByUnmarshallingJSON(&result),
944		autorest.ByClosing())
945	result.Response = autorest.Response{Response: resp}
946	return
947}
948
949// CreateFunction create function for web site, or a deployment slot.
950// Parameters:
951// resourceGroupName - name of the resource group to which the resource belongs.
952// name - site name.
953// functionName - function name.
954// functionEnvelope - function details.
955func (client AppsClient) CreateFunction(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope) (result AppsCreateFunctionFuture, err error) {
956	if tracing.IsEnabled() {
957		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateFunction")
958		defer func() {
959			sc := -1
960			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
961				sc = result.FutureAPI.Response().StatusCode
962			}
963			tracing.EndSpan(ctx, sc, err)
964		}()
965	}
966	if err := validation.Validate([]validation.Validation{
967		{TargetValue: resourceGroupName,
968			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
969				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
970				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
971		return result, validation.NewError("web.AppsClient", "CreateFunction", err.Error())
972	}
973
974	req, err := client.CreateFunctionPreparer(ctx, resourceGroupName, name, functionName, functionEnvelope)
975	if err != nil {
976		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateFunction", nil, "Failure preparing request")
977		return
978	}
979
980	result, err = client.CreateFunctionSender(req)
981	if err != nil {
982		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateFunction", nil, "Failure sending request")
983		return
984	}
985
986	return
987}
988
989// CreateFunctionPreparer prepares the CreateFunction request.
990func (client AppsClient) CreateFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope) (*http.Request, error) {
991	pathParameters := map[string]interface{}{
992		"functionName":      autorest.Encode("path", functionName),
993		"name":              autorest.Encode("path", name),
994		"resourceGroupName": autorest.Encode("path", resourceGroupName),
995		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
996	}
997
998	const APIVersion = "2018-02-01"
999	queryParameters := map[string]interface{}{
1000		"api-version": APIVersion,
1001	}
1002
1003	preparer := autorest.CreatePreparer(
1004		autorest.AsContentType("application/json; charset=utf-8"),
1005		autorest.AsPut(),
1006		autorest.WithBaseURL(client.BaseURI),
1007		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters),
1008		autorest.WithJSON(functionEnvelope),
1009		autorest.WithQueryParameters(queryParameters))
1010	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1011}
1012
1013// CreateFunctionSender sends the CreateFunction request. The method will close the
1014// http.Response Body if it receives an error.
1015func (client AppsClient) CreateFunctionSender(req *http.Request) (future AppsCreateFunctionFuture, err error) {
1016	var resp *http.Response
1017	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1018	if err != nil {
1019		return
1020	}
1021	var azf azure.Future
1022	azf, err = azure.NewFutureFromResponse(resp)
1023	future.FutureAPI = &azf
1024	future.Result = future.result
1025	return
1026}
1027
1028// CreateFunctionResponder handles the response to the CreateFunction request. The method always
1029// closes the http.Response Body.
1030func (client AppsClient) CreateFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) {
1031	err = autorest.Respond(
1032		resp,
1033		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
1034		autorest.ByUnmarshallingJSON(&result),
1035		autorest.ByClosing())
1036	result.Response = autorest.Response{Response: resp}
1037	return
1038}
1039
1040// CreateInstanceFunctionSlot create function for web site, or a deployment slot.
1041// Parameters:
1042// resourceGroupName - name of the resource group to which the resource belongs.
1043// name - site name.
1044// functionName - function name.
1045// slot - name of the deployment slot.
1046// functionEnvelope - function details.
1047func (client AppsClient) CreateInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope) (result AppsCreateInstanceFunctionSlotFuture, err error) {
1048	if tracing.IsEnabled() {
1049		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateInstanceFunctionSlot")
1050		defer func() {
1051			sc := -1
1052			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1053				sc = result.FutureAPI.Response().StatusCode
1054			}
1055			tracing.EndSpan(ctx, sc, err)
1056		}()
1057	}
1058	if err := validation.Validate([]validation.Validation{
1059		{TargetValue: resourceGroupName,
1060			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1061				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1062				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1063		return result, validation.NewError("web.AppsClient", "CreateInstanceFunctionSlot", err.Error())
1064	}
1065
1066	req, err := client.CreateInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot, functionEnvelope)
1067	if err != nil {
1068		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceFunctionSlot", nil, "Failure preparing request")
1069		return
1070	}
1071
1072	result, err = client.CreateInstanceFunctionSlotSender(req)
1073	if err != nil {
1074		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceFunctionSlot", nil, "Failure sending request")
1075		return
1076	}
1077
1078	return
1079}
1080
1081// CreateInstanceFunctionSlotPreparer prepares the CreateInstanceFunctionSlot request.
1082func (client AppsClient) CreateInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope) (*http.Request, error) {
1083	pathParameters := map[string]interface{}{
1084		"functionName":      autorest.Encode("path", functionName),
1085		"name":              autorest.Encode("path", name),
1086		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1087		"slot":              autorest.Encode("path", slot),
1088		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1089	}
1090
1091	const APIVersion = "2018-02-01"
1092	queryParameters := map[string]interface{}{
1093		"api-version": APIVersion,
1094	}
1095
1096	preparer := autorest.CreatePreparer(
1097		autorest.AsContentType("application/json; charset=utf-8"),
1098		autorest.AsPut(),
1099		autorest.WithBaseURL(client.BaseURI),
1100		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters),
1101		autorest.WithJSON(functionEnvelope),
1102		autorest.WithQueryParameters(queryParameters))
1103	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1104}
1105
1106// CreateInstanceFunctionSlotSender sends the CreateInstanceFunctionSlot request. The method will close the
1107// http.Response Body if it receives an error.
1108func (client AppsClient) CreateInstanceFunctionSlotSender(req *http.Request) (future AppsCreateInstanceFunctionSlotFuture, err error) {
1109	var resp *http.Response
1110	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1111	if err != nil {
1112		return
1113	}
1114	var azf azure.Future
1115	azf, err = azure.NewFutureFromResponse(resp)
1116	future.FutureAPI = &azf
1117	future.Result = future.result
1118	return
1119}
1120
1121// CreateInstanceFunctionSlotResponder handles the response to the CreateInstanceFunctionSlot request. The method always
1122// closes the http.Response Body.
1123func (client AppsClient) CreateInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) {
1124	err = autorest.Respond(
1125		resp,
1126		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
1127		autorest.ByUnmarshallingJSON(&result),
1128		autorest.ByClosing())
1129	result.Response = autorest.Response{Response: resp}
1130	return
1131}
1132
1133// CreateInstanceMSDeployOperation invoke the MSDeploy web app extension.
1134// Parameters:
1135// resourceGroupName - name of the resource group to which the resource belongs.
1136// name - name of web app.
1137// instanceID - ID of web app instance.
1138// mSDeploy - details of MSDeploy operation
1139func (client AppsClient) CreateInstanceMSDeployOperation(ctx context.Context, resourceGroupName string, name string, instanceID string, mSDeploy MSDeploy) (result AppsCreateInstanceMSDeployOperationFuture, err error) {
1140	if tracing.IsEnabled() {
1141		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateInstanceMSDeployOperation")
1142		defer func() {
1143			sc := -1
1144			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1145				sc = result.FutureAPI.Response().StatusCode
1146			}
1147			tracing.EndSpan(ctx, sc, err)
1148		}()
1149	}
1150	if err := validation.Validate([]validation.Validation{
1151		{TargetValue: resourceGroupName,
1152			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1153				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1154				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1155		return result, validation.NewError("web.AppsClient", "CreateInstanceMSDeployOperation", err.Error())
1156	}
1157
1158	req, err := client.CreateInstanceMSDeployOperationPreparer(ctx, resourceGroupName, name, instanceID, mSDeploy)
1159	if err != nil {
1160		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperation", nil, "Failure preparing request")
1161		return
1162	}
1163
1164	result, err = client.CreateInstanceMSDeployOperationSender(req)
1165	if err != nil {
1166		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperation", nil, "Failure sending request")
1167		return
1168	}
1169
1170	return
1171}
1172
1173// CreateInstanceMSDeployOperationPreparer prepares the CreateInstanceMSDeployOperation request.
1174func (client AppsClient) CreateInstanceMSDeployOperationPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string, mSDeploy MSDeploy) (*http.Request, error) {
1175	pathParameters := map[string]interface{}{
1176		"instanceId":        autorest.Encode("path", instanceID),
1177		"name":              autorest.Encode("path", name),
1178		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1179		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1180	}
1181
1182	const APIVersion = "2018-02-01"
1183	queryParameters := map[string]interface{}{
1184		"api-version": APIVersion,
1185	}
1186
1187	preparer := autorest.CreatePreparer(
1188		autorest.AsContentType("application/json; charset=utf-8"),
1189		autorest.AsPut(),
1190		autorest.WithBaseURL(client.BaseURI),
1191		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
1192		autorest.WithJSON(mSDeploy),
1193		autorest.WithQueryParameters(queryParameters))
1194	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1195}
1196
1197// CreateInstanceMSDeployOperationSender sends the CreateInstanceMSDeployOperation request. The method will close the
1198// http.Response Body if it receives an error.
1199func (client AppsClient) CreateInstanceMSDeployOperationSender(req *http.Request) (future AppsCreateInstanceMSDeployOperationFuture, err error) {
1200	var resp *http.Response
1201	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1202	if err != nil {
1203		return
1204	}
1205	var azf azure.Future
1206	azf, err = azure.NewFutureFromResponse(resp)
1207	future.FutureAPI = &azf
1208	future.Result = future.result
1209	return
1210}
1211
1212// CreateInstanceMSDeployOperationResponder handles the response to the CreateInstanceMSDeployOperation request. The method always
1213// closes the http.Response Body.
1214func (client AppsClient) CreateInstanceMSDeployOperationResponder(resp *http.Response) (result MSDeployStatus, err error) {
1215	err = autorest.Respond(
1216		resp,
1217		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict),
1218		autorest.ByUnmarshallingJSON(&result),
1219		autorest.ByClosing())
1220	result.Response = autorest.Response{Response: resp}
1221	return
1222}
1223
1224// CreateInstanceMSDeployOperationSlot invoke the MSDeploy web app extension.
1225// Parameters:
1226// resourceGroupName - name of the resource group to which the resource belongs.
1227// name - name of web app.
1228// slot - name of web app slot. If not specified then will default to production slot.
1229// instanceID - ID of web app instance.
1230// mSDeploy - details of MSDeploy operation
1231func (client AppsClient) CreateInstanceMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, mSDeploy MSDeploy) (result AppsCreateInstanceMSDeployOperationSlotFuture, err error) {
1232	if tracing.IsEnabled() {
1233		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateInstanceMSDeployOperationSlot")
1234		defer func() {
1235			sc := -1
1236			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1237				sc = result.FutureAPI.Response().StatusCode
1238			}
1239			tracing.EndSpan(ctx, sc, err)
1240		}()
1241	}
1242	if err := validation.Validate([]validation.Validation{
1243		{TargetValue: resourceGroupName,
1244			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1245				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1246				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1247		return result, validation.NewError("web.AppsClient", "CreateInstanceMSDeployOperationSlot", err.Error())
1248	}
1249
1250	req, err := client.CreateInstanceMSDeployOperationSlotPreparer(ctx, resourceGroupName, name, slot, instanceID, mSDeploy)
1251	if err != nil {
1252		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperationSlot", nil, "Failure preparing request")
1253		return
1254	}
1255
1256	result, err = client.CreateInstanceMSDeployOperationSlotSender(req)
1257	if err != nil {
1258		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperationSlot", nil, "Failure sending request")
1259		return
1260	}
1261
1262	return
1263}
1264
1265// CreateInstanceMSDeployOperationSlotPreparer prepares the CreateInstanceMSDeployOperationSlot request.
1266func (client AppsClient) CreateInstanceMSDeployOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, mSDeploy MSDeploy) (*http.Request, error) {
1267	pathParameters := map[string]interface{}{
1268		"instanceId":        autorest.Encode("path", instanceID),
1269		"name":              autorest.Encode("path", name),
1270		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1271		"slot":              autorest.Encode("path", slot),
1272		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1273	}
1274
1275	const APIVersion = "2018-02-01"
1276	queryParameters := map[string]interface{}{
1277		"api-version": APIVersion,
1278	}
1279
1280	preparer := autorest.CreatePreparer(
1281		autorest.AsContentType("application/json; charset=utf-8"),
1282		autorest.AsPut(),
1283		autorest.WithBaseURL(client.BaseURI),
1284		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
1285		autorest.WithJSON(mSDeploy),
1286		autorest.WithQueryParameters(queryParameters))
1287	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1288}
1289
1290// CreateInstanceMSDeployOperationSlotSender sends the CreateInstanceMSDeployOperationSlot request. The method will close the
1291// http.Response Body if it receives an error.
1292func (client AppsClient) CreateInstanceMSDeployOperationSlotSender(req *http.Request) (future AppsCreateInstanceMSDeployOperationSlotFuture, err error) {
1293	var resp *http.Response
1294	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1295	if err != nil {
1296		return
1297	}
1298	var azf azure.Future
1299	azf, err = azure.NewFutureFromResponse(resp)
1300	future.FutureAPI = &azf
1301	future.Result = future.result
1302	return
1303}
1304
1305// CreateInstanceMSDeployOperationSlotResponder handles the response to the CreateInstanceMSDeployOperationSlot request. The method always
1306// closes the http.Response Body.
1307func (client AppsClient) CreateInstanceMSDeployOperationSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
1308	err = autorest.Respond(
1309		resp,
1310		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict),
1311		autorest.ByUnmarshallingJSON(&result),
1312		autorest.ByClosing())
1313	result.Response = autorest.Response{Response: resp}
1314	return
1315}
1316
1317// CreateMSDeployOperation invoke the MSDeploy web app extension.
1318// Parameters:
1319// resourceGroupName - name of the resource group to which the resource belongs.
1320// name - name of web app.
1321// mSDeploy - details of MSDeploy operation
1322func (client AppsClient) CreateMSDeployOperation(ctx context.Context, resourceGroupName string, name string, mSDeploy MSDeploy) (result AppsCreateMSDeployOperationFuture, err error) {
1323	if tracing.IsEnabled() {
1324		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateMSDeployOperation")
1325		defer func() {
1326			sc := -1
1327			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1328				sc = result.FutureAPI.Response().StatusCode
1329			}
1330			tracing.EndSpan(ctx, sc, err)
1331		}()
1332	}
1333	if err := validation.Validate([]validation.Validation{
1334		{TargetValue: resourceGroupName,
1335			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1336				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1337				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1338		return result, validation.NewError("web.AppsClient", "CreateMSDeployOperation", err.Error())
1339	}
1340
1341	req, err := client.CreateMSDeployOperationPreparer(ctx, resourceGroupName, name, mSDeploy)
1342	if err != nil {
1343		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperation", nil, "Failure preparing request")
1344		return
1345	}
1346
1347	result, err = client.CreateMSDeployOperationSender(req)
1348	if err != nil {
1349		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperation", nil, "Failure sending request")
1350		return
1351	}
1352
1353	return
1354}
1355
1356// CreateMSDeployOperationPreparer prepares the CreateMSDeployOperation request.
1357func (client AppsClient) CreateMSDeployOperationPreparer(ctx context.Context, resourceGroupName string, name string, mSDeploy MSDeploy) (*http.Request, error) {
1358	pathParameters := map[string]interface{}{
1359		"name":              autorest.Encode("path", name),
1360		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1361		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1362	}
1363
1364	const APIVersion = "2018-02-01"
1365	queryParameters := map[string]interface{}{
1366		"api-version": APIVersion,
1367	}
1368
1369	preparer := autorest.CreatePreparer(
1370		autorest.AsContentType("application/json; charset=utf-8"),
1371		autorest.AsPut(),
1372		autorest.WithBaseURL(client.BaseURI),
1373		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters),
1374		autorest.WithJSON(mSDeploy),
1375		autorest.WithQueryParameters(queryParameters))
1376	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1377}
1378
1379// CreateMSDeployOperationSender sends the CreateMSDeployOperation request. The method will close the
1380// http.Response Body if it receives an error.
1381func (client AppsClient) CreateMSDeployOperationSender(req *http.Request) (future AppsCreateMSDeployOperationFuture, err error) {
1382	var resp *http.Response
1383	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1384	if err != nil {
1385		return
1386	}
1387	var azf azure.Future
1388	azf, err = azure.NewFutureFromResponse(resp)
1389	future.FutureAPI = &azf
1390	future.Result = future.result
1391	return
1392}
1393
1394// CreateMSDeployOperationResponder handles the response to the CreateMSDeployOperation request. The method always
1395// closes the http.Response Body.
1396func (client AppsClient) CreateMSDeployOperationResponder(resp *http.Response) (result MSDeployStatus, err error) {
1397	err = autorest.Respond(
1398		resp,
1399		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict),
1400		autorest.ByUnmarshallingJSON(&result),
1401		autorest.ByClosing())
1402	result.Response = autorest.Response{Response: resp}
1403	return
1404}
1405
1406// CreateMSDeployOperationSlot invoke the MSDeploy web app extension.
1407// Parameters:
1408// resourceGroupName - name of the resource group to which the resource belongs.
1409// name - name of web app.
1410// slot - name of web app slot. If not specified then will default to production slot.
1411// mSDeploy - details of MSDeploy operation
1412func (client AppsClient) CreateMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, mSDeploy MSDeploy) (result AppsCreateMSDeployOperationSlotFuture, err error) {
1413	if tracing.IsEnabled() {
1414		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateMSDeployOperationSlot")
1415		defer func() {
1416			sc := -1
1417			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1418				sc = result.FutureAPI.Response().StatusCode
1419			}
1420			tracing.EndSpan(ctx, sc, err)
1421		}()
1422	}
1423	if err := validation.Validate([]validation.Validation{
1424		{TargetValue: resourceGroupName,
1425			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1426				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1427				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1428		return result, validation.NewError("web.AppsClient", "CreateMSDeployOperationSlot", err.Error())
1429	}
1430
1431	req, err := client.CreateMSDeployOperationSlotPreparer(ctx, resourceGroupName, name, slot, mSDeploy)
1432	if err != nil {
1433		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperationSlot", nil, "Failure preparing request")
1434		return
1435	}
1436
1437	result, err = client.CreateMSDeployOperationSlotSender(req)
1438	if err != nil {
1439		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperationSlot", nil, "Failure sending request")
1440		return
1441	}
1442
1443	return
1444}
1445
1446// CreateMSDeployOperationSlotPreparer prepares the CreateMSDeployOperationSlot request.
1447func (client AppsClient) CreateMSDeployOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, mSDeploy MSDeploy) (*http.Request, error) {
1448	pathParameters := map[string]interface{}{
1449		"name":              autorest.Encode("path", name),
1450		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1451		"slot":              autorest.Encode("path", slot),
1452		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1453	}
1454
1455	const APIVersion = "2018-02-01"
1456	queryParameters := map[string]interface{}{
1457		"api-version": APIVersion,
1458	}
1459
1460	preparer := autorest.CreatePreparer(
1461		autorest.AsContentType("application/json; charset=utf-8"),
1462		autorest.AsPut(),
1463		autorest.WithBaseURL(client.BaseURI),
1464		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters),
1465		autorest.WithJSON(mSDeploy),
1466		autorest.WithQueryParameters(queryParameters))
1467	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1468}
1469
1470// CreateMSDeployOperationSlotSender sends the CreateMSDeployOperationSlot request. The method will close the
1471// http.Response Body if it receives an error.
1472func (client AppsClient) CreateMSDeployOperationSlotSender(req *http.Request) (future AppsCreateMSDeployOperationSlotFuture, err error) {
1473	var resp *http.Response
1474	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1475	if err != nil {
1476		return
1477	}
1478	var azf azure.Future
1479	azf, err = azure.NewFutureFromResponse(resp)
1480	future.FutureAPI = &azf
1481	future.Result = future.result
1482	return
1483}
1484
1485// CreateMSDeployOperationSlotResponder handles the response to the CreateMSDeployOperationSlot request. The method always
1486// closes the http.Response Body.
1487func (client AppsClient) CreateMSDeployOperationSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
1488	err = autorest.Respond(
1489		resp,
1490		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict),
1491		autorest.ByUnmarshallingJSON(&result),
1492		autorest.ByClosing())
1493	result.Response = autorest.Response{Response: resp}
1494	return
1495}
1496
1497// CreateOrUpdate creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
1498// Parameters:
1499// resourceGroupName - name of the resource group to which the resource belongs.
1500// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
1501// parameter.
1502// siteEnvelope - a JSON representation of the app properties. See example.
1503func (client AppsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site) (result AppsCreateOrUpdateFuture, err error) {
1504	if tracing.IsEnabled() {
1505		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdate")
1506		defer func() {
1507			sc := -1
1508			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1509				sc = result.FutureAPI.Response().StatusCode
1510			}
1511			tracing.EndSpan(ctx, sc, err)
1512		}()
1513	}
1514	if err := validation.Validate([]validation.Validation{
1515		{TargetValue: resourceGroupName,
1516			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1517				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1518				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
1519		{TargetValue: siteEnvelope,
1520			Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false,
1521				Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false,
1522					Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false,
1523						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
1524							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
1525						}},
1526						{Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.Null, Rule: false,
1527							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
1528								{Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
1529							}},
1530					}},
1531					{Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false,
1532						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}},
1533				}}}}}); err != nil {
1534		return result, validation.NewError("web.AppsClient", "CreateOrUpdate", err.Error())
1535	}
1536
1537	req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, name, siteEnvelope)
1538	if err != nil {
1539		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdate", nil, "Failure preparing request")
1540		return
1541	}
1542
1543	result, err = client.CreateOrUpdateSender(req)
1544	if err != nil {
1545		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdate", nil, "Failure sending request")
1546		return
1547	}
1548
1549	return
1550}
1551
1552// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
1553func (client AppsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site) (*http.Request, error) {
1554	pathParameters := map[string]interface{}{
1555		"name":              autorest.Encode("path", name),
1556		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1557		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1558	}
1559
1560	const APIVersion = "2018-02-01"
1561	queryParameters := map[string]interface{}{
1562		"api-version": APIVersion,
1563	}
1564
1565	preparer := autorest.CreatePreparer(
1566		autorest.AsContentType("application/json; charset=utf-8"),
1567		autorest.AsPut(),
1568		autorest.WithBaseURL(client.BaseURI),
1569		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
1570		autorest.WithJSON(siteEnvelope),
1571		autorest.WithQueryParameters(queryParameters))
1572	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1573}
1574
1575// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
1576// http.Response Body if it receives an error.
1577func (client AppsClient) CreateOrUpdateSender(req *http.Request) (future AppsCreateOrUpdateFuture, err error) {
1578	var resp *http.Response
1579	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1580	if err != nil {
1581		return
1582	}
1583	var azf azure.Future
1584	azf, err = azure.NewFutureFromResponse(resp)
1585	future.FutureAPI = &azf
1586	future.Result = future.result
1587	return
1588}
1589
1590// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
1591// closes the http.Response Body.
1592func (client AppsClient) CreateOrUpdateResponder(resp *http.Response) (result Site, err error) {
1593	err = autorest.Respond(
1594		resp,
1595		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
1596		autorest.ByUnmarshallingJSON(&result),
1597		autorest.ByClosing())
1598	result.Response = autorest.Response{Response: resp}
1599	return
1600}
1601
1602// CreateOrUpdateConfiguration updates the configuration of an app.
1603// Parameters:
1604// resourceGroupName - name of the resource group to which the resource belongs.
1605// name - name of the app.
1606// siteConfig - JSON representation of a SiteConfig object. See example.
1607func (client AppsClient) CreateOrUpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (result SiteConfigResource, err error) {
1608	if tracing.IsEnabled() {
1609		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateConfiguration")
1610		defer func() {
1611			sc := -1
1612			if result.Response.Response != nil {
1613				sc = result.Response.Response.StatusCode
1614			}
1615			tracing.EndSpan(ctx, sc, err)
1616		}()
1617	}
1618	if err := validation.Validate([]validation.Validation{
1619		{TargetValue: resourceGroupName,
1620			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1621				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1622				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
1623		{TargetValue: siteConfig,
1624			Constraints: []validation.Constraint{{Target: "siteConfig.SiteConfig", Name: validation.Null, Rule: false,
1625				Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push", Name: validation.Null, Rule: false,
1626					Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
1627						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
1628					}},
1629					{Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.Null, Rule: false,
1630						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
1631							{Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
1632						}},
1633				}}}}}); err != nil {
1634		return result, validation.NewError("web.AppsClient", "CreateOrUpdateConfiguration", err.Error())
1635	}
1636
1637	req, err := client.CreateOrUpdateConfigurationPreparer(ctx, resourceGroupName, name, siteConfig)
1638	if err != nil {
1639		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfiguration", nil, "Failure preparing request")
1640		return
1641	}
1642
1643	resp, err := client.CreateOrUpdateConfigurationSender(req)
1644	if err != nil {
1645		result.Response = autorest.Response{Response: resp}
1646		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfiguration", resp, "Failure sending request")
1647		return
1648	}
1649
1650	result, err = client.CreateOrUpdateConfigurationResponder(resp)
1651	if err != nil {
1652		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfiguration", resp, "Failure responding to request")
1653		return
1654	}
1655
1656	return
1657}
1658
1659// CreateOrUpdateConfigurationPreparer prepares the CreateOrUpdateConfiguration request.
1660func (client AppsClient) CreateOrUpdateConfigurationPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (*http.Request, error) {
1661	pathParameters := map[string]interface{}{
1662		"name":              autorest.Encode("path", name),
1663		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1664		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1665	}
1666
1667	const APIVersion = "2018-02-01"
1668	queryParameters := map[string]interface{}{
1669		"api-version": APIVersion,
1670	}
1671
1672	preparer := autorest.CreatePreparer(
1673		autorest.AsContentType("application/json; charset=utf-8"),
1674		autorest.AsPut(),
1675		autorest.WithBaseURL(client.BaseURI),
1676		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters),
1677		autorest.WithJSON(siteConfig),
1678		autorest.WithQueryParameters(queryParameters))
1679	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1680}
1681
1682// CreateOrUpdateConfigurationSender sends the CreateOrUpdateConfiguration request. The method will close the
1683// http.Response Body if it receives an error.
1684func (client AppsClient) CreateOrUpdateConfigurationSender(req *http.Request) (*http.Response, error) {
1685	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
1686}
1687
1688// CreateOrUpdateConfigurationResponder handles the response to the CreateOrUpdateConfiguration request. The method always
1689// closes the http.Response Body.
1690func (client AppsClient) CreateOrUpdateConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) {
1691	err = autorest.Respond(
1692		resp,
1693		azure.WithErrorUnlessStatusCode(http.StatusOK),
1694		autorest.ByUnmarshallingJSON(&result),
1695		autorest.ByClosing())
1696	result.Response = autorest.Response{Response: resp}
1697	return
1698}
1699
1700// CreateOrUpdateConfigurationSlot updates the configuration of an app.
1701// Parameters:
1702// resourceGroupName - name of the resource group to which the resource belongs.
1703// name - name of the app.
1704// siteConfig - JSON representation of a SiteConfig object. See example.
1705// slot - name of the deployment slot. If a slot is not specified, the API will update configuration for the
1706// production slot.
1707func (client AppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (result SiteConfigResource, err error) {
1708	if tracing.IsEnabled() {
1709		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateConfigurationSlot")
1710		defer func() {
1711			sc := -1
1712			if result.Response.Response != nil {
1713				sc = result.Response.Response.StatusCode
1714			}
1715			tracing.EndSpan(ctx, sc, err)
1716		}()
1717	}
1718	if err := validation.Validate([]validation.Validation{
1719		{TargetValue: resourceGroupName,
1720			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1721				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1722				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
1723		{TargetValue: siteConfig,
1724			Constraints: []validation.Constraint{{Target: "siteConfig.SiteConfig", Name: validation.Null, Rule: false,
1725				Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push", Name: validation.Null, Rule: false,
1726					Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
1727						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
1728					}},
1729					{Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.Null, Rule: false,
1730						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
1731							{Target: "siteConfig.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
1732						}},
1733				}}}}}); err != nil {
1734		return result, validation.NewError("web.AppsClient", "CreateOrUpdateConfigurationSlot", err.Error())
1735	}
1736
1737	req, err := client.CreateOrUpdateConfigurationSlotPreparer(ctx, resourceGroupName, name, siteConfig, slot)
1738	if err != nil {
1739		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfigurationSlot", nil, "Failure preparing request")
1740		return
1741	}
1742
1743	resp, err := client.CreateOrUpdateConfigurationSlotSender(req)
1744	if err != nil {
1745		result.Response = autorest.Response{Response: resp}
1746		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfigurationSlot", resp, "Failure sending request")
1747		return
1748	}
1749
1750	result, err = client.CreateOrUpdateConfigurationSlotResponder(resp)
1751	if err != nil {
1752		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfigurationSlot", resp, "Failure responding to request")
1753		return
1754	}
1755
1756	return
1757}
1758
1759// CreateOrUpdateConfigurationSlotPreparer prepares the CreateOrUpdateConfigurationSlot request.
1760func (client AppsClient) CreateOrUpdateConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (*http.Request, error) {
1761	pathParameters := map[string]interface{}{
1762		"name":              autorest.Encode("path", name),
1763		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1764		"slot":              autorest.Encode("path", slot),
1765		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1766	}
1767
1768	const APIVersion = "2018-02-01"
1769	queryParameters := map[string]interface{}{
1770		"api-version": APIVersion,
1771	}
1772
1773	preparer := autorest.CreatePreparer(
1774		autorest.AsContentType("application/json; charset=utf-8"),
1775		autorest.AsPut(),
1776		autorest.WithBaseURL(client.BaseURI),
1777		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters),
1778		autorest.WithJSON(siteConfig),
1779		autorest.WithQueryParameters(queryParameters))
1780	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1781}
1782
1783// CreateOrUpdateConfigurationSlotSender sends the CreateOrUpdateConfigurationSlot request. The method will close the
1784// http.Response Body if it receives an error.
1785func (client AppsClient) CreateOrUpdateConfigurationSlotSender(req *http.Request) (*http.Response, error) {
1786	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
1787}
1788
1789// CreateOrUpdateConfigurationSlotResponder handles the response to the CreateOrUpdateConfigurationSlot request. The method always
1790// closes the http.Response Body.
1791func (client AppsClient) CreateOrUpdateConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
1792	err = autorest.Respond(
1793		resp,
1794		azure.WithErrorUnlessStatusCode(http.StatusOK),
1795		autorest.ByUnmarshallingJSON(&result),
1796		autorest.ByClosing())
1797	result.Response = autorest.Response{Response: resp}
1798	return
1799}
1800
1801// CreateOrUpdateDomainOwnershipIdentifier creates a domain ownership identifier for web app, or updates an existing
1802// ownership identifier.
1803// Parameters:
1804// resourceGroupName - name of the resource group to which the resource belongs.
1805// name - name of the app.
1806// domainOwnershipIdentifierName - name of domain ownership identifier.
1807// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
1808func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (result Identifier, err error) {
1809	if tracing.IsEnabled() {
1810		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateDomainOwnershipIdentifier")
1811		defer func() {
1812			sc := -1
1813			if result.Response.Response != nil {
1814				sc = result.Response.Response.StatusCode
1815			}
1816			tracing.EndSpan(ctx, sc, err)
1817		}()
1818	}
1819	if err := validation.Validate([]validation.Validation{
1820		{TargetValue: resourceGroupName,
1821			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1822				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1823				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1824		return result, validation.NewError("web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", err.Error())
1825	}
1826
1827	req, err := client.CreateOrUpdateDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier)
1828	if err != nil {
1829		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", nil, "Failure preparing request")
1830		return
1831	}
1832
1833	resp, err := client.CreateOrUpdateDomainOwnershipIdentifierSender(req)
1834	if err != nil {
1835		result.Response = autorest.Response{Response: resp}
1836		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", resp, "Failure sending request")
1837		return
1838	}
1839
1840	result, err = client.CreateOrUpdateDomainOwnershipIdentifierResponder(resp)
1841	if err != nil {
1842		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", resp, "Failure responding to request")
1843		return
1844	}
1845
1846	return
1847}
1848
1849// CreateOrUpdateDomainOwnershipIdentifierPreparer prepares the CreateOrUpdateDomainOwnershipIdentifier request.
1850func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (*http.Request, error) {
1851	pathParameters := map[string]interface{}{
1852		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
1853		"name":                          autorest.Encode("path", name),
1854		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
1855		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
1856	}
1857
1858	const APIVersion = "2018-02-01"
1859	queryParameters := map[string]interface{}{
1860		"api-version": APIVersion,
1861	}
1862
1863	preparer := autorest.CreatePreparer(
1864		autorest.AsContentType("application/json; charset=utf-8"),
1865		autorest.AsPut(),
1866		autorest.WithBaseURL(client.BaseURI),
1867		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
1868		autorest.WithJSON(domainOwnershipIdentifier),
1869		autorest.WithQueryParameters(queryParameters))
1870	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1871}
1872
1873// CreateOrUpdateDomainOwnershipIdentifierSender sends the CreateOrUpdateDomainOwnershipIdentifier request. The method will close the
1874// http.Response Body if it receives an error.
1875func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
1876	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
1877}
1878
1879// CreateOrUpdateDomainOwnershipIdentifierResponder handles the response to the CreateOrUpdateDomainOwnershipIdentifier request. The method always
1880// closes the http.Response Body.
1881func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) {
1882	err = autorest.Respond(
1883		resp,
1884		azure.WithErrorUnlessStatusCode(http.StatusOK),
1885		autorest.ByUnmarshallingJSON(&result),
1886		autorest.ByClosing())
1887	result.Response = autorest.Response{Response: resp}
1888	return
1889}
1890
1891// CreateOrUpdateDomainOwnershipIdentifierSlot creates a domain ownership identifier for web app, or updates an
1892// existing ownership identifier.
1893// Parameters:
1894// resourceGroupName - name of the resource group to which the resource belongs.
1895// name - name of the app.
1896// domainOwnershipIdentifierName - name of domain ownership identifier.
1897// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
1898// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
1899// production slot.
1900func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (result Identifier, err error) {
1901	if tracing.IsEnabled() {
1902		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot")
1903		defer func() {
1904			sc := -1
1905			if result.Response.Response != nil {
1906				sc = result.Response.Response.StatusCode
1907			}
1908			tracing.EndSpan(ctx, sc, err)
1909		}()
1910	}
1911	if err := validation.Validate([]validation.Validation{
1912		{TargetValue: resourceGroupName,
1913			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1914				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1915				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1916		return result, validation.NewError("web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", err.Error())
1917	}
1918
1919	req, err := client.CreateOrUpdateDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, slot)
1920	if err != nil {
1921		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
1922		return
1923	}
1924
1925	resp, err := client.CreateOrUpdateDomainOwnershipIdentifierSlotSender(req)
1926	if err != nil {
1927		result.Response = autorest.Response{Response: resp}
1928		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", resp, "Failure sending request")
1929		return
1930	}
1931
1932	result, err = client.CreateOrUpdateDomainOwnershipIdentifierSlotResponder(resp)
1933	if err != nil {
1934		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
1935		return
1936	}
1937
1938	return
1939}
1940
1941// CreateOrUpdateDomainOwnershipIdentifierSlotPreparer prepares the CreateOrUpdateDomainOwnershipIdentifierSlot request.
1942func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (*http.Request, error) {
1943	pathParameters := map[string]interface{}{
1944		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
1945		"name":                          autorest.Encode("path", name),
1946		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
1947		"slot":                          autorest.Encode("path", slot),
1948		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
1949	}
1950
1951	const APIVersion = "2018-02-01"
1952	queryParameters := map[string]interface{}{
1953		"api-version": APIVersion,
1954	}
1955
1956	preparer := autorest.CreatePreparer(
1957		autorest.AsContentType("application/json; charset=utf-8"),
1958		autorest.AsPut(),
1959		autorest.WithBaseURL(client.BaseURI),
1960		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
1961		autorest.WithJSON(domainOwnershipIdentifier),
1962		autorest.WithQueryParameters(queryParameters))
1963	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1964}
1965
1966// CreateOrUpdateDomainOwnershipIdentifierSlotSender sends the CreateOrUpdateDomainOwnershipIdentifierSlot request. The method will close the
1967// http.Response Body if it receives an error.
1968func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
1969	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
1970}
1971
1972// CreateOrUpdateDomainOwnershipIdentifierSlotResponder handles the response to the CreateOrUpdateDomainOwnershipIdentifierSlot request. The method always
1973// closes the http.Response Body.
1974func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) {
1975	err = autorest.Respond(
1976		resp,
1977		azure.WithErrorUnlessStatusCode(http.StatusOK),
1978		autorest.ByUnmarshallingJSON(&result),
1979		autorest.ByClosing())
1980	result.Response = autorest.Response{Response: resp}
1981	return
1982}
1983
1984// CreateOrUpdateFunctionSecret add or update a function secret.
1985// Parameters:
1986// resourceGroupName - name of the resource group to which the resource belongs.
1987// name - site name.
1988// functionName - the name of the function.
1989// keyName - the name of the key.
1990// key - the key to create or update
1991func (client AppsClient) CreateOrUpdateFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo) (result KeyInfo, err error) {
1992	if tracing.IsEnabled() {
1993		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateFunctionSecret")
1994		defer func() {
1995			sc := -1
1996			if result.Response.Response != nil {
1997				sc = result.Response.Response.StatusCode
1998			}
1999			tracing.EndSpan(ctx, sc, err)
2000		}()
2001	}
2002	if err := validation.Validate([]validation.Validation{
2003		{TargetValue: resourceGroupName,
2004			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2005				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2006				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2007		return result, validation.NewError("web.AppsClient", "CreateOrUpdateFunctionSecret", err.Error())
2008	}
2009
2010	req, err := client.CreateOrUpdateFunctionSecretPreparer(ctx, resourceGroupName, name, functionName, keyName, key)
2011	if err != nil {
2012		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", nil, "Failure preparing request")
2013		return
2014	}
2015
2016	resp, err := client.CreateOrUpdateFunctionSecretSender(req)
2017	if err != nil {
2018		result.Response = autorest.Response{Response: resp}
2019		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", resp, "Failure sending request")
2020		return
2021	}
2022
2023	result, err = client.CreateOrUpdateFunctionSecretResponder(resp)
2024	if err != nil {
2025		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", resp, "Failure responding to request")
2026		return
2027	}
2028
2029	return
2030}
2031
2032// CreateOrUpdateFunctionSecretPreparer prepares the CreateOrUpdateFunctionSecret request.
2033func (client AppsClient) CreateOrUpdateFunctionSecretPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo) (*http.Request, error) {
2034	pathParameters := map[string]interface{}{
2035		"functionName":      autorest.Encode("path", functionName),
2036		"keyName":           autorest.Encode("path", keyName),
2037		"name":              autorest.Encode("path", name),
2038		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2039		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2040	}
2041
2042	const APIVersion = "2018-02-01"
2043	queryParameters := map[string]interface{}{
2044		"api-version": APIVersion,
2045	}
2046
2047	preparer := autorest.CreatePreparer(
2048		autorest.AsContentType("application/json; charset=utf-8"),
2049		autorest.AsPut(),
2050		autorest.WithBaseURL(client.BaseURI),
2051		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}", pathParameters),
2052		autorest.WithJSON(key),
2053		autorest.WithQueryParameters(queryParameters))
2054	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2055}
2056
2057// CreateOrUpdateFunctionSecretSender sends the CreateOrUpdateFunctionSecret request. The method will close the
2058// http.Response Body if it receives an error.
2059func (client AppsClient) CreateOrUpdateFunctionSecretSender(req *http.Request) (*http.Response, error) {
2060	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2061}
2062
2063// CreateOrUpdateFunctionSecretResponder handles the response to the CreateOrUpdateFunctionSecret request. The method always
2064// closes the http.Response Body.
2065func (client AppsClient) CreateOrUpdateFunctionSecretResponder(resp *http.Response) (result KeyInfo, err error) {
2066	err = autorest.Respond(
2067		resp,
2068		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
2069		autorest.ByUnmarshallingJSON(&result),
2070		autorest.ByClosing())
2071	result.Response = autorest.Response{Response: resp}
2072	return
2073}
2074
2075// CreateOrUpdateFunctionSecretSlot add or update a function secret.
2076// Parameters:
2077// resourceGroupName - name of the resource group to which the resource belongs.
2078// name - site name.
2079// functionName - the name of the function.
2080// keyName - the name of the key.
2081// slot - name of the deployment slot.
2082// key - the key to create or update
2083func (client AppsClient) CreateOrUpdateFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo) (result KeyInfo, err error) {
2084	if tracing.IsEnabled() {
2085		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateFunctionSecretSlot")
2086		defer func() {
2087			sc := -1
2088			if result.Response.Response != nil {
2089				sc = result.Response.Response.StatusCode
2090			}
2091			tracing.EndSpan(ctx, sc, err)
2092		}()
2093	}
2094	if err := validation.Validate([]validation.Validation{
2095		{TargetValue: resourceGroupName,
2096			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2097				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2098				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2099		return result, validation.NewError("web.AppsClient", "CreateOrUpdateFunctionSecretSlot", err.Error())
2100	}
2101
2102	req, err := client.CreateOrUpdateFunctionSecretSlotPreparer(ctx, resourceGroupName, name, functionName, keyName, slot, key)
2103	if err != nil {
2104		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", nil, "Failure preparing request")
2105		return
2106	}
2107
2108	resp, err := client.CreateOrUpdateFunctionSecretSlotSender(req)
2109	if err != nil {
2110		result.Response = autorest.Response{Response: resp}
2111		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", resp, "Failure sending request")
2112		return
2113	}
2114
2115	result, err = client.CreateOrUpdateFunctionSecretSlotResponder(resp)
2116	if err != nil {
2117		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", resp, "Failure responding to request")
2118		return
2119	}
2120
2121	return
2122}
2123
2124// CreateOrUpdateFunctionSecretSlotPreparer prepares the CreateOrUpdateFunctionSecretSlot request.
2125func (client AppsClient) CreateOrUpdateFunctionSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo) (*http.Request, error) {
2126	pathParameters := map[string]interface{}{
2127		"functionName":      autorest.Encode("path", functionName),
2128		"keyName":           autorest.Encode("path", keyName),
2129		"name":              autorest.Encode("path", name),
2130		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2131		"slot":              autorest.Encode("path", slot),
2132		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2133	}
2134
2135	const APIVersion = "2018-02-01"
2136	queryParameters := map[string]interface{}{
2137		"api-version": APIVersion,
2138	}
2139
2140	preparer := autorest.CreatePreparer(
2141		autorest.AsContentType("application/json; charset=utf-8"),
2142		autorest.AsPut(),
2143		autorest.WithBaseURL(client.BaseURI),
2144		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}", pathParameters),
2145		autorest.WithJSON(key),
2146		autorest.WithQueryParameters(queryParameters))
2147	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2148}
2149
2150// CreateOrUpdateFunctionSecretSlotSender sends the CreateOrUpdateFunctionSecretSlot request. The method will close the
2151// http.Response Body if it receives an error.
2152func (client AppsClient) CreateOrUpdateFunctionSecretSlotSender(req *http.Request) (*http.Response, error) {
2153	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2154}
2155
2156// CreateOrUpdateFunctionSecretSlotResponder handles the response to the CreateOrUpdateFunctionSecretSlot request. The method always
2157// closes the http.Response Body.
2158func (client AppsClient) CreateOrUpdateFunctionSecretSlotResponder(resp *http.Response) (result KeyInfo, err error) {
2159	err = autorest.Respond(
2160		resp,
2161		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
2162		autorest.ByUnmarshallingJSON(&result),
2163		autorest.ByClosing())
2164	result.Response = autorest.Response{Response: resp}
2165	return
2166}
2167
2168// CreateOrUpdateHostNameBinding creates a hostname binding for an app.
2169// Parameters:
2170// resourceGroupName - name of the resource group to which the resource belongs.
2171// name - name of the app.
2172// hostName - hostname in the hostname binding.
2173// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object.
2174func (client AppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (result HostNameBinding, err error) {
2175	if tracing.IsEnabled() {
2176		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBinding")
2177		defer func() {
2178			sc := -1
2179			if result.Response.Response != nil {
2180				sc = result.Response.Response.StatusCode
2181			}
2182			tracing.EndSpan(ctx, sc, err)
2183		}()
2184	}
2185	if err := validation.Validate([]validation.Validation{
2186		{TargetValue: resourceGroupName,
2187			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2188				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2189				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2190		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostNameBinding", err.Error())
2191	}
2192
2193	req, err := client.CreateOrUpdateHostNameBindingPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding)
2194	if err != nil {
2195		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", nil, "Failure preparing request")
2196		return
2197	}
2198
2199	resp, err := client.CreateOrUpdateHostNameBindingSender(req)
2200	if err != nil {
2201		result.Response = autorest.Response{Response: resp}
2202		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure sending request")
2203		return
2204	}
2205
2206	result, err = client.CreateOrUpdateHostNameBindingResponder(resp)
2207	if err != nil {
2208		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure responding to request")
2209		return
2210	}
2211
2212	return
2213}
2214
2215// CreateOrUpdateHostNameBindingPreparer prepares the CreateOrUpdateHostNameBinding request.
2216func (client AppsClient) CreateOrUpdateHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (*http.Request, error) {
2217	pathParameters := map[string]interface{}{
2218		"hostName":          autorest.Encode("path", hostName),
2219		"name":              autorest.Encode("path", name),
2220		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2221		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2222	}
2223
2224	const APIVersion = "2018-02-01"
2225	queryParameters := map[string]interface{}{
2226		"api-version": APIVersion,
2227	}
2228
2229	preparer := autorest.CreatePreparer(
2230		autorest.AsContentType("application/json; charset=utf-8"),
2231		autorest.AsPut(),
2232		autorest.WithBaseURL(client.BaseURI),
2233		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters),
2234		autorest.WithJSON(hostNameBinding),
2235		autorest.WithQueryParameters(queryParameters))
2236	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2237}
2238
2239// CreateOrUpdateHostNameBindingSender sends the CreateOrUpdateHostNameBinding request. The method will close the
2240// http.Response Body if it receives an error.
2241func (client AppsClient) CreateOrUpdateHostNameBindingSender(req *http.Request) (*http.Response, error) {
2242	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2243}
2244
2245// CreateOrUpdateHostNameBindingResponder handles the response to the CreateOrUpdateHostNameBinding request. The method always
2246// closes the http.Response Body.
2247func (client AppsClient) CreateOrUpdateHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) {
2248	err = autorest.Respond(
2249		resp,
2250		azure.WithErrorUnlessStatusCode(http.StatusOK),
2251		autorest.ByUnmarshallingJSON(&result),
2252		autorest.ByClosing())
2253	result.Response = autorest.Response{Response: resp}
2254	return
2255}
2256
2257// CreateOrUpdateHostNameBindingSlot creates a hostname binding for an app.
2258// Parameters:
2259// resourceGroupName - name of the resource group to which the resource belongs.
2260// name - name of the app.
2261// hostName - hostname in the hostname binding.
2262// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object.
2263// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the
2264// production slot.
2265func (client AppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (result HostNameBinding, err error) {
2266	if tracing.IsEnabled() {
2267		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBindingSlot")
2268		defer func() {
2269			sc := -1
2270			if result.Response.Response != nil {
2271				sc = result.Response.Response.StatusCode
2272			}
2273			tracing.EndSpan(ctx, sc, err)
2274		}()
2275	}
2276	if err := validation.Validate([]validation.Validation{
2277		{TargetValue: resourceGroupName,
2278			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2279				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2280				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2281		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostNameBindingSlot", err.Error())
2282	}
2283
2284	req, err := client.CreateOrUpdateHostNameBindingSlotPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding, slot)
2285	if err != nil {
2286		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", nil, "Failure preparing request")
2287		return
2288	}
2289
2290	resp, err := client.CreateOrUpdateHostNameBindingSlotSender(req)
2291	if err != nil {
2292		result.Response = autorest.Response{Response: resp}
2293		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure sending request")
2294		return
2295	}
2296
2297	result, err = client.CreateOrUpdateHostNameBindingSlotResponder(resp)
2298	if err != nil {
2299		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure responding to request")
2300		return
2301	}
2302
2303	return
2304}
2305
2306// CreateOrUpdateHostNameBindingSlotPreparer prepares the CreateOrUpdateHostNameBindingSlot request.
2307func (client AppsClient) CreateOrUpdateHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (*http.Request, error) {
2308	pathParameters := map[string]interface{}{
2309		"hostName":          autorest.Encode("path", hostName),
2310		"name":              autorest.Encode("path", name),
2311		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2312		"slot":              autorest.Encode("path", slot),
2313		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2314	}
2315
2316	const APIVersion = "2018-02-01"
2317	queryParameters := map[string]interface{}{
2318		"api-version": APIVersion,
2319	}
2320
2321	preparer := autorest.CreatePreparer(
2322		autorest.AsContentType("application/json; charset=utf-8"),
2323		autorest.AsPut(),
2324		autorest.WithBaseURL(client.BaseURI),
2325		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters),
2326		autorest.WithJSON(hostNameBinding),
2327		autorest.WithQueryParameters(queryParameters))
2328	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2329}
2330
2331// CreateOrUpdateHostNameBindingSlotSender sends the CreateOrUpdateHostNameBindingSlot request. The method will close the
2332// http.Response Body if it receives an error.
2333func (client AppsClient) CreateOrUpdateHostNameBindingSlotSender(req *http.Request) (*http.Response, error) {
2334	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2335}
2336
2337// CreateOrUpdateHostNameBindingSlotResponder handles the response to the CreateOrUpdateHostNameBindingSlot request. The method always
2338// closes the http.Response Body.
2339func (client AppsClient) CreateOrUpdateHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) {
2340	err = autorest.Respond(
2341		resp,
2342		azure.WithErrorUnlessStatusCode(http.StatusOK),
2343		autorest.ByUnmarshallingJSON(&result),
2344		autorest.ByClosing())
2345	result.Response = autorest.Response{Response: resp}
2346	return
2347}
2348
2349// CreateOrUpdateHostSecret add or update a host level secret.
2350// Parameters:
2351// resourceGroupName - name of the resource group to which the resource belongs.
2352// name - site name.
2353// keyType - the type of host key.
2354// keyName - the name of the key.
2355// key - the key to create or update
2356func (client AppsClient) CreateOrUpdateHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo) (result KeyInfo, err error) {
2357	if tracing.IsEnabled() {
2358		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostSecret")
2359		defer func() {
2360			sc := -1
2361			if result.Response.Response != nil {
2362				sc = result.Response.Response.StatusCode
2363			}
2364			tracing.EndSpan(ctx, sc, err)
2365		}()
2366	}
2367	if err := validation.Validate([]validation.Validation{
2368		{TargetValue: resourceGroupName,
2369			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2370				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2371				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2372		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostSecret", err.Error())
2373	}
2374
2375	req, err := client.CreateOrUpdateHostSecretPreparer(ctx, resourceGroupName, name, keyType, keyName, key)
2376	if err != nil {
2377		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", nil, "Failure preparing request")
2378		return
2379	}
2380
2381	resp, err := client.CreateOrUpdateHostSecretSender(req)
2382	if err != nil {
2383		result.Response = autorest.Response{Response: resp}
2384		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", resp, "Failure sending request")
2385		return
2386	}
2387
2388	result, err = client.CreateOrUpdateHostSecretResponder(resp)
2389	if err != nil {
2390		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", resp, "Failure responding to request")
2391		return
2392	}
2393
2394	return
2395}
2396
2397// CreateOrUpdateHostSecretPreparer prepares the CreateOrUpdateHostSecret request.
2398func (client AppsClient) CreateOrUpdateHostSecretPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo) (*http.Request, error) {
2399	pathParameters := map[string]interface{}{
2400		"keyName":           autorest.Encode("path", keyName),
2401		"keyType":           autorest.Encode("path", keyType),
2402		"name":              autorest.Encode("path", name),
2403		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2404		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2405	}
2406
2407	const APIVersion = "2018-02-01"
2408	queryParameters := map[string]interface{}{
2409		"api-version": APIVersion,
2410	}
2411
2412	preparer := autorest.CreatePreparer(
2413		autorest.AsContentType("application/json; charset=utf-8"),
2414		autorest.AsPut(),
2415		autorest.WithBaseURL(client.BaseURI),
2416		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}", pathParameters),
2417		autorest.WithJSON(key),
2418		autorest.WithQueryParameters(queryParameters))
2419	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2420}
2421
2422// CreateOrUpdateHostSecretSender sends the CreateOrUpdateHostSecret request. The method will close the
2423// http.Response Body if it receives an error.
2424func (client AppsClient) CreateOrUpdateHostSecretSender(req *http.Request) (*http.Response, error) {
2425	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2426}
2427
2428// CreateOrUpdateHostSecretResponder handles the response to the CreateOrUpdateHostSecret request. The method always
2429// closes the http.Response Body.
2430func (client AppsClient) CreateOrUpdateHostSecretResponder(resp *http.Response) (result KeyInfo, err error) {
2431	err = autorest.Respond(
2432		resp,
2433		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
2434		autorest.ByUnmarshallingJSON(&result),
2435		autorest.ByClosing())
2436	result.Response = autorest.Response{Response: resp}
2437	return
2438}
2439
2440// CreateOrUpdateHostSecretSlot add or update a host level secret.
2441// Parameters:
2442// resourceGroupName - name of the resource group to which the resource belongs.
2443// name - site name.
2444// keyType - the type of host key.
2445// keyName - the name of the key.
2446// slot - name of the deployment slot.
2447// key - the key to create or update
2448func (client AppsClient) CreateOrUpdateHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo) (result KeyInfo, err error) {
2449	if tracing.IsEnabled() {
2450		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostSecretSlot")
2451		defer func() {
2452			sc := -1
2453			if result.Response.Response != nil {
2454				sc = result.Response.Response.StatusCode
2455			}
2456			tracing.EndSpan(ctx, sc, err)
2457		}()
2458	}
2459	if err := validation.Validate([]validation.Validation{
2460		{TargetValue: resourceGroupName,
2461			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2462				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2463				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2464		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostSecretSlot", err.Error())
2465	}
2466
2467	req, err := client.CreateOrUpdateHostSecretSlotPreparer(ctx, resourceGroupName, name, keyType, keyName, slot, key)
2468	if err != nil {
2469		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", nil, "Failure preparing request")
2470		return
2471	}
2472
2473	resp, err := client.CreateOrUpdateHostSecretSlotSender(req)
2474	if err != nil {
2475		result.Response = autorest.Response{Response: resp}
2476		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", resp, "Failure sending request")
2477		return
2478	}
2479
2480	result, err = client.CreateOrUpdateHostSecretSlotResponder(resp)
2481	if err != nil {
2482		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", resp, "Failure responding to request")
2483		return
2484	}
2485
2486	return
2487}
2488
2489// CreateOrUpdateHostSecretSlotPreparer prepares the CreateOrUpdateHostSecretSlot request.
2490func (client AppsClient) CreateOrUpdateHostSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo) (*http.Request, error) {
2491	pathParameters := map[string]interface{}{
2492		"keyName":           autorest.Encode("path", keyName),
2493		"keyType":           autorest.Encode("path", keyType),
2494		"name":              autorest.Encode("path", name),
2495		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2496		"slot":              autorest.Encode("path", slot),
2497		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2498	}
2499
2500	const APIVersion = "2018-02-01"
2501	queryParameters := map[string]interface{}{
2502		"api-version": APIVersion,
2503	}
2504
2505	preparer := autorest.CreatePreparer(
2506		autorest.AsContentType("application/json; charset=utf-8"),
2507		autorest.AsPut(),
2508		autorest.WithBaseURL(client.BaseURI),
2509		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}", pathParameters),
2510		autorest.WithJSON(key),
2511		autorest.WithQueryParameters(queryParameters))
2512	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2513}
2514
2515// CreateOrUpdateHostSecretSlotSender sends the CreateOrUpdateHostSecretSlot request. The method will close the
2516// http.Response Body if it receives an error.
2517func (client AppsClient) CreateOrUpdateHostSecretSlotSender(req *http.Request) (*http.Response, error) {
2518	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2519}
2520
2521// CreateOrUpdateHostSecretSlotResponder handles the response to the CreateOrUpdateHostSecretSlot request. The method always
2522// closes the http.Response Body.
2523func (client AppsClient) CreateOrUpdateHostSecretSlotResponder(resp *http.Response) (result KeyInfo, err error) {
2524	err = autorest.Respond(
2525		resp,
2526		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
2527		autorest.ByUnmarshallingJSON(&result),
2528		autorest.ByClosing())
2529	result.Response = autorest.Response{Response: resp}
2530	return
2531}
2532
2533// CreateOrUpdateHybridConnection creates a new Hybrid Connection using a Service Bus relay.
2534// Parameters:
2535// resourceGroupName - name of the resource group to which the resource belongs.
2536// name - the name of the web app.
2537// namespaceName - the namespace for this hybrid connection.
2538// relayName - the relay name for this hybrid connection.
2539// connectionEnvelope - the details of the hybrid connection.
2540func (client AppsClient) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) {
2541	if tracing.IsEnabled() {
2542		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnection")
2543		defer func() {
2544			sc := -1
2545			if result.Response.Response != nil {
2546				sc = result.Response.Response.StatusCode
2547			}
2548			tracing.EndSpan(ctx, sc, err)
2549		}()
2550	}
2551	if err := validation.Validate([]validation.Validation{
2552		{TargetValue: resourceGroupName,
2553			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2554				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2555				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2556		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHybridConnection", err.Error())
2557	}
2558
2559	req, err := client.CreateOrUpdateHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope)
2560	if err != nil {
2561		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", nil, "Failure preparing request")
2562		return
2563	}
2564
2565	resp, err := client.CreateOrUpdateHybridConnectionSender(req)
2566	if err != nil {
2567		result.Response = autorest.Response{Response: resp}
2568		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure sending request")
2569		return
2570	}
2571
2572	result, err = client.CreateOrUpdateHybridConnectionResponder(resp)
2573	if err != nil {
2574		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure responding to request")
2575		return
2576	}
2577
2578	return
2579}
2580
2581// CreateOrUpdateHybridConnectionPreparer prepares the CreateOrUpdateHybridConnection request.
2582func (client AppsClient) CreateOrUpdateHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (*http.Request, error) {
2583	pathParameters := map[string]interface{}{
2584		"name":              autorest.Encode("path", name),
2585		"namespaceName":     autorest.Encode("path", namespaceName),
2586		"relayName":         autorest.Encode("path", relayName),
2587		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2588		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2589	}
2590
2591	const APIVersion = "2018-02-01"
2592	queryParameters := map[string]interface{}{
2593		"api-version": APIVersion,
2594	}
2595
2596	preparer := autorest.CreatePreparer(
2597		autorest.AsContentType("application/json; charset=utf-8"),
2598		autorest.AsPut(),
2599		autorest.WithBaseURL(client.BaseURI),
2600		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
2601		autorest.WithJSON(connectionEnvelope),
2602		autorest.WithQueryParameters(queryParameters))
2603	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2604}
2605
2606// CreateOrUpdateHybridConnectionSender sends the CreateOrUpdateHybridConnection request. The method will close the
2607// http.Response Body if it receives an error.
2608func (client AppsClient) CreateOrUpdateHybridConnectionSender(req *http.Request) (*http.Response, error) {
2609	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2610}
2611
2612// CreateOrUpdateHybridConnectionResponder handles the response to the CreateOrUpdateHybridConnection request. The method always
2613// closes the http.Response Body.
2614func (client AppsClient) CreateOrUpdateHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) {
2615	err = autorest.Respond(
2616		resp,
2617		azure.WithErrorUnlessStatusCode(http.StatusOK),
2618		autorest.ByUnmarshallingJSON(&result),
2619		autorest.ByClosing())
2620	result.Response = autorest.Response{Response: resp}
2621	return
2622}
2623
2624// CreateOrUpdateHybridConnectionSlot creates a new Hybrid Connection using a Service Bus relay.
2625// Parameters:
2626// resourceGroupName - name of the resource group to which the resource belongs.
2627// name - the name of the web app.
2628// namespaceName - the namespace for this hybrid connection.
2629// relayName - the relay name for this hybrid connection.
2630// connectionEnvelope - the details of the hybrid connection.
2631// slot - the name of the slot for the web app.
2632func (client AppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) {
2633	if tracing.IsEnabled() {
2634		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnectionSlot")
2635		defer func() {
2636			sc := -1
2637			if result.Response.Response != nil {
2638				sc = result.Response.Response.StatusCode
2639			}
2640			tracing.EndSpan(ctx, sc, err)
2641		}()
2642	}
2643	if err := validation.Validate([]validation.Validation{
2644		{TargetValue: resourceGroupName,
2645			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2646				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2647				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2648		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHybridConnectionSlot", err.Error())
2649	}
2650
2651	req, err := client.CreateOrUpdateHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot)
2652	if err != nil {
2653		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", nil, "Failure preparing request")
2654		return
2655	}
2656
2657	resp, err := client.CreateOrUpdateHybridConnectionSlotSender(req)
2658	if err != nil {
2659		result.Response = autorest.Response{Response: resp}
2660		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure sending request")
2661		return
2662	}
2663
2664	result, err = client.CreateOrUpdateHybridConnectionSlotResponder(resp)
2665	if err != nil {
2666		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure responding to request")
2667		return
2668	}
2669
2670	return
2671}
2672
2673// CreateOrUpdateHybridConnectionSlotPreparer prepares the CreateOrUpdateHybridConnectionSlot request.
2674func (client AppsClient) CreateOrUpdateHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (*http.Request, error) {
2675	pathParameters := map[string]interface{}{
2676		"name":              autorest.Encode("path", name),
2677		"namespaceName":     autorest.Encode("path", namespaceName),
2678		"relayName":         autorest.Encode("path", relayName),
2679		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2680		"slot":              autorest.Encode("path", slot),
2681		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2682	}
2683
2684	const APIVersion = "2018-02-01"
2685	queryParameters := map[string]interface{}{
2686		"api-version": APIVersion,
2687	}
2688
2689	preparer := autorest.CreatePreparer(
2690		autorest.AsContentType("application/json; charset=utf-8"),
2691		autorest.AsPut(),
2692		autorest.WithBaseURL(client.BaseURI),
2693		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
2694		autorest.WithJSON(connectionEnvelope),
2695		autorest.WithQueryParameters(queryParameters))
2696	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2697}
2698
2699// CreateOrUpdateHybridConnectionSlotSender sends the CreateOrUpdateHybridConnectionSlot request. The method will close the
2700// http.Response Body if it receives an error.
2701func (client AppsClient) CreateOrUpdateHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
2702	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2703}
2704
2705// CreateOrUpdateHybridConnectionSlotResponder handles the response to the CreateOrUpdateHybridConnectionSlot request. The method always
2706// closes the http.Response Body.
2707func (client AppsClient) CreateOrUpdateHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) {
2708	err = autorest.Respond(
2709		resp,
2710		azure.WithErrorUnlessStatusCode(http.StatusOK),
2711		autorest.ByUnmarshallingJSON(&result),
2712		autorest.ByClosing())
2713	result.Response = autorest.Response{Response: resp}
2714	return
2715}
2716
2717// CreateOrUpdatePublicCertificate creates a hostname binding for an app.
2718// Parameters:
2719// resourceGroupName - name of the resource group to which the resource belongs.
2720// name - name of the app.
2721// publicCertificateName - public certificate name.
2722// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate
2723// object.
2724func (client AppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (result PublicCertificate, err error) {
2725	if tracing.IsEnabled() {
2726		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificate")
2727		defer func() {
2728			sc := -1
2729			if result.Response.Response != nil {
2730				sc = result.Response.Response.StatusCode
2731			}
2732			tracing.EndSpan(ctx, sc, err)
2733		}()
2734	}
2735	if err := validation.Validate([]validation.Validation{
2736		{TargetValue: resourceGroupName,
2737			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2738				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2739				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2740		return result, validation.NewError("web.AppsClient", "CreateOrUpdatePublicCertificate", err.Error())
2741	}
2742
2743	req, err := client.CreateOrUpdatePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate)
2744	if err != nil {
2745		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", nil, "Failure preparing request")
2746		return
2747	}
2748
2749	resp, err := client.CreateOrUpdatePublicCertificateSender(req)
2750	if err != nil {
2751		result.Response = autorest.Response{Response: resp}
2752		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure sending request")
2753		return
2754	}
2755
2756	result, err = client.CreateOrUpdatePublicCertificateResponder(resp)
2757	if err != nil {
2758		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure responding to request")
2759		return
2760	}
2761
2762	return
2763}
2764
2765// CreateOrUpdatePublicCertificatePreparer prepares the CreateOrUpdatePublicCertificate request.
2766func (client AppsClient) CreateOrUpdatePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (*http.Request, error) {
2767	pathParameters := map[string]interface{}{
2768		"name":                  autorest.Encode("path", name),
2769		"publicCertificateName": autorest.Encode("path", publicCertificateName),
2770		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
2771		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
2772	}
2773
2774	const APIVersion = "2018-02-01"
2775	queryParameters := map[string]interface{}{
2776		"api-version": APIVersion,
2777	}
2778
2779	preparer := autorest.CreatePreparer(
2780		autorest.AsContentType("application/json; charset=utf-8"),
2781		autorest.AsPut(),
2782		autorest.WithBaseURL(client.BaseURI),
2783		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters),
2784		autorest.WithJSON(publicCertificate),
2785		autorest.WithQueryParameters(queryParameters))
2786	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2787}
2788
2789// CreateOrUpdatePublicCertificateSender sends the CreateOrUpdatePublicCertificate request. The method will close the
2790// http.Response Body if it receives an error.
2791func (client AppsClient) CreateOrUpdatePublicCertificateSender(req *http.Request) (*http.Response, error) {
2792	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2793}
2794
2795// CreateOrUpdatePublicCertificateResponder handles the response to the CreateOrUpdatePublicCertificate request. The method always
2796// closes the http.Response Body.
2797func (client AppsClient) CreateOrUpdatePublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) {
2798	err = autorest.Respond(
2799		resp,
2800		azure.WithErrorUnlessStatusCode(http.StatusOK),
2801		autorest.ByUnmarshallingJSON(&result),
2802		autorest.ByClosing())
2803	result.Response = autorest.Response{Response: resp}
2804	return
2805}
2806
2807// CreateOrUpdatePublicCertificateSlot creates a hostname binding for an app.
2808// Parameters:
2809// resourceGroupName - name of the resource group to which the resource belongs.
2810// name - name of the app.
2811// publicCertificateName - public certificate name.
2812// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate
2813// object.
2814// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the
2815// production slot.
2816func (client AppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (result PublicCertificate, err error) {
2817	if tracing.IsEnabled() {
2818		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificateSlot")
2819		defer func() {
2820			sc := -1
2821			if result.Response.Response != nil {
2822				sc = result.Response.Response.StatusCode
2823			}
2824			tracing.EndSpan(ctx, sc, err)
2825		}()
2826	}
2827	if err := validation.Validate([]validation.Validation{
2828		{TargetValue: resourceGroupName,
2829			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2830				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2831				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2832		return result, validation.NewError("web.AppsClient", "CreateOrUpdatePublicCertificateSlot", err.Error())
2833	}
2834
2835	req, err := client.CreateOrUpdatePublicCertificateSlotPreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate, slot)
2836	if err != nil {
2837		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", nil, "Failure preparing request")
2838		return
2839	}
2840
2841	resp, err := client.CreateOrUpdatePublicCertificateSlotSender(req)
2842	if err != nil {
2843		result.Response = autorest.Response{Response: resp}
2844		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure sending request")
2845		return
2846	}
2847
2848	result, err = client.CreateOrUpdatePublicCertificateSlotResponder(resp)
2849	if err != nil {
2850		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure responding to request")
2851		return
2852	}
2853
2854	return
2855}
2856
2857// CreateOrUpdatePublicCertificateSlotPreparer prepares the CreateOrUpdatePublicCertificateSlot request.
2858func (client AppsClient) CreateOrUpdatePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (*http.Request, error) {
2859	pathParameters := map[string]interface{}{
2860		"name":                  autorest.Encode("path", name),
2861		"publicCertificateName": autorest.Encode("path", publicCertificateName),
2862		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
2863		"slot":                  autorest.Encode("path", slot),
2864		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
2865	}
2866
2867	const APIVersion = "2018-02-01"
2868	queryParameters := map[string]interface{}{
2869		"api-version": APIVersion,
2870	}
2871
2872	preparer := autorest.CreatePreparer(
2873		autorest.AsContentType("application/json; charset=utf-8"),
2874		autorest.AsPut(),
2875		autorest.WithBaseURL(client.BaseURI),
2876		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters),
2877		autorest.WithJSON(publicCertificate),
2878		autorest.WithQueryParameters(queryParameters))
2879	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2880}
2881
2882// CreateOrUpdatePublicCertificateSlotSender sends the CreateOrUpdatePublicCertificateSlot request. The method will close the
2883// http.Response Body if it receives an error.
2884func (client AppsClient) CreateOrUpdatePublicCertificateSlotSender(req *http.Request) (*http.Response, error) {
2885	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2886}
2887
2888// CreateOrUpdatePublicCertificateSlotResponder handles the response to the CreateOrUpdatePublicCertificateSlot request. The method always
2889// closes the http.Response Body.
2890func (client AppsClient) CreateOrUpdatePublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) {
2891	err = autorest.Respond(
2892		resp,
2893		azure.WithErrorUnlessStatusCode(http.StatusOK),
2894		autorest.ByUnmarshallingJSON(&result),
2895		autorest.ByClosing())
2896	result.Response = autorest.Response{Response: resp}
2897	return
2898}
2899
2900// CreateOrUpdateRelayServiceConnection creates a new hybrid connection configuration (PUT), or updates an existing one
2901// (PATCH).
2902// Parameters:
2903// resourceGroupName - name of the resource group to which the resource belongs.
2904// name - name of the app.
2905// entityName - name of the hybrid connection configuration.
2906// connectionEnvelope - details of the hybrid connection configuration.
2907func (client AppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) {
2908	if tracing.IsEnabled() {
2909		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnection")
2910		defer func() {
2911			sc := -1
2912			if result.Response.Response != nil {
2913				sc = result.Response.Response.StatusCode
2914			}
2915			tracing.EndSpan(ctx, sc, err)
2916		}()
2917	}
2918	if err := validation.Validate([]validation.Validation{
2919		{TargetValue: resourceGroupName,
2920			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2921				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2922				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2923		return result, validation.NewError("web.AppsClient", "CreateOrUpdateRelayServiceConnection", err.Error())
2924	}
2925
2926	req, err := client.CreateOrUpdateRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope)
2927	if err != nil {
2928		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", nil, "Failure preparing request")
2929		return
2930	}
2931
2932	resp, err := client.CreateOrUpdateRelayServiceConnectionSender(req)
2933	if err != nil {
2934		result.Response = autorest.Response{Response: resp}
2935		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure sending request")
2936		return
2937	}
2938
2939	result, err = client.CreateOrUpdateRelayServiceConnectionResponder(resp)
2940	if err != nil {
2941		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure responding to request")
2942		return
2943	}
2944
2945	return
2946}
2947
2948// CreateOrUpdateRelayServiceConnectionPreparer prepares the CreateOrUpdateRelayServiceConnection request.
2949func (client AppsClient) CreateOrUpdateRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (*http.Request, error) {
2950	pathParameters := map[string]interface{}{
2951		"entityName":        autorest.Encode("path", entityName),
2952		"name":              autorest.Encode("path", name),
2953		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2954		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2955	}
2956
2957	const APIVersion = "2018-02-01"
2958	queryParameters := map[string]interface{}{
2959		"api-version": APIVersion,
2960	}
2961
2962	preparer := autorest.CreatePreparer(
2963		autorest.AsContentType("application/json; charset=utf-8"),
2964		autorest.AsPut(),
2965		autorest.WithBaseURL(client.BaseURI),
2966		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
2967		autorest.WithJSON(connectionEnvelope),
2968		autorest.WithQueryParameters(queryParameters))
2969	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2970}
2971
2972// CreateOrUpdateRelayServiceConnectionSender sends the CreateOrUpdateRelayServiceConnection request. The method will close the
2973// http.Response Body if it receives an error.
2974func (client AppsClient) CreateOrUpdateRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
2975	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2976}
2977
2978// CreateOrUpdateRelayServiceConnectionResponder handles the response to the CreateOrUpdateRelayServiceConnection request. The method always
2979// closes the http.Response Body.
2980func (client AppsClient) CreateOrUpdateRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
2981	err = autorest.Respond(
2982		resp,
2983		azure.WithErrorUnlessStatusCode(http.StatusOK),
2984		autorest.ByUnmarshallingJSON(&result),
2985		autorest.ByClosing())
2986	result.Response = autorest.Response{Response: resp}
2987	return
2988}
2989
2990// CreateOrUpdateRelayServiceConnectionSlot creates a new hybrid connection configuration (PUT), or updates an existing
2991// one (PATCH).
2992// Parameters:
2993// resourceGroupName - name of the resource group to which the resource belongs.
2994// name - name of the app.
2995// entityName - name of the hybrid connection configuration.
2996// connectionEnvelope - details of the hybrid connection configuration.
2997// slot - name of the deployment slot. If a slot is not specified, the API will create or update a hybrid
2998// connection for the production slot.
2999func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) {
3000	if tracing.IsEnabled() {
3001		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnectionSlot")
3002		defer func() {
3003			sc := -1
3004			if result.Response.Response != nil {
3005				sc = result.Response.Response.StatusCode
3006			}
3007			tracing.EndSpan(ctx, sc, err)
3008		}()
3009	}
3010	if err := validation.Validate([]validation.Validation{
3011		{TargetValue: resourceGroupName,
3012			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3013				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3014				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3015		return result, validation.NewError("web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", err.Error())
3016	}
3017
3018	req, err := client.CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope, slot)
3019	if err != nil {
3020		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", nil, "Failure preparing request")
3021		return
3022	}
3023
3024	resp, err := client.CreateOrUpdateRelayServiceConnectionSlotSender(req)
3025	if err != nil {
3026		result.Response = autorest.Response{Response: resp}
3027		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure sending request")
3028		return
3029	}
3030
3031	result, err = client.CreateOrUpdateRelayServiceConnectionSlotResponder(resp)
3032	if err != nil {
3033		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure responding to request")
3034		return
3035	}
3036
3037	return
3038}
3039
3040// CreateOrUpdateRelayServiceConnectionSlotPreparer prepares the CreateOrUpdateRelayServiceConnectionSlot request.
3041func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (*http.Request, error) {
3042	pathParameters := map[string]interface{}{
3043		"entityName":        autorest.Encode("path", entityName),
3044		"name":              autorest.Encode("path", name),
3045		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3046		"slot":              autorest.Encode("path", slot),
3047		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3048	}
3049
3050	const APIVersion = "2018-02-01"
3051	queryParameters := map[string]interface{}{
3052		"api-version": APIVersion,
3053	}
3054
3055	preparer := autorest.CreatePreparer(
3056		autorest.AsContentType("application/json; charset=utf-8"),
3057		autorest.AsPut(),
3058		autorest.WithBaseURL(client.BaseURI),
3059		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
3060		autorest.WithJSON(connectionEnvelope),
3061		autorest.WithQueryParameters(queryParameters))
3062	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3063}
3064
3065// CreateOrUpdateRelayServiceConnectionSlotSender sends the CreateOrUpdateRelayServiceConnectionSlot request. The method will close the
3066// http.Response Body if it receives an error.
3067func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
3068	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3069}
3070
3071// CreateOrUpdateRelayServiceConnectionSlotResponder handles the response to the CreateOrUpdateRelayServiceConnectionSlot request. The method always
3072// closes the http.Response Body.
3073func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
3074	err = autorest.Respond(
3075		resp,
3076		azure.WithErrorUnlessStatusCode(http.StatusOK),
3077		autorest.ByUnmarshallingJSON(&result),
3078		autorest.ByClosing())
3079	result.Response = autorest.Response{Response: resp}
3080	return
3081}
3082
3083// CreateOrUpdateSlot creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
3084// Parameters:
3085// resourceGroupName - name of the resource group to which the resource belongs.
3086// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
3087// parameter.
3088// siteEnvelope - a JSON representation of the app properties. See example.
3089// slot - name of the deployment slot to create or update. By default, this API attempts to create or modify
3090// the production slot.
3091func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (result AppsCreateOrUpdateSlotFuture, err error) {
3092	if tracing.IsEnabled() {
3093		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSlot")
3094		defer func() {
3095			sc := -1
3096			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
3097				sc = result.FutureAPI.Response().StatusCode
3098			}
3099			tracing.EndSpan(ctx, sc, err)
3100		}()
3101	}
3102	if err := validation.Validate([]validation.Validation{
3103		{TargetValue: resourceGroupName,
3104			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3105				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3106				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
3107		{TargetValue: siteEnvelope,
3108			Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false,
3109				Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false,
3110					Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false,
3111						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
3112							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
3113						}},
3114						{Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.Null, Rule: false,
3115							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
3116								{Target: "siteEnvelope.SiteProperties.SiteConfig.ReservedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
3117							}},
3118					}},
3119					{Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false,
3120						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}},
3121				}}}}}); err != nil {
3122		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSlot", err.Error())
3123	}
3124
3125	req, err := client.CreateOrUpdateSlotPreparer(ctx, resourceGroupName, name, siteEnvelope, slot)
3126	if err != nil {
3127		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", nil, "Failure preparing request")
3128		return
3129	}
3130
3131	result, err = client.CreateOrUpdateSlotSender(req)
3132	if err != nil {
3133		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", nil, "Failure sending request")
3134		return
3135	}
3136
3137	return
3138}
3139
3140// CreateOrUpdateSlotPreparer prepares the CreateOrUpdateSlot request.
3141func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (*http.Request, error) {
3142	pathParameters := map[string]interface{}{
3143		"name":              autorest.Encode("path", name),
3144		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3145		"slot":              autorest.Encode("path", slot),
3146		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3147	}
3148
3149	const APIVersion = "2018-02-01"
3150	queryParameters := map[string]interface{}{
3151		"api-version": APIVersion,
3152	}
3153
3154	preparer := autorest.CreatePreparer(
3155		autorest.AsContentType("application/json; charset=utf-8"),
3156		autorest.AsPut(),
3157		autorest.WithBaseURL(client.BaseURI),
3158		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
3159		autorest.WithJSON(siteEnvelope),
3160		autorest.WithQueryParameters(queryParameters))
3161	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3162}
3163
3164// CreateOrUpdateSlotSender sends the CreateOrUpdateSlot request. The method will close the
3165// http.Response Body if it receives an error.
3166func (client AppsClient) CreateOrUpdateSlotSender(req *http.Request) (future AppsCreateOrUpdateSlotFuture, err error) {
3167	var resp *http.Response
3168	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
3169	if err != nil {
3170		return
3171	}
3172	var azf azure.Future
3173	azf, err = azure.NewFutureFromResponse(resp)
3174	future.FutureAPI = &azf
3175	future.Result = future.result
3176	return
3177}
3178
3179// CreateOrUpdateSlotResponder handles the response to the CreateOrUpdateSlot request. The method always
3180// closes the http.Response Body.
3181func (client AppsClient) CreateOrUpdateSlotResponder(resp *http.Response) (result Site, err error) {
3182	err = autorest.Respond(
3183		resp,
3184		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
3185		autorest.ByUnmarshallingJSON(&result),
3186		autorest.ByClosing())
3187	result.Response = autorest.Response{Response: resp}
3188	return
3189}
3190
3191// CreateOrUpdateSourceControl updates the source control configuration of an app.
3192// Parameters:
3193// resourceGroupName - name of the resource group to which the resource belongs.
3194// name - name of the app.
3195// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
3196func (client AppsClient) CreateOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (result AppsCreateOrUpdateSourceControlFuture, err error) {
3197	if tracing.IsEnabled() {
3198		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControl")
3199		defer func() {
3200			sc := -1
3201			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
3202				sc = result.FutureAPI.Response().StatusCode
3203			}
3204			tracing.EndSpan(ctx, sc, err)
3205		}()
3206	}
3207	if err := validation.Validate([]validation.Validation{
3208		{TargetValue: resourceGroupName,
3209			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3210				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3211				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3212		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSourceControl", err.Error())
3213	}
3214
3215	req, err := client.CreateOrUpdateSourceControlPreparer(ctx, resourceGroupName, name, siteSourceControl)
3216	if err != nil {
3217		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", nil, "Failure preparing request")
3218		return
3219	}
3220
3221	result, err = client.CreateOrUpdateSourceControlSender(req)
3222	if err != nil {
3223		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", nil, "Failure sending request")
3224		return
3225	}
3226
3227	return
3228}
3229
3230// CreateOrUpdateSourceControlPreparer prepares the CreateOrUpdateSourceControl request.
3231func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (*http.Request, error) {
3232	pathParameters := map[string]interface{}{
3233		"name":              autorest.Encode("path", name),
3234		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3235		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3236	}
3237
3238	const APIVersion = "2018-02-01"
3239	queryParameters := map[string]interface{}{
3240		"api-version": APIVersion,
3241	}
3242
3243	preparer := autorest.CreatePreparer(
3244		autorest.AsContentType("application/json; charset=utf-8"),
3245		autorest.AsPut(),
3246		autorest.WithBaseURL(client.BaseURI),
3247		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
3248		autorest.WithJSON(siteSourceControl),
3249		autorest.WithQueryParameters(queryParameters))
3250	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3251}
3252
3253// CreateOrUpdateSourceControlSender sends the CreateOrUpdateSourceControl request. The method will close the
3254// http.Response Body if it receives an error.
3255func (client AppsClient) CreateOrUpdateSourceControlSender(req *http.Request) (future AppsCreateOrUpdateSourceControlFuture, err error) {
3256	var resp *http.Response
3257	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
3258	if err != nil {
3259		return
3260	}
3261	var azf azure.Future
3262	azf, err = azure.NewFutureFromResponse(resp)
3263	future.FutureAPI = &azf
3264	future.Result = future.result
3265	return
3266}
3267
3268// CreateOrUpdateSourceControlResponder handles the response to the CreateOrUpdateSourceControl request. The method always
3269// closes the http.Response Body.
3270func (client AppsClient) CreateOrUpdateSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) {
3271	err = autorest.Respond(
3272		resp,
3273		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
3274		autorest.ByUnmarshallingJSON(&result),
3275		autorest.ByClosing())
3276	result.Response = autorest.Response{Response: resp}
3277	return
3278}
3279
3280// CreateOrUpdateSourceControlSlot updates the source control configuration of an app.
3281// Parameters:
3282// resourceGroupName - name of the resource group to which the resource belongs.
3283// name - name of the app.
3284// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
3285// slot - name of the deployment slot. If a slot is not specified, the API will update the source control
3286// configuration for the production slot.
3287func (client AppsClient) CreateOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (result AppsCreateOrUpdateSourceControlSlotFuture, err error) {
3288	if tracing.IsEnabled() {
3289		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControlSlot")
3290		defer func() {
3291			sc := -1
3292			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
3293				sc = result.FutureAPI.Response().StatusCode
3294			}
3295			tracing.EndSpan(ctx, sc, err)
3296		}()
3297	}
3298	if err := validation.Validate([]validation.Validation{
3299		{TargetValue: resourceGroupName,
3300			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3301				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3302				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3303		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSourceControlSlot", err.Error())
3304	}
3305
3306	req, err := client.CreateOrUpdateSourceControlSlotPreparer(ctx, resourceGroupName, name, siteSourceControl, slot)
3307	if err != nil {
3308		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", nil, "Failure preparing request")
3309		return
3310	}
3311
3312	result, err = client.CreateOrUpdateSourceControlSlotSender(req)
3313	if err != nil {
3314		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", nil, "Failure sending request")
3315		return
3316	}
3317
3318	return
3319}
3320
3321// CreateOrUpdateSourceControlSlotPreparer prepares the CreateOrUpdateSourceControlSlot request.
3322func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (*http.Request, error) {
3323	pathParameters := map[string]interface{}{
3324		"name":              autorest.Encode("path", name),
3325		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3326		"slot":              autorest.Encode("path", slot),
3327		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3328	}
3329
3330	const APIVersion = "2018-02-01"
3331	queryParameters := map[string]interface{}{
3332		"api-version": APIVersion,
3333	}
3334
3335	preparer := autorest.CreatePreparer(
3336		autorest.AsContentType("application/json; charset=utf-8"),
3337		autorest.AsPut(),
3338		autorest.WithBaseURL(client.BaseURI),
3339		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
3340		autorest.WithJSON(siteSourceControl),
3341		autorest.WithQueryParameters(queryParameters))
3342	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3343}
3344
3345// CreateOrUpdateSourceControlSlotSender sends the CreateOrUpdateSourceControlSlot request. The method will close the
3346// http.Response Body if it receives an error.
3347func (client AppsClient) CreateOrUpdateSourceControlSlotSender(req *http.Request) (future AppsCreateOrUpdateSourceControlSlotFuture, err error) {
3348	var resp *http.Response
3349	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
3350	if err != nil {
3351		return
3352	}
3353	var azf azure.Future
3354	azf, err = azure.NewFutureFromResponse(resp)
3355	future.FutureAPI = &azf
3356	future.Result = future.result
3357	return
3358}
3359
3360// CreateOrUpdateSourceControlSlotResponder handles the response to the CreateOrUpdateSourceControlSlot request. The method always
3361// closes the http.Response Body.
3362func (client AppsClient) CreateOrUpdateSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) {
3363	err = autorest.Respond(
3364		resp,
3365		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
3366		autorest.ByUnmarshallingJSON(&result),
3367		autorest.ByClosing())
3368	result.Response = autorest.Response{Response: resp}
3369	return
3370}
3371
3372// CreateOrUpdateSwiftVirtualNetworkConnection integrates this Web App with a Virtual Network. This requires that 1)
3373// "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been
3374// delegated, and is not
3375// in use by another App Service Plan other than the one this App is in.
3376// Parameters:
3377// resourceGroupName - name of the resource group to which the resource belongs.
3378// name - name of the app.
3379// connectionEnvelope - properties of the Virtual Network connection. See example.
3380func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (result SwiftVirtualNetwork, err error) {
3381	if tracing.IsEnabled() {
3382		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnection")
3383		defer func() {
3384			sc := -1
3385			if result.Response.Response != nil {
3386				sc = result.Response.Response.StatusCode
3387			}
3388			tracing.EndSpan(ctx, sc, err)
3389		}()
3390	}
3391	if err := validation.Validate([]validation.Validation{
3392		{TargetValue: resourceGroupName,
3393			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3394				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3395				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3396		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", err.Error())
3397	}
3398
3399	req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name, connectionEnvelope)
3400	if err != nil {
3401		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", nil, "Failure preparing request")
3402		return
3403	}
3404
3405	resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSender(req)
3406	if err != nil {
3407		result.Response = autorest.Response{Response: resp}
3408		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure sending request")
3409		return
3410	}
3411
3412	result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp)
3413	if err != nil {
3414		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure responding to request")
3415		return
3416	}
3417
3418	return
3419}
3420
3421// CreateOrUpdateSwiftVirtualNetworkConnectionPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnection request.
3422func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (*http.Request, error) {
3423	pathParameters := map[string]interface{}{
3424		"name":              autorest.Encode("path", name),
3425		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3426		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3427	}
3428
3429	const APIVersion = "2018-02-01"
3430	queryParameters := map[string]interface{}{
3431		"api-version": APIVersion,
3432	}
3433
3434	preparer := autorest.CreatePreparer(
3435		autorest.AsContentType("application/json; charset=utf-8"),
3436		autorest.AsPut(),
3437		autorest.WithBaseURL(client.BaseURI),
3438		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
3439		autorest.WithJSON(connectionEnvelope),
3440		autorest.WithQueryParameters(queryParameters))
3441	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3442}
3443
3444// CreateOrUpdateSwiftVirtualNetworkConnectionSender sends the CreateOrUpdateSwiftVirtualNetworkConnection request. The method will close the
3445// http.Response Body if it receives an error.
3446func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) {
3447	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3448}
3449
3450// CreateOrUpdateSwiftVirtualNetworkConnectionResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnection request. The method always
3451// closes the http.Response Body.
3452func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
3453	err = autorest.Respond(
3454		resp,
3455		azure.WithErrorUnlessStatusCode(http.StatusOK),
3456		autorest.ByUnmarshallingJSON(&result),
3457		autorest.ByClosing())
3458	result.Response = autorest.Response{Response: resp}
3459	return
3460}
3461
3462// CreateOrUpdateSwiftVirtualNetworkConnectionSlot integrates this Web App with a Virtual Network. This requires that
3463// 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been
3464// delegated, and is not
3465// in use by another App Service Plan other than the one this App is in.
3466// Parameters:
3467// resourceGroupName - name of the resource group to which the resource belongs.
3468// name - name of the app.
3469// connectionEnvelope - properties of the Virtual Network connection. See example.
3470// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
3471// the production slot.
3472func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (result SwiftVirtualNetwork, err error) {
3473	if tracing.IsEnabled() {
3474		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionSlot")
3475		defer func() {
3476			sc := -1
3477			if result.Response.Response != nil {
3478				sc = result.Response.Response.StatusCode
3479			}
3480			tracing.EndSpan(ctx, sc, err)
3481		}()
3482	}
3483	if err := validation.Validate([]validation.Validation{
3484		{TargetValue: resourceGroupName,
3485			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3486				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3487				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3488		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", err.Error())
3489	}
3490
3491	req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, connectionEnvelope, slot)
3492	if err != nil {
3493		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request")
3494		return
3495	}
3496
3497	resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req)
3498	if err != nil {
3499		result.Response = autorest.Response{Response: resp}
3500		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request")
3501		return
3502	}
3503
3504	result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp)
3505	if err != nil {
3506		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request")
3507		return
3508	}
3509
3510	return
3511}
3512
3513// CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request.
3514func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (*http.Request, error) {
3515	pathParameters := map[string]interface{}{
3516		"name":              autorest.Encode("path", name),
3517		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3518		"slot":              autorest.Encode("path", slot),
3519		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3520	}
3521
3522	const APIVersion = "2018-02-01"
3523	queryParameters := map[string]interface{}{
3524		"api-version": APIVersion,
3525	}
3526
3527	preparer := autorest.CreatePreparer(
3528		autorest.AsContentType("application/json; charset=utf-8"),
3529		autorest.AsPut(),
3530		autorest.WithBaseURL(client.BaseURI),
3531		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
3532		autorest.WithJSON(connectionEnvelope),
3533		autorest.WithQueryParameters(queryParameters))
3534	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3535}
3536
3537// CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender sends the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method will close the
3538// http.Response Body if it receives an error.
3539func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) {
3540	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3541}
3542
3543// CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method always
3544// closes the http.Response Body.
3545func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
3546	err = autorest.Respond(
3547		resp,
3548		azure.WithErrorUnlessStatusCode(http.StatusOK),
3549		autorest.ByUnmarshallingJSON(&result),
3550		autorest.ByClosing())
3551	result.Response = autorest.Response{Response: resp}
3552	return
3553}
3554
3555// CreateOrUpdateVnetConnection adds a Virtual Network connection to an app or slot (PUT) or updates the connection
3556// properties (PATCH).
3557// Parameters:
3558// resourceGroupName - name of the resource group to which the resource belongs.
3559// name - name of the app.
3560// vnetName - name of an existing Virtual Network.
3561// connectionEnvelope - properties of the Virtual Network connection. See example.
3562func (client AppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) {
3563	if tracing.IsEnabled() {
3564		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnection")
3565		defer func() {
3566			sc := -1
3567			if result.Response.Response != nil {
3568				sc = result.Response.Response.StatusCode
3569			}
3570			tracing.EndSpan(ctx, sc, err)
3571		}()
3572	}
3573	if err := validation.Validate([]validation.Validation{
3574		{TargetValue: resourceGroupName,
3575			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3576				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3577				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3578		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnection", err.Error())
3579	}
3580
3581	req, err := client.CreateOrUpdateVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope)
3582	if err != nil {
3583		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", nil, "Failure preparing request")
3584		return
3585	}
3586
3587	resp, err := client.CreateOrUpdateVnetConnectionSender(req)
3588	if err != nil {
3589		result.Response = autorest.Response{Response: resp}
3590		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure sending request")
3591		return
3592	}
3593
3594	result, err = client.CreateOrUpdateVnetConnectionResponder(resp)
3595	if err != nil {
3596		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure responding to request")
3597		return
3598	}
3599
3600	return
3601}
3602
3603// CreateOrUpdateVnetConnectionPreparer prepares the CreateOrUpdateVnetConnection request.
3604func (client AppsClient) CreateOrUpdateVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (*http.Request, error) {
3605	pathParameters := map[string]interface{}{
3606		"name":              autorest.Encode("path", name),
3607		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3608		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3609		"vnetName":          autorest.Encode("path", vnetName),
3610	}
3611
3612	const APIVersion = "2018-02-01"
3613	queryParameters := map[string]interface{}{
3614		"api-version": APIVersion,
3615	}
3616
3617	preparer := autorest.CreatePreparer(
3618		autorest.AsContentType("application/json; charset=utf-8"),
3619		autorest.AsPut(),
3620		autorest.WithBaseURL(client.BaseURI),
3621		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
3622		autorest.WithJSON(connectionEnvelope),
3623		autorest.WithQueryParameters(queryParameters))
3624	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3625}
3626
3627// CreateOrUpdateVnetConnectionSender sends the CreateOrUpdateVnetConnection request. The method will close the
3628// http.Response Body if it receives an error.
3629func (client AppsClient) CreateOrUpdateVnetConnectionSender(req *http.Request) (*http.Response, error) {
3630	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3631}
3632
3633// CreateOrUpdateVnetConnectionResponder handles the response to the CreateOrUpdateVnetConnection request. The method always
3634// closes the http.Response Body.
3635func (client AppsClient) CreateOrUpdateVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) {
3636	err = autorest.Respond(
3637		resp,
3638		azure.WithErrorUnlessStatusCode(http.StatusOK),
3639		autorest.ByUnmarshallingJSON(&result),
3640		autorest.ByClosing())
3641	result.Response = autorest.Response{Response: resp}
3642	return
3643}
3644
3645// CreateOrUpdateVnetConnectionGateway adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
3646// Parameters:
3647// resourceGroupName - name of the resource group to which the resource belongs.
3648// name - name of the app.
3649// vnetName - name of the Virtual Network.
3650// gatewayName - name of the gateway. Currently, the only supported string is "primary".
3651// connectionEnvelope - the properties to update this gateway with.
3652func (client AppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) {
3653	if tracing.IsEnabled() {
3654		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGateway")
3655		defer func() {
3656			sc := -1
3657			if result.Response.Response != nil {
3658				sc = result.Response.Response.StatusCode
3659			}
3660			tracing.EndSpan(ctx, sc, err)
3661		}()
3662	}
3663	if err := validation.Validate([]validation.Validation{
3664		{TargetValue: resourceGroupName,
3665			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3666				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3667				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
3668		{TargetValue: connectionEnvelope,
3669			Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false,
3670				Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
3671		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGateway", err.Error())
3672	}
3673
3674	req, err := client.CreateOrUpdateVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope)
3675	if err != nil {
3676		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", nil, "Failure preparing request")
3677		return
3678	}
3679
3680	resp, err := client.CreateOrUpdateVnetConnectionGatewaySender(req)
3681	if err != nil {
3682		result.Response = autorest.Response{Response: resp}
3683		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure sending request")
3684		return
3685	}
3686
3687	result, err = client.CreateOrUpdateVnetConnectionGatewayResponder(resp)
3688	if err != nil {
3689		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure responding to request")
3690		return
3691	}
3692
3693	return
3694}
3695
3696// CreateOrUpdateVnetConnectionGatewayPreparer prepares the CreateOrUpdateVnetConnectionGateway request.
3697func (client AppsClient) CreateOrUpdateVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (*http.Request, error) {
3698	pathParameters := map[string]interface{}{
3699		"gatewayName":       autorest.Encode("path", gatewayName),
3700		"name":              autorest.Encode("path", name),
3701		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3702		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3703		"vnetName":          autorest.Encode("path", vnetName),
3704	}
3705
3706	const APIVersion = "2018-02-01"
3707	queryParameters := map[string]interface{}{
3708		"api-version": APIVersion,
3709	}
3710
3711	preparer := autorest.CreatePreparer(
3712		autorest.AsContentType("application/json; charset=utf-8"),
3713		autorest.AsPut(),
3714		autorest.WithBaseURL(client.BaseURI),
3715		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
3716		autorest.WithJSON(connectionEnvelope),
3717		autorest.WithQueryParameters(queryParameters))
3718	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3719}
3720
3721// CreateOrUpdateVnetConnectionGatewaySender sends the CreateOrUpdateVnetConnectionGateway request. The method will close the
3722// http.Response Body if it receives an error.
3723func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) {
3724	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3725}
3726
3727// CreateOrUpdateVnetConnectionGatewayResponder handles the response to the CreateOrUpdateVnetConnectionGateway request. The method always
3728// closes the http.Response Body.
3729func (client AppsClient) CreateOrUpdateVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) {
3730	err = autorest.Respond(
3731		resp,
3732		azure.WithErrorUnlessStatusCode(http.StatusOK),
3733		autorest.ByUnmarshallingJSON(&result),
3734		autorest.ByClosing())
3735	result.Response = autorest.Response{Response: resp}
3736	return
3737}
3738
3739// CreateOrUpdateVnetConnectionGatewaySlot adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
3740// Parameters:
3741// resourceGroupName - name of the resource group to which the resource belongs.
3742// name - name of the app.
3743// vnetName - name of the Virtual Network.
3744// gatewayName - name of the gateway. Currently, the only supported string is "primary".
3745// connectionEnvelope - the properties to update this gateway with.
3746// slot - name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the
3747// production slot's Virtual Network.
3748func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) {
3749	if tracing.IsEnabled() {
3750		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGatewaySlot")
3751		defer func() {
3752			sc := -1
3753			if result.Response.Response != nil {
3754				sc = result.Response.Response.StatusCode
3755			}
3756			tracing.EndSpan(ctx, sc, err)
3757		}()
3758	}
3759	if err := validation.Validate([]validation.Validation{
3760		{TargetValue: resourceGroupName,
3761			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3762				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3763				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
3764		{TargetValue: connectionEnvelope,
3765			Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false,
3766				Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
3767		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", err.Error())
3768	}
3769
3770	req, err := client.CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot)
3771	if err != nil {
3772		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", nil, "Failure preparing request")
3773		return
3774	}
3775
3776	resp, err := client.CreateOrUpdateVnetConnectionGatewaySlotSender(req)
3777	if err != nil {
3778		result.Response = autorest.Response{Response: resp}
3779		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure sending request")
3780		return
3781	}
3782
3783	result, err = client.CreateOrUpdateVnetConnectionGatewaySlotResponder(resp)
3784	if err != nil {
3785		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure responding to request")
3786		return
3787	}
3788
3789	return
3790}
3791
3792// CreateOrUpdateVnetConnectionGatewaySlotPreparer prepares the CreateOrUpdateVnetConnectionGatewaySlot request.
3793func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (*http.Request, error) {
3794	pathParameters := map[string]interface{}{
3795		"gatewayName":       autorest.Encode("path", gatewayName),
3796		"name":              autorest.Encode("path", name),
3797		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3798		"slot":              autorest.Encode("path", slot),
3799		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3800		"vnetName":          autorest.Encode("path", vnetName),
3801	}
3802
3803	const APIVersion = "2018-02-01"
3804	queryParameters := map[string]interface{}{
3805		"api-version": APIVersion,
3806	}
3807
3808	preparer := autorest.CreatePreparer(
3809		autorest.AsContentType("application/json; charset=utf-8"),
3810		autorest.AsPut(),
3811		autorest.WithBaseURL(client.BaseURI),
3812		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
3813		autorest.WithJSON(connectionEnvelope),
3814		autorest.WithQueryParameters(queryParameters))
3815	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3816}
3817
3818// CreateOrUpdateVnetConnectionGatewaySlotSender sends the CreateOrUpdateVnetConnectionGatewaySlot request. The method will close the
3819// http.Response Body if it receives an error.
3820func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) {
3821	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3822}
3823
3824// CreateOrUpdateVnetConnectionGatewaySlotResponder handles the response to the CreateOrUpdateVnetConnectionGatewaySlot request. The method always
3825// closes the http.Response Body.
3826func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) {
3827	err = autorest.Respond(
3828		resp,
3829		azure.WithErrorUnlessStatusCode(http.StatusOK),
3830		autorest.ByUnmarshallingJSON(&result),
3831		autorest.ByClosing())
3832	result.Response = autorest.Response{Response: resp}
3833	return
3834}
3835
3836// CreateOrUpdateVnetConnectionSlot adds a Virtual Network connection to an app or slot (PUT) or updates the connection
3837// properties (PATCH).
3838// Parameters:
3839// resourceGroupName - name of the resource group to which the resource belongs.
3840// name - name of the app.
3841// vnetName - name of an existing Virtual Network.
3842// connectionEnvelope - properties of the Virtual Network connection. See example.
3843// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
3844// the production slot.
3845func (client AppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) {
3846	if tracing.IsEnabled() {
3847		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionSlot")
3848		defer func() {
3849			sc := -1
3850			if result.Response.Response != nil {
3851				sc = result.Response.Response.StatusCode
3852			}
3853			tracing.EndSpan(ctx, sc, err)
3854		}()
3855	}
3856	if err := validation.Validate([]validation.Validation{
3857		{TargetValue: resourceGroupName,
3858			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3859				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3860				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3861		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionSlot", err.Error())
3862	}
3863
3864	req, err := client.CreateOrUpdateVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope, slot)
3865	if err != nil {
3866		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", nil, "Failure preparing request")
3867		return
3868	}
3869
3870	resp, err := client.CreateOrUpdateVnetConnectionSlotSender(req)
3871	if err != nil {
3872		result.Response = autorest.Response{Response: resp}
3873		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure sending request")
3874		return
3875	}
3876
3877	result, err = client.CreateOrUpdateVnetConnectionSlotResponder(resp)
3878	if err != nil {
3879		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure responding to request")
3880		return
3881	}
3882
3883	return
3884}
3885
3886// CreateOrUpdateVnetConnectionSlotPreparer prepares the CreateOrUpdateVnetConnectionSlot request.
3887func (client AppsClient) CreateOrUpdateVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (*http.Request, error) {
3888	pathParameters := map[string]interface{}{
3889		"name":              autorest.Encode("path", name),
3890		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3891		"slot":              autorest.Encode("path", slot),
3892		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3893		"vnetName":          autorest.Encode("path", vnetName),
3894	}
3895
3896	const APIVersion = "2018-02-01"
3897	queryParameters := map[string]interface{}{
3898		"api-version": APIVersion,
3899	}
3900
3901	preparer := autorest.CreatePreparer(
3902		autorest.AsContentType("application/json; charset=utf-8"),
3903		autorest.AsPut(),
3904		autorest.WithBaseURL(client.BaseURI),
3905		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
3906		autorest.WithJSON(connectionEnvelope),
3907		autorest.WithQueryParameters(queryParameters))
3908	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3909}
3910
3911// CreateOrUpdateVnetConnectionSlotSender sends the CreateOrUpdateVnetConnectionSlot request. The method will close the
3912// http.Response Body if it receives an error.
3913func (client AppsClient) CreateOrUpdateVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
3914	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3915}
3916
3917// CreateOrUpdateVnetConnectionSlotResponder handles the response to the CreateOrUpdateVnetConnectionSlot request. The method always
3918// closes the http.Response Body.
3919func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) {
3920	err = autorest.Respond(
3921		resp,
3922		azure.WithErrorUnlessStatusCode(http.StatusOK),
3923		autorest.ByUnmarshallingJSON(&result),
3924		autorest.ByClosing())
3925	result.Response = autorest.Response{Response: resp}
3926	return
3927}
3928
3929// Delete deletes a web, mobile, or API app, or one of the deployment slots.
3930// Parameters:
3931// resourceGroupName - name of the resource group to which the resource belongs.
3932// name - name of the app to delete.
3933// deleteMetrics - if true, web app metrics are also deleted.
3934// deleteEmptyServerFarm - specify false if you want to keep empty App Service plan. By default, empty App
3935// Service plan is deleted.
3936func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) {
3937	if tracing.IsEnabled() {
3938		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Delete")
3939		defer func() {
3940			sc := -1
3941			if result.Response != nil {
3942				sc = result.Response.StatusCode
3943			}
3944			tracing.EndSpan(ctx, sc, err)
3945		}()
3946	}
3947	if err := validation.Validate([]validation.Validation{
3948		{TargetValue: resourceGroupName,
3949			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3950				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3951				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3952		return result, validation.NewError("web.AppsClient", "Delete", err.Error())
3953	}
3954
3955	req, err := client.DeletePreparer(ctx, resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm)
3956	if err != nil {
3957		err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", nil, "Failure preparing request")
3958		return
3959	}
3960
3961	resp, err := client.DeleteSender(req)
3962	if err != nil {
3963		result.Response = resp
3964		err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure sending request")
3965		return
3966	}
3967
3968	result, err = client.DeleteResponder(resp)
3969	if err != nil {
3970		err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure responding to request")
3971		return
3972	}
3973
3974	return
3975}
3976
3977// DeletePreparer prepares the Delete request.
3978func (client AppsClient) DeletePreparer(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) {
3979	pathParameters := map[string]interface{}{
3980		"name":              autorest.Encode("path", name),
3981		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3982		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3983	}
3984
3985	const APIVersion = "2018-02-01"
3986	queryParameters := map[string]interface{}{
3987		"api-version": APIVersion,
3988	}
3989	if deleteMetrics != nil {
3990		queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics)
3991	}
3992	if deleteEmptyServerFarm != nil {
3993		queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm)
3994	}
3995
3996	preparer := autorest.CreatePreparer(
3997		autorest.AsDelete(),
3998		autorest.WithBaseURL(client.BaseURI),
3999		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
4000		autorest.WithQueryParameters(queryParameters))
4001	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4002}
4003
4004// DeleteSender sends the Delete request. The method will close the
4005// http.Response Body if it receives an error.
4006func (client AppsClient) DeleteSender(req *http.Request) (*http.Response, error) {
4007	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4008}
4009
4010// DeleteResponder handles the response to the Delete request. The method always
4011// closes the http.Response Body.
4012func (client AppsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
4013	err = autorest.Respond(
4014		resp,
4015		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
4016		autorest.ByClosing())
4017	result.Response = resp
4018	return
4019}
4020
4021// DeleteBackup deletes a backup of an app by its ID.
4022// Parameters:
4023// resourceGroupName - name of the resource group to which the resource belongs.
4024// name - name of the app.
4025// backupID - ID of the backup.
4026func (client AppsClient) DeleteBackup(ctx context.Context, resourceGroupName string, name string, backupID string) (result autorest.Response, err error) {
4027	if tracing.IsEnabled() {
4028		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackup")
4029		defer func() {
4030			sc := -1
4031			if result.Response != nil {
4032				sc = result.Response.StatusCode
4033			}
4034			tracing.EndSpan(ctx, sc, err)
4035		}()
4036	}
4037	if err := validation.Validate([]validation.Validation{
4038		{TargetValue: resourceGroupName,
4039			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4040				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4041				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4042		return result, validation.NewError("web.AppsClient", "DeleteBackup", err.Error())
4043	}
4044
4045	req, err := client.DeleteBackupPreparer(ctx, resourceGroupName, name, backupID)
4046	if err != nil {
4047		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", nil, "Failure preparing request")
4048		return
4049	}
4050
4051	resp, err := client.DeleteBackupSender(req)
4052	if err != nil {
4053		result.Response = resp
4054		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure sending request")
4055		return
4056	}
4057
4058	result, err = client.DeleteBackupResponder(resp)
4059	if err != nil {
4060		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure responding to request")
4061		return
4062	}
4063
4064	return
4065}
4066
4067// DeleteBackupPreparer prepares the DeleteBackup request.
4068func (client AppsClient) DeleteBackupPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) {
4069	pathParameters := map[string]interface{}{
4070		"backupId":          autorest.Encode("path", backupID),
4071		"name":              autorest.Encode("path", name),
4072		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4073		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4074	}
4075
4076	const APIVersion = "2018-02-01"
4077	queryParameters := map[string]interface{}{
4078		"api-version": APIVersion,
4079	}
4080
4081	preparer := autorest.CreatePreparer(
4082		autorest.AsDelete(),
4083		autorest.WithBaseURL(client.BaseURI),
4084		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters),
4085		autorest.WithQueryParameters(queryParameters))
4086	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4087}
4088
4089// DeleteBackupSender sends the DeleteBackup request. The method will close the
4090// http.Response Body if it receives an error.
4091func (client AppsClient) DeleteBackupSender(req *http.Request) (*http.Response, error) {
4092	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4093}
4094
4095// DeleteBackupResponder handles the response to the DeleteBackup request. The method always
4096// closes the http.Response Body.
4097func (client AppsClient) DeleteBackupResponder(resp *http.Response) (result autorest.Response, err error) {
4098	err = autorest.Respond(
4099		resp,
4100		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
4101		autorest.ByClosing())
4102	result.Response = resp
4103	return
4104}
4105
4106// DeleteBackupConfiguration deletes the backup configuration of an app.
4107// Parameters:
4108// resourceGroupName - name of the resource group to which the resource belongs.
4109// name - name of the app.
4110func (client AppsClient) DeleteBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
4111	if tracing.IsEnabled() {
4112		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfiguration")
4113		defer func() {
4114			sc := -1
4115			if result.Response != nil {
4116				sc = result.Response.StatusCode
4117			}
4118			tracing.EndSpan(ctx, sc, err)
4119		}()
4120	}
4121	if err := validation.Validate([]validation.Validation{
4122		{TargetValue: resourceGroupName,
4123			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4124				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4125				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4126		return result, validation.NewError("web.AppsClient", "DeleteBackupConfiguration", err.Error())
4127	}
4128
4129	req, err := client.DeleteBackupConfigurationPreparer(ctx, resourceGroupName, name)
4130	if err != nil {
4131		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", nil, "Failure preparing request")
4132		return
4133	}
4134
4135	resp, err := client.DeleteBackupConfigurationSender(req)
4136	if err != nil {
4137		result.Response = resp
4138		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure sending request")
4139		return
4140	}
4141
4142	result, err = client.DeleteBackupConfigurationResponder(resp)
4143	if err != nil {
4144		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure responding to request")
4145		return
4146	}
4147
4148	return
4149}
4150
4151// DeleteBackupConfigurationPreparer prepares the DeleteBackupConfiguration request.
4152func (client AppsClient) DeleteBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
4153	pathParameters := map[string]interface{}{
4154		"name":              autorest.Encode("path", name),
4155		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4156		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4157	}
4158
4159	const APIVersion = "2018-02-01"
4160	queryParameters := map[string]interface{}{
4161		"api-version": APIVersion,
4162	}
4163
4164	preparer := autorest.CreatePreparer(
4165		autorest.AsDelete(),
4166		autorest.WithBaseURL(client.BaseURI),
4167		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup", pathParameters),
4168		autorest.WithQueryParameters(queryParameters))
4169	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4170}
4171
4172// DeleteBackupConfigurationSender sends the DeleteBackupConfiguration request. The method will close the
4173// http.Response Body if it receives an error.
4174func (client AppsClient) DeleteBackupConfigurationSender(req *http.Request) (*http.Response, error) {
4175	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4176}
4177
4178// DeleteBackupConfigurationResponder handles the response to the DeleteBackupConfiguration request. The method always
4179// closes the http.Response Body.
4180func (client AppsClient) DeleteBackupConfigurationResponder(resp *http.Response) (result autorest.Response, err error) {
4181	err = autorest.Respond(
4182		resp,
4183		azure.WithErrorUnlessStatusCode(http.StatusOK),
4184		autorest.ByClosing())
4185	result.Response = resp
4186	return
4187}
4188
4189// DeleteBackupConfigurationSlot deletes the backup configuration of an app.
4190// Parameters:
4191// resourceGroupName - name of the resource group to which the resource belongs.
4192// name - name of the app.
4193// slot - name of the deployment slot. If a slot is not specified, the API will delete the backup configuration
4194// for the production slot.
4195func (client AppsClient) DeleteBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
4196	if tracing.IsEnabled() {
4197		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfigurationSlot")
4198		defer func() {
4199			sc := -1
4200			if result.Response != nil {
4201				sc = result.Response.StatusCode
4202			}
4203			tracing.EndSpan(ctx, sc, err)
4204		}()
4205	}
4206	if err := validation.Validate([]validation.Validation{
4207		{TargetValue: resourceGroupName,
4208			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4209				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4210				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4211		return result, validation.NewError("web.AppsClient", "DeleteBackupConfigurationSlot", err.Error())
4212	}
4213
4214	req, err := client.DeleteBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
4215	if err != nil {
4216		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", nil, "Failure preparing request")
4217		return
4218	}
4219
4220	resp, err := client.DeleteBackupConfigurationSlotSender(req)
4221	if err != nil {
4222		result.Response = resp
4223		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure sending request")
4224		return
4225	}
4226
4227	result, err = client.DeleteBackupConfigurationSlotResponder(resp)
4228	if err != nil {
4229		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure responding to request")
4230		return
4231	}
4232
4233	return
4234}
4235
4236// DeleteBackupConfigurationSlotPreparer prepares the DeleteBackupConfigurationSlot request.
4237func (client AppsClient) DeleteBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
4238	pathParameters := map[string]interface{}{
4239		"name":              autorest.Encode("path", name),
4240		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4241		"slot":              autorest.Encode("path", slot),
4242		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4243	}
4244
4245	const APIVersion = "2018-02-01"
4246	queryParameters := map[string]interface{}{
4247		"api-version": APIVersion,
4248	}
4249
4250	preparer := autorest.CreatePreparer(
4251		autorest.AsDelete(),
4252		autorest.WithBaseURL(client.BaseURI),
4253		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup", pathParameters),
4254		autorest.WithQueryParameters(queryParameters))
4255	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4256}
4257
4258// DeleteBackupConfigurationSlotSender sends the DeleteBackupConfigurationSlot request. The method will close the
4259// http.Response Body if it receives an error.
4260func (client AppsClient) DeleteBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) {
4261	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4262}
4263
4264// DeleteBackupConfigurationSlotResponder handles the response to the DeleteBackupConfigurationSlot request. The method always
4265// closes the http.Response Body.
4266func (client AppsClient) DeleteBackupConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) {
4267	err = autorest.Respond(
4268		resp,
4269		azure.WithErrorUnlessStatusCode(http.StatusOK),
4270		autorest.ByClosing())
4271	result.Response = resp
4272	return
4273}
4274
4275// DeleteBackupSlot deletes a backup of an app by its ID.
4276// Parameters:
4277// resourceGroupName - name of the resource group to which the resource belongs.
4278// name - name of the app.
4279// backupID - ID of the backup.
4280// slot - name of the deployment slot. If a slot is not specified, the API will delete a backup of the
4281// production slot.
4282func (client AppsClient) DeleteBackupSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result autorest.Response, err error) {
4283	if tracing.IsEnabled() {
4284		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupSlot")
4285		defer func() {
4286			sc := -1
4287			if result.Response != nil {
4288				sc = result.Response.StatusCode
4289			}
4290			tracing.EndSpan(ctx, sc, err)
4291		}()
4292	}
4293	if err := validation.Validate([]validation.Validation{
4294		{TargetValue: resourceGroupName,
4295			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4296				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4297				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4298		return result, validation.NewError("web.AppsClient", "DeleteBackupSlot", err.Error())
4299	}
4300
4301	req, err := client.DeleteBackupSlotPreparer(ctx, resourceGroupName, name, backupID, slot)
4302	if err != nil {
4303		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", nil, "Failure preparing request")
4304		return
4305	}
4306
4307	resp, err := client.DeleteBackupSlotSender(req)
4308	if err != nil {
4309		result.Response = resp
4310		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure sending request")
4311		return
4312	}
4313
4314	result, err = client.DeleteBackupSlotResponder(resp)
4315	if err != nil {
4316		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure responding to request")
4317		return
4318	}
4319
4320	return
4321}
4322
4323// DeleteBackupSlotPreparer prepares the DeleteBackupSlot request.
4324func (client AppsClient) DeleteBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) {
4325	pathParameters := map[string]interface{}{
4326		"backupId":          autorest.Encode("path", backupID),
4327		"name":              autorest.Encode("path", name),
4328		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4329		"slot":              autorest.Encode("path", slot),
4330		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4331	}
4332
4333	const APIVersion = "2018-02-01"
4334	queryParameters := map[string]interface{}{
4335		"api-version": APIVersion,
4336	}
4337
4338	preparer := autorest.CreatePreparer(
4339		autorest.AsDelete(),
4340		autorest.WithBaseURL(client.BaseURI),
4341		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters),
4342		autorest.WithQueryParameters(queryParameters))
4343	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4344}
4345
4346// DeleteBackupSlotSender sends the DeleteBackupSlot request. The method will close the
4347// http.Response Body if it receives an error.
4348func (client AppsClient) DeleteBackupSlotSender(req *http.Request) (*http.Response, error) {
4349	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4350}
4351
4352// DeleteBackupSlotResponder handles the response to the DeleteBackupSlot request. The method always
4353// closes the http.Response Body.
4354func (client AppsClient) DeleteBackupSlotResponder(resp *http.Response) (result autorest.Response, err error) {
4355	err = autorest.Respond(
4356		resp,
4357		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
4358		autorest.ByClosing())
4359	result.Response = resp
4360	return
4361}
4362
4363// DeleteContinuousWebJob delete a continuous web job by its ID for an app, or a deployment slot.
4364// Parameters:
4365// resourceGroupName - name of the resource group to which the resource belongs.
4366// name - site name.
4367// webJobName - name of Web Job.
4368func (client AppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
4369	if tracing.IsEnabled() {
4370		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJob")
4371		defer func() {
4372			sc := -1
4373			if result.Response != nil {
4374				sc = result.Response.StatusCode
4375			}
4376			tracing.EndSpan(ctx, sc, err)
4377		}()
4378	}
4379	if err := validation.Validate([]validation.Validation{
4380		{TargetValue: resourceGroupName,
4381			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4382				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4383				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4384		return result, validation.NewError("web.AppsClient", "DeleteContinuousWebJob", err.Error())
4385	}
4386
4387	req, err := client.DeleteContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
4388	if err != nil {
4389		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", nil, "Failure preparing request")
4390		return
4391	}
4392
4393	resp, err := client.DeleteContinuousWebJobSender(req)
4394	if err != nil {
4395		result.Response = resp
4396		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure sending request")
4397		return
4398	}
4399
4400	result, err = client.DeleteContinuousWebJobResponder(resp)
4401	if err != nil {
4402		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure responding to request")
4403		return
4404	}
4405
4406	return
4407}
4408
4409// DeleteContinuousWebJobPreparer prepares the DeleteContinuousWebJob request.
4410func (client AppsClient) DeleteContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
4411	pathParameters := map[string]interface{}{
4412		"name":              autorest.Encode("path", name),
4413		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4414		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4415		"webJobName":        autorest.Encode("path", webJobName),
4416	}
4417
4418	const APIVersion = "2018-02-01"
4419	queryParameters := map[string]interface{}{
4420		"api-version": APIVersion,
4421	}
4422
4423	preparer := autorest.CreatePreparer(
4424		autorest.AsDelete(),
4425		autorest.WithBaseURL(client.BaseURI),
4426		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters),
4427		autorest.WithQueryParameters(queryParameters))
4428	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4429}
4430
4431// DeleteContinuousWebJobSender sends the DeleteContinuousWebJob request. The method will close the
4432// http.Response Body if it receives an error.
4433func (client AppsClient) DeleteContinuousWebJobSender(req *http.Request) (*http.Response, error) {
4434	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4435}
4436
4437// DeleteContinuousWebJobResponder handles the response to the DeleteContinuousWebJob request. The method always
4438// closes the http.Response Body.
4439func (client AppsClient) DeleteContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
4440	err = autorest.Respond(
4441		resp,
4442		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4443		autorest.ByClosing())
4444	result.Response = resp
4445	return
4446}
4447
4448// DeleteContinuousWebJobSlot delete a continuous web job by its ID for an app, or a deployment slot.
4449// Parameters:
4450// resourceGroupName - name of the resource group to which the resource belongs.
4451// name - site name.
4452// webJobName - name of Web Job.
4453// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
4454// production slot.
4455func (client AppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
4456	if tracing.IsEnabled() {
4457		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJobSlot")
4458		defer func() {
4459			sc := -1
4460			if result.Response != nil {
4461				sc = result.Response.StatusCode
4462			}
4463			tracing.EndSpan(ctx, sc, err)
4464		}()
4465	}
4466	if err := validation.Validate([]validation.Validation{
4467		{TargetValue: resourceGroupName,
4468			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4469				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4470				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4471		return result, validation.NewError("web.AppsClient", "DeleteContinuousWebJobSlot", err.Error())
4472	}
4473
4474	req, err := client.DeleteContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
4475	if err != nil {
4476		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", nil, "Failure preparing request")
4477		return
4478	}
4479
4480	resp, err := client.DeleteContinuousWebJobSlotSender(req)
4481	if err != nil {
4482		result.Response = resp
4483		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure sending request")
4484		return
4485	}
4486
4487	result, err = client.DeleteContinuousWebJobSlotResponder(resp)
4488	if err != nil {
4489		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure responding to request")
4490		return
4491	}
4492
4493	return
4494}
4495
4496// DeleteContinuousWebJobSlotPreparer prepares the DeleteContinuousWebJobSlot request.
4497func (client AppsClient) DeleteContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
4498	pathParameters := map[string]interface{}{
4499		"name":              autorest.Encode("path", name),
4500		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4501		"slot":              autorest.Encode("path", slot),
4502		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4503		"webJobName":        autorest.Encode("path", webJobName),
4504	}
4505
4506	const APIVersion = "2018-02-01"
4507	queryParameters := map[string]interface{}{
4508		"api-version": APIVersion,
4509	}
4510
4511	preparer := autorest.CreatePreparer(
4512		autorest.AsDelete(),
4513		autorest.WithBaseURL(client.BaseURI),
4514		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters),
4515		autorest.WithQueryParameters(queryParameters))
4516	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4517}
4518
4519// DeleteContinuousWebJobSlotSender sends the DeleteContinuousWebJobSlot request. The method will close the
4520// http.Response Body if it receives an error.
4521func (client AppsClient) DeleteContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
4522	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4523}
4524
4525// DeleteContinuousWebJobSlotResponder handles the response to the DeleteContinuousWebJobSlot request. The method always
4526// closes the http.Response Body.
4527func (client AppsClient) DeleteContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
4528	err = autorest.Respond(
4529		resp,
4530		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4531		autorest.ByClosing())
4532	result.Response = resp
4533	return
4534}
4535
4536// DeleteDeployment delete a deployment by its ID for an app, or a deployment slot.
4537// Parameters:
4538// resourceGroupName - name of the resource group to which the resource belongs.
4539// name - name of the app.
4540// ID - deployment ID.
4541func (client AppsClient) DeleteDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result autorest.Response, err error) {
4542	if tracing.IsEnabled() {
4543		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeployment")
4544		defer func() {
4545			sc := -1
4546			if result.Response != nil {
4547				sc = result.Response.StatusCode
4548			}
4549			tracing.EndSpan(ctx, sc, err)
4550		}()
4551	}
4552	if err := validation.Validate([]validation.Validation{
4553		{TargetValue: resourceGroupName,
4554			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4555				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4556				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4557		return result, validation.NewError("web.AppsClient", "DeleteDeployment", err.Error())
4558	}
4559
4560	req, err := client.DeleteDeploymentPreparer(ctx, resourceGroupName, name, ID)
4561	if err != nil {
4562		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", nil, "Failure preparing request")
4563		return
4564	}
4565
4566	resp, err := client.DeleteDeploymentSender(req)
4567	if err != nil {
4568		result.Response = resp
4569		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure sending request")
4570		return
4571	}
4572
4573	result, err = client.DeleteDeploymentResponder(resp)
4574	if err != nil {
4575		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure responding to request")
4576		return
4577	}
4578
4579	return
4580}
4581
4582// DeleteDeploymentPreparer prepares the DeleteDeployment request.
4583func (client AppsClient) DeleteDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) {
4584	pathParameters := map[string]interface{}{
4585		"id":                autorest.Encode("path", ID),
4586		"name":              autorest.Encode("path", name),
4587		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4588		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4589	}
4590
4591	const APIVersion = "2018-02-01"
4592	queryParameters := map[string]interface{}{
4593		"api-version": APIVersion,
4594	}
4595
4596	preparer := autorest.CreatePreparer(
4597		autorest.AsDelete(),
4598		autorest.WithBaseURL(client.BaseURI),
4599		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters),
4600		autorest.WithQueryParameters(queryParameters))
4601	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4602}
4603
4604// DeleteDeploymentSender sends the DeleteDeployment request. The method will close the
4605// http.Response Body if it receives an error.
4606func (client AppsClient) DeleteDeploymentSender(req *http.Request) (*http.Response, error) {
4607	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4608}
4609
4610// DeleteDeploymentResponder handles the response to the DeleteDeployment request. The method always
4611// closes the http.Response Body.
4612func (client AppsClient) DeleteDeploymentResponder(resp *http.Response) (result autorest.Response, err error) {
4613	err = autorest.Respond(
4614		resp,
4615		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4616		autorest.ByClosing())
4617	result.Response = resp
4618	return
4619}
4620
4621// DeleteDeploymentSlot delete a deployment by its ID for an app, or a deployment slot.
4622// Parameters:
4623// resourceGroupName - name of the resource group to which the resource belongs.
4624// name - name of the app.
4625// ID - deployment ID.
4626// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
4627// production slot.
4628func (client AppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result autorest.Response, err error) {
4629	if tracing.IsEnabled() {
4630		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeploymentSlot")
4631		defer func() {
4632			sc := -1
4633			if result.Response != nil {
4634				sc = result.Response.StatusCode
4635			}
4636			tracing.EndSpan(ctx, sc, err)
4637		}()
4638	}
4639	if err := validation.Validate([]validation.Validation{
4640		{TargetValue: resourceGroupName,
4641			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4642				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4643				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4644		return result, validation.NewError("web.AppsClient", "DeleteDeploymentSlot", err.Error())
4645	}
4646
4647	req, err := client.DeleteDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot)
4648	if err != nil {
4649		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", nil, "Failure preparing request")
4650		return
4651	}
4652
4653	resp, err := client.DeleteDeploymentSlotSender(req)
4654	if err != nil {
4655		result.Response = resp
4656		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure sending request")
4657		return
4658	}
4659
4660	result, err = client.DeleteDeploymentSlotResponder(resp)
4661	if err != nil {
4662		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure responding to request")
4663		return
4664	}
4665
4666	return
4667}
4668
4669// DeleteDeploymentSlotPreparer prepares the DeleteDeploymentSlot request.
4670func (client AppsClient) DeleteDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) {
4671	pathParameters := map[string]interface{}{
4672		"id":                autorest.Encode("path", ID),
4673		"name":              autorest.Encode("path", name),
4674		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4675		"slot":              autorest.Encode("path", slot),
4676		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4677	}
4678
4679	const APIVersion = "2018-02-01"
4680	queryParameters := map[string]interface{}{
4681		"api-version": APIVersion,
4682	}
4683
4684	preparer := autorest.CreatePreparer(
4685		autorest.AsDelete(),
4686		autorest.WithBaseURL(client.BaseURI),
4687		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters),
4688		autorest.WithQueryParameters(queryParameters))
4689	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4690}
4691
4692// DeleteDeploymentSlotSender sends the DeleteDeploymentSlot request. The method will close the
4693// http.Response Body if it receives an error.
4694func (client AppsClient) DeleteDeploymentSlotSender(req *http.Request) (*http.Response, error) {
4695	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4696}
4697
4698// DeleteDeploymentSlotResponder handles the response to the DeleteDeploymentSlot request. The method always
4699// closes the http.Response Body.
4700func (client AppsClient) DeleteDeploymentSlotResponder(resp *http.Response) (result autorest.Response, err error) {
4701	err = autorest.Respond(
4702		resp,
4703		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4704		autorest.ByClosing())
4705	result.Response = resp
4706	return
4707}
4708
4709// DeleteDomainOwnershipIdentifier deletes a domain ownership identifier for a web app.
4710// Parameters:
4711// resourceGroupName - name of the resource group to which the resource belongs.
4712// name - name of the app.
4713// domainOwnershipIdentifierName - name of domain ownership identifier.
4714func (client AppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result autorest.Response, err error) {
4715	if tracing.IsEnabled() {
4716		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifier")
4717		defer func() {
4718			sc := -1
4719			if result.Response != nil {
4720				sc = result.Response.StatusCode
4721			}
4722			tracing.EndSpan(ctx, sc, err)
4723		}()
4724	}
4725	if err := validation.Validate([]validation.Validation{
4726		{TargetValue: resourceGroupName,
4727			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4728				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4729				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4730		return result, validation.NewError("web.AppsClient", "DeleteDomainOwnershipIdentifier", err.Error())
4731	}
4732
4733	req, err := client.DeleteDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName)
4734	if err != nil {
4735		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", nil, "Failure preparing request")
4736		return
4737	}
4738
4739	resp, err := client.DeleteDomainOwnershipIdentifierSender(req)
4740	if err != nil {
4741		result.Response = resp
4742		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure sending request")
4743		return
4744	}
4745
4746	result, err = client.DeleteDomainOwnershipIdentifierResponder(resp)
4747	if err != nil {
4748		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure responding to request")
4749		return
4750	}
4751
4752	return
4753}
4754
4755// DeleteDomainOwnershipIdentifierPreparer prepares the DeleteDomainOwnershipIdentifier request.
4756func (client AppsClient) DeleteDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) {
4757	pathParameters := map[string]interface{}{
4758		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
4759		"name":                          autorest.Encode("path", name),
4760		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
4761		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
4762	}
4763
4764	const APIVersion = "2018-02-01"
4765	queryParameters := map[string]interface{}{
4766		"api-version": APIVersion,
4767	}
4768
4769	preparer := autorest.CreatePreparer(
4770		autorest.AsDelete(),
4771		autorest.WithBaseURL(client.BaseURI),
4772		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
4773		autorest.WithQueryParameters(queryParameters))
4774	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4775}
4776
4777// DeleteDomainOwnershipIdentifierSender sends the DeleteDomainOwnershipIdentifier request. The method will close the
4778// http.Response Body if it receives an error.
4779func (client AppsClient) DeleteDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
4780	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4781}
4782
4783// DeleteDomainOwnershipIdentifierResponder handles the response to the DeleteDomainOwnershipIdentifier request. The method always
4784// closes the http.Response Body.
4785func (client AppsClient) DeleteDomainOwnershipIdentifierResponder(resp *http.Response) (result autorest.Response, err error) {
4786	err = autorest.Respond(
4787		resp,
4788		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4789		autorest.ByClosing())
4790	result.Response = resp
4791	return
4792}
4793
4794// DeleteDomainOwnershipIdentifierSlot deletes a domain ownership identifier for a web app.
4795// Parameters:
4796// resourceGroupName - name of the resource group to which the resource belongs.
4797// name - name of the app.
4798// domainOwnershipIdentifierName - name of domain ownership identifier.
4799// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
4800// production slot.
4801func (client AppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result autorest.Response, err error) {
4802	if tracing.IsEnabled() {
4803		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifierSlot")
4804		defer func() {
4805			sc := -1
4806			if result.Response != nil {
4807				sc = result.Response.StatusCode
4808			}
4809			tracing.EndSpan(ctx, sc, err)
4810		}()
4811	}
4812	if err := validation.Validate([]validation.Validation{
4813		{TargetValue: resourceGroupName,
4814			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4815				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4816				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4817		return result, validation.NewError("web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", err.Error())
4818	}
4819
4820	req, err := client.DeleteDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot)
4821	if err != nil {
4822		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
4823		return
4824	}
4825
4826	resp, err := client.DeleteDomainOwnershipIdentifierSlotSender(req)
4827	if err != nil {
4828		result.Response = resp
4829		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure sending request")
4830		return
4831	}
4832
4833	result, err = client.DeleteDomainOwnershipIdentifierSlotResponder(resp)
4834	if err != nil {
4835		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
4836		return
4837	}
4838
4839	return
4840}
4841
4842// DeleteDomainOwnershipIdentifierSlotPreparer prepares the DeleteDomainOwnershipIdentifierSlot request.
4843func (client AppsClient) DeleteDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) {
4844	pathParameters := map[string]interface{}{
4845		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
4846		"name":                          autorest.Encode("path", name),
4847		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
4848		"slot":                          autorest.Encode("path", slot),
4849		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
4850	}
4851
4852	const APIVersion = "2018-02-01"
4853	queryParameters := map[string]interface{}{
4854		"api-version": APIVersion,
4855	}
4856
4857	preparer := autorest.CreatePreparer(
4858		autorest.AsDelete(),
4859		autorest.WithBaseURL(client.BaseURI),
4860		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
4861		autorest.WithQueryParameters(queryParameters))
4862	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4863}
4864
4865// DeleteDomainOwnershipIdentifierSlotSender sends the DeleteDomainOwnershipIdentifierSlot request. The method will close the
4866// http.Response Body if it receives an error.
4867func (client AppsClient) DeleteDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
4868	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4869}
4870
4871// DeleteDomainOwnershipIdentifierSlotResponder handles the response to the DeleteDomainOwnershipIdentifierSlot request. The method always
4872// closes the http.Response Body.
4873func (client AppsClient) DeleteDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result autorest.Response, err error) {
4874	err = autorest.Respond(
4875		resp,
4876		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4877		autorest.ByClosing())
4878	result.Response = resp
4879	return
4880}
4881
4882// DeleteFunction delete a function for web site, or a deployment slot.
4883// Parameters:
4884// resourceGroupName - name of the resource group to which the resource belongs.
4885// name - site name.
4886// functionName - function name.
4887func (client AppsClient) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result autorest.Response, err error) {
4888	if tracing.IsEnabled() {
4889		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunction")
4890		defer func() {
4891			sc := -1
4892			if result.Response != nil {
4893				sc = result.Response.StatusCode
4894			}
4895			tracing.EndSpan(ctx, sc, err)
4896		}()
4897	}
4898	if err := validation.Validate([]validation.Validation{
4899		{TargetValue: resourceGroupName,
4900			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4901				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4902				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4903		return result, validation.NewError("web.AppsClient", "DeleteFunction", err.Error())
4904	}
4905
4906	req, err := client.DeleteFunctionPreparer(ctx, resourceGroupName, name, functionName)
4907	if err != nil {
4908		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", nil, "Failure preparing request")
4909		return
4910	}
4911
4912	resp, err := client.DeleteFunctionSender(req)
4913	if err != nil {
4914		result.Response = resp
4915		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure sending request")
4916		return
4917	}
4918
4919	result, err = client.DeleteFunctionResponder(resp)
4920	if err != nil {
4921		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure responding to request")
4922		return
4923	}
4924
4925	return
4926}
4927
4928// DeleteFunctionPreparer prepares the DeleteFunction request.
4929func (client AppsClient) DeleteFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
4930	pathParameters := map[string]interface{}{
4931		"functionName":      autorest.Encode("path", functionName),
4932		"name":              autorest.Encode("path", name),
4933		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4934		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4935	}
4936
4937	const APIVersion = "2018-02-01"
4938	queryParameters := map[string]interface{}{
4939		"api-version": APIVersion,
4940	}
4941
4942	preparer := autorest.CreatePreparer(
4943		autorest.AsDelete(),
4944		autorest.WithBaseURL(client.BaseURI),
4945		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters),
4946		autorest.WithQueryParameters(queryParameters))
4947	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4948}
4949
4950// DeleteFunctionSender sends the DeleteFunction request. The method will close the
4951// http.Response Body if it receives an error.
4952func (client AppsClient) DeleteFunctionSender(req *http.Request) (*http.Response, error) {
4953	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4954}
4955
4956// DeleteFunctionResponder handles the response to the DeleteFunction request. The method always
4957// closes the http.Response Body.
4958func (client AppsClient) DeleteFunctionResponder(resp *http.Response) (result autorest.Response, err error) {
4959	err = autorest.Respond(
4960		resp,
4961		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
4962		autorest.ByClosing())
4963	result.Response = resp
4964	return
4965}
4966
4967// DeleteFunctionSecret delete a function secret.
4968// Parameters:
4969// resourceGroupName - name of the resource group to which the resource belongs.
4970// name - site name.
4971// functionName - the name of the function.
4972// keyName - the name of the key.
4973func (client AppsClient) DeleteFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (result autorest.Response, err error) {
4974	if tracing.IsEnabled() {
4975		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunctionSecret")
4976		defer func() {
4977			sc := -1
4978			if result.Response != nil {
4979				sc = result.Response.StatusCode
4980			}
4981			tracing.EndSpan(ctx, sc, err)
4982		}()
4983	}
4984	if err := validation.Validate([]validation.Validation{
4985		{TargetValue: resourceGroupName,
4986			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4987				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4988				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4989		return result, validation.NewError("web.AppsClient", "DeleteFunctionSecret", err.Error())
4990	}
4991
4992	req, err := client.DeleteFunctionSecretPreparer(ctx, resourceGroupName, name, functionName, keyName)
4993	if err != nil {
4994		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", nil, "Failure preparing request")
4995		return
4996	}
4997
4998	resp, err := client.DeleteFunctionSecretSender(req)
4999	if err != nil {
5000		result.Response = resp
5001		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", resp, "Failure sending request")
5002		return
5003	}
5004
5005	result, err = client.DeleteFunctionSecretResponder(resp)
5006	if err != nil {
5007		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", resp, "Failure responding to request")
5008		return
5009	}
5010
5011	return
5012}
5013
5014// DeleteFunctionSecretPreparer prepares the DeleteFunctionSecret request.
5015func (client AppsClient) DeleteFunctionSecretPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (*http.Request, error) {
5016	pathParameters := map[string]interface{}{
5017		"functionName":      autorest.Encode("path", functionName),
5018		"keyName":           autorest.Encode("path", keyName),
5019		"name":              autorest.Encode("path", name),
5020		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5021		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5022	}
5023
5024	const APIVersion = "2018-02-01"
5025	queryParameters := map[string]interface{}{
5026		"api-version": APIVersion,
5027	}
5028
5029	preparer := autorest.CreatePreparer(
5030		autorest.AsDelete(),
5031		autorest.WithBaseURL(client.BaseURI),
5032		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}", pathParameters),
5033		autorest.WithQueryParameters(queryParameters))
5034	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5035}
5036
5037// DeleteFunctionSecretSender sends the DeleteFunctionSecret request. The method will close the
5038// http.Response Body if it receives an error.
5039func (client AppsClient) DeleteFunctionSecretSender(req *http.Request) (*http.Response, error) {
5040	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5041}
5042
5043// DeleteFunctionSecretResponder handles the response to the DeleteFunctionSecret request. The method always
5044// closes the http.Response Body.
5045func (client AppsClient) DeleteFunctionSecretResponder(resp *http.Response) (result autorest.Response, err error) {
5046	err = autorest.Respond(
5047		resp,
5048		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
5049		autorest.ByClosing())
5050	result.Response = resp
5051	return
5052}
5053
5054// DeleteFunctionSecretSlot delete a function secret.
5055// Parameters:
5056// resourceGroupName - name of the resource group to which the resource belongs.
5057// name - site name.
5058// functionName - the name of the function.
5059// keyName - the name of the key.
5060// slot - name of the deployment slot.
5061func (client AppsClient) DeleteFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (result autorest.Response, err error) {
5062	if tracing.IsEnabled() {
5063		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunctionSecretSlot")
5064		defer func() {
5065			sc := -1
5066			if result.Response != nil {
5067				sc = result.Response.StatusCode
5068			}
5069			tracing.EndSpan(ctx, sc, err)
5070		}()
5071	}
5072	if err := validation.Validate([]validation.Validation{
5073		{TargetValue: resourceGroupName,
5074			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5075				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5076				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5077		return result, validation.NewError("web.AppsClient", "DeleteFunctionSecretSlot", err.Error())
5078	}
5079
5080	req, err := client.DeleteFunctionSecretSlotPreparer(ctx, resourceGroupName, name, functionName, keyName, slot)
5081	if err != nil {
5082		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", nil, "Failure preparing request")
5083		return
5084	}
5085
5086	resp, err := client.DeleteFunctionSecretSlotSender(req)
5087	if err != nil {
5088		result.Response = resp
5089		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", resp, "Failure sending request")
5090		return
5091	}
5092
5093	result, err = client.DeleteFunctionSecretSlotResponder(resp)
5094	if err != nil {
5095		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", resp, "Failure responding to request")
5096		return
5097	}
5098
5099	return
5100}
5101
5102// DeleteFunctionSecretSlotPreparer prepares the DeleteFunctionSecretSlot request.
5103func (client AppsClient) DeleteFunctionSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (*http.Request, error) {
5104	pathParameters := map[string]interface{}{
5105		"functionName":      autorest.Encode("path", functionName),
5106		"keyName":           autorest.Encode("path", keyName),
5107		"name":              autorest.Encode("path", name),
5108		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5109		"slot":              autorest.Encode("path", slot),
5110		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5111	}
5112
5113	const APIVersion = "2018-02-01"
5114	queryParameters := map[string]interface{}{
5115		"api-version": APIVersion,
5116	}
5117
5118	preparer := autorest.CreatePreparer(
5119		autorest.AsDelete(),
5120		autorest.WithBaseURL(client.BaseURI),
5121		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}", pathParameters),
5122		autorest.WithQueryParameters(queryParameters))
5123	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5124}
5125
5126// DeleteFunctionSecretSlotSender sends the DeleteFunctionSecretSlot request. The method will close the
5127// http.Response Body if it receives an error.
5128func (client AppsClient) DeleteFunctionSecretSlotSender(req *http.Request) (*http.Response, error) {
5129	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5130}
5131
5132// DeleteFunctionSecretSlotResponder handles the response to the DeleteFunctionSecretSlot request. The method always
5133// closes the http.Response Body.
5134func (client AppsClient) DeleteFunctionSecretSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5135	err = autorest.Respond(
5136		resp,
5137		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
5138		autorest.ByClosing())
5139	result.Response = resp
5140	return
5141}
5142
5143// DeleteHostNameBinding deletes a hostname binding for an app.
5144// Parameters:
5145// resourceGroupName - name of the resource group to which the resource belongs.
5146// name - name of the app.
5147// hostName - hostname in the hostname binding.
5148func (client AppsClient) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result autorest.Response, err error) {
5149	if tracing.IsEnabled() {
5150		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBinding")
5151		defer func() {
5152			sc := -1
5153			if result.Response != nil {
5154				sc = result.Response.StatusCode
5155			}
5156			tracing.EndSpan(ctx, sc, err)
5157		}()
5158	}
5159	if err := validation.Validate([]validation.Validation{
5160		{TargetValue: resourceGroupName,
5161			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5162				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5163				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5164		return result, validation.NewError("web.AppsClient", "DeleteHostNameBinding", err.Error())
5165	}
5166
5167	req, err := client.DeleteHostNameBindingPreparer(ctx, resourceGroupName, name, hostName)
5168	if err != nil {
5169		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", nil, "Failure preparing request")
5170		return
5171	}
5172
5173	resp, err := client.DeleteHostNameBindingSender(req)
5174	if err != nil {
5175		result.Response = resp
5176		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure sending request")
5177		return
5178	}
5179
5180	result, err = client.DeleteHostNameBindingResponder(resp)
5181	if err != nil {
5182		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure responding to request")
5183		return
5184	}
5185
5186	return
5187}
5188
5189// DeleteHostNameBindingPreparer prepares the DeleteHostNameBinding request.
5190func (client AppsClient) DeleteHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) {
5191	pathParameters := map[string]interface{}{
5192		"hostName":          autorest.Encode("path", hostName),
5193		"name":              autorest.Encode("path", name),
5194		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5195		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5196	}
5197
5198	const APIVersion = "2018-02-01"
5199	queryParameters := map[string]interface{}{
5200		"api-version": APIVersion,
5201	}
5202
5203	preparer := autorest.CreatePreparer(
5204		autorest.AsDelete(),
5205		autorest.WithBaseURL(client.BaseURI),
5206		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters),
5207		autorest.WithQueryParameters(queryParameters))
5208	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5209}
5210
5211// DeleteHostNameBindingSender sends the DeleteHostNameBinding request. The method will close the
5212// http.Response Body if it receives an error.
5213func (client AppsClient) DeleteHostNameBindingSender(req *http.Request) (*http.Response, error) {
5214	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5215}
5216
5217// DeleteHostNameBindingResponder handles the response to the DeleteHostNameBinding request. The method always
5218// closes the http.Response Body.
5219func (client AppsClient) DeleteHostNameBindingResponder(resp *http.Response) (result autorest.Response, err error) {
5220	err = autorest.Respond(
5221		resp,
5222		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5223		autorest.ByClosing())
5224	result.Response = resp
5225	return
5226}
5227
5228// DeleteHostNameBindingSlot deletes a hostname binding for an app.
5229// Parameters:
5230// resourceGroupName - name of the resource group to which the resource belongs.
5231// name - name of the app.
5232// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
5233// production slot.
5234// hostName - hostname in the hostname binding.
5235func (client AppsClient) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result autorest.Response, err error) {
5236	if tracing.IsEnabled() {
5237		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBindingSlot")
5238		defer func() {
5239			sc := -1
5240			if result.Response != nil {
5241				sc = result.Response.StatusCode
5242			}
5243			tracing.EndSpan(ctx, sc, err)
5244		}()
5245	}
5246	if err := validation.Validate([]validation.Validation{
5247		{TargetValue: resourceGroupName,
5248			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5249				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5250				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5251		return result, validation.NewError("web.AppsClient", "DeleteHostNameBindingSlot", err.Error())
5252	}
5253
5254	req, err := client.DeleteHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName)
5255	if err != nil {
5256		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", nil, "Failure preparing request")
5257		return
5258	}
5259
5260	resp, err := client.DeleteHostNameBindingSlotSender(req)
5261	if err != nil {
5262		result.Response = resp
5263		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure sending request")
5264		return
5265	}
5266
5267	result, err = client.DeleteHostNameBindingSlotResponder(resp)
5268	if err != nil {
5269		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure responding to request")
5270		return
5271	}
5272
5273	return
5274}
5275
5276// DeleteHostNameBindingSlotPreparer prepares the DeleteHostNameBindingSlot request.
5277func (client AppsClient) DeleteHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) {
5278	pathParameters := map[string]interface{}{
5279		"hostName":          autorest.Encode("path", hostName),
5280		"name":              autorest.Encode("path", name),
5281		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5282		"slot":              autorest.Encode("path", slot),
5283		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5284	}
5285
5286	const APIVersion = "2018-02-01"
5287	queryParameters := map[string]interface{}{
5288		"api-version": APIVersion,
5289	}
5290
5291	preparer := autorest.CreatePreparer(
5292		autorest.AsDelete(),
5293		autorest.WithBaseURL(client.BaseURI),
5294		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters),
5295		autorest.WithQueryParameters(queryParameters))
5296	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5297}
5298
5299// DeleteHostNameBindingSlotSender sends the DeleteHostNameBindingSlot request. The method will close the
5300// http.Response Body if it receives an error.
5301func (client AppsClient) DeleteHostNameBindingSlotSender(req *http.Request) (*http.Response, error) {
5302	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5303}
5304
5305// DeleteHostNameBindingSlotResponder handles the response to the DeleteHostNameBindingSlot request. The method always
5306// closes the http.Response Body.
5307func (client AppsClient) DeleteHostNameBindingSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5308	err = autorest.Respond(
5309		resp,
5310		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5311		autorest.ByClosing())
5312	result.Response = resp
5313	return
5314}
5315
5316// DeleteHostSecret delete a host level secret.
5317// Parameters:
5318// resourceGroupName - name of the resource group to which the resource belongs.
5319// name - site name.
5320// keyType - the type of host key.
5321// keyName - the name of the key.
5322func (client AppsClient) DeleteHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (result autorest.Response, err error) {
5323	if tracing.IsEnabled() {
5324		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostSecret")
5325		defer func() {
5326			sc := -1
5327			if result.Response != nil {
5328				sc = result.Response.StatusCode
5329			}
5330			tracing.EndSpan(ctx, sc, err)
5331		}()
5332	}
5333	if err := validation.Validate([]validation.Validation{
5334		{TargetValue: resourceGroupName,
5335			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5336				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5337				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5338		return result, validation.NewError("web.AppsClient", "DeleteHostSecret", err.Error())
5339	}
5340
5341	req, err := client.DeleteHostSecretPreparer(ctx, resourceGroupName, name, keyType, keyName)
5342	if err != nil {
5343		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", nil, "Failure preparing request")
5344		return
5345	}
5346
5347	resp, err := client.DeleteHostSecretSender(req)
5348	if err != nil {
5349		result.Response = resp
5350		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", resp, "Failure sending request")
5351		return
5352	}
5353
5354	result, err = client.DeleteHostSecretResponder(resp)
5355	if err != nil {
5356		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", resp, "Failure responding to request")
5357		return
5358	}
5359
5360	return
5361}
5362
5363// DeleteHostSecretPreparer prepares the DeleteHostSecret request.
5364func (client AppsClient) DeleteHostSecretPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (*http.Request, error) {
5365	pathParameters := map[string]interface{}{
5366		"keyName":           autorest.Encode("path", keyName),
5367		"keyType":           autorest.Encode("path", keyType),
5368		"name":              autorest.Encode("path", name),
5369		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5370		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5371	}
5372
5373	const APIVersion = "2018-02-01"
5374	queryParameters := map[string]interface{}{
5375		"api-version": APIVersion,
5376	}
5377
5378	preparer := autorest.CreatePreparer(
5379		autorest.AsDelete(),
5380		autorest.WithBaseURL(client.BaseURI),
5381		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}", pathParameters),
5382		autorest.WithQueryParameters(queryParameters))
5383	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5384}
5385
5386// DeleteHostSecretSender sends the DeleteHostSecret request. The method will close the
5387// http.Response Body if it receives an error.
5388func (client AppsClient) DeleteHostSecretSender(req *http.Request) (*http.Response, error) {
5389	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5390}
5391
5392// DeleteHostSecretResponder handles the response to the DeleteHostSecret request. The method always
5393// closes the http.Response Body.
5394func (client AppsClient) DeleteHostSecretResponder(resp *http.Response) (result autorest.Response, err error) {
5395	err = autorest.Respond(
5396		resp,
5397		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
5398		autorest.ByClosing())
5399	result.Response = resp
5400	return
5401}
5402
5403// DeleteHostSecretSlot delete a host level secret.
5404// Parameters:
5405// resourceGroupName - name of the resource group to which the resource belongs.
5406// name - site name.
5407// keyType - the type of host key.
5408// keyName - the name of the key.
5409// slot - name of the deployment slot.
5410func (client AppsClient) DeleteHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (result autorest.Response, err error) {
5411	if tracing.IsEnabled() {
5412		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostSecretSlot")
5413		defer func() {
5414			sc := -1
5415			if result.Response != nil {
5416				sc = result.Response.StatusCode
5417			}
5418			tracing.EndSpan(ctx, sc, err)
5419		}()
5420	}
5421	if err := validation.Validate([]validation.Validation{
5422		{TargetValue: resourceGroupName,
5423			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5424				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5425				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5426		return result, validation.NewError("web.AppsClient", "DeleteHostSecretSlot", err.Error())
5427	}
5428
5429	req, err := client.DeleteHostSecretSlotPreparer(ctx, resourceGroupName, name, keyType, keyName, slot)
5430	if err != nil {
5431		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", nil, "Failure preparing request")
5432		return
5433	}
5434
5435	resp, err := client.DeleteHostSecretSlotSender(req)
5436	if err != nil {
5437		result.Response = resp
5438		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", resp, "Failure sending request")
5439		return
5440	}
5441
5442	result, err = client.DeleteHostSecretSlotResponder(resp)
5443	if err != nil {
5444		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", resp, "Failure responding to request")
5445		return
5446	}
5447
5448	return
5449}
5450
5451// DeleteHostSecretSlotPreparer prepares the DeleteHostSecretSlot request.
5452func (client AppsClient) DeleteHostSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (*http.Request, error) {
5453	pathParameters := map[string]interface{}{
5454		"keyName":           autorest.Encode("path", keyName),
5455		"keyType":           autorest.Encode("path", keyType),
5456		"name":              autorest.Encode("path", name),
5457		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5458		"slot":              autorest.Encode("path", slot),
5459		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5460	}
5461
5462	const APIVersion = "2018-02-01"
5463	queryParameters := map[string]interface{}{
5464		"api-version": APIVersion,
5465	}
5466
5467	preparer := autorest.CreatePreparer(
5468		autorest.AsDelete(),
5469		autorest.WithBaseURL(client.BaseURI),
5470		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}", pathParameters),
5471		autorest.WithQueryParameters(queryParameters))
5472	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5473}
5474
5475// DeleteHostSecretSlotSender sends the DeleteHostSecretSlot request. The method will close the
5476// http.Response Body if it receives an error.
5477func (client AppsClient) DeleteHostSecretSlotSender(req *http.Request) (*http.Response, error) {
5478	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5479}
5480
5481// DeleteHostSecretSlotResponder handles the response to the DeleteHostSecretSlot request. The method always
5482// closes the http.Response Body.
5483func (client AppsClient) DeleteHostSecretSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5484	err = autorest.Respond(
5485		resp,
5486		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
5487		autorest.ByClosing())
5488	result.Response = resp
5489	return
5490}
5491
5492// DeleteHybridConnection removes a Hybrid Connection from this site.
5493// Parameters:
5494// resourceGroupName - name of the resource group to which the resource belongs.
5495// name - the name of the web app.
5496// namespaceName - the namespace for this hybrid connection.
5497// relayName - the relay name for this hybrid connection.
5498func (client AppsClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result autorest.Response, err error) {
5499	if tracing.IsEnabled() {
5500		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnection")
5501		defer func() {
5502			sc := -1
5503			if result.Response != nil {
5504				sc = result.Response.StatusCode
5505			}
5506			tracing.EndSpan(ctx, sc, err)
5507		}()
5508	}
5509	if err := validation.Validate([]validation.Validation{
5510		{TargetValue: resourceGroupName,
5511			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5512				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5513				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5514		return result, validation.NewError("web.AppsClient", "DeleteHybridConnection", err.Error())
5515	}
5516
5517	req, err := client.DeleteHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName)
5518	if err != nil {
5519		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", nil, "Failure preparing request")
5520		return
5521	}
5522
5523	resp, err := client.DeleteHybridConnectionSender(req)
5524	if err != nil {
5525		result.Response = resp
5526		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure sending request")
5527		return
5528	}
5529
5530	result, err = client.DeleteHybridConnectionResponder(resp)
5531	if err != nil {
5532		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure responding to request")
5533		return
5534	}
5535
5536	return
5537}
5538
5539// DeleteHybridConnectionPreparer prepares the DeleteHybridConnection request.
5540func (client AppsClient) DeleteHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) {
5541	pathParameters := map[string]interface{}{
5542		"name":              autorest.Encode("path", name),
5543		"namespaceName":     autorest.Encode("path", namespaceName),
5544		"relayName":         autorest.Encode("path", relayName),
5545		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5546		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5547	}
5548
5549	const APIVersion = "2018-02-01"
5550	queryParameters := map[string]interface{}{
5551		"api-version": APIVersion,
5552	}
5553
5554	preparer := autorest.CreatePreparer(
5555		autorest.AsDelete(),
5556		autorest.WithBaseURL(client.BaseURI),
5557		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
5558		autorest.WithQueryParameters(queryParameters))
5559	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5560}
5561
5562// DeleteHybridConnectionSender sends the DeleteHybridConnection request. The method will close the
5563// http.Response Body if it receives an error.
5564func (client AppsClient) DeleteHybridConnectionSender(req *http.Request) (*http.Response, error) {
5565	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5566}
5567
5568// DeleteHybridConnectionResponder handles the response to the DeleteHybridConnection request. The method always
5569// closes the http.Response Body.
5570func (client AppsClient) DeleteHybridConnectionResponder(resp *http.Response) (result autorest.Response, err error) {
5571	err = autorest.Respond(
5572		resp,
5573		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
5574		autorest.ByClosing())
5575	result.Response = resp
5576	return
5577}
5578
5579// DeleteHybridConnectionSlot removes a Hybrid Connection from this site.
5580// Parameters:
5581// resourceGroupName - name of the resource group to which the resource belongs.
5582// name - the name of the web app.
5583// namespaceName - the namespace for this hybrid connection.
5584// relayName - the relay name for this hybrid connection.
5585// slot - the name of the slot for the web app.
5586func (client AppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result autorest.Response, err error) {
5587	if tracing.IsEnabled() {
5588		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnectionSlot")
5589		defer func() {
5590			sc := -1
5591			if result.Response != nil {
5592				sc = result.Response.StatusCode
5593			}
5594			tracing.EndSpan(ctx, sc, err)
5595		}()
5596	}
5597	if err := validation.Validate([]validation.Validation{
5598		{TargetValue: resourceGroupName,
5599			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5600				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5601				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5602		return result, validation.NewError("web.AppsClient", "DeleteHybridConnectionSlot", err.Error())
5603	}
5604
5605	req, err := client.DeleteHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot)
5606	if err != nil {
5607		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", nil, "Failure preparing request")
5608		return
5609	}
5610
5611	resp, err := client.DeleteHybridConnectionSlotSender(req)
5612	if err != nil {
5613		result.Response = resp
5614		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure sending request")
5615		return
5616	}
5617
5618	result, err = client.DeleteHybridConnectionSlotResponder(resp)
5619	if err != nil {
5620		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure responding to request")
5621		return
5622	}
5623
5624	return
5625}
5626
5627// DeleteHybridConnectionSlotPreparer prepares the DeleteHybridConnectionSlot request.
5628func (client AppsClient) DeleteHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) {
5629	pathParameters := map[string]interface{}{
5630		"name":              autorest.Encode("path", name),
5631		"namespaceName":     autorest.Encode("path", namespaceName),
5632		"relayName":         autorest.Encode("path", relayName),
5633		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5634		"slot":              autorest.Encode("path", slot),
5635		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5636	}
5637
5638	const APIVersion = "2018-02-01"
5639	queryParameters := map[string]interface{}{
5640		"api-version": APIVersion,
5641	}
5642
5643	preparer := autorest.CreatePreparer(
5644		autorest.AsDelete(),
5645		autorest.WithBaseURL(client.BaseURI),
5646		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
5647		autorest.WithQueryParameters(queryParameters))
5648	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5649}
5650
5651// DeleteHybridConnectionSlotSender sends the DeleteHybridConnectionSlot request. The method will close the
5652// http.Response Body if it receives an error.
5653func (client AppsClient) DeleteHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
5654	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5655}
5656
5657// DeleteHybridConnectionSlotResponder handles the response to the DeleteHybridConnectionSlot request. The method always
5658// closes the http.Response Body.
5659func (client AppsClient) DeleteHybridConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5660	err = autorest.Respond(
5661		resp,
5662		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
5663		autorest.ByClosing())
5664	result.Response = resp
5665	return
5666}
5667
5668// DeleteInstanceFunctionSlot delete a function for web site, or a deployment slot.
5669// Parameters:
5670// resourceGroupName - name of the resource group to which the resource belongs.
5671// name - site name.
5672// functionName - function name.
5673// slot - name of the deployment slot.
5674func (client AppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result autorest.Response, err error) {
5675	if tracing.IsEnabled() {
5676		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceFunctionSlot")
5677		defer func() {
5678			sc := -1
5679			if result.Response != nil {
5680				sc = result.Response.StatusCode
5681			}
5682			tracing.EndSpan(ctx, sc, err)
5683		}()
5684	}
5685	if err := validation.Validate([]validation.Validation{
5686		{TargetValue: resourceGroupName,
5687			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5688				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5689				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5690		return result, validation.NewError("web.AppsClient", "DeleteInstanceFunctionSlot", err.Error())
5691	}
5692
5693	req, err := client.DeleteInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
5694	if err != nil {
5695		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", nil, "Failure preparing request")
5696		return
5697	}
5698
5699	resp, err := client.DeleteInstanceFunctionSlotSender(req)
5700	if err != nil {
5701		result.Response = resp
5702		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure sending request")
5703		return
5704	}
5705
5706	result, err = client.DeleteInstanceFunctionSlotResponder(resp)
5707	if err != nil {
5708		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure responding to request")
5709		return
5710	}
5711
5712	return
5713}
5714
5715// DeleteInstanceFunctionSlotPreparer prepares the DeleteInstanceFunctionSlot request.
5716func (client AppsClient) DeleteInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
5717	pathParameters := map[string]interface{}{
5718		"functionName":      autorest.Encode("path", functionName),
5719		"name":              autorest.Encode("path", name),
5720		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5721		"slot":              autorest.Encode("path", slot),
5722		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5723	}
5724
5725	const APIVersion = "2018-02-01"
5726	queryParameters := map[string]interface{}{
5727		"api-version": APIVersion,
5728	}
5729
5730	preparer := autorest.CreatePreparer(
5731		autorest.AsDelete(),
5732		autorest.WithBaseURL(client.BaseURI),
5733		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters),
5734		autorest.WithQueryParameters(queryParameters))
5735	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5736}
5737
5738// DeleteInstanceFunctionSlotSender sends the DeleteInstanceFunctionSlot request. The method will close the
5739// http.Response Body if it receives an error.
5740func (client AppsClient) DeleteInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) {
5741	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5742}
5743
5744// DeleteInstanceFunctionSlotResponder handles the response to the DeleteInstanceFunctionSlot request. The method always
5745// closes the http.Response Body.
5746func (client AppsClient) DeleteInstanceFunctionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5747	err = autorest.Respond(
5748		resp,
5749		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
5750		autorest.ByClosing())
5751	result.Response = resp
5752	return
5753}
5754
5755// DeleteInstanceProcess terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out
5756// instance in a web site.
5757// Parameters:
5758// resourceGroupName - name of the resource group to which the resource belongs.
5759// name - site name.
5760// processID - pID.
5761// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
5762// response from "GET api/sites/{siteName}/instances".
5763func (client AppsClient) DeleteInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result autorest.Response, err error) {
5764	if tracing.IsEnabled() {
5765		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcess")
5766		defer func() {
5767			sc := -1
5768			if result.Response != nil {
5769				sc = result.Response.StatusCode
5770			}
5771			tracing.EndSpan(ctx, sc, err)
5772		}()
5773	}
5774	if err := validation.Validate([]validation.Validation{
5775		{TargetValue: resourceGroupName,
5776			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5777				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5778				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5779		return result, validation.NewError("web.AppsClient", "DeleteInstanceProcess", err.Error())
5780	}
5781
5782	req, err := client.DeleteInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID)
5783	if err != nil {
5784		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", nil, "Failure preparing request")
5785		return
5786	}
5787
5788	resp, err := client.DeleteInstanceProcessSender(req)
5789	if err != nil {
5790		result.Response = resp
5791		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure sending request")
5792		return
5793	}
5794
5795	result, err = client.DeleteInstanceProcessResponder(resp)
5796	if err != nil {
5797		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure responding to request")
5798		return
5799	}
5800
5801	return
5802}
5803
5804// DeleteInstanceProcessPreparer prepares the DeleteInstanceProcess request.
5805func (client AppsClient) DeleteInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
5806	pathParameters := map[string]interface{}{
5807		"instanceId":        autorest.Encode("path", instanceID),
5808		"name":              autorest.Encode("path", name),
5809		"processId":         autorest.Encode("path", processID),
5810		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5811		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5812	}
5813
5814	const APIVersion = "2018-02-01"
5815	queryParameters := map[string]interface{}{
5816		"api-version": APIVersion,
5817	}
5818
5819	preparer := autorest.CreatePreparer(
5820		autorest.AsDelete(),
5821		autorest.WithBaseURL(client.BaseURI),
5822		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters),
5823		autorest.WithQueryParameters(queryParameters))
5824	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5825}
5826
5827// DeleteInstanceProcessSender sends the DeleteInstanceProcess request. The method will close the
5828// http.Response Body if it receives an error.
5829func (client AppsClient) DeleteInstanceProcessSender(req *http.Request) (*http.Response, error) {
5830	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5831}
5832
5833// DeleteInstanceProcessResponder handles the response to the DeleteInstanceProcess request. The method always
5834// closes the http.Response Body.
5835func (client AppsClient) DeleteInstanceProcessResponder(resp *http.Response) (result autorest.Response, err error) {
5836	err = autorest.Respond(
5837		resp,
5838		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
5839		autorest.ByClosing())
5840	result.Response = resp
5841	return
5842}
5843
5844// DeleteInstanceProcessSlot terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out
5845// instance in a web site.
5846// Parameters:
5847// resourceGroupName - name of the resource group to which the resource belongs.
5848// name - site name.
5849// processID - pID.
5850// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
5851// production slot.
5852// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
5853// response from "GET api/sites/{siteName}/instances".
5854func (client AppsClient) DeleteInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result autorest.Response, err error) {
5855	if tracing.IsEnabled() {
5856		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcessSlot")
5857		defer func() {
5858			sc := -1
5859			if result.Response != nil {
5860				sc = result.Response.StatusCode
5861			}
5862			tracing.EndSpan(ctx, sc, err)
5863		}()
5864	}
5865	if err := validation.Validate([]validation.Validation{
5866		{TargetValue: resourceGroupName,
5867			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5868				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5869				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5870		return result, validation.NewError("web.AppsClient", "DeleteInstanceProcessSlot", err.Error())
5871	}
5872
5873	req, err := client.DeleteInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
5874	if err != nil {
5875		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", nil, "Failure preparing request")
5876		return
5877	}
5878
5879	resp, err := client.DeleteInstanceProcessSlotSender(req)
5880	if err != nil {
5881		result.Response = resp
5882		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure sending request")
5883		return
5884	}
5885
5886	result, err = client.DeleteInstanceProcessSlotResponder(resp)
5887	if err != nil {
5888		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure responding to request")
5889		return
5890	}
5891
5892	return
5893}
5894
5895// DeleteInstanceProcessSlotPreparer prepares the DeleteInstanceProcessSlot request.
5896func (client AppsClient) DeleteInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
5897	pathParameters := map[string]interface{}{
5898		"instanceId":        autorest.Encode("path", instanceID),
5899		"name":              autorest.Encode("path", name),
5900		"processId":         autorest.Encode("path", processID),
5901		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5902		"slot":              autorest.Encode("path", slot),
5903		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5904	}
5905
5906	const APIVersion = "2018-02-01"
5907	queryParameters := map[string]interface{}{
5908		"api-version": APIVersion,
5909	}
5910
5911	preparer := autorest.CreatePreparer(
5912		autorest.AsDelete(),
5913		autorest.WithBaseURL(client.BaseURI),
5914		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters),
5915		autorest.WithQueryParameters(queryParameters))
5916	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5917}
5918
5919// DeleteInstanceProcessSlotSender sends the DeleteInstanceProcessSlot request. The method will close the
5920// http.Response Body if it receives an error.
5921func (client AppsClient) DeleteInstanceProcessSlotSender(req *http.Request) (*http.Response, error) {
5922	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5923}
5924
5925// DeleteInstanceProcessSlotResponder handles the response to the DeleteInstanceProcessSlot request. The method always
5926// closes the http.Response Body.
5927func (client AppsClient) DeleteInstanceProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5928	err = autorest.Respond(
5929		resp,
5930		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
5931		autorest.ByClosing())
5932	result.Response = resp
5933	return
5934}
5935
5936// DeletePremierAddOn delete a premier add-on from an app.
5937// Parameters:
5938// resourceGroupName - name of the resource group to which the resource belongs.
5939// name - name of the app.
5940// premierAddOnName - add-on name.
5941func (client AppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result autorest.Response, err error) {
5942	if tracing.IsEnabled() {
5943		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOn")
5944		defer func() {
5945			sc := -1
5946			if result.Response != nil {
5947				sc = result.Response.StatusCode
5948			}
5949			tracing.EndSpan(ctx, sc, err)
5950		}()
5951	}
5952	if err := validation.Validate([]validation.Validation{
5953		{TargetValue: resourceGroupName,
5954			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5955				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5956				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5957		return result, validation.NewError("web.AppsClient", "DeletePremierAddOn", err.Error())
5958	}
5959
5960	req, err := client.DeletePremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName)
5961	if err != nil {
5962		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", nil, "Failure preparing request")
5963		return
5964	}
5965
5966	resp, err := client.DeletePremierAddOnSender(req)
5967	if err != nil {
5968		result.Response = resp
5969		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure sending request")
5970		return
5971	}
5972
5973	result, err = client.DeletePremierAddOnResponder(resp)
5974	if err != nil {
5975		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure responding to request")
5976		return
5977	}
5978
5979	return
5980}
5981
5982// DeletePremierAddOnPreparer prepares the DeletePremierAddOn request.
5983func (client AppsClient) DeletePremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) {
5984	pathParameters := map[string]interface{}{
5985		"name":              autorest.Encode("path", name),
5986		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
5987		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5988		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5989	}
5990
5991	const APIVersion = "2018-02-01"
5992	queryParameters := map[string]interface{}{
5993		"api-version": APIVersion,
5994	}
5995
5996	preparer := autorest.CreatePreparer(
5997		autorest.AsDelete(),
5998		autorest.WithBaseURL(client.BaseURI),
5999		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters),
6000		autorest.WithQueryParameters(queryParameters))
6001	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6002}
6003
6004// DeletePremierAddOnSender sends the DeletePremierAddOn request. The method will close the
6005// http.Response Body if it receives an error.
6006func (client AppsClient) DeletePremierAddOnSender(req *http.Request) (*http.Response, error) {
6007	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6008}
6009
6010// DeletePremierAddOnResponder handles the response to the DeletePremierAddOn request. The method always
6011// closes the http.Response Body.
6012func (client AppsClient) DeletePremierAddOnResponder(resp *http.Response) (result autorest.Response, err error) {
6013	err = autorest.Respond(
6014		resp,
6015		azure.WithErrorUnlessStatusCode(http.StatusOK),
6016		autorest.ByClosing())
6017	result.Response = resp
6018	return
6019}
6020
6021// DeletePremierAddOnSlot delete a premier add-on from an app.
6022// Parameters:
6023// resourceGroupName - name of the resource group to which the resource belongs.
6024// name - name of the app.
6025// premierAddOnName - add-on name.
6026// slot - name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the
6027// production slot.
6028func (client AppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result autorest.Response, err error) {
6029	if tracing.IsEnabled() {
6030		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOnSlot")
6031		defer func() {
6032			sc := -1
6033			if result.Response != nil {
6034				sc = result.Response.StatusCode
6035			}
6036			tracing.EndSpan(ctx, sc, err)
6037		}()
6038	}
6039	if err := validation.Validate([]validation.Validation{
6040		{TargetValue: resourceGroupName,
6041			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6042				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6043				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6044		return result, validation.NewError("web.AppsClient", "DeletePremierAddOnSlot", err.Error())
6045	}
6046
6047	req, err := client.DeletePremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot)
6048	if err != nil {
6049		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", nil, "Failure preparing request")
6050		return
6051	}
6052
6053	resp, err := client.DeletePremierAddOnSlotSender(req)
6054	if err != nil {
6055		result.Response = resp
6056		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure sending request")
6057		return
6058	}
6059
6060	result, err = client.DeletePremierAddOnSlotResponder(resp)
6061	if err != nil {
6062		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure responding to request")
6063		return
6064	}
6065
6066	return
6067}
6068
6069// DeletePremierAddOnSlotPreparer prepares the DeletePremierAddOnSlot request.
6070func (client AppsClient) DeletePremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) {
6071	pathParameters := map[string]interface{}{
6072		"name":              autorest.Encode("path", name),
6073		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
6074		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6075		"slot":              autorest.Encode("path", slot),
6076		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6077	}
6078
6079	const APIVersion = "2018-02-01"
6080	queryParameters := map[string]interface{}{
6081		"api-version": APIVersion,
6082	}
6083
6084	preparer := autorest.CreatePreparer(
6085		autorest.AsDelete(),
6086		autorest.WithBaseURL(client.BaseURI),
6087		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters),
6088		autorest.WithQueryParameters(queryParameters))
6089	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6090}
6091
6092// DeletePremierAddOnSlotSender sends the DeletePremierAddOnSlot request. The method will close the
6093// http.Response Body if it receives an error.
6094func (client AppsClient) DeletePremierAddOnSlotSender(req *http.Request) (*http.Response, error) {
6095	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6096}
6097
6098// DeletePremierAddOnSlotResponder handles the response to the DeletePremierAddOnSlot request. The method always
6099// closes the http.Response Body.
6100func (client AppsClient) DeletePremierAddOnSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6101	err = autorest.Respond(
6102		resp,
6103		azure.WithErrorUnlessStatusCode(http.StatusOK),
6104		autorest.ByClosing())
6105	result.Response = resp
6106	return
6107}
6108
6109// DeleteProcess terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in
6110// a web site.
6111// Parameters:
6112// resourceGroupName - name of the resource group to which the resource belongs.
6113// name - site name.
6114// processID - pID.
6115func (client AppsClient) DeleteProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result autorest.Response, err error) {
6116	if tracing.IsEnabled() {
6117		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcess")
6118		defer func() {
6119			sc := -1
6120			if result.Response != nil {
6121				sc = result.Response.StatusCode
6122			}
6123			tracing.EndSpan(ctx, sc, err)
6124		}()
6125	}
6126	if err := validation.Validate([]validation.Validation{
6127		{TargetValue: resourceGroupName,
6128			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6129				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6130				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6131		return result, validation.NewError("web.AppsClient", "DeleteProcess", err.Error())
6132	}
6133
6134	req, err := client.DeleteProcessPreparer(ctx, resourceGroupName, name, processID)
6135	if err != nil {
6136		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", nil, "Failure preparing request")
6137		return
6138	}
6139
6140	resp, err := client.DeleteProcessSender(req)
6141	if err != nil {
6142		result.Response = resp
6143		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure sending request")
6144		return
6145	}
6146
6147	result, err = client.DeleteProcessResponder(resp)
6148	if err != nil {
6149		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure responding to request")
6150		return
6151	}
6152
6153	return
6154}
6155
6156// DeleteProcessPreparer prepares the DeleteProcess request.
6157func (client AppsClient) DeleteProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
6158	pathParameters := map[string]interface{}{
6159		"name":              autorest.Encode("path", name),
6160		"processId":         autorest.Encode("path", processID),
6161		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6162		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6163	}
6164
6165	const APIVersion = "2018-02-01"
6166	queryParameters := map[string]interface{}{
6167		"api-version": APIVersion,
6168	}
6169
6170	preparer := autorest.CreatePreparer(
6171		autorest.AsDelete(),
6172		autorest.WithBaseURL(client.BaseURI),
6173		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters),
6174		autorest.WithQueryParameters(queryParameters))
6175	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6176}
6177
6178// DeleteProcessSender sends the DeleteProcess request. The method will close the
6179// http.Response Body if it receives an error.
6180func (client AppsClient) DeleteProcessSender(req *http.Request) (*http.Response, error) {
6181	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6182}
6183
6184// DeleteProcessResponder handles the response to the DeleteProcess request. The method always
6185// closes the http.Response Body.
6186func (client AppsClient) DeleteProcessResponder(resp *http.Response) (result autorest.Response, err error) {
6187	err = autorest.Respond(
6188		resp,
6189		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
6190		autorest.ByClosing())
6191	result.Response = resp
6192	return
6193}
6194
6195// DeleteProcessSlot terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out
6196// instance in a web site.
6197// Parameters:
6198// resourceGroupName - name of the resource group to which the resource belongs.
6199// name - site name.
6200// processID - pID.
6201// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
6202// production slot.
6203func (client AppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result autorest.Response, err error) {
6204	if tracing.IsEnabled() {
6205		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcessSlot")
6206		defer func() {
6207			sc := -1
6208			if result.Response != nil {
6209				sc = result.Response.StatusCode
6210			}
6211			tracing.EndSpan(ctx, sc, err)
6212		}()
6213	}
6214	if err := validation.Validate([]validation.Validation{
6215		{TargetValue: resourceGroupName,
6216			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6217				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6218				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6219		return result, validation.NewError("web.AppsClient", "DeleteProcessSlot", err.Error())
6220	}
6221
6222	req, err := client.DeleteProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot)
6223	if err != nil {
6224		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", nil, "Failure preparing request")
6225		return
6226	}
6227
6228	resp, err := client.DeleteProcessSlotSender(req)
6229	if err != nil {
6230		result.Response = resp
6231		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure sending request")
6232		return
6233	}
6234
6235	result, err = client.DeleteProcessSlotResponder(resp)
6236	if err != nil {
6237		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure responding to request")
6238		return
6239	}
6240
6241	return
6242}
6243
6244// DeleteProcessSlotPreparer prepares the DeleteProcessSlot request.
6245func (client AppsClient) DeleteProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
6246	pathParameters := map[string]interface{}{
6247		"name":              autorest.Encode("path", name),
6248		"processId":         autorest.Encode("path", processID),
6249		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6250		"slot":              autorest.Encode("path", slot),
6251		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6252	}
6253
6254	const APIVersion = "2018-02-01"
6255	queryParameters := map[string]interface{}{
6256		"api-version": APIVersion,
6257	}
6258
6259	preparer := autorest.CreatePreparer(
6260		autorest.AsDelete(),
6261		autorest.WithBaseURL(client.BaseURI),
6262		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters),
6263		autorest.WithQueryParameters(queryParameters))
6264	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6265}
6266
6267// DeleteProcessSlotSender sends the DeleteProcessSlot request. The method will close the
6268// http.Response Body if it receives an error.
6269func (client AppsClient) DeleteProcessSlotSender(req *http.Request) (*http.Response, error) {
6270	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6271}
6272
6273// DeleteProcessSlotResponder handles the response to the DeleteProcessSlot request. The method always
6274// closes the http.Response Body.
6275func (client AppsClient) DeleteProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6276	err = autorest.Respond(
6277		resp,
6278		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
6279		autorest.ByClosing())
6280	result.Response = resp
6281	return
6282}
6283
6284// DeletePublicCertificate deletes a hostname binding for an app.
6285// Parameters:
6286// resourceGroupName - name of the resource group to which the resource belongs.
6287// name - name of the app.
6288// publicCertificateName - public certificate name.
6289func (client AppsClient) DeletePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result autorest.Response, err error) {
6290	if tracing.IsEnabled() {
6291		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificate")
6292		defer func() {
6293			sc := -1
6294			if result.Response != nil {
6295				sc = result.Response.StatusCode
6296			}
6297			tracing.EndSpan(ctx, sc, err)
6298		}()
6299	}
6300	if err := validation.Validate([]validation.Validation{
6301		{TargetValue: resourceGroupName,
6302			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6303				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6304				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6305		return result, validation.NewError("web.AppsClient", "DeletePublicCertificate", err.Error())
6306	}
6307
6308	req, err := client.DeletePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName)
6309	if err != nil {
6310		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", nil, "Failure preparing request")
6311		return
6312	}
6313
6314	resp, err := client.DeletePublicCertificateSender(req)
6315	if err != nil {
6316		result.Response = resp
6317		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure sending request")
6318		return
6319	}
6320
6321	result, err = client.DeletePublicCertificateResponder(resp)
6322	if err != nil {
6323		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure responding to request")
6324		return
6325	}
6326
6327	return
6328}
6329
6330// DeletePublicCertificatePreparer prepares the DeletePublicCertificate request.
6331func (client AppsClient) DeletePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) {
6332	pathParameters := map[string]interface{}{
6333		"name":                  autorest.Encode("path", name),
6334		"publicCertificateName": autorest.Encode("path", publicCertificateName),
6335		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
6336		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
6337	}
6338
6339	const APIVersion = "2018-02-01"
6340	queryParameters := map[string]interface{}{
6341		"api-version": APIVersion,
6342	}
6343
6344	preparer := autorest.CreatePreparer(
6345		autorest.AsDelete(),
6346		autorest.WithBaseURL(client.BaseURI),
6347		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters),
6348		autorest.WithQueryParameters(queryParameters))
6349	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6350}
6351
6352// DeletePublicCertificateSender sends the DeletePublicCertificate request. The method will close the
6353// http.Response Body if it receives an error.
6354func (client AppsClient) DeletePublicCertificateSender(req *http.Request) (*http.Response, error) {
6355	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6356}
6357
6358// DeletePublicCertificateResponder handles the response to the DeletePublicCertificate request. The method always
6359// closes the http.Response Body.
6360func (client AppsClient) DeletePublicCertificateResponder(resp *http.Response) (result autorest.Response, err error) {
6361	err = autorest.Respond(
6362		resp,
6363		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
6364		autorest.ByClosing())
6365	result.Response = resp
6366	return
6367}
6368
6369// DeletePublicCertificateSlot deletes a hostname binding for an app.
6370// Parameters:
6371// resourceGroupName - name of the resource group to which the resource belongs.
6372// name - name of the app.
6373// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
6374// production slot.
6375// publicCertificateName - public certificate name.
6376func (client AppsClient) DeletePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result autorest.Response, err error) {
6377	if tracing.IsEnabled() {
6378		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificateSlot")
6379		defer func() {
6380			sc := -1
6381			if result.Response != nil {
6382				sc = result.Response.StatusCode
6383			}
6384			tracing.EndSpan(ctx, sc, err)
6385		}()
6386	}
6387	if err := validation.Validate([]validation.Validation{
6388		{TargetValue: resourceGroupName,
6389			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6390				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6391				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6392		return result, validation.NewError("web.AppsClient", "DeletePublicCertificateSlot", err.Error())
6393	}
6394
6395	req, err := client.DeletePublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName)
6396	if err != nil {
6397		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", nil, "Failure preparing request")
6398		return
6399	}
6400
6401	resp, err := client.DeletePublicCertificateSlotSender(req)
6402	if err != nil {
6403		result.Response = resp
6404		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure sending request")
6405		return
6406	}
6407
6408	result, err = client.DeletePublicCertificateSlotResponder(resp)
6409	if err != nil {
6410		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure responding to request")
6411		return
6412	}
6413
6414	return
6415}
6416
6417// DeletePublicCertificateSlotPreparer prepares the DeletePublicCertificateSlot request.
6418func (client AppsClient) DeletePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) {
6419	pathParameters := map[string]interface{}{
6420		"name":                  autorest.Encode("path", name),
6421		"publicCertificateName": autorest.Encode("path", publicCertificateName),
6422		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
6423		"slot":                  autorest.Encode("path", slot),
6424		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
6425	}
6426
6427	const APIVersion = "2018-02-01"
6428	queryParameters := map[string]interface{}{
6429		"api-version": APIVersion,
6430	}
6431
6432	preparer := autorest.CreatePreparer(
6433		autorest.AsDelete(),
6434		autorest.WithBaseURL(client.BaseURI),
6435		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters),
6436		autorest.WithQueryParameters(queryParameters))
6437	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6438}
6439
6440// DeletePublicCertificateSlotSender sends the DeletePublicCertificateSlot request. The method will close the
6441// http.Response Body if it receives an error.
6442func (client AppsClient) DeletePublicCertificateSlotSender(req *http.Request) (*http.Response, error) {
6443	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6444}
6445
6446// DeletePublicCertificateSlotResponder handles the response to the DeletePublicCertificateSlot request. The method always
6447// closes the http.Response Body.
6448func (client AppsClient) DeletePublicCertificateSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6449	err = autorest.Respond(
6450		resp,
6451		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
6452		autorest.ByClosing())
6453	result.Response = resp
6454	return
6455}
6456
6457// DeleteRelayServiceConnection deletes a relay service connection by its name.
6458// Parameters:
6459// resourceGroupName - name of the resource group to which the resource belongs.
6460// name - name of the app.
6461// entityName - name of the hybrid connection configuration.
6462func (client AppsClient) DeleteRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result autorest.Response, err error) {
6463	if tracing.IsEnabled() {
6464		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnection")
6465		defer func() {
6466			sc := -1
6467			if result.Response != nil {
6468				sc = result.Response.StatusCode
6469			}
6470			tracing.EndSpan(ctx, sc, err)
6471		}()
6472	}
6473	if err := validation.Validate([]validation.Validation{
6474		{TargetValue: resourceGroupName,
6475			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6476				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6477				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6478		return result, validation.NewError("web.AppsClient", "DeleteRelayServiceConnection", err.Error())
6479	}
6480
6481	req, err := client.DeleteRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName)
6482	if err != nil {
6483		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", nil, "Failure preparing request")
6484		return
6485	}
6486
6487	resp, err := client.DeleteRelayServiceConnectionSender(req)
6488	if err != nil {
6489		result.Response = resp
6490		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure sending request")
6491		return
6492	}
6493
6494	result, err = client.DeleteRelayServiceConnectionResponder(resp)
6495	if err != nil {
6496		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure responding to request")
6497		return
6498	}
6499
6500	return
6501}
6502
6503// DeleteRelayServiceConnectionPreparer prepares the DeleteRelayServiceConnection request.
6504func (client AppsClient) DeleteRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) {
6505	pathParameters := map[string]interface{}{
6506		"entityName":        autorest.Encode("path", entityName),
6507		"name":              autorest.Encode("path", name),
6508		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6509		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6510	}
6511
6512	const APIVersion = "2018-02-01"
6513	queryParameters := map[string]interface{}{
6514		"api-version": APIVersion,
6515	}
6516
6517	preparer := autorest.CreatePreparer(
6518		autorest.AsDelete(),
6519		autorest.WithBaseURL(client.BaseURI),
6520		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
6521		autorest.WithQueryParameters(queryParameters))
6522	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6523}
6524
6525// DeleteRelayServiceConnectionSender sends the DeleteRelayServiceConnection request. The method will close the
6526// http.Response Body if it receives an error.
6527func (client AppsClient) DeleteRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
6528	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6529}
6530
6531// DeleteRelayServiceConnectionResponder handles the response to the DeleteRelayServiceConnection request. The method always
6532// closes the http.Response Body.
6533func (client AppsClient) DeleteRelayServiceConnectionResponder(resp *http.Response) (result autorest.Response, err error) {
6534	err = autorest.Respond(
6535		resp,
6536		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
6537		autorest.ByClosing())
6538	result.Response = resp
6539	return
6540}
6541
6542// DeleteRelayServiceConnectionSlot deletes a relay service connection by its name.
6543// Parameters:
6544// resourceGroupName - name of the resource group to which the resource belongs.
6545// name - name of the app.
6546// entityName - name of the hybrid connection configuration.
6547// slot - name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for
6548// the production slot.
6549func (client AppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result autorest.Response, err error) {
6550	if tracing.IsEnabled() {
6551		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnectionSlot")
6552		defer func() {
6553			sc := -1
6554			if result.Response != nil {
6555				sc = result.Response.StatusCode
6556			}
6557			tracing.EndSpan(ctx, sc, err)
6558		}()
6559	}
6560	if err := validation.Validate([]validation.Validation{
6561		{TargetValue: resourceGroupName,
6562			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6563				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6564				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6565		return result, validation.NewError("web.AppsClient", "DeleteRelayServiceConnectionSlot", err.Error())
6566	}
6567
6568	req, err := client.DeleteRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot)
6569	if err != nil {
6570		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", nil, "Failure preparing request")
6571		return
6572	}
6573
6574	resp, err := client.DeleteRelayServiceConnectionSlotSender(req)
6575	if err != nil {
6576		result.Response = resp
6577		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure sending request")
6578		return
6579	}
6580
6581	result, err = client.DeleteRelayServiceConnectionSlotResponder(resp)
6582	if err != nil {
6583		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure responding to request")
6584		return
6585	}
6586
6587	return
6588}
6589
6590// DeleteRelayServiceConnectionSlotPreparer prepares the DeleteRelayServiceConnectionSlot request.
6591func (client AppsClient) DeleteRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) {
6592	pathParameters := map[string]interface{}{
6593		"entityName":        autorest.Encode("path", entityName),
6594		"name":              autorest.Encode("path", name),
6595		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6596		"slot":              autorest.Encode("path", slot),
6597		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6598	}
6599
6600	const APIVersion = "2018-02-01"
6601	queryParameters := map[string]interface{}{
6602		"api-version": APIVersion,
6603	}
6604
6605	preparer := autorest.CreatePreparer(
6606		autorest.AsDelete(),
6607		autorest.WithBaseURL(client.BaseURI),
6608		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
6609		autorest.WithQueryParameters(queryParameters))
6610	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6611}
6612
6613// DeleteRelayServiceConnectionSlotSender sends the DeleteRelayServiceConnectionSlot request. The method will close the
6614// http.Response Body if it receives an error.
6615func (client AppsClient) DeleteRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
6616	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6617}
6618
6619// DeleteRelayServiceConnectionSlotResponder handles the response to the DeleteRelayServiceConnectionSlot request. The method always
6620// closes the http.Response Body.
6621func (client AppsClient) DeleteRelayServiceConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6622	err = autorest.Respond(
6623		resp,
6624		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
6625		autorest.ByClosing())
6626	result.Response = resp
6627	return
6628}
6629
6630// DeleteSiteExtension remove a site extension from a web site, or a deployment slot.
6631// Parameters:
6632// resourceGroupName - name of the resource group to which the resource belongs.
6633// name - site name.
6634// siteExtensionID - site extension name.
6635func (client AppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result autorest.Response, err error) {
6636	if tracing.IsEnabled() {
6637		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtension")
6638		defer func() {
6639			sc := -1
6640			if result.Response != nil {
6641				sc = result.Response.StatusCode
6642			}
6643			tracing.EndSpan(ctx, sc, err)
6644		}()
6645	}
6646	if err := validation.Validate([]validation.Validation{
6647		{TargetValue: resourceGroupName,
6648			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6649				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6650				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6651		return result, validation.NewError("web.AppsClient", "DeleteSiteExtension", err.Error())
6652	}
6653
6654	req, err := client.DeleteSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID)
6655	if err != nil {
6656		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", nil, "Failure preparing request")
6657		return
6658	}
6659
6660	resp, err := client.DeleteSiteExtensionSender(req)
6661	if err != nil {
6662		result.Response = resp
6663		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure sending request")
6664		return
6665	}
6666
6667	result, err = client.DeleteSiteExtensionResponder(resp)
6668	if err != nil {
6669		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure responding to request")
6670		return
6671	}
6672
6673	return
6674}
6675
6676// DeleteSiteExtensionPreparer prepares the DeleteSiteExtension request.
6677func (client AppsClient) DeleteSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) {
6678	pathParameters := map[string]interface{}{
6679		"name":              autorest.Encode("path", name),
6680		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6681		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
6682		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6683	}
6684
6685	const APIVersion = "2018-02-01"
6686	queryParameters := map[string]interface{}{
6687		"api-version": APIVersion,
6688	}
6689
6690	preparer := autorest.CreatePreparer(
6691		autorest.AsDelete(),
6692		autorest.WithBaseURL(client.BaseURI),
6693		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters),
6694		autorest.WithQueryParameters(queryParameters))
6695	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6696}
6697
6698// DeleteSiteExtensionSender sends the DeleteSiteExtension request. The method will close the
6699// http.Response Body if it receives an error.
6700func (client AppsClient) DeleteSiteExtensionSender(req *http.Request) (*http.Response, error) {
6701	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6702}
6703
6704// DeleteSiteExtensionResponder handles the response to the DeleteSiteExtension request. The method always
6705// closes the http.Response Body.
6706func (client AppsClient) DeleteSiteExtensionResponder(resp *http.Response) (result autorest.Response, err error) {
6707	err = autorest.Respond(
6708		resp,
6709		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
6710		autorest.ByClosing())
6711	result.Response = resp
6712	return
6713}
6714
6715// DeleteSiteExtensionSlot remove a site extension from a web site, or a deployment slot.
6716// Parameters:
6717// resourceGroupName - name of the resource group to which the resource belongs.
6718// name - site name.
6719// siteExtensionID - site extension name.
6720// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
6721// production slot.
6722func (client AppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result autorest.Response, err error) {
6723	if tracing.IsEnabled() {
6724		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtensionSlot")
6725		defer func() {
6726			sc := -1
6727			if result.Response != nil {
6728				sc = result.Response.StatusCode
6729			}
6730			tracing.EndSpan(ctx, sc, err)
6731		}()
6732	}
6733	if err := validation.Validate([]validation.Validation{
6734		{TargetValue: resourceGroupName,
6735			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6736				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6737				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6738		return result, validation.NewError("web.AppsClient", "DeleteSiteExtensionSlot", err.Error())
6739	}
6740
6741	req, err := client.DeleteSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot)
6742	if err != nil {
6743		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", nil, "Failure preparing request")
6744		return
6745	}
6746
6747	resp, err := client.DeleteSiteExtensionSlotSender(req)
6748	if err != nil {
6749		result.Response = resp
6750		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure sending request")
6751		return
6752	}
6753
6754	result, err = client.DeleteSiteExtensionSlotResponder(resp)
6755	if err != nil {
6756		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure responding to request")
6757		return
6758	}
6759
6760	return
6761}
6762
6763// DeleteSiteExtensionSlotPreparer prepares the DeleteSiteExtensionSlot request.
6764func (client AppsClient) DeleteSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) {
6765	pathParameters := map[string]interface{}{
6766		"name":              autorest.Encode("path", name),
6767		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6768		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
6769		"slot":              autorest.Encode("path", slot),
6770		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6771	}
6772
6773	const APIVersion = "2018-02-01"
6774	queryParameters := map[string]interface{}{
6775		"api-version": APIVersion,
6776	}
6777
6778	preparer := autorest.CreatePreparer(
6779		autorest.AsDelete(),
6780		autorest.WithBaseURL(client.BaseURI),
6781		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters),
6782		autorest.WithQueryParameters(queryParameters))
6783	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6784}
6785
6786// DeleteSiteExtensionSlotSender sends the DeleteSiteExtensionSlot request. The method will close the
6787// http.Response Body if it receives an error.
6788func (client AppsClient) DeleteSiteExtensionSlotSender(req *http.Request) (*http.Response, error) {
6789	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6790}
6791
6792// DeleteSiteExtensionSlotResponder handles the response to the DeleteSiteExtensionSlot request. The method always
6793// closes the http.Response Body.
6794func (client AppsClient) DeleteSiteExtensionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6795	err = autorest.Respond(
6796		resp,
6797		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
6798		autorest.ByClosing())
6799	result.Response = resp
6800	return
6801}
6802
6803// DeleteSlot deletes a web, mobile, or API app, or one of the deployment slots.
6804// Parameters:
6805// resourceGroupName - name of the resource group to which the resource belongs.
6806// name - name of the app to delete.
6807// slot - name of the deployment slot to delete. By default, the API deletes the production slot.
6808// deleteMetrics - if true, web app metrics are also deleted.
6809// deleteEmptyServerFarm - specify true if the App Service plan will be empty after app deletion and you want
6810// to delete the empty App Service plan. By default, the empty App Service plan is not deleted.
6811func (client AppsClient) DeleteSlot(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) {
6812	if tracing.IsEnabled() {
6813		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSlot")
6814		defer func() {
6815			sc := -1
6816			if result.Response != nil {
6817				sc = result.Response.StatusCode
6818			}
6819			tracing.EndSpan(ctx, sc, err)
6820		}()
6821	}
6822	if err := validation.Validate([]validation.Validation{
6823		{TargetValue: resourceGroupName,
6824			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6825				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6826				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6827		return result, validation.NewError("web.AppsClient", "DeleteSlot", err.Error())
6828	}
6829
6830	req, err := client.DeleteSlotPreparer(ctx, resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm)
6831	if err != nil {
6832		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", nil, "Failure preparing request")
6833		return
6834	}
6835
6836	resp, err := client.DeleteSlotSender(req)
6837	if err != nil {
6838		result.Response = resp
6839		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure sending request")
6840		return
6841	}
6842
6843	result, err = client.DeleteSlotResponder(resp)
6844	if err != nil {
6845		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure responding to request")
6846		return
6847	}
6848
6849	return
6850}
6851
6852// DeleteSlotPreparer prepares the DeleteSlot request.
6853func (client AppsClient) DeleteSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) {
6854	pathParameters := map[string]interface{}{
6855		"name":              autorest.Encode("path", name),
6856		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6857		"slot":              autorest.Encode("path", slot),
6858		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6859	}
6860
6861	const APIVersion = "2018-02-01"
6862	queryParameters := map[string]interface{}{
6863		"api-version": APIVersion,
6864	}
6865	if deleteMetrics != nil {
6866		queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics)
6867	}
6868	if deleteEmptyServerFarm != nil {
6869		queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm)
6870	}
6871
6872	preparer := autorest.CreatePreparer(
6873		autorest.AsDelete(),
6874		autorest.WithBaseURL(client.BaseURI),
6875		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
6876		autorest.WithQueryParameters(queryParameters))
6877	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6878}
6879
6880// DeleteSlotSender sends the DeleteSlot request. The method will close the
6881// http.Response Body if it receives an error.
6882func (client AppsClient) DeleteSlotSender(req *http.Request) (*http.Response, error) {
6883	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6884}
6885
6886// DeleteSlotResponder handles the response to the DeleteSlot request. The method always
6887// closes the http.Response Body.
6888func (client AppsClient) DeleteSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6889	err = autorest.Respond(
6890		resp,
6891		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
6892		autorest.ByClosing())
6893	result.Response = resp
6894	return
6895}
6896
6897// DeleteSourceControl deletes the source control configuration of an app.
6898// Parameters:
6899// resourceGroupName - name of the resource group to which the resource belongs.
6900// name - name of the app.
6901func (client AppsClient) DeleteSourceControl(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
6902	if tracing.IsEnabled() {
6903		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControl")
6904		defer func() {
6905			sc := -1
6906			if result.Response != nil {
6907				sc = result.Response.StatusCode
6908			}
6909			tracing.EndSpan(ctx, sc, err)
6910		}()
6911	}
6912	if err := validation.Validate([]validation.Validation{
6913		{TargetValue: resourceGroupName,
6914			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6915				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6916				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6917		return result, validation.NewError("web.AppsClient", "DeleteSourceControl", err.Error())
6918	}
6919
6920	req, err := client.DeleteSourceControlPreparer(ctx, resourceGroupName, name)
6921	if err != nil {
6922		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", nil, "Failure preparing request")
6923		return
6924	}
6925
6926	resp, err := client.DeleteSourceControlSender(req)
6927	if err != nil {
6928		result.Response = resp
6929		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure sending request")
6930		return
6931	}
6932
6933	result, err = client.DeleteSourceControlResponder(resp)
6934	if err != nil {
6935		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure responding to request")
6936		return
6937	}
6938
6939	return
6940}
6941
6942// DeleteSourceControlPreparer prepares the DeleteSourceControl request.
6943func (client AppsClient) DeleteSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
6944	pathParameters := map[string]interface{}{
6945		"name":              autorest.Encode("path", name),
6946		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6947		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6948	}
6949
6950	const APIVersion = "2018-02-01"
6951	queryParameters := map[string]interface{}{
6952		"api-version": APIVersion,
6953	}
6954
6955	preparer := autorest.CreatePreparer(
6956		autorest.AsDelete(),
6957		autorest.WithBaseURL(client.BaseURI),
6958		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
6959		autorest.WithQueryParameters(queryParameters))
6960	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6961}
6962
6963// DeleteSourceControlSender sends the DeleteSourceControl request. The method will close the
6964// http.Response Body if it receives an error.
6965func (client AppsClient) DeleteSourceControlSender(req *http.Request) (*http.Response, error) {
6966	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6967}
6968
6969// DeleteSourceControlResponder handles the response to the DeleteSourceControl request. The method always
6970// closes the http.Response Body.
6971func (client AppsClient) DeleteSourceControlResponder(resp *http.Response) (result autorest.Response, err error) {
6972	err = autorest.Respond(
6973		resp,
6974		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound),
6975		autorest.ByClosing())
6976	result.Response = resp
6977	return
6978}
6979
6980// DeleteSourceControlSlot deletes the source control configuration of an app.
6981// Parameters:
6982// resourceGroupName - name of the resource group to which the resource belongs.
6983// name - name of the app.
6984// slot - name of the deployment slot. If a slot is not specified, the API will delete the source control
6985// configuration for the production slot.
6986func (client AppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
6987	if tracing.IsEnabled() {
6988		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControlSlot")
6989		defer func() {
6990			sc := -1
6991			if result.Response != nil {
6992				sc = result.Response.StatusCode
6993			}
6994			tracing.EndSpan(ctx, sc, err)
6995		}()
6996	}
6997	if err := validation.Validate([]validation.Validation{
6998		{TargetValue: resourceGroupName,
6999			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7000				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7001				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7002		return result, validation.NewError("web.AppsClient", "DeleteSourceControlSlot", err.Error())
7003	}
7004
7005	req, err := client.DeleteSourceControlSlotPreparer(ctx, resourceGroupName, name, slot)
7006	if err != nil {
7007		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", nil, "Failure preparing request")
7008		return
7009	}
7010
7011	resp, err := client.DeleteSourceControlSlotSender(req)
7012	if err != nil {
7013		result.Response = resp
7014		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure sending request")
7015		return
7016	}
7017
7018	result, err = client.DeleteSourceControlSlotResponder(resp)
7019	if err != nil {
7020		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure responding to request")
7021		return
7022	}
7023
7024	return
7025}
7026
7027// DeleteSourceControlSlotPreparer prepares the DeleteSourceControlSlot request.
7028func (client AppsClient) DeleteSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
7029	pathParameters := map[string]interface{}{
7030		"name":              autorest.Encode("path", name),
7031		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7032		"slot":              autorest.Encode("path", slot),
7033		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7034	}
7035
7036	const APIVersion = "2018-02-01"
7037	queryParameters := map[string]interface{}{
7038		"api-version": APIVersion,
7039	}
7040
7041	preparer := autorest.CreatePreparer(
7042		autorest.AsDelete(),
7043		autorest.WithBaseURL(client.BaseURI),
7044		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
7045		autorest.WithQueryParameters(queryParameters))
7046	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7047}
7048
7049// DeleteSourceControlSlotSender sends the DeleteSourceControlSlot request. The method will close the
7050// http.Response Body if it receives an error.
7051func (client AppsClient) DeleteSourceControlSlotSender(req *http.Request) (*http.Response, error) {
7052	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7053}
7054
7055// DeleteSourceControlSlotResponder handles the response to the DeleteSourceControlSlot request. The method always
7056// closes the http.Response Body.
7057func (client AppsClient) DeleteSourceControlSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7058	err = autorest.Respond(
7059		resp,
7060		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound),
7061		autorest.ByClosing())
7062	result.Response = resp
7063	return
7064}
7065
7066// DeleteSwiftVirtualNetwork deletes a Swift Virtual Network connection from an app (or deployment slot).
7067// Parameters:
7068// resourceGroupName - name of the resource group to which the resource belongs.
7069// name - name of the app.
7070func (client AppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
7071	if tracing.IsEnabled() {
7072		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetwork")
7073		defer func() {
7074			sc := -1
7075			if result.Response != nil {
7076				sc = result.Response.StatusCode
7077			}
7078			tracing.EndSpan(ctx, sc, err)
7079		}()
7080	}
7081	if err := validation.Validate([]validation.Validation{
7082		{TargetValue: resourceGroupName,
7083			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7084				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7085				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7086		return result, validation.NewError("web.AppsClient", "DeleteSwiftVirtualNetwork", err.Error())
7087	}
7088
7089	req, err := client.DeleteSwiftVirtualNetworkPreparer(ctx, resourceGroupName, name)
7090	if err != nil {
7091		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", nil, "Failure preparing request")
7092		return
7093	}
7094
7095	resp, err := client.DeleteSwiftVirtualNetworkSender(req)
7096	if err != nil {
7097		result.Response = resp
7098		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure sending request")
7099		return
7100	}
7101
7102	result, err = client.DeleteSwiftVirtualNetworkResponder(resp)
7103	if err != nil {
7104		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure responding to request")
7105		return
7106	}
7107
7108	return
7109}
7110
7111// DeleteSwiftVirtualNetworkPreparer prepares the DeleteSwiftVirtualNetwork request.
7112func (client AppsClient) DeleteSwiftVirtualNetworkPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
7113	pathParameters := map[string]interface{}{
7114		"name":              autorest.Encode("path", name),
7115		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7116		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7117	}
7118
7119	const APIVersion = "2018-02-01"
7120	queryParameters := map[string]interface{}{
7121		"api-version": APIVersion,
7122	}
7123
7124	preparer := autorest.CreatePreparer(
7125		autorest.AsDelete(),
7126		autorest.WithBaseURL(client.BaseURI),
7127		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
7128		autorest.WithQueryParameters(queryParameters))
7129	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7130}
7131
7132// DeleteSwiftVirtualNetworkSender sends the DeleteSwiftVirtualNetwork request. The method will close the
7133// http.Response Body if it receives an error.
7134func (client AppsClient) DeleteSwiftVirtualNetworkSender(req *http.Request) (*http.Response, error) {
7135	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7136}
7137
7138// DeleteSwiftVirtualNetworkResponder handles the response to the DeleteSwiftVirtualNetwork request. The method always
7139// closes the http.Response Body.
7140func (client AppsClient) DeleteSwiftVirtualNetworkResponder(resp *http.Response) (result autorest.Response, err error) {
7141	err = autorest.Respond(
7142		resp,
7143		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
7144		autorest.ByClosing())
7145	result.Response = resp
7146	return
7147}
7148
7149// DeleteSwiftVirtualNetworkSlot deletes a Swift Virtual Network connection from an app (or deployment slot).
7150// Parameters:
7151// resourceGroupName - name of the resource group to which the resource belongs.
7152// name - name of the app.
7153// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the
7154// production slot.
7155func (client AppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
7156	if tracing.IsEnabled() {
7157		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetworkSlot")
7158		defer func() {
7159			sc := -1
7160			if result.Response != nil {
7161				sc = result.Response.StatusCode
7162			}
7163			tracing.EndSpan(ctx, sc, err)
7164		}()
7165	}
7166	if err := validation.Validate([]validation.Validation{
7167		{TargetValue: resourceGroupName,
7168			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7169				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7170				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7171		return result, validation.NewError("web.AppsClient", "DeleteSwiftVirtualNetworkSlot", err.Error())
7172	}
7173
7174	req, err := client.DeleteSwiftVirtualNetworkSlotPreparer(ctx, resourceGroupName, name, slot)
7175	if err != nil {
7176		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", nil, "Failure preparing request")
7177		return
7178	}
7179
7180	resp, err := client.DeleteSwiftVirtualNetworkSlotSender(req)
7181	if err != nil {
7182		result.Response = resp
7183		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure sending request")
7184		return
7185	}
7186
7187	result, err = client.DeleteSwiftVirtualNetworkSlotResponder(resp)
7188	if err != nil {
7189		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure responding to request")
7190		return
7191	}
7192
7193	return
7194}
7195
7196// DeleteSwiftVirtualNetworkSlotPreparer prepares the DeleteSwiftVirtualNetworkSlot request.
7197func (client AppsClient) DeleteSwiftVirtualNetworkSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
7198	pathParameters := map[string]interface{}{
7199		"name":              autorest.Encode("path", name),
7200		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7201		"slot":              autorest.Encode("path", slot),
7202		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7203	}
7204
7205	const APIVersion = "2018-02-01"
7206	queryParameters := map[string]interface{}{
7207		"api-version": APIVersion,
7208	}
7209
7210	preparer := autorest.CreatePreparer(
7211		autorest.AsDelete(),
7212		autorest.WithBaseURL(client.BaseURI),
7213		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
7214		autorest.WithQueryParameters(queryParameters))
7215	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7216}
7217
7218// DeleteSwiftVirtualNetworkSlotSender sends the DeleteSwiftVirtualNetworkSlot request. The method will close the
7219// http.Response Body if it receives an error.
7220func (client AppsClient) DeleteSwiftVirtualNetworkSlotSender(req *http.Request) (*http.Response, error) {
7221	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7222}
7223
7224// DeleteSwiftVirtualNetworkSlotResponder handles the response to the DeleteSwiftVirtualNetworkSlot request. The method always
7225// closes the http.Response Body.
7226func (client AppsClient) DeleteSwiftVirtualNetworkSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7227	err = autorest.Respond(
7228		resp,
7229		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
7230		autorest.ByClosing())
7231	result.Response = resp
7232	return
7233}
7234
7235// DeleteTriggeredWebJob delete a triggered web job by its ID for an app, or a deployment slot.
7236// Parameters:
7237// resourceGroupName - name of the resource group to which the resource belongs.
7238// name - site name.
7239// webJobName - name of Web Job.
7240func (client AppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
7241	if tracing.IsEnabled() {
7242		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJob")
7243		defer func() {
7244			sc := -1
7245			if result.Response != nil {
7246				sc = result.Response.StatusCode
7247			}
7248			tracing.EndSpan(ctx, sc, err)
7249		}()
7250	}
7251	if err := validation.Validate([]validation.Validation{
7252		{TargetValue: resourceGroupName,
7253			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7254				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7255				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7256		return result, validation.NewError("web.AppsClient", "DeleteTriggeredWebJob", err.Error())
7257	}
7258
7259	req, err := client.DeleteTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName)
7260	if err != nil {
7261		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", nil, "Failure preparing request")
7262		return
7263	}
7264
7265	resp, err := client.DeleteTriggeredWebJobSender(req)
7266	if err != nil {
7267		result.Response = resp
7268		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure sending request")
7269		return
7270	}
7271
7272	result, err = client.DeleteTriggeredWebJobResponder(resp)
7273	if err != nil {
7274		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure responding to request")
7275		return
7276	}
7277
7278	return
7279}
7280
7281// DeleteTriggeredWebJobPreparer prepares the DeleteTriggeredWebJob request.
7282func (client AppsClient) DeleteTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
7283	pathParameters := map[string]interface{}{
7284		"name":              autorest.Encode("path", name),
7285		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7286		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7287		"webJobName":        autorest.Encode("path", webJobName),
7288	}
7289
7290	const APIVersion = "2018-02-01"
7291	queryParameters := map[string]interface{}{
7292		"api-version": APIVersion,
7293	}
7294
7295	preparer := autorest.CreatePreparer(
7296		autorest.AsDelete(),
7297		autorest.WithBaseURL(client.BaseURI),
7298		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters),
7299		autorest.WithQueryParameters(queryParameters))
7300	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7301}
7302
7303// DeleteTriggeredWebJobSender sends the DeleteTriggeredWebJob request. The method will close the
7304// http.Response Body if it receives an error.
7305func (client AppsClient) DeleteTriggeredWebJobSender(req *http.Request) (*http.Response, error) {
7306	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7307}
7308
7309// DeleteTriggeredWebJobResponder handles the response to the DeleteTriggeredWebJob request. The method always
7310// closes the http.Response Body.
7311func (client AppsClient) DeleteTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
7312	err = autorest.Respond(
7313		resp,
7314		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
7315		autorest.ByClosing())
7316	result.Response = resp
7317	return
7318}
7319
7320// DeleteTriggeredWebJobSlot delete a triggered web job by its ID for an app, or a deployment slot.
7321// Parameters:
7322// resourceGroupName - name of the resource group to which the resource belongs.
7323// name - site name.
7324// webJobName - name of Web Job.
7325// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
7326// production slot.
7327func (client AppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
7328	if tracing.IsEnabled() {
7329		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJobSlot")
7330		defer func() {
7331			sc := -1
7332			if result.Response != nil {
7333				sc = result.Response.StatusCode
7334			}
7335			tracing.EndSpan(ctx, sc, err)
7336		}()
7337	}
7338	if err := validation.Validate([]validation.Validation{
7339		{TargetValue: resourceGroupName,
7340			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7341				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7342				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7343		return result, validation.NewError("web.AppsClient", "DeleteTriggeredWebJobSlot", err.Error())
7344	}
7345
7346	req, err := client.DeleteTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
7347	if err != nil {
7348		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", nil, "Failure preparing request")
7349		return
7350	}
7351
7352	resp, err := client.DeleteTriggeredWebJobSlotSender(req)
7353	if err != nil {
7354		result.Response = resp
7355		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure sending request")
7356		return
7357	}
7358
7359	result, err = client.DeleteTriggeredWebJobSlotResponder(resp)
7360	if err != nil {
7361		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure responding to request")
7362		return
7363	}
7364
7365	return
7366}
7367
7368// DeleteTriggeredWebJobSlotPreparer prepares the DeleteTriggeredWebJobSlot request.
7369func (client AppsClient) DeleteTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
7370	pathParameters := map[string]interface{}{
7371		"name":              autorest.Encode("path", name),
7372		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7373		"slot":              autorest.Encode("path", slot),
7374		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7375		"webJobName":        autorest.Encode("path", webJobName),
7376	}
7377
7378	const APIVersion = "2018-02-01"
7379	queryParameters := map[string]interface{}{
7380		"api-version": APIVersion,
7381	}
7382
7383	preparer := autorest.CreatePreparer(
7384		autorest.AsDelete(),
7385		autorest.WithBaseURL(client.BaseURI),
7386		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters),
7387		autorest.WithQueryParameters(queryParameters))
7388	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7389}
7390
7391// DeleteTriggeredWebJobSlotSender sends the DeleteTriggeredWebJobSlot request. The method will close the
7392// http.Response Body if it receives an error.
7393func (client AppsClient) DeleteTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) {
7394	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7395}
7396
7397// DeleteTriggeredWebJobSlotResponder handles the response to the DeleteTriggeredWebJobSlot request. The method always
7398// closes the http.Response Body.
7399func (client AppsClient) DeleteTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7400	err = autorest.Respond(
7401		resp,
7402		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
7403		autorest.ByClosing())
7404	result.Response = resp
7405	return
7406}
7407
7408// DeleteVnetConnection deletes a connection from an app (or deployment slot to a named virtual network.
7409// Parameters:
7410// resourceGroupName - name of the resource group to which the resource belongs.
7411// name - name of the app.
7412// vnetName - name of the virtual network.
7413func (client AppsClient) DeleteVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result autorest.Response, err error) {
7414	if tracing.IsEnabled() {
7415		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnection")
7416		defer func() {
7417			sc := -1
7418			if result.Response != nil {
7419				sc = result.Response.StatusCode
7420			}
7421			tracing.EndSpan(ctx, sc, err)
7422		}()
7423	}
7424	if err := validation.Validate([]validation.Validation{
7425		{TargetValue: resourceGroupName,
7426			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7427				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7428				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7429		return result, validation.NewError("web.AppsClient", "DeleteVnetConnection", err.Error())
7430	}
7431
7432	req, err := client.DeleteVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName)
7433	if err != nil {
7434		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", nil, "Failure preparing request")
7435		return
7436	}
7437
7438	resp, err := client.DeleteVnetConnectionSender(req)
7439	if err != nil {
7440		result.Response = resp
7441		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure sending request")
7442		return
7443	}
7444
7445	result, err = client.DeleteVnetConnectionResponder(resp)
7446	if err != nil {
7447		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure responding to request")
7448		return
7449	}
7450
7451	return
7452}
7453
7454// DeleteVnetConnectionPreparer prepares the DeleteVnetConnection request.
7455func (client AppsClient) DeleteVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) {
7456	pathParameters := map[string]interface{}{
7457		"name":              autorest.Encode("path", name),
7458		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7459		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7460		"vnetName":          autorest.Encode("path", vnetName),
7461	}
7462
7463	const APIVersion = "2018-02-01"
7464	queryParameters := map[string]interface{}{
7465		"api-version": APIVersion,
7466	}
7467
7468	preparer := autorest.CreatePreparer(
7469		autorest.AsDelete(),
7470		autorest.WithBaseURL(client.BaseURI),
7471		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
7472		autorest.WithQueryParameters(queryParameters))
7473	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7474}
7475
7476// DeleteVnetConnectionSender sends the DeleteVnetConnection request. The method will close the
7477// http.Response Body if it receives an error.
7478func (client AppsClient) DeleteVnetConnectionSender(req *http.Request) (*http.Response, error) {
7479	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7480}
7481
7482// DeleteVnetConnectionResponder handles the response to the DeleteVnetConnection request. The method always
7483// closes the http.Response Body.
7484func (client AppsClient) DeleteVnetConnectionResponder(resp *http.Response) (result autorest.Response, err error) {
7485	err = autorest.Respond(
7486		resp,
7487		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
7488		autorest.ByClosing())
7489	result.Response = resp
7490	return
7491}
7492
7493// DeleteVnetConnectionSlot deletes a connection from an app (or deployment slot to a named virtual network.
7494// Parameters:
7495// resourceGroupName - name of the resource group to which the resource belongs.
7496// name - name of the app.
7497// vnetName - name of the virtual network.
7498// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the
7499// production slot.
7500func (client AppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result autorest.Response, err error) {
7501	if tracing.IsEnabled() {
7502		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnectionSlot")
7503		defer func() {
7504			sc := -1
7505			if result.Response != nil {
7506				sc = result.Response.StatusCode
7507			}
7508			tracing.EndSpan(ctx, sc, err)
7509		}()
7510	}
7511	if err := validation.Validate([]validation.Validation{
7512		{TargetValue: resourceGroupName,
7513			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7514				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7515				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7516		return result, validation.NewError("web.AppsClient", "DeleteVnetConnectionSlot", err.Error())
7517	}
7518
7519	req, err := client.DeleteVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot)
7520	if err != nil {
7521		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", nil, "Failure preparing request")
7522		return
7523	}
7524
7525	resp, err := client.DeleteVnetConnectionSlotSender(req)
7526	if err != nil {
7527		result.Response = resp
7528		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure sending request")
7529		return
7530	}
7531
7532	result, err = client.DeleteVnetConnectionSlotResponder(resp)
7533	if err != nil {
7534		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure responding to request")
7535		return
7536	}
7537
7538	return
7539}
7540
7541// DeleteVnetConnectionSlotPreparer prepares the DeleteVnetConnectionSlot request.
7542func (client AppsClient) DeleteVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) {
7543	pathParameters := map[string]interface{}{
7544		"name":              autorest.Encode("path", name),
7545		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7546		"slot":              autorest.Encode("path", slot),
7547		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7548		"vnetName":          autorest.Encode("path", vnetName),
7549	}
7550
7551	const APIVersion = "2018-02-01"
7552	queryParameters := map[string]interface{}{
7553		"api-version": APIVersion,
7554	}
7555
7556	preparer := autorest.CreatePreparer(
7557		autorest.AsDelete(),
7558		autorest.WithBaseURL(client.BaseURI),
7559		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
7560		autorest.WithQueryParameters(queryParameters))
7561	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7562}
7563
7564// DeleteVnetConnectionSlotSender sends the DeleteVnetConnectionSlot request. The method will close the
7565// http.Response Body if it receives an error.
7566func (client AppsClient) DeleteVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
7567	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7568}
7569
7570// DeleteVnetConnectionSlotResponder handles the response to the DeleteVnetConnectionSlot request. The method always
7571// closes the http.Response Body.
7572func (client AppsClient) DeleteVnetConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7573	err = autorest.Respond(
7574		resp,
7575		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
7576		autorest.ByClosing())
7577	result.Response = resp
7578	return
7579}
7580
7581// DiscoverBackup discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get
7582// information about the databases stored in a backup.
7583// Parameters:
7584// resourceGroupName - name of the resource group to which the resource belongs.
7585// name - name of the app.
7586// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup.
7587func (client AppsClient) DiscoverBackup(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (result RestoreRequest, err error) {
7588	if tracing.IsEnabled() {
7589		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackup")
7590		defer func() {
7591			sc := -1
7592			if result.Response.Response != nil {
7593				sc = result.Response.Response.StatusCode
7594			}
7595			tracing.EndSpan(ctx, sc, err)
7596		}()
7597	}
7598	if err := validation.Validate([]validation.Validation{
7599		{TargetValue: resourceGroupName,
7600			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7601				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7602				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
7603		{TargetValue: request,
7604			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
7605				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
7606					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
7607				}}}}}); err != nil {
7608		return result, validation.NewError("web.AppsClient", "DiscoverBackup", err.Error())
7609	}
7610
7611	req, err := client.DiscoverBackupPreparer(ctx, resourceGroupName, name, request)
7612	if err != nil {
7613		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", nil, "Failure preparing request")
7614		return
7615	}
7616
7617	resp, err := client.DiscoverBackupSender(req)
7618	if err != nil {
7619		result.Response = autorest.Response{Response: resp}
7620		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure sending request")
7621		return
7622	}
7623
7624	result, err = client.DiscoverBackupResponder(resp)
7625	if err != nil {
7626		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure responding to request")
7627		return
7628	}
7629
7630	return
7631}
7632
7633// DiscoverBackupPreparer prepares the DiscoverBackup request.
7634func (client AppsClient) DiscoverBackupPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (*http.Request, error) {
7635	pathParameters := map[string]interface{}{
7636		"name":              autorest.Encode("path", name),
7637		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7638		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7639	}
7640
7641	const APIVersion = "2018-02-01"
7642	queryParameters := map[string]interface{}{
7643		"api-version": APIVersion,
7644	}
7645
7646	preparer := autorest.CreatePreparer(
7647		autorest.AsContentType("application/json; charset=utf-8"),
7648		autorest.AsPost(),
7649		autorest.WithBaseURL(client.BaseURI),
7650		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup", pathParameters),
7651		autorest.WithJSON(request),
7652		autorest.WithQueryParameters(queryParameters))
7653	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7654}
7655
7656// DiscoverBackupSender sends the DiscoverBackup request. The method will close the
7657// http.Response Body if it receives an error.
7658func (client AppsClient) DiscoverBackupSender(req *http.Request) (*http.Response, error) {
7659	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7660}
7661
7662// DiscoverBackupResponder handles the response to the DiscoverBackup request. The method always
7663// closes the http.Response Body.
7664func (client AppsClient) DiscoverBackupResponder(resp *http.Response) (result RestoreRequest, err error) {
7665	err = autorest.Respond(
7666		resp,
7667		azure.WithErrorUnlessStatusCode(http.StatusOK),
7668		autorest.ByUnmarshallingJSON(&result),
7669		autorest.ByClosing())
7670	result.Response = autorest.Response{Response: resp}
7671	return
7672}
7673
7674// DiscoverBackupSlot discovers an existing app backup that can be restored from a blob in Azure storage. Use this to
7675// get information about the databases stored in a backup.
7676// Parameters:
7677// resourceGroupName - name of the resource group to which the resource belongs.
7678// name - name of the app.
7679// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup.
7680// slot - name of the deployment slot. If a slot is not specified, the API will perform discovery for the
7681// production slot.
7682func (client AppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (result RestoreRequest, err error) {
7683	if tracing.IsEnabled() {
7684		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackupSlot")
7685		defer func() {
7686			sc := -1
7687			if result.Response.Response != nil {
7688				sc = result.Response.Response.StatusCode
7689			}
7690			tracing.EndSpan(ctx, sc, err)
7691		}()
7692	}
7693	if err := validation.Validate([]validation.Validation{
7694		{TargetValue: resourceGroupName,
7695			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7696				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7697				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
7698		{TargetValue: request,
7699			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
7700				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
7701					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
7702				}}}}}); err != nil {
7703		return result, validation.NewError("web.AppsClient", "DiscoverBackupSlot", err.Error())
7704	}
7705
7706	req, err := client.DiscoverBackupSlotPreparer(ctx, resourceGroupName, name, request, slot)
7707	if err != nil {
7708		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", nil, "Failure preparing request")
7709		return
7710	}
7711
7712	resp, err := client.DiscoverBackupSlotSender(req)
7713	if err != nil {
7714		result.Response = autorest.Response{Response: resp}
7715		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure sending request")
7716		return
7717	}
7718
7719	result, err = client.DiscoverBackupSlotResponder(resp)
7720	if err != nil {
7721		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure responding to request")
7722		return
7723	}
7724
7725	return
7726}
7727
7728// DiscoverBackupSlotPreparer prepares the DiscoverBackupSlot request.
7729func (client AppsClient) DiscoverBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (*http.Request, error) {
7730	pathParameters := map[string]interface{}{
7731		"name":              autorest.Encode("path", name),
7732		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7733		"slot":              autorest.Encode("path", slot),
7734		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7735	}
7736
7737	const APIVersion = "2018-02-01"
7738	queryParameters := map[string]interface{}{
7739		"api-version": APIVersion,
7740	}
7741
7742	preparer := autorest.CreatePreparer(
7743		autorest.AsContentType("application/json; charset=utf-8"),
7744		autorest.AsPost(),
7745		autorest.WithBaseURL(client.BaseURI),
7746		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup", pathParameters),
7747		autorest.WithJSON(request),
7748		autorest.WithQueryParameters(queryParameters))
7749	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7750}
7751
7752// DiscoverBackupSlotSender sends the DiscoverBackupSlot request. The method will close the
7753// http.Response Body if it receives an error.
7754func (client AppsClient) DiscoverBackupSlotSender(req *http.Request) (*http.Response, error) {
7755	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7756}
7757
7758// DiscoverBackupSlotResponder handles the response to the DiscoverBackupSlot request. The method always
7759// closes the http.Response Body.
7760func (client AppsClient) DiscoverBackupSlotResponder(resp *http.Response) (result RestoreRequest, err error) {
7761	err = autorest.Respond(
7762		resp,
7763		azure.WithErrorUnlessStatusCode(http.StatusOK),
7764		autorest.ByUnmarshallingJSON(&result),
7765		autorest.ByClosing())
7766	result.Response = autorest.Response{Response: resp}
7767	return
7768}
7769
7770// GenerateNewSitePublishingPassword generates a new publishing password for an app (or deployment slot, if specified).
7771// Parameters:
7772// resourceGroupName - name of the resource group to which the resource belongs.
7773// name - name of the app.
7774func (client AppsClient) GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
7775	if tracing.IsEnabled() {
7776		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPassword")
7777		defer func() {
7778			sc := -1
7779			if result.Response != nil {
7780				sc = result.Response.StatusCode
7781			}
7782			tracing.EndSpan(ctx, sc, err)
7783		}()
7784	}
7785	if err := validation.Validate([]validation.Validation{
7786		{TargetValue: resourceGroupName,
7787			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7788				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7789				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7790		return result, validation.NewError("web.AppsClient", "GenerateNewSitePublishingPassword", err.Error())
7791	}
7792
7793	req, err := client.GenerateNewSitePublishingPasswordPreparer(ctx, resourceGroupName, name)
7794	if err != nil {
7795		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", nil, "Failure preparing request")
7796		return
7797	}
7798
7799	resp, err := client.GenerateNewSitePublishingPasswordSender(req)
7800	if err != nil {
7801		result.Response = resp
7802		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure sending request")
7803		return
7804	}
7805
7806	result, err = client.GenerateNewSitePublishingPasswordResponder(resp)
7807	if err != nil {
7808		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure responding to request")
7809		return
7810	}
7811
7812	return
7813}
7814
7815// GenerateNewSitePublishingPasswordPreparer prepares the GenerateNewSitePublishingPassword request.
7816func (client AppsClient) GenerateNewSitePublishingPasswordPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
7817	pathParameters := map[string]interface{}{
7818		"name":              autorest.Encode("path", name),
7819		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7820		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7821	}
7822
7823	const APIVersion = "2018-02-01"
7824	queryParameters := map[string]interface{}{
7825		"api-version": APIVersion,
7826	}
7827
7828	preparer := autorest.CreatePreparer(
7829		autorest.AsPost(),
7830		autorest.WithBaseURL(client.BaseURI),
7831		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword", pathParameters),
7832		autorest.WithQueryParameters(queryParameters))
7833	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7834}
7835
7836// GenerateNewSitePublishingPasswordSender sends the GenerateNewSitePublishingPassword request. The method will close the
7837// http.Response Body if it receives an error.
7838func (client AppsClient) GenerateNewSitePublishingPasswordSender(req *http.Request) (*http.Response, error) {
7839	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7840}
7841
7842// GenerateNewSitePublishingPasswordResponder handles the response to the GenerateNewSitePublishingPassword request. The method always
7843// closes the http.Response Body.
7844func (client AppsClient) GenerateNewSitePublishingPasswordResponder(resp *http.Response) (result autorest.Response, err error) {
7845	err = autorest.Respond(
7846		resp,
7847		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
7848		autorest.ByClosing())
7849	result.Response = resp
7850	return
7851}
7852
7853// GenerateNewSitePublishingPasswordSlot generates a new publishing password for an app (or deployment slot, if
7854// specified).
7855// Parameters:
7856// resourceGroupName - name of the resource group to which the resource belongs.
7857// name - name of the app.
7858// slot - name of the deployment slot. If a slot is not specified, the API generate a new publishing password
7859// for the production slot.
7860func (client AppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
7861	if tracing.IsEnabled() {
7862		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPasswordSlot")
7863		defer func() {
7864			sc := -1
7865			if result.Response != nil {
7866				sc = result.Response.StatusCode
7867			}
7868			tracing.EndSpan(ctx, sc, err)
7869		}()
7870	}
7871	if err := validation.Validate([]validation.Validation{
7872		{TargetValue: resourceGroupName,
7873			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7874				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7875				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7876		return result, validation.NewError("web.AppsClient", "GenerateNewSitePublishingPasswordSlot", err.Error())
7877	}
7878
7879	req, err := client.GenerateNewSitePublishingPasswordSlotPreparer(ctx, resourceGroupName, name, slot)
7880	if err != nil {
7881		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", nil, "Failure preparing request")
7882		return
7883	}
7884
7885	resp, err := client.GenerateNewSitePublishingPasswordSlotSender(req)
7886	if err != nil {
7887		result.Response = resp
7888		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure sending request")
7889		return
7890	}
7891
7892	result, err = client.GenerateNewSitePublishingPasswordSlotResponder(resp)
7893	if err != nil {
7894		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure responding to request")
7895		return
7896	}
7897
7898	return
7899}
7900
7901// GenerateNewSitePublishingPasswordSlotPreparer prepares the GenerateNewSitePublishingPasswordSlot request.
7902func (client AppsClient) GenerateNewSitePublishingPasswordSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
7903	pathParameters := map[string]interface{}{
7904		"name":              autorest.Encode("path", name),
7905		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7906		"slot":              autorest.Encode("path", slot),
7907		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7908	}
7909
7910	const APIVersion = "2018-02-01"
7911	queryParameters := map[string]interface{}{
7912		"api-version": APIVersion,
7913	}
7914
7915	preparer := autorest.CreatePreparer(
7916		autorest.AsPost(),
7917		autorest.WithBaseURL(client.BaseURI),
7918		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword", pathParameters),
7919		autorest.WithQueryParameters(queryParameters))
7920	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7921}
7922
7923// GenerateNewSitePublishingPasswordSlotSender sends the GenerateNewSitePublishingPasswordSlot request. The method will close the
7924// http.Response Body if it receives an error.
7925func (client AppsClient) GenerateNewSitePublishingPasswordSlotSender(req *http.Request) (*http.Response, error) {
7926	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7927}
7928
7929// GenerateNewSitePublishingPasswordSlotResponder handles the response to the GenerateNewSitePublishingPasswordSlot request. The method always
7930// closes the http.Response Body.
7931func (client AppsClient) GenerateNewSitePublishingPasswordSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7932	err = autorest.Respond(
7933		resp,
7934		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
7935		autorest.ByClosing())
7936	result.Response = resp
7937	return
7938}
7939
7940// Get gets the details of a web, mobile, or API app.
7941// Parameters:
7942// resourceGroupName - name of the resource group to which the resource belongs.
7943// name - name of the app.
7944func (client AppsClient) Get(ctx context.Context, resourceGroupName string, name string) (result Site, err error) {
7945	if tracing.IsEnabled() {
7946		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Get")
7947		defer func() {
7948			sc := -1
7949			if result.Response.Response != nil {
7950				sc = result.Response.Response.StatusCode
7951			}
7952			tracing.EndSpan(ctx, sc, err)
7953		}()
7954	}
7955	if err := validation.Validate([]validation.Validation{
7956		{TargetValue: resourceGroupName,
7957			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7958				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7959				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7960		return result, validation.NewError("web.AppsClient", "Get", err.Error())
7961	}
7962
7963	req, err := client.GetPreparer(ctx, resourceGroupName, name)
7964	if err != nil {
7965		err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", nil, "Failure preparing request")
7966		return
7967	}
7968
7969	resp, err := client.GetSender(req)
7970	if err != nil {
7971		result.Response = autorest.Response{Response: resp}
7972		err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure sending request")
7973		return
7974	}
7975
7976	result, err = client.GetResponder(resp)
7977	if err != nil {
7978		err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure responding to request")
7979		return
7980	}
7981
7982	return
7983}
7984
7985// GetPreparer prepares the Get request.
7986func (client AppsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
7987	pathParameters := map[string]interface{}{
7988		"name":              autorest.Encode("path", name),
7989		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7990		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7991	}
7992
7993	const APIVersion = "2018-02-01"
7994	queryParameters := map[string]interface{}{
7995		"api-version": APIVersion,
7996	}
7997
7998	preparer := autorest.CreatePreparer(
7999		autorest.AsGet(),
8000		autorest.WithBaseURL(client.BaseURI),
8001		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
8002		autorest.WithQueryParameters(queryParameters))
8003	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8004}
8005
8006// GetSender sends the Get request. The method will close the
8007// http.Response Body if it receives an error.
8008func (client AppsClient) GetSender(req *http.Request) (*http.Response, error) {
8009	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8010}
8011
8012// GetResponder handles the response to the Get request. The method always
8013// closes the http.Response Body.
8014func (client AppsClient) GetResponder(resp *http.Response) (result Site, err error) {
8015	err = autorest.Respond(
8016		resp,
8017		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
8018		autorest.ByUnmarshallingJSON(&result),
8019		autorest.ByClosing())
8020	result.Response = autorest.Response{Response: resp}
8021	return
8022}
8023
8024// GetAuthSettings gets the Authentication/Authorization settings of an app.
8025// Parameters:
8026// resourceGroupName - name of the resource group to which the resource belongs.
8027// name - name of the app.
8028func (client AppsClient) GetAuthSettings(ctx context.Context, resourceGroupName string, name string) (result SiteAuthSettings, err error) {
8029	if tracing.IsEnabled() {
8030		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettings")
8031		defer func() {
8032			sc := -1
8033			if result.Response.Response != nil {
8034				sc = result.Response.Response.StatusCode
8035			}
8036			tracing.EndSpan(ctx, sc, err)
8037		}()
8038	}
8039	if err := validation.Validate([]validation.Validation{
8040		{TargetValue: resourceGroupName,
8041			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8042				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8043				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8044		return result, validation.NewError("web.AppsClient", "GetAuthSettings", err.Error())
8045	}
8046
8047	req, err := client.GetAuthSettingsPreparer(ctx, resourceGroupName, name)
8048	if err != nil {
8049		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", nil, "Failure preparing request")
8050		return
8051	}
8052
8053	resp, err := client.GetAuthSettingsSender(req)
8054	if err != nil {
8055		result.Response = autorest.Response{Response: resp}
8056		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure sending request")
8057		return
8058	}
8059
8060	result, err = client.GetAuthSettingsResponder(resp)
8061	if err != nil {
8062		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure responding to request")
8063		return
8064	}
8065
8066	return
8067}
8068
8069// GetAuthSettingsPreparer prepares the GetAuthSettings request.
8070func (client AppsClient) GetAuthSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8071	pathParameters := map[string]interface{}{
8072		"name":              autorest.Encode("path", name),
8073		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8074		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8075	}
8076
8077	const APIVersion = "2018-02-01"
8078	queryParameters := map[string]interface{}{
8079		"api-version": APIVersion,
8080	}
8081
8082	preparer := autorest.CreatePreparer(
8083		autorest.AsPost(),
8084		autorest.WithBaseURL(client.BaseURI),
8085		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list", pathParameters),
8086		autorest.WithQueryParameters(queryParameters))
8087	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8088}
8089
8090// GetAuthSettingsSender sends the GetAuthSettings request. The method will close the
8091// http.Response Body if it receives an error.
8092func (client AppsClient) GetAuthSettingsSender(req *http.Request) (*http.Response, error) {
8093	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8094}
8095
8096// GetAuthSettingsResponder handles the response to the GetAuthSettings request. The method always
8097// closes the http.Response Body.
8098func (client AppsClient) GetAuthSettingsResponder(resp *http.Response) (result SiteAuthSettings, err error) {
8099	err = autorest.Respond(
8100		resp,
8101		azure.WithErrorUnlessStatusCode(http.StatusOK),
8102		autorest.ByUnmarshallingJSON(&result),
8103		autorest.ByClosing())
8104	result.Response = autorest.Response{Response: resp}
8105	return
8106}
8107
8108// GetAuthSettingsSlot gets the Authentication/Authorization settings of an app.
8109// Parameters:
8110// resourceGroupName - name of the resource group to which the resource belongs.
8111// name - name of the app.
8112// slot - name of the deployment slot. If a slot is not specified, the API will get the settings for the
8113// production slot.
8114func (client AppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteAuthSettings, err error) {
8115	if tracing.IsEnabled() {
8116		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsSlot")
8117		defer func() {
8118			sc := -1
8119			if result.Response.Response != nil {
8120				sc = result.Response.Response.StatusCode
8121			}
8122			tracing.EndSpan(ctx, sc, err)
8123		}()
8124	}
8125	if err := validation.Validate([]validation.Validation{
8126		{TargetValue: resourceGroupName,
8127			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8128				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8129				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8130		return result, validation.NewError("web.AppsClient", "GetAuthSettingsSlot", err.Error())
8131	}
8132
8133	req, err := client.GetAuthSettingsSlotPreparer(ctx, resourceGroupName, name, slot)
8134	if err != nil {
8135		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", nil, "Failure preparing request")
8136		return
8137	}
8138
8139	resp, err := client.GetAuthSettingsSlotSender(req)
8140	if err != nil {
8141		result.Response = autorest.Response{Response: resp}
8142		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure sending request")
8143		return
8144	}
8145
8146	result, err = client.GetAuthSettingsSlotResponder(resp)
8147	if err != nil {
8148		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure responding to request")
8149		return
8150	}
8151
8152	return
8153}
8154
8155// GetAuthSettingsSlotPreparer prepares the GetAuthSettingsSlot request.
8156func (client AppsClient) GetAuthSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
8157	pathParameters := map[string]interface{}{
8158		"name":              autorest.Encode("path", name),
8159		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8160		"slot":              autorest.Encode("path", slot),
8161		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8162	}
8163
8164	const APIVersion = "2018-02-01"
8165	queryParameters := map[string]interface{}{
8166		"api-version": APIVersion,
8167	}
8168
8169	preparer := autorest.CreatePreparer(
8170		autorest.AsPost(),
8171		autorest.WithBaseURL(client.BaseURI),
8172		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list", pathParameters),
8173		autorest.WithQueryParameters(queryParameters))
8174	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8175}
8176
8177// GetAuthSettingsSlotSender sends the GetAuthSettingsSlot request. The method will close the
8178// http.Response Body if it receives an error.
8179func (client AppsClient) GetAuthSettingsSlotSender(req *http.Request) (*http.Response, error) {
8180	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8181}
8182
8183// GetAuthSettingsSlotResponder handles the response to the GetAuthSettingsSlot request. The method always
8184// closes the http.Response Body.
8185func (client AppsClient) GetAuthSettingsSlotResponder(resp *http.Response) (result SiteAuthSettings, err error) {
8186	err = autorest.Respond(
8187		resp,
8188		azure.WithErrorUnlessStatusCode(http.StatusOK),
8189		autorest.ByUnmarshallingJSON(&result),
8190		autorest.ByClosing())
8191	result.Response = autorest.Response{Response: resp}
8192	return
8193}
8194
8195// GetBackupConfiguration gets the backup configuration of an app.
8196// Parameters:
8197// resourceGroupName - name of the resource group to which the resource belongs.
8198// name - name of the app.
8199func (client AppsClient) GetBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result BackupRequest, err error) {
8200	if tracing.IsEnabled() {
8201		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfiguration")
8202		defer func() {
8203			sc := -1
8204			if result.Response.Response != nil {
8205				sc = result.Response.Response.StatusCode
8206			}
8207			tracing.EndSpan(ctx, sc, err)
8208		}()
8209	}
8210	if err := validation.Validate([]validation.Validation{
8211		{TargetValue: resourceGroupName,
8212			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8213				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8214				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8215		return result, validation.NewError("web.AppsClient", "GetBackupConfiguration", err.Error())
8216	}
8217
8218	req, err := client.GetBackupConfigurationPreparer(ctx, resourceGroupName, name)
8219	if err != nil {
8220		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", nil, "Failure preparing request")
8221		return
8222	}
8223
8224	resp, err := client.GetBackupConfigurationSender(req)
8225	if err != nil {
8226		result.Response = autorest.Response{Response: resp}
8227		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure sending request")
8228		return
8229	}
8230
8231	result, err = client.GetBackupConfigurationResponder(resp)
8232	if err != nil {
8233		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure responding to request")
8234		return
8235	}
8236
8237	return
8238}
8239
8240// GetBackupConfigurationPreparer prepares the GetBackupConfiguration request.
8241func (client AppsClient) GetBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8242	pathParameters := map[string]interface{}{
8243		"name":              autorest.Encode("path", name),
8244		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8245		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8246	}
8247
8248	const APIVersion = "2018-02-01"
8249	queryParameters := map[string]interface{}{
8250		"api-version": APIVersion,
8251	}
8252
8253	preparer := autorest.CreatePreparer(
8254		autorest.AsPost(),
8255		autorest.WithBaseURL(client.BaseURI),
8256		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list", pathParameters),
8257		autorest.WithQueryParameters(queryParameters))
8258	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8259}
8260
8261// GetBackupConfigurationSender sends the GetBackupConfiguration request. The method will close the
8262// http.Response Body if it receives an error.
8263func (client AppsClient) GetBackupConfigurationSender(req *http.Request) (*http.Response, error) {
8264	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8265}
8266
8267// GetBackupConfigurationResponder handles the response to the GetBackupConfiguration request. The method always
8268// closes the http.Response Body.
8269func (client AppsClient) GetBackupConfigurationResponder(resp *http.Response) (result BackupRequest, err error) {
8270	err = autorest.Respond(
8271		resp,
8272		azure.WithErrorUnlessStatusCode(http.StatusOK),
8273		autorest.ByUnmarshallingJSON(&result),
8274		autorest.ByClosing())
8275	result.Response = autorest.Response{Response: resp}
8276	return
8277}
8278
8279// GetBackupConfigurationSlot gets the backup configuration of an app.
8280// Parameters:
8281// resourceGroupName - name of the resource group to which the resource belongs.
8282// name - name of the app.
8283// slot - name of the deployment slot. If a slot is not specified, the API will get the backup configuration
8284// for the production slot.
8285func (client AppsClient) GetBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupRequest, err error) {
8286	if tracing.IsEnabled() {
8287		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfigurationSlot")
8288		defer func() {
8289			sc := -1
8290			if result.Response.Response != nil {
8291				sc = result.Response.Response.StatusCode
8292			}
8293			tracing.EndSpan(ctx, sc, err)
8294		}()
8295	}
8296	if err := validation.Validate([]validation.Validation{
8297		{TargetValue: resourceGroupName,
8298			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8299				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8300				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8301		return result, validation.NewError("web.AppsClient", "GetBackupConfigurationSlot", err.Error())
8302	}
8303
8304	req, err := client.GetBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
8305	if err != nil {
8306		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", nil, "Failure preparing request")
8307		return
8308	}
8309
8310	resp, err := client.GetBackupConfigurationSlotSender(req)
8311	if err != nil {
8312		result.Response = autorest.Response{Response: resp}
8313		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure sending request")
8314		return
8315	}
8316
8317	result, err = client.GetBackupConfigurationSlotResponder(resp)
8318	if err != nil {
8319		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure responding to request")
8320		return
8321	}
8322
8323	return
8324}
8325
8326// GetBackupConfigurationSlotPreparer prepares the GetBackupConfigurationSlot request.
8327func (client AppsClient) GetBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
8328	pathParameters := map[string]interface{}{
8329		"name":              autorest.Encode("path", name),
8330		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8331		"slot":              autorest.Encode("path", slot),
8332		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8333	}
8334
8335	const APIVersion = "2018-02-01"
8336	queryParameters := map[string]interface{}{
8337		"api-version": APIVersion,
8338	}
8339
8340	preparer := autorest.CreatePreparer(
8341		autorest.AsPost(),
8342		autorest.WithBaseURL(client.BaseURI),
8343		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list", pathParameters),
8344		autorest.WithQueryParameters(queryParameters))
8345	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8346}
8347
8348// GetBackupConfigurationSlotSender sends the GetBackupConfigurationSlot request. The method will close the
8349// http.Response Body if it receives an error.
8350func (client AppsClient) GetBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) {
8351	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8352}
8353
8354// GetBackupConfigurationSlotResponder handles the response to the GetBackupConfigurationSlot request. The method always
8355// closes the http.Response Body.
8356func (client AppsClient) GetBackupConfigurationSlotResponder(resp *http.Response) (result BackupRequest, err error) {
8357	err = autorest.Respond(
8358		resp,
8359		azure.WithErrorUnlessStatusCode(http.StatusOK),
8360		autorest.ByUnmarshallingJSON(&result),
8361		autorest.ByClosing())
8362	result.Response = autorest.Response{Response: resp}
8363	return
8364}
8365
8366// GetBackupStatus gets a backup of an app by its ID.
8367// Parameters:
8368// resourceGroupName - name of the resource group to which the resource belongs.
8369// name - name of the app.
8370// backupID - ID of the backup.
8371func (client AppsClient) GetBackupStatus(ctx context.Context, resourceGroupName string, name string, backupID string) (result BackupItem, err error) {
8372	if tracing.IsEnabled() {
8373		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatus")
8374		defer func() {
8375			sc := -1
8376			if result.Response.Response != nil {
8377				sc = result.Response.Response.StatusCode
8378			}
8379			tracing.EndSpan(ctx, sc, err)
8380		}()
8381	}
8382	if err := validation.Validate([]validation.Validation{
8383		{TargetValue: resourceGroupName,
8384			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8385				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8386				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8387		return result, validation.NewError("web.AppsClient", "GetBackupStatus", err.Error())
8388	}
8389
8390	req, err := client.GetBackupStatusPreparer(ctx, resourceGroupName, name, backupID)
8391	if err != nil {
8392		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", nil, "Failure preparing request")
8393		return
8394	}
8395
8396	resp, err := client.GetBackupStatusSender(req)
8397	if err != nil {
8398		result.Response = autorest.Response{Response: resp}
8399		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure sending request")
8400		return
8401	}
8402
8403	result, err = client.GetBackupStatusResponder(resp)
8404	if err != nil {
8405		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure responding to request")
8406		return
8407	}
8408
8409	return
8410}
8411
8412// GetBackupStatusPreparer prepares the GetBackupStatus request.
8413func (client AppsClient) GetBackupStatusPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) {
8414	pathParameters := map[string]interface{}{
8415		"backupId":          autorest.Encode("path", backupID),
8416		"name":              autorest.Encode("path", name),
8417		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8418		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8419	}
8420
8421	const APIVersion = "2018-02-01"
8422	queryParameters := map[string]interface{}{
8423		"api-version": APIVersion,
8424	}
8425
8426	preparer := autorest.CreatePreparer(
8427		autorest.AsGet(),
8428		autorest.WithBaseURL(client.BaseURI),
8429		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters),
8430		autorest.WithQueryParameters(queryParameters))
8431	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8432}
8433
8434// GetBackupStatusSender sends the GetBackupStatus request. The method will close the
8435// http.Response Body if it receives an error.
8436func (client AppsClient) GetBackupStatusSender(req *http.Request) (*http.Response, error) {
8437	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8438}
8439
8440// GetBackupStatusResponder handles the response to the GetBackupStatus request. The method always
8441// closes the http.Response Body.
8442func (client AppsClient) GetBackupStatusResponder(resp *http.Response) (result BackupItem, err error) {
8443	err = autorest.Respond(
8444		resp,
8445		azure.WithErrorUnlessStatusCode(http.StatusOK),
8446		autorest.ByUnmarshallingJSON(&result),
8447		autorest.ByClosing())
8448	result.Response = autorest.Response{Response: resp}
8449	return
8450}
8451
8452// GetBackupStatusSlot gets a backup of an app by its ID.
8453// Parameters:
8454// resourceGroupName - name of the resource group to which the resource belongs.
8455// name - name of the app.
8456// backupID - ID of the backup.
8457// slot - name of the deployment slot. If a slot is not specified, the API will get a backup of the production
8458// slot.
8459func (client AppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result BackupItem, err error) {
8460	if tracing.IsEnabled() {
8461		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatusSlot")
8462		defer func() {
8463			sc := -1
8464			if result.Response.Response != nil {
8465				sc = result.Response.Response.StatusCode
8466			}
8467			tracing.EndSpan(ctx, sc, err)
8468		}()
8469	}
8470	if err := validation.Validate([]validation.Validation{
8471		{TargetValue: resourceGroupName,
8472			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8473				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8474				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8475		return result, validation.NewError("web.AppsClient", "GetBackupStatusSlot", err.Error())
8476	}
8477
8478	req, err := client.GetBackupStatusSlotPreparer(ctx, resourceGroupName, name, backupID, slot)
8479	if err != nil {
8480		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", nil, "Failure preparing request")
8481		return
8482	}
8483
8484	resp, err := client.GetBackupStatusSlotSender(req)
8485	if err != nil {
8486		result.Response = autorest.Response{Response: resp}
8487		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure sending request")
8488		return
8489	}
8490
8491	result, err = client.GetBackupStatusSlotResponder(resp)
8492	if err != nil {
8493		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure responding to request")
8494		return
8495	}
8496
8497	return
8498}
8499
8500// GetBackupStatusSlotPreparer prepares the GetBackupStatusSlot request.
8501func (client AppsClient) GetBackupStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) {
8502	pathParameters := map[string]interface{}{
8503		"backupId":          autorest.Encode("path", backupID),
8504		"name":              autorest.Encode("path", name),
8505		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8506		"slot":              autorest.Encode("path", slot),
8507		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8508	}
8509
8510	const APIVersion = "2018-02-01"
8511	queryParameters := map[string]interface{}{
8512		"api-version": APIVersion,
8513	}
8514
8515	preparer := autorest.CreatePreparer(
8516		autorest.AsGet(),
8517		autorest.WithBaseURL(client.BaseURI),
8518		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters),
8519		autorest.WithQueryParameters(queryParameters))
8520	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8521}
8522
8523// GetBackupStatusSlotSender sends the GetBackupStatusSlot request. The method will close the
8524// http.Response Body if it receives an error.
8525func (client AppsClient) GetBackupStatusSlotSender(req *http.Request) (*http.Response, error) {
8526	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8527}
8528
8529// GetBackupStatusSlotResponder handles the response to the GetBackupStatusSlot request. The method always
8530// closes the http.Response Body.
8531func (client AppsClient) GetBackupStatusSlotResponder(resp *http.Response) (result BackupItem, err error) {
8532	err = autorest.Respond(
8533		resp,
8534		azure.WithErrorUnlessStatusCode(http.StatusOK),
8535		autorest.ByUnmarshallingJSON(&result),
8536		autorest.ByClosing())
8537	result.Response = autorest.Response{Response: resp}
8538	return
8539}
8540
8541// GetConfiguration gets the configuration of an app, such as platform version and bitness, default documents, virtual
8542// applications, Always On, etc.
8543// Parameters:
8544// resourceGroupName - name of the resource group to which the resource belongs.
8545// name - name of the app.
8546func (client AppsClient) GetConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResource, err error) {
8547	if tracing.IsEnabled() {
8548		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfiguration")
8549		defer func() {
8550			sc := -1
8551			if result.Response.Response != nil {
8552				sc = result.Response.Response.StatusCode
8553			}
8554			tracing.EndSpan(ctx, sc, err)
8555		}()
8556	}
8557	if err := validation.Validate([]validation.Validation{
8558		{TargetValue: resourceGroupName,
8559			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8560				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8561				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8562		return result, validation.NewError("web.AppsClient", "GetConfiguration", err.Error())
8563	}
8564
8565	req, err := client.GetConfigurationPreparer(ctx, resourceGroupName, name)
8566	if err != nil {
8567		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", nil, "Failure preparing request")
8568		return
8569	}
8570
8571	resp, err := client.GetConfigurationSender(req)
8572	if err != nil {
8573		result.Response = autorest.Response{Response: resp}
8574		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure sending request")
8575		return
8576	}
8577
8578	result, err = client.GetConfigurationResponder(resp)
8579	if err != nil {
8580		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure responding to request")
8581		return
8582	}
8583
8584	return
8585}
8586
8587// GetConfigurationPreparer prepares the GetConfiguration request.
8588func (client AppsClient) GetConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8589	pathParameters := map[string]interface{}{
8590		"name":              autorest.Encode("path", name),
8591		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8592		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8593	}
8594
8595	const APIVersion = "2018-02-01"
8596	queryParameters := map[string]interface{}{
8597		"api-version": APIVersion,
8598	}
8599
8600	preparer := autorest.CreatePreparer(
8601		autorest.AsGet(),
8602		autorest.WithBaseURL(client.BaseURI),
8603		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters),
8604		autorest.WithQueryParameters(queryParameters))
8605	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8606}
8607
8608// GetConfigurationSender sends the GetConfiguration request. The method will close the
8609// http.Response Body if it receives an error.
8610func (client AppsClient) GetConfigurationSender(req *http.Request) (*http.Response, error) {
8611	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8612}
8613
8614// GetConfigurationResponder handles the response to the GetConfiguration request. The method always
8615// closes the http.Response Body.
8616func (client AppsClient) GetConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) {
8617	err = autorest.Respond(
8618		resp,
8619		azure.WithErrorUnlessStatusCode(http.StatusOK),
8620		autorest.ByUnmarshallingJSON(&result),
8621		autorest.ByClosing())
8622	result.Response = autorest.Response{Response: resp}
8623	return
8624}
8625
8626// GetConfigurationSlot gets the configuration of an app, such as platform version and bitness, default documents,
8627// virtual applications, Always On, etc.
8628// Parameters:
8629// resourceGroupName - name of the resource group to which the resource belongs.
8630// name - name of the app.
8631// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
8632// production slot.
8633func (client AppsClient) GetConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResource, err error) {
8634	if tracing.IsEnabled() {
8635		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSlot")
8636		defer func() {
8637			sc := -1
8638			if result.Response.Response != nil {
8639				sc = result.Response.Response.StatusCode
8640			}
8641			tracing.EndSpan(ctx, sc, err)
8642		}()
8643	}
8644	if err := validation.Validate([]validation.Validation{
8645		{TargetValue: resourceGroupName,
8646			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8647				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8648				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8649		return result, validation.NewError("web.AppsClient", "GetConfigurationSlot", err.Error())
8650	}
8651
8652	req, err := client.GetConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
8653	if err != nil {
8654		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", nil, "Failure preparing request")
8655		return
8656	}
8657
8658	resp, err := client.GetConfigurationSlotSender(req)
8659	if err != nil {
8660		result.Response = autorest.Response{Response: resp}
8661		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure sending request")
8662		return
8663	}
8664
8665	result, err = client.GetConfigurationSlotResponder(resp)
8666	if err != nil {
8667		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure responding to request")
8668		return
8669	}
8670
8671	return
8672}
8673
8674// GetConfigurationSlotPreparer prepares the GetConfigurationSlot request.
8675func (client AppsClient) GetConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
8676	pathParameters := map[string]interface{}{
8677		"name":              autorest.Encode("path", name),
8678		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8679		"slot":              autorest.Encode("path", slot),
8680		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8681	}
8682
8683	const APIVersion = "2018-02-01"
8684	queryParameters := map[string]interface{}{
8685		"api-version": APIVersion,
8686	}
8687
8688	preparer := autorest.CreatePreparer(
8689		autorest.AsGet(),
8690		autorest.WithBaseURL(client.BaseURI),
8691		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters),
8692		autorest.WithQueryParameters(queryParameters))
8693	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8694}
8695
8696// GetConfigurationSlotSender sends the GetConfigurationSlot request. The method will close the
8697// http.Response Body if it receives an error.
8698func (client AppsClient) GetConfigurationSlotSender(req *http.Request) (*http.Response, error) {
8699	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8700}
8701
8702// GetConfigurationSlotResponder handles the response to the GetConfigurationSlot request. The method always
8703// closes the http.Response Body.
8704func (client AppsClient) GetConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
8705	err = autorest.Respond(
8706		resp,
8707		azure.WithErrorUnlessStatusCode(http.StatusOK),
8708		autorest.ByUnmarshallingJSON(&result),
8709		autorest.ByClosing())
8710	result.Response = autorest.Response{Response: resp}
8711	return
8712}
8713
8714// GetConfigurationSnapshot gets a snapshot of the configuration of an app at a previous point in time.
8715// Parameters:
8716// resourceGroupName - name of the resource group to which the resource belongs.
8717// name - name of the app.
8718// snapshotID - the ID of the snapshot to read.
8719func (client AppsClient) GetConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string) (result SiteConfigResource, err error) {
8720	if tracing.IsEnabled() {
8721		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshot")
8722		defer func() {
8723			sc := -1
8724			if result.Response.Response != nil {
8725				sc = result.Response.Response.StatusCode
8726			}
8727			tracing.EndSpan(ctx, sc, err)
8728		}()
8729	}
8730	if err := validation.Validate([]validation.Validation{
8731		{TargetValue: resourceGroupName,
8732			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8733				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8734				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8735		return result, validation.NewError("web.AppsClient", "GetConfigurationSnapshot", err.Error())
8736	}
8737
8738	req, err := client.GetConfigurationSnapshotPreparer(ctx, resourceGroupName, name, snapshotID)
8739	if err != nil {
8740		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", nil, "Failure preparing request")
8741		return
8742	}
8743
8744	resp, err := client.GetConfigurationSnapshotSender(req)
8745	if err != nil {
8746		result.Response = autorest.Response{Response: resp}
8747		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure sending request")
8748		return
8749	}
8750
8751	result, err = client.GetConfigurationSnapshotResponder(resp)
8752	if err != nil {
8753		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure responding to request")
8754		return
8755	}
8756
8757	return
8758}
8759
8760// GetConfigurationSnapshotPreparer prepares the GetConfigurationSnapshot request.
8761func (client AppsClient) GetConfigurationSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string) (*http.Request, error) {
8762	pathParameters := map[string]interface{}{
8763		"name":              autorest.Encode("path", name),
8764		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8765		"snapshotId":        autorest.Encode("path", snapshotID),
8766		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8767	}
8768
8769	const APIVersion = "2018-02-01"
8770	queryParameters := map[string]interface{}{
8771		"api-version": APIVersion,
8772	}
8773
8774	preparer := autorest.CreatePreparer(
8775		autorest.AsGet(),
8776		autorest.WithBaseURL(client.BaseURI),
8777		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}", pathParameters),
8778		autorest.WithQueryParameters(queryParameters))
8779	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8780}
8781
8782// GetConfigurationSnapshotSender sends the GetConfigurationSnapshot request. The method will close the
8783// http.Response Body if it receives an error.
8784func (client AppsClient) GetConfigurationSnapshotSender(req *http.Request) (*http.Response, error) {
8785	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8786}
8787
8788// GetConfigurationSnapshotResponder handles the response to the GetConfigurationSnapshot request. The method always
8789// closes the http.Response Body.
8790func (client AppsClient) GetConfigurationSnapshotResponder(resp *http.Response) (result SiteConfigResource, err error) {
8791	err = autorest.Respond(
8792		resp,
8793		azure.WithErrorUnlessStatusCode(http.StatusOK),
8794		autorest.ByUnmarshallingJSON(&result),
8795		autorest.ByClosing())
8796	result.Response = autorest.Response{Response: resp}
8797	return
8798}
8799
8800// GetConfigurationSnapshotSlot gets a snapshot of the configuration of an app at a previous point in time.
8801// Parameters:
8802// resourceGroupName - name of the resource group to which the resource belongs.
8803// name - name of the app.
8804// snapshotID - the ID of the snapshot to read.
8805// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
8806// production slot.
8807func (client AppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (result SiteConfigResource, err error) {
8808	if tracing.IsEnabled() {
8809		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshotSlot")
8810		defer func() {
8811			sc := -1
8812			if result.Response.Response != nil {
8813				sc = result.Response.Response.StatusCode
8814			}
8815			tracing.EndSpan(ctx, sc, err)
8816		}()
8817	}
8818	if err := validation.Validate([]validation.Validation{
8819		{TargetValue: resourceGroupName,
8820			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8821				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8822				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8823		return result, validation.NewError("web.AppsClient", "GetConfigurationSnapshotSlot", err.Error())
8824	}
8825
8826	req, err := client.GetConfigurationSnapshotSlotPreparer(ctx, resourceGroupName, name, snapshotID, slot)
8827	if err != nil {
8828		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", nil, "Failure preparing request")
8829		return
8830	}
8831
8832	resp, err := client.GetConfigurationSnapshotSlotSender(req)
8833	if err != nil {
8834		result.Response = autorest.Response{Response: resp}
8835		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure sending request")
8836		return
8837	}
8838
8839	result, err = client.GetConfigurationSnapshotSlotResponder(resp)
8840	if err != nil {
8841		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure responding to request")
8842		return
8843	}
8844
8845	return
8846}
8847
8848// GetConfigurationSnapshotSlotPreparer prepares the GetConfigurationSnapshotSlot request.
8849func (client AppsClient) GetConfigurationSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (*http.Request, error) {
8850	pathParameters := map[string]interface{}{
8851		"name":              autorest.Encode("path", name),
8852		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8853		"slot":              autorest.Encode("path", slot),
8854		"snapshotId":        autorest.Encode("path", snapshotID),
8855		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8856	}
8857
8858	const APIVersion = "2018-02-01"
8859	queryParameters := map[string]interface{}{
8860		"api-version": APIVersion,
8861	}
8862
8863	preparer := autorest.CreatePreparer(
8864		autorest.AsGet(),
8865		autorest.WithBaseURL(client.BaseURI),
8866		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}", pathParameters),
8867		autorest.WithQueryParameters(queryParameters))
8868	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8869}
8870
8871// GetConfigurationSnapshotSlotSender sends the GetConfigurationSnapshotSlot request. The method will close the
8872// http.Response Body if it receives an error.
8873func (client AppsClient) GetConfigurationSnapshotSlotSender(req *http.Request) (*http.Response, error) {
8874	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8875}
8876
8877// GetConfigurationSnapshotSlotResponder handles the response to the GetConfigurationSnapshotSlot request. The method always
8878// closes the http.Response Body.
8879func (client AppsClient) GetConfigurationSnapshotSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
8880	err = autorest.Respond(
8881		resp,
8882		azure.WithErrorUnlessStatusCode(http.StatusOK),
8883		autorest.ByUnmarshallingJSON(&result),
8884		autorest.ByClosing())
8885	result.Response = autorest.Response{Response: resp}
8886	return
8887}
8888
8889// GetContainerLogsZip gets the ZIP archived docker log files for the given site
8890// Parameters:
8891// resourceGroupName - name of the resource group to which the resource belongs.
8892// name - name of web app.
8893func (client AppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) {
8894	if tracing.IsEnabled() {
8895		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZip")
8896		defer func() {
8897			sc := -1
8898			if result.Response.Response != nil {
8899				sc = result.Response.Response.StatusCode
8900			}
8901			tracing.EndSpan(ctx, sc, err)
8902		}()
8903	}
8904	if err := validation.Validate([]validation.Validation{
8905		{TargetValue: resourceGroupName,
8906			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8907				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8908				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8909		return result, validation.NewError("web.AppsClient", "GetContainerLogsZip", err.Error())
8910	}
8911
8912	req, err := client.GetContainerLogsZipPreparer(ctx, resourceGroupName, name)
8913	if err != nil {
8914		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", nil, "Failure preparing request")
8915		return
8916	}
8917
8918	resp, err := client.GetContainerLogsZipSender(req)
8919	if err != nil {
8920		result.Response = autorest.Response{Response: resp}
8921		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure sending request")
8922		return
8923	}
8924
8925	result, err = client.GetContainerLogsZipResponder(resp)
8926	if err != nil {
8927		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure responding to request")
8928		return
8929	}
8930
8931	return
8932}
8933
8934// GetContainerLogsZipPreparer prepares the GetContainerLogsZip request.
8935func (client AppsClient) GetContainerLogsZipPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8936	pathParameters := map[string]interface{}{
8937		"name":              autorest.Encode("path", name),
8938		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8939		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8940	}
8941
8942	const APIVersion = "2018-02-01"
8943	queryParameters := map[string]interface{}{
8944		"api-version": APIVersion,
8945	}
8946
8947	preparer := autorest.CreatePreparer(
8948		autorest.AsPost(),
8949		autorest.WithBaseURL(client.BaseURI),
8950		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download", pathParameters),
8951		autorest.WithQueryParameters(queryParameters))
8952	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8953}
8954
8955// GetContainerLogsZipSender sends the GetContainerLogsZip request. The method will close the
8956// http.Response Body if it receives an error.
8957func (client AppsClient) GetContainerLogsZipSender(req *http.Request) (*http.Response, error) {
8958	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8959}
8960
8961// GetContainerLogsZipResponder handles the response to the GetContainerLogsZip request. The method always
8962// closes the http.Response Body.
8963func (client AppsClient) GetContainerLogsZipResponder(resp *http.Response) (result ReadCloser, err error) {
8964	result.Value = &resp.Body
8965	err = autorest.Respond(
8966		resp,
8967		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
8968	result.Response = autorest.Response{Response: resp}
8969	return
8970}
8971
8972// GetContainerLogsZipSlot gets the ZIP archived docker log files for the given site
8973// Parameters:
8974// resourceGroupName - name of the resource group to which the resource belongs.
8975// name - name of web app.
8976// slot - name of web app slot. If not specified then will default to production slot.
8977func (client AppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) {
8978	if tracing.IsEnabled() {
8979		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZipSlot")
8980		defer func() {
8981			sc := -1
8982			if result.Response.Response != nil {
8983				sc = result.Response.Response.StatusCode
8984			}
8985			tracing.EndSpan(ctx, sc, err)
8986		}()
8987	}
8988	if err := validation.Validate([]validation.Validation{
8989		{TargetValue: resourceGroupName,
8990			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8991				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8992				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8993		return result, validation.NewError("web.AppsClient", "GetContainerLogsZipSlot", err.Error())
8994	}
8995
8996	req, err := client.GetContainerLogsZipSlotPreparer(ctx, resourceGroupName, name, slot)
8997	if err != nil {
8998		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", nil, "Failure preparing request")
8999		return
9000	}
9001
9002	resp, err := client.GetContainerLogsZipSlotSender(req)
9003	if err != nil {
9004		result.Response = autorest.Response{Response: resp}
9005		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure sending request")
9006		return
9007	}
9008
9009	result, err = client.GetContainerLogsZipSlotResponder(resp)
9010	if err != nil {
9011		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure responding to request")
9012		return
9013	}
9014
9015	return
9016}
9017
9018// GetContainerLogsZipSlotPreparer prepares the GetContainerLogsZipSlot request.
9019func (client AppsClient) GetContainerLogsZipSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
9020	pathParameters := map[string]interface{}{
9021		"name":              autorest.Encode("path", name),
9022		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9023		"slot":              autorest.Encode("path", slot),
9024		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9025	}
9026
9027	const APIVersion = "2018-02-01"
9028	queryParameters := map[string]interface{}{
9029		"api-version": APIVersion,
9030	}
9031
9032	preparer := autorest.CreatePreparer(
9033		autorest.AsPost(),
9034		autorest.WithBaseURL(client.BaseURI),
9035		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download", pathParameters),
9036		autorest.WithQueryParameters(queryParameters))
9037	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9038}
9039
9040// GetContainerLogsZipSlotSender sends the GetContainerLogsZipSlot request. The method will close the
9041// http.Response Body if it receives an error.
9042func (client AppsClient) GetContainerLogsZipSlotSender(req *http.Request) (*http.Response, error) {
9043	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9044}
9045
9046// GetContainerLogsZipSlotResponder handles the response to the GetContainerLogsZipSlot request. The method always
9047// closes the http.Response Body.
9048func (client AppsClient) GetContainerLogsZipSlotResponder(resp *http.Response) (result ReadCloser, err error) {
9049	result.Value = &resp.Body
9050	err = autorest.Respond(
9051		resp,
9052		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
9053	result.Response = autorest.Response{Response: resp}
9054	return
9055}
9056
9057// GetContinuousWebJob gets a continuous web job by its ID for an app, or a deployment slot.
9058// Parameters:
9059// resourceGroupName - name of the resource group to which the resource belongs.
9060// name - site name.
9061// webJobName - name of Web Job.
9062func (client AppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result ContinuousWebJob, err error) {
9063	if tracing.IsEnabled() {
9064		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJob")
9065		defer func() {
9066			sc := -1
9067			if result.Response.Response != nil {
9068				sc = result.Response.Response.StatusCode
9069			}
9070			tracing.EndSpan(ctx, sc, err)
9071		}()
9072	}
9073	if err := validation.Validate([]validation.Validation{
9074		{TargetValue: resourceGroupName,
9075			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9076				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9077				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9078		return result, validation.NewError("web.AppsClient", "GetContinuousWebJob", err.Error())
9079	}
9080
9081	req, err := client.GetContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
9082	if err != nil {
9083		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", nil, "Failure preparing request")
9084		return
9085	}
9086
9087	resp, err := client.GetContinuousWebJobSender(req)
9088	if err != nil {
9089		result.Response = autorest.Response{Response: resp}
9090		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure sending request")
9091		return
9092	}
9093
9094	result, err = client.GetContinuousWebJobResponder(resp)
9095	if err != nil {
9096		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure responding to request")
9097		return
9098	}
9099
9100	return
9101}
9102
9103// GetContinuousWebJobPreparer prepares the GetContinuousWebJob request.
9104func (client AppsClient) GetContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
9105	pathParameters := map[string]interface{}{
9106		"name":              autorest.Encode("path", name),
9107		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9108		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9109		"webJobName":        autorest.Encode("path", webJobName),
9110	}
9111
9112	const APIVersion = "2018-02-01"
9113	queryParameters := map[string]interface{}{
9114		"api-version": APIVersion,
9115	}
9116
9117	preparer := autorest.CreatePreparer(
9118		autorest.AsGet(),
9119		autorest.WithBaseURL(client.BaseURI),
9120		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters),
9121		autorest.WithQueryParameters(queryParameters))
9122	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9123}
9124
9125// GetContinuousWebJobSender sends the GetContinuousWebJob request. The method will close the
9126// http.Response Body if it receives an error.
9127func (client AppsClient) GetContinuousWebJobSender(req *http.Request) (*http.Response, error) {
9128	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9129}
9130
9131// GetContinuousWebJobResponder handles the response to the GetContinuousWebJob request. The method always
9132// closes the http.Response Body.
9133func (client AppsClient) GetContinuousWebJobResponder(resp *http.Response) (result ContinuousWebJob, err error) {
9134	err = autorest.Respond(
9135		resp,
9136		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
9137		autorest.ByUnmarshallingJSON(&result),
9138		autorest.ByClosing())
9139	result.Response = autorest.Response{Response: resp}
9140	return
9141}
9142
9143// GetContinuousWebJobSlot gets a continuous web job by its ID for an app, or a deployment slot.
9144// Parameters:
9145// resourceGroupName - name of the resource group to which the resource belongs.
9146// name - site name.
9147// webJobName - name of Web Job.
9148// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
9149// production slot.
9150func (client AppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result ContinuousWebJob, err error) {
9151	if tracing.IsEnabled() {
9152		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJobSlot")
9153		defer func() {
9154			sc := -1
9155			if result.Response.Response != nil {
9156				sc = result.Response.Response.StatusCode
9157			}
9158			tracing.EndSpan(ctx, sc, err)
9159		}()
9160	}
9161	if err := validation.Validate([]validation.Validation{
9162		{TargetValue: resourceGroupName,
9163			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9164				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9165				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9166		return result, validation.NewError("web.AppsClient", "GetContinuousWebJobSlot", err.Error())
9167	}
9168
9169	req, err := client.GetContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
9170	if err != nil {
9171		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", nil, "Failure preparing request")
9172		return
9173	}
9174
9175	resp, err := client.GetContinuousWebJobSlotSender(req)
9176	if err != nil {
9177		result.Response = autorest.Response{Response: resp}
9178		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure sending request")
9179		return
9180	}
9181
9182	result, err = client.GetContinuousWebJobSlotResponder(resp)
9183	if err != nil {
9184		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure responding to request")
9185		return
9186	}
9187
9188	return
9189}
9190
9191// GetContinuousWebJobSlotPreparer prepares the GetContinuousWebJobSlot request.
9192func (client AppsClient) GetContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
9193	pathParameters := map[string]interface{}{
9194		"name":              autorest.Encode("path", name),
9195		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9196		"slot":              autorest.Encode("path", slot),
9197		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9198		"webJobName":        autorest.Encode("path", webJobName),
9199	}
9200
9201	const APIVersion = "2018-02-01"
9202	queryParameters := map[string]interface{}{
9203		"api-version": APIVersion,
9204	}
9205
9206	preparer := autorest.CreatePreparer(
9207		autorest.AsGet(),
9208		autorest.WithBaseURL(client.BaseURI),
9209		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters),
9210		autorest.WithQueryParameters(queryParameters))
9211	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9212}
9213
9214// GetContinuousWebJobSlotSender sends the GetContinuousWebJobSlot request. The method will close the
9215// http.Response Body if it receives an error.
9216func (client AppsClient) GetContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
9217	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9218}
9219
9220// GetContinuousWebJobSlotResponder handles the response to the GetContinuousWebJobSlot request. The method always
9221// closes the http.Response Body.
9222func (client AppsClient) GetContinuousWebJobSlotResponder(resp *http.Response) (result ContinuousWebJob, err error) {
9223	err = autorest.Respond(
9224		resp,
9225		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
9226		autorest.ByUnmarshallingJSON(&result),
9227		autorest.ByClosing())
9228	result.Response = autorest.Response{Response: resp}
9229	return
9230}
9231
9232// GetDeployment get a deployment by its ID for an app, or a deployment slot.
9233// Parameters:
9234// resourceGroupName - name of the resource group to which the resource belongs.
9235// name - name of the app.
9236// ID - deployment ID.
9237func (client AppsClient) GetDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) {
9238	if tracing.IsEnabled() {
9239		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeployment")
9240		defer func() {
9241			sc := -1
9242			if result.Response.Response != nil {
9243				sc = result.Response.Response.StatusCode
9244			}
9245			tracing.EndSpan(ctx, sc, err)
9246		}()
9247	}
9248	if err := validation.Validate([]validation.Validation{
9249		{TargetValue: resourceGroupName,
9250			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9251				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9252				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9253		return result, validation.NewError("web.AppsClient", "GetDeployment", err.Error())
9254	}
9255
9256	req, err := client.GetDeploymentPreparer(ctx, resourceGroupName, name, ID)
9257	if err != nil {
9258		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", nil, "Failure preparing request")
9259		return
9260	}
9261
9262	resp, err := client.GetDeploymentSender(req)
9263	if err != nil {
9264		result.Response = autorest.Response{Response: resp}
9265		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure sending request")
9266		return
9267	}
9268
9269	result, err = client.GetDeploymentResponder(resp)
9270	if err != nil {
9271		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure responding to request")
9272		return
9273	}
9274
9275	return
9276}
9277
9278// GetDeploymentPreparer prepares the GetDeployment request.
9279func (client AppsClient) GetDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) {
9280	pathParameters := map[string]interface{}{
9281		"id":                autorest.Encode("path", ID),
9282		"name":              autorest.Encode("path", name),
9283		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9284		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9285	}
9286
9287	const APIVersion = "2018-02-01"
9288	queryParameters := map[string]interface{}{
9289		"api-version": APIVersion,
9290	}
9291
9292	preparer := autorest.CreatePreparer(
9293		autorest.AsGet(),
9294		autorest.WithBaseURL(client.BaseURI),
9295		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters),
9296		autorest.WithQueryParameters(queryParameters))
9297	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9298}
9299
9300// GetDeploymentSender sends the GetDeployment request. The method will close the
9301// http.Response Body if it receives an error.
9302func (client AppsClient) GetDeploymentSender(req *http.Request) (*http.Response, error) {
9303	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9304}
9305
9306// GetDeploymentResponder handles the response to the GetDeployment request. The method always
9307// closes the http.Response Body.
9308func (client AppsClient) GetDeploymentResponder(resp *http.Response) (result Deployment, err error) {
9309	err = autorest.Respond(
9310		resp,
9311		azure.WithErrorUnlessStatusCode(http.StatusOK),
9312		autorest.ByUnmarshallingJSON(&result),
9313		autorest.ByClosing())
9314	result.Response = autorest.Response{Response: resp}
9315	return
9316}
9317
9318// GetDeploymentSlot get a deployment by its ID for an app, or a deployment slot.
9319// Parameters:
9320// resourceGroupName - name of the resource group to which the resource belongs.
9321// name - name of the app.
9322// ID - deployment ID.
9323// slot - name of the deployment slot. If a slot is not specified, the API gets a deployment for the production
9324// slot.
9325func (client AppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) {
9326	if tracing.IsEnabled() {
9327		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeploymentSlot")
9328		defer func() {
9329			sc := -1
9330			if result.Response.Response != nil {
9331				sc = result.Response.Response.StatusCode
9332			}
9333			tracing.EndSpan(ctx, sc, err)
9334		}()
9335	}
9336	if err := validation.Validate([]validation.Validation{
9337		{TargetValue: resourceGroupName,
9338			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9339				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9340				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9341		return result, validation.NewError("web.AppsClient", "GetDeploymentSlot", err.Error())
9342	}
9343
9344	req, err := client.GetDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot)
9345	if err != nil {
9346		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", nil, "Failure preparing request")
9347		return
9348	}
9349
9350	resp, err := client.GetDeploymentSlotSender(req)
9351	if err != nil {
9352		result.Response = autorest.Response{Response: resp}
9353		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure sending request")
9354		return
9355	}
9356
9357	result, err = client.GetDeploymentSlotResponder(resp)
9358	if err != nil {
9359		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure responding to request")
9360		return
9361	}
9362
9363	return
9364}
9365
9366// GetDeploymentSlotPreparer prepares the GetDeploymentSlot request.
9367func (client AppsClient) GetDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) {
9368	pathParameters := map[string]interface{}{
9369		"id":                autorest.Encode("path", ID),
9370		"name":              autorest.Encode("path", name),
9371		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9372		"slot":              autorest.Encode("path", slot),
9373		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9374	}
9375
9376	const APIVersion = "2018-02-01"
9377	queryParameters := map[string]interface{}{
9378		"api-version": APIVersion,
9379	}
9380
9381	preparer := autorest.CreatePreparer(
9382		autorest.AsGet(),
9383		autorest.WithBaseURL(client.BaseURI),
9384		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters),
9385		autorest.WithQueryParameters(queryParameters))
9386	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9387}
9388
9389// GetDeploymentSlotSender sends the GetDeploymentSlot request. The method will close the
9390// http.Response Body if it receives an error.
9391func (client AppsClient) GetDeploymentSlotSender(req *http.Request) (*http.Response, error) {
9392	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9393}
9394
9395// GetDeploymentSlotResponder handles the response to the GetDeploymentSlot request. The method always
9396// closes the http.Response Body.
9397func (client AppsClient) GetDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) {
9398	err = autorest.Respond(
9399		resp,
9400		azure.WithErrorUnlessStatusCode(http.StatusOK),
9401		autorest.ByUnmarshallingJSON(&result),
9402		autorest.ByClosing())
9403	result.Response = autorest.Response{Response: resp}
9404	return
9405}
9406
9407// GetDiagnosticLogsConfiguration gets the logging configuration of an app.
9408// Parameters:
9409// resourceGroupName - name of the resource group to which the resource belongs.
9410// name - name of the app.
9411func (client AppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteLogsConfig, err error) {
9412	if tracing.IsEnabled() {
9413		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfiguration")
9414		defer func() {
9415			sc := -1
9416			if result.Response.Response != nil {
9417				sc = result.Response.Response.StatusCode
9418			}
9419			tracing.EndSpan(ctx, sc, err)
9420		}()
9421	}
9422	if err := validation.Validate([]validation.Validation{
9423		{TargetValue: resourceGroupName,
9424			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9425				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9426				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9427		return result, validation.NewError("web.AppsClient", "GetDiagnosticLogsConfiguration", err.Error())
9428	}
9429
9430	req, err := client.GetDiagnosticLogsConfigurationPreparer(ctx, resourceGroupName, name)
9431	if err != nil {
9432		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", nil, "Failure preparing request")
9433		return
9434	}
9435
9436	resp, err := client.GetDiagnosticLogsConfigurationSender(req)
9437	if err != nil {
9438		result.Response = autorest.Response{Response: resp}
9439		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure sending request")
9440		return
9441	}
9442
9443	result, err = client.GetDiagnosticLogsConfigurationResponder(resp)
9444	if err != nil {
9445		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure responding to request")
9446		return
9447	}
9448
9449	return
9450}
9451
9452// GetDiagnosticLogsConfigurationPreparer prepares the GetDiagnosticLogsConfiguration request.
9453func (client AppsClient) GetDiagnosticLogsConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
9454	pathParameters := map[string]interface{}{
9455		"name":              autorest.Encode("path", name),
9456		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9457		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9458	}
9459
9460	const APIVersion = "2018-02-01"
9461	queryParameters := map[string]interface{}{
9462		"api-version": APIVersion,
9463	}
9464
9465	preparer := autorest.CreatePreparer(
9466		autorest.AsGet(),
9467		autorest.WithBaseURL(client.BaseURI),
9468		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs", pathParameters),
9469		autorest.WithQueryParameters(queryParameters))
9470	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9471}
9472
9473// GetDiagnosticLogsConfigurationSender sends the GetDiagnosticLogsConfiguration request. The method will close the
9474// http.Response Body if it receives an error.
9475func (client AppsClient) GetDiagnosticLogsConfigurationSender(req *http.Request) (*http.Response, error) {
9476	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9477}
9478
9479// GetDiagnosticLogsConfigurationResponder handles the response to the GetDiagnosticLogsConfiguration request. The method always
9480// closes the http.Response Body.
9481func (client AppsClient) GetDiagnosticLogsConfigurationResponder(resp *http.Response) (result SiteLogsConfig, err error) {
9482	err = autorest.Respond(
9483		resp,
9484		azure.WithErrorUnlessStatusCode(http.StatusOK),
9485		autorest.ByUnmarshallingJSON(&result),
9486		autorest.ByClosing())
9487	result.Response = autorest.Response{Response: resp}
9488	return
9489}
9490
9491// GetDiagnosticLogsConfigurationSlot gets the logging configuration of an app.
9492// Parameters:
9493// resourceGroupName - name of the resource group to which the resource belongs.
9494// name - name of the app.
9495// slot - name of the deployment slot. If a slot is not specified, the API will get the logging configuration
9496// for the production slot.
9497func (client AppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteLogsConfig, err error) {
9498	if tracing.IsEnabled() {
9499		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfigurationSlot")
9500		defer func() {
9501			sc := -1
9502			if result.Response.Response != nil {
9503				sc = result.Response.Response.StatusCode
9504			}
9505			tracing.EndSpan(ctx, sc, err)
9506		}()
9507	}
9508	if err := validation.Validate([]validation.Validation{
9509		{TargetValue: resourceGroupName,
9510			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9511				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9512				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9513		return result, validation.NewError("web.AppsClient", "GetDiagnosticLogsConfigurationSlot", err.Error())
9514	}
9515
9516	req, err := client.GetDiagnosticLogsConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
9517	if err != nil {
9518		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", nil, "Failure preparing request")
9519		return
9520	}
9521
9522	resp, err := client.GetDiagnosticLogsConfigurationSlotSender(req)
9523	if err != nil {
9524		result.Response = autorest.Response{Response: resp}
9525		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure sending request")
9526		return
9527	}
9528
9529	result, err = client.GetDiagnosticLogsConfigurationSlotResponder(resp)
9530	if err != nil {
9531		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure responding to request")
9532		return
9533	}
9534
9535	return
9536}
9537
9538// GetDiagnosticLogsConfigurationSlotPreparer prepares the GetDiagnosticLogsConfigurationSlot request.
9539func (client AppsClient) GetDiagnosticLogsConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
9540	pathParameters := map[string]interface{}{
9541		"name":              autorest.Encode("path", name),
9542		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9543		"slot":              autorest.Encode("path", slot),
9544		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9545	}
9546
9547	const APIVersion = "2018-02-01"
9548	queryParameters := map[string]interface{}{
9549		"api-version": APIVersion,
9550	}
9551
9552	preparer := autorest.CreatePreparer(
9553		autorest.AsGet(),
9554		autorest.WithBaseURL(client.BaseURI),
9555		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs", pathParameters),
9556		autorest.WithQueryParameters(queryParameters))
9557	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9558}
9559
9560// GetDiagnosticLogsConfigurationSlotSender sends the GetDiagnosticLogsConfigurationSlot request. The method will close the
9561// http.Response Body if it receives an error.
9562func (client AppsClient) GetDiagnosticLogsConfigurationSlotSender(req *http.Request) (*http.Response, error) {
9563	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9564}
9565
9566// GetDiagnosticLogsConfigurationSlotResponder handles the response to the GetDiagnosticLogsConfigurationSlot request. The method always
9567// closes the http.Response Body.
9568func (client AppsClient) GetDiagnosticLogsConfigurationSlotResponder(resp *http.Response) (result SiteLogsConfig, err error) {
9569	err = autorest.Respond(
9570		resp,
9571		azure.WithErrorUnlessStatusCode(http.StatusOK),
9572		autorest.ByUnmarshallingJSON(&result),
9573		autorest.ByClosing())
9574	result.Response = autorest.Response{Response: resp}
9575	return
9576}
9577
9578// GetDomainOwnershipIdentifier get domain ownership identifier for web app.
9579// Parameters:
9580// resourceGroupName - name of the resource group to which the resource belongs.
9581// name - name of the app.
9582// domainOwnershipIdentifierName - name of domain ownership identifier.
9583func (client AppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result Identifier, err error) {
9584	if tracing.IsEnabled() {
9585		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifier")
9586		defer func() {
9587			sc := -1
9588			if result.Response.Response != nil {
9589				sc = result.Response.Response.StatusCode
9590			}
9591			tracing.EndSpan(ctx, sc, err)
9592		}()
9593	}
9594	if err := validation.Validate([]validation.Validation{
9595		{TargetValue: resourceGroupName,
9596			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9597				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9598				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9599		return result, validation.NewError("web.AppsClient", "GetDomainOwnershipIdentifier", err.Error())
9600	}
9601
9602	req, err := client.GetDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName)
9603	if err != nil {
9604		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", nil, "Failure preparing request")
9605		return
9606	}
9607
9608	resp, err := client.GetDomainOwnershipIdentifierSender(req)
9609	if err != nil {
9610		result.Response = autorest.Response{Response: resp}
9611		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure sending request")
9612		return
9613	}
9614
9615	result, err = client.GetDomainOwnershipIdentifierResponder(resp)
9616	if err != nil {
9617		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure responding to request")
9618		return
9619	}
9620
9621	return
9622}
9623
9624// GetDomainOwnershipIdentifierPreparer prepares the GetDomainOwnershipIdentifier request.
9625func (client AppsClient) GetDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) {
9626	pathParameters := map[string]interface{}{
9627		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
9628		"name":                          autorest.Encode("path", name),
9629		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
9630		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
9631	}
9632
9633	const APIVersion = "2018-02-01"
9634	queryParameters := map[string]interface{}{
9635		"api-version": APIVersion,
9636	}
9637
9638	preparer := autorest.CreatePreparer(
9639		autorest.AsGet(),
9640		autorest.WithBaseURL(client.BaseURI),
9641		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
9642		autorest.WithQueryParameters(queryParameters))
9643	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9644}
9645
9646// GetDomainOwnershipIdentifierSender sends the GetDomainOwnershipIdentifier request. The method will close the
9647// http.Response Body if it receives an error.
9648func (client AppsClient) GetDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
9649	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9650}
9651
9652// GetDomainOwnershipIdentifierResponder handles the response to the GetDomainOwnershipIdentifier request. The method always
9653// closes the http.Response Body.
9654func (client AppsClient) GetDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) {
9655	err = autorest.Respond(
9656		resp,
9657		azure.WithErrorUnlessStatusCode(http.StatusOK),
9658		autorest.ByUnmarshallingJSON(&result),
9659		autorest.ByClosing())
9660	result.Response = autorest.Response{Response: resp}
9661	return
9662}
9663
9664// GetDomainOwnershipIdentifierSlot get domain ownership identifier for web app.
9665// Parameters:
9666// resourceGroupName - name of the resource group to which the resource belongs.
9667// name - name of the app.
9668// domainOwnershipIdentifierName - name of domain ownership identifier.
9669// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
9670// production slot.
9671func (client AppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result Identifier, err error) {
9672	if tracing.IsEnabled() {
9673		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifierSlot")
9674		defer func() {
9675			sc := -1
9676			if result.Response.Response != nil {
9677				sc = result.Response.Response.StatusCode
9678			}
9679			tracing.EndSpan(ctx, sc, err)
9680		}()
9681	}
9682	if err := validation.Validate([]validation.Validation{
9683		{TargetValue: resourceGroupName,
9684			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9685				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9686				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9687		return result, validation.NewError("web.AppsClient", "GetDomainOwnershipIdentifierSlot", err.Error())
9688	}
9689
9690	req, err := client.GetDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot)
9691	if err != nil {
9692		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
9693		return
9694	}
9695
9696	resp, err := client.GetDomainOwnershipIdentifierSlotSender(req)
9697	if err != nil {
9698		result.Response = autorest.Response{Response: resp}
9699		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure sending request")
9700		return
9701	}
9702
9703	result, err = client.GetDomainOwnershipIdentifierSlotResponder(resp)
9704	if err != nil {
9705		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
9706		return
9707	}
9708
9709	return
9710}
9711
9712// GetDomainOwnershipIdentifierSlotPreparer prepares the GetDomainOwnershipIdentifierSlot request.
9713func (client AppsClient) GetDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) {
9714	pathParameters := map[string]interface{}{
9715		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
9716		"name":                          autorest.Encode("path", name),
9717		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
9718		"slot":                          autorest.Encode("path", slot),
9719		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
9720	}
9721
9722	const APIVersion = "2018-02-01"
9723	queryParameters := map[string]interface{}{
9724		"api-version": APIVersion,
9725	}
9726
9727	preparer := autorest.CreatePreparer(
9728		autorest.AsGet(),
9729		autorest.WithBaseURL(client.BaseURI),
9730		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
9731		autorest.WithQueryParameters(queryParameters))
9732	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9733}
9734
9735// GetDomainOwnershipIdentifierSlotSender sends the GetDomainOwnershipIdentifierSlot request. The method will close the
9736// http.Response Body if it receives an error.
9737func (client AppsClient) GetDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
9738	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9739}
9740
9741// GetDomainOwnershipIdentifierSlotResponder handles the response to the GetDomainOwnershipIdentifierSlot request. The method always
9742// closes the http.Response Body.
9743func (client AppsClient) GetDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) {
9744	err = autorest.Respond(
9745		resp,
9746		azure.WithErrorUnlessStatusCode(http.StatusOK),
9747		autorest.ByUnmarshallingJSON(&result),
9748		autorest.ByClosing())
9749	result.Response = autorest.Response{Response: resp}
9750	return
9751}
9752
9753// GetFunction get function information by its ID for web site, or a deployment slot.
9754// Parameters:
9755// resourceGroupName - name of the resource group to which the resource belongs.
9756// name - site name.
9757// functionName - function name.
9758func (client AppsClient) GetFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionEnvelope, err error) {
9759	if tracing.IsEnabled() {
9760		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunction")
9761		defer func() {
9762			sc := -1
9763			if result.Response.Response != nil {
9764				sc = result.Response.Response.StatusCode
9765			}
9766			tracing.EndSpan(ctx, sc, err)
9767		}()
9768	}
9769	if err := validation.Validate([]validation.Validation{
9770		{TargetValue: resourceGroupName,
9771			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9772				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9773				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9774		return result, validation.NewError("web.AppsClient", "GetFunction", err.Error())
9775	}
9776
9777	req, err := client.GetFunctionPreparer(ctx, resourceGroupName, name, functionName)
9778	if err != nil {
9779		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", nil, "Failure preparing request")
9780		return
9781	}
9782
9783	resp, err := client.GetFunctionSender(req)
9784	if err != nil {
9785		result.Response = autorest.Response{Response: resp}
9786		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure sending request")
9787		return
9788	}
9789
9790	result, err = client.GetFunctionResponder(resp)
9791	if err != nil {
9792		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure responding to request")
9793		return
9794	}
9795
9796	return
9797}
9798
9799// GetFunctionPreparer prepares the GetFunction request.
9800func (client AppsClient) GetFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
9801	pathParameters := map[string]interface{}{
9802		"functionName":      autorest.Encode("path", functionName),
9803		"name":              autorest.Encode("path", name),
9804		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9805		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9806	}
9807
9808	const APIVersion = "2018-02-01"
9809	queryParameters := map[string]interface{}{
9810		"api-version": APIVersion,
9811	}
9812
9813	preparer := autorest.CreatePreparer(
9814		autorest.AsGet(),
9815		autorest.WithBaseURL(client.BaseURI),
9816		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters),
9817		autorest.WithQueryParameters(queryParameters))
9818	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9819}
9820
9821// GetFunctionSender sends the GetFunction request. The method will close the
9822// http.Response Body if it receives an error.
9823func (client AppsClient) GetFunctionSender(req *http.Request) (*http.Response, error) {
9824	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9825}
9826
9827// GetFunctionResponder handles the response to the GetFunction request. The method always
9828// closes the http.Response Body.
9829func (client AppsClient) GetFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) {
9830	err = autorest.Respond(
9831		resp,
9832		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
9833		autorest.ByUnmarshallingJSON(&result),
9834		autorest.ByClosing())
9835	result.Response = autorest.Response{Response: resp}
9836	return
9837}
9838
9839// GetFunctionsAdminToken fetch a short lived token that can be exchanged for a master key.
9840// Parameters:
9841// resourceGroupName - name of the resource group to which the resource belongs.
9842// name - name of web app.
9843func (client AppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGroupName string, name string) (result String, err error) {
9844	if tracing.IsEnabled() {
9845		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminToken")
9846		defer func() {
9847			sc := -1
9848			if result.Response.Response != nil {
9849				sc = result.Response.Response.StatusCode
9850			}
9851			tracing.EndSpan(ctx, sc, err)
9852		}()
9853	}
9854	if err := validation.Validate([]validation.Validation{
9855		{TargetValue: resourceGroupName,
9856			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9857				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9858				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9859		return result, validation.NewError("web.AppsClient", "GetFunctionsAdminToken", err.Error())
9860	}
9861
9862	req, err := client.GetFunctionsAdminTokenPreparer(ctx, resourceGroupName, name)
9863	if err != nil {
9864		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", nil, "Failure preparing request")
9865		return
9866	}
9867
9868	resp, err := client.GetFunctionsAdminTokenSender(req)
9869	if err != nil {
9870		result.Response = autorest.Response{Response: resp}
9871		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure sending request")
9872		return
9873	}
9874
9875	result, err = client.GetFunctionsAdminTokenResponder(resp)
9876	if err != nil {
9877		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure responding to request")
9878		return
9879	}
9880
9881	return
9882}
9883
9884// GetFunctionsAdminTokenPreparer prepares the GetFunctionsAdminToken request.
9885func (client AppsClient) GetFunctionsAdminTokenPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
9886	pathParameters := map[string]interface{}{
9887		"name":              autorest.Encode("path", name),
9888		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9889		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9890	}
9891
9892	const APIVersion = "2018-02-01"
9893	queryParameters := map[string]interface{}{
9894		"api-version": APIVersion,
9895	}
9896
9897	preparer := autorest.CreatePreparer(
9898		autorest.AsGet(),
9899		autorest.WithBaseURL(client.BaseURI),
9900		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token", pathParameters),
9901		autorest.WithQueryParameters(queryParameters))
9902	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9903}
9904
9905// GetFunctionsAdminTokenSender sends the GetFunctionsAdminToken request. The method will close the
9906// http.Response Body if it receives an error.
9907func (client AppsClient) GetFunctionsAdminTokenSender(req *http.Request) (*http.Response, error) {
9908	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9909}
9910
9911// GetFunctionsAdminTokenResponder handles the response to the GetFunctionsAdminToken request. The method always
9912// closes the http.Response Body.
9913func (client AppsClient) GetFunctionsAdminTokenResponder(resp *http.Response) (result String, err error) {
9914	err = autorest.Respond(
9915		resp,
9916		azure.WithErrorUnlessStatusCode(http.StatusOK),
9917		autorest.ByUnmarshallingJSON(&result.Value),
9918		autorest.ByClosing())
9919	result.Response = autorest.Response{Response: resp}
9920	return
9921}
9922
9923// GetFunctionsAdminTokenSlot fetch a short lived token that can be exchanged for a master key.
9924// Parameters:
9925// resourceGroupName - name of the resource group to which the resource belongs.
9926// name - name of web app.
9927// slot - name of web app slot. If not specified then will default to production slot.
9928func (client AppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result String, err error) {
9929	if tracing.IsEnabled() {
9930		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminTokenSlot")
9931		defer func() {
9932			sc := -1
9933			if result.Response.Response != nil {
9934				sc = result.Response.Response.StatusCode
9935			}
9936			tracing.EndSpan(ctx, sc, err)
9937		}()
9938	}
9939	if err := validation.Validate([]validation.Validation{
9940		{TargetValue: resourceGroupName,
9941			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9942				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9943				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9944		return result, validation.NewError("web.AppsClient", "GetFunctionsAdminTokenSlot", err.Error())
9945	}
9946
9947	req, err := client.GetFunctionsAdminTokenSlotPreparer(ctx, resourceGroupName, name, slot)
9948	if err != nil {
9949		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", nil, "Failure preparing request")
9950		return
9951	}
9952
9953	resp, err := client.GetFunctionsAdminTokenSlotSender(req)
9954	if err != nil {
9955		result.Response = autorest.Response{Response: resp}
9956		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure sending request")
9957		return
9958	}
9959
9960	result, err = client.GetFunctionsAdminTokenSlotResponder(resp)
9961	if err != nil {
9962		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure responding to request")
9963		return
9964	}
9965
9966	return
9967}
9968
9969// GetFunctionsAdminTokenSlotPreparer prepares the GetFunctionsAdminTokenSlot request.
9970func (client AppsClient) GetFunctionsAdminTokenSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
9971	pathParameters := map[string]interface{}{
9972		"name":              autorest.Encode("path", name),
9973		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9974		"slot":              autorest.Encode("path", slot),
9975		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9976	}
9977
9978	const APIVersion = "2018-02-01"
9979	queryParameters := map[string]interface{}{
9980		"api-version": APIVersion,
9981	}
9982
9983	preparer := autorest.CreatePreparer(
9984		autorest.AsGet(),
9985		autorest.WithBaseURL(client.BaseURI),
9986		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token", pathParameters),
9987		autorest.WithQueryParameters(queryParameters))
9988	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9989}
9990
9991// GetFunctionsAdminTokenSlotSender sends the GetFunctionsAdminTokenSlot request. The method will close the
9992// http.Response Body if it receives an error.
9993func (client AppsClient) GetFunctionsAdminTokenSlotSender(req *http.Request) (*http.Response, error) {
9994	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9995}
9996
9997// GetFunctionsAdminTokenSlotResponder handles the response to the GetFunctionsAdminTokenSlot request. The method always
9998// closes the http.Response Body.
9999func (client AppsClient) GetFunctionsAdminTokenSlotResponder(resp *http.Response) (result String, err error) {
10000	err = autorest.Respond(
10001		resp,
10002		azure.WithErrorUnlessStatusCode(http.StatusOK),
10003		autorest.ByUnmarshallingJSON(&result.Value),
10004		autorest.ByClosing())
10005	result.Response = autorest.Response{Response: resp}
10006	return
10007}
10008
10009// GetHostNameBinding get the named hostname binding for an app (or deployment slot, if specified).
10010// Parameters:
10011// resourceGroupName - name of the resource group to which the resource belongs.
10012// name - name of the app.
10013// hostName - hostname in the hostname binding.
10014func (client AppsClient) GetHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result HostNameBinding, err error) {
10015	if tracing.IsEnabled() {
10016		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBinding")
10017		defer func() {
10018			sc := -1
10019			if result.Response.Response != nil {
10020				sc = result.Response.Response.StatusCode
10021			}
10022			tracing.EndSpan(ctx, sc, err)
10023		}()
10024	}
10025	if err := validation.Validate([]validation.Validation{
10026		{TargetValue: resourceGroupName,
10027			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10028				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10029				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10030		return result, validation.NewError("web.AppsClient", "GetHostNameBinding", err.Error())
10031	}
10032
10033	req, err := client.GetHostNameBindingPreparer(ctx, resourceGroupName, name, hostName)
10034	if err != nil {
10035		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", nil, "Failure preparing request")
10036		return
10037	}
10038
10039	resp, err := client.GetHostNameBindingSender(req)
10040	if err != nil {
10041		result.Response = autorest.Response{Response: resp}
10042		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure sending request")
10043		return
10044	}
10045
10046	result, err = client.GetHostNameBindingResponder(resp)
10047	if err != nil {
10048		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure responding to request")
10049		return
10050	}
10051
10052	return
10053}
10054
10055// GetHostNameBindingPreparer prepares the GetHostNameBinding request.
10056func (client AppsClient) GetHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) {
10057	pathParameters := map[string]interface{}{
10058		"hostName":          autorest.Encode("path", hostName),
10059		"name":              autorest.Encode("path", name),
10060		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10061		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10062	}
10063
10064	const APIVersion = "2018-02-01"
10065	queryParameters := map[string]interface{}{
10066		"api-version": APIVersion,
10067	}
10068
10069	preparer := autorest.CreatePreparer(
10070		autorest.AsGet(),
10071		autorest.WithBaseURL(client.BaseURI),
10072		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters),
10073		autorest.WithQueryParameters(queryParameters))
10074	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10075}
10076
10077// GetHostNameBindingSender sends the GetHostNameBinding request. The method will close the
10078// http.Response Body if it receives an error.
10079func (client AppsClient) GetHostNameBindingSender(req *http.Request) (*http.Response, error) {
10080	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10081}
10082
10083// GetHostNameBindingResponder handles the response to the GetHostNameBinding request. The method always
10084// closes the http.Response Body.
10085func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) {
10086	err = autorest.Respond(
10087		resp,
10088		azure.WithErrorUnlessStatusCode(http.StatusOK),
10089		autorest.ByUnmarshallingJSON(&result),
10090		autorest.ByClosing())
10091	result.Response = autorest.Response{Response: resp}
10092	return
10093}
10094
10095// GetHostNameBindingSlot get the named hostname binding for an app (or deployment slot, if specified).
10096// Parameters:
10097// resourceGroupName - name of the resource group to which the resource belongs.
10098// name - name of the app.
10099// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production
10100// slot.
10101// hostName - hostname in the hostname binding.
10102func (client AppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result HostNameBinding, err error) {
10103	if tracing.IsEnabled() {
10104		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBindingSlot")
10105		defer func() {
10106			sc := -1
10107			if result.Response.Response != nil {
10108				sc = result.Response.Response.StatusCode
10109			}
10110			tracing.EndSpan(ctx, sc, err)
10111		}()
10112	}
10113	if err := validation.Validate([]validation.Validation{
10114		{TargetValue: resourceGroupName,
10115			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10116				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10117				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10118		return result, validation.NewError("web.AppsClient", "GetHostNameBindingSlot", err.Error())
10119	}
10120
10121	req, err := client.GetHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName)
10122	if err != nil {
10123		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", nil, "Failure preparing request")
10124		return
10125	}
10126
10127	resp, err := client.GetHostNameBindingSlotSender(req)
10128	if err != nil {
10129		result.Response = autorest.Response{Response: resp}
10130		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure sending request")
10131		return
10132	}
10133
10134	result, err = client.GetHostNameBindingSlotResponder(resp)
10135	if err != nil {
10136		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure responding to request")
10137		return
10138	}
10139
10140	return
10141}
10142
10143// GetHostNameBindingSlotPreparer prepares the GetHostNameBindingSlot request.
10144func (client AppsClient) GetHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) {
10145	pathParameters := map[string]interface{}{
10146		"hostName":          autorest.Encode("path", hostName),
10147		"name":              autorest.Encode("path", name),
10148		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10149		"slot":              autorest.Encode("path", slot),
10150		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10151	}
10152
10153	const APIVersion = "2018-02-01"
10154	queryParameters := map[string]interface{}{
10155		"api-version": APIVersion,
10156	}
10157
10158	preparer := autorest.CreatePreparer(
10159		autorest.AsGet(),
10160		autorest.WithBaseURL(client.BaseURI),
10161		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters),
10162		autorest.WithQueryParameters(queryParameters))
10163	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10164}
10165
10166// GetHostNameBindingSlotSender sends the GetHostNameBindingSlot request. The method will close the
10167// http.Response Body if it receives an error.
10168func (client AppsClient) GetHostNameBindingSlotSender(req *http.Request) (*http.Response, error) {
10169	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10170}
10171
10172// GetHostNameBindingSlotResponder handles the response to the GetHostNameBindingSlot request. The method always
10173// closes the http.Response Body.
10174func (client AppsClient) GetHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) {
10175	err = autorest.Respond(
10176		resp,
10177		azure.WithErrorUnlessStatusCode(http.StatusOK),
10178		autorest.ByUnmarshallingJSON(&result),
10179		autorest.ByClosing())
10180	result.Response = autorest.Response{Response: resp}
10181	return
10182}
10183
10184// GetHybridConnection retrieves a specific Service Bus Hybrid Connection used by this Web App.
10185// Parameters:
10186// resourceGroupName - name of the resource group to which the resource belongs.
10187// name - the name of the web app.
10188// namespaceName - the namespace for this hybrid connection.
10189// relayName - the relay name for this hybrid connection.
10190func (client AppsClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnection, err error) {
10191	if tracing.IsEnabled() {
10192		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnection")
10193		defer func() {
10194			sc := -1
10195			if result.Response.Response != nil {
10196				sc = result.Response.Response.StatusCode
10197			}
10198			tracing.EndSpan(ctx, sc, err)
10199		}()
10200	}
10201	if err := validation.Validate([]validation.Validation{
10202		{TargetValue: resourceGroupName,
10203			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10204				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10205				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10206		return result, validation.NewError("web.AppsClient", "GetHybridConnection", err.Error())
10207	}
10208
10209	req, err := client.GetHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName)
10210	if err != nil {
10211		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", nil, "Failure preparing request")
10212		return
10213	}
10214
10215	resp, err := client.GetHybridConnectionSender(req)
10216	if err != nil {
10217		result.Response = autorest.Response{Response: resp}
10218		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure sending request")
10219		return
10220	}
10221
10222	result, err = client.GetHybridConnectionResponder(resp)
10223	if err != nil {
10224		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure responding to request")
10225		return
10226	}
10227
10228	return
10229}
10230
10231// GetHybridConnectionPreparer prepares the GetHybridConnection request.
10232func (client AppsClient) GetHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) {
10233	pathParameters := map[string]interface{}{
10234		"name":              autorest.Encode("path", name),
10235		"namespaceName":     autorest.Encode("path", namespaceName),
10236		"relayName":         autorest.Encode("path", relayName),
10237		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10238		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10239	}
10240
10241	const APIVersion = "2018-02-01"
10242	queryParameters := map[string]interface{}{
10243		"api-version": APIVersion,
10244	}
10245
10246	preparer := autorest.CreatePreparer(
10247		autorest.AsGet(),
10248		autorest.WithBaseURL(client.BaseURI),
10249		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
10250		autorest.WithQueryParameters(queryParameters))
10251	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10252}
10253
10254// GetHybridConnectionSender sends the GetHybridConnection request. The method will close the
10255// http.Response Body if it receives an error.
10256func (client AppsClient) GetHybridConnectionSender(req *http.Request) (*http.Response, error) {
10257	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10258}
10259
10260// GetHybridConnectionResponder handles the response to the GetHybridConnection request. The method always
10261// closes the http.Response Body.
10262func (client AppsClient) GetHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) {
10263	err = autorest.Respond(
10264		resp,
10265		azure.WithErrorUnlessStatusCode(http.StatusOK),
10266		autorest.ByUnmarshallingJSON(&result),
10267		autorest.ByClosing())
10268	result.Response = autorest.Response{Response: resp}
10269	return
10270}
10271
10272// GetHybridConnectionSlot retrieves a specific Service Bus Hybrid Connection used by this Web App.
10273// Parameters:
10274// resourceGroupName - name of the resource group to which the resource belongs.
10275// name - the name of the web app.
10276// namespaceName - the namespace for this hybrid connection.
10277// relayName - the relay name for this hybrid connection.
10278// slot - the name of the slot for the web app.
10279func (client AppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result HybridConnection, err error) {
10280	if tracing.IsEnabled() {
10281		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnectionSlot")
10282		defer func() {
10283			sc := -1
10284			if result.Response.Response != nil {
10285				sc = result.Response.Response.StatusCode
10286			}
10287			tracing.EndSpan(ctx, sc, err)
10288		}()
10289	}
10290	if err := validation.Validate([]validation.Validation{
10291		{TargetValue: resourceGroupName,
10292			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10293				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10294				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10295		return result, validation.NewError("web.AppsClient", "GetHybridConnectionSlot", err.Error())
10296	}
10297
10298	req, err := client.GetHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot)
10299	if err != nil {
10300		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", nil, "Failure preparing request")
10301		return
10302	}
10303
10304	resp, err := client.GetHybridConnectionSlotSender(req)
10305	if err != nil {
10306		result.Response = autorest.Response{Response: resp}
10307		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure sending request")
10308		return
10309	}
10310
10311	result, err = client.GetHybridConnectionSlotResponder(resp)
10312	if err != nil {
10313		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure responding to request")
10314		return
10315	}
10316
10317	return
10318}
10319
10320// GetHybridConnectionSlotPreparer prepares the GetHybridConnectionSlot request.
10321func (client AppsClient) GetHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) {
10322	pathParameters := map[string]interface{}{
10323		"name":              autorest.Encode("path", name),
10324		"namespaceName":     autorest.Encode("path", namespaceName),
10325		"relayName":         autorest.Encode("path", relayName),
10326		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10327		"slot":              autorest.Encode("path", slot),
10328		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10329	}
10330
10331	const APIVersion = "2018-02-01"
10332	queryParameters := map[string]interface{}{
10333		"api-version": APIVersion,
10334	}
10335
10336	preparer := autorest.CreatePreparer(
10337		autorest.AsGet(),
10338		autorest.WithBaseURL(client.BaseURI),
10339		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
10340		autorest.WithQueryParameters(queryParameters))
10341	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10342}
10343
10344// GetHybridConnectionSlotSender sends the GetHybridConnectionSlot request. The method will close the
10345// http.Response Body if it receives an error.
10346func (client AppsClient) GetHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
10347	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10348}
10349
10350// GetHybridConnectionSlotResponder handles the response to the GetHybridConnectionSlot request. The method always
10351// closes the http.Response Body.
10352func (client AppsClient) GetHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) {
10353	err = autorest.Respond(
10354		resp,
10355		azure.WithErrorUnlessStatusCode(http.StatusOK),
10356		autorest.ByUnmarshallingJSON(&result),
10357		autorest.ByClosing())
10358	result.Response = autorest.Response{Response: resp}
10359	return
10360}
10361
10362// GetInstanceFunctionSlot get function information by its ID for web site, or a deployment slot.
10363// Parameters:
10364// resourceGroupName - name of the resource group to which the resource belongs.
10365// name - site name.
10366// functionName - function name.
10367// slot - name of the deployment slot.
10368func (client AppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionEnvelope, err error) {
10369	if tracing.IsEnabled() {
10370		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceFunctionSlot")
10371		defer func() {
10372			sc := -1
10373			if result.Response.Response != nil {
10374				sc = result.Response.Response.StatusCode
10375			}
10376			tracing.EndSpan(ctx, sc, err)
10377		}()
10378	}
10379	if err := validation.Validate([]validation.Validation{
10380		{TargetValue: resourceGroupName,
10381			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10382				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10383				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10384		return result, validation.NewError("web.AppsClient", "GetInstanceFunctionSlot", err.Error())
10385	}
10386
10387	req, err := client.GetInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
10388	if err != nil {
10389		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", nil, "Failure preparing request")
10390		return
10391	}
10392
10393	resp, err := client.GetInstanceFunctionSlotSender(req)
10394	if err != nil {
10395		result.Response = autorest.Response{Response: resp}
10396		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure sending request")
10397		return
10398	}
10399
10400	result, err = client.GetInstanceFunctionSlotResponder(resp)
10401	if err != nil {
10402		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure responding to request")
10403		return
10404	}
10405
10406	return
10407}
10408
10409// GetInstanceFunctionSlotPreparer prepares the GetInstanceFunctionSlot request.
10410func (client AppsClient) GetInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
10411	pathParameters := map[string]interface{}{
10412		"functionName":      autorest.Encode("path", functionName),
10413		"name":              autorest.Encode("path", name),
10414		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10415		"slot":              autorest.Encode("path", slot),
10416		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10417	}
10418
10419	const APIVersion = "2018-02-01"
10420	queryParameters := map[string]interface{}{
10421		"api-version": APIVersion,
10422	}
10423
10424	preparer := autorest.CreatePreparer(
10425		autorest.AsGet(),
10426		autorest.WithBaseURL(client.BaseURI),
10427		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters),
10428		autorest.WithQueryParameters(queryParameters))
10429	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10430}
10431
10432// GetInstanceFunctionSlotSender sends the GetInstanceFunctionSlot request. The method will close the
10433// http.Response Body if it receives an error.
10434func (client AppsClient) GetInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) {
10435	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10436}
10437
10438// GetInstanceFunctionSlotResponder handles the response to the GetInstanceFunctionSlot request. The method always
10439// closes the http.Response Body.
10440func (client AppsClient) GetInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) {
10441	err = autorest.Respond(
10442		resp,
10443		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
10444		autorest.ByUnmarshallingJSON(&result),
10445		autorest.ByClosing())
10446	result.Response = autorest.Response{Response: resp}
10447	return
10448}
10449
10450// GetInstanceMSDeployLog get the MSDeploy Log for the last MSDeploy operation.
10451// Parameters:
10452// resourceGroupName - name of the resource group to which the resource belongs.
10453// name - name of web app.
10454// instanceID - ID of web app instance.
10455func (client AppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployLog, err error) {
10456	if tracing.IsEnabled() {
10457		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLog")
10458		defer func() {
10459			sc := -1
10460			if result.Response.Response != nil {
10461				sc = result.Response.Response.StatusCode
10462			}
10463			tracing.EndSpan(ctx, sc, err)
10464		}()
10465	}
10466	if err := validation.Validate([]validation.Validation{
10467		{TargetValue: resourceGroupName,
10468			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10469				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10470				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10471		return result, validation.NewError("web.AppsClient", "GetInstanceMSDeployLog", err.Error())
10472	}
10473
10474	req, err := client.GetInstanceMSDeployLogPreparer(ctx, resourceGroupName, name, instanceID)
10475	if err != nil {
10476		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", nil, "Failure preparing request")
10477		return
10478	}
10479
10480	resp, err := client.GetInstanceMSDeployLogSender(req)
10481	if err != nil {
10482		result.Response = autorest.Response{Response: resp}
10483		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure sending request")
10484		return
10485	}
10486
10487	result, err = client.GetInstanceMSDeployLogResponder(resp)
10488	if err != nil {
10489		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure responding to request")
10490		return
10491	}
10492
10493	return
10494}
10495
10496// GetInstanceMSDeployLogPreparer prepares the GetInstanceMSDeployLog request.
10497func (client AppsClient) GetInstanceMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) {
10498	pathParameters := map[string]interface{}{
10499		"instanceId":        autorest.Encode("path", instanceID),
10500		"name":              autorest.Encode("path", name),
10501		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10502		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10503	}
10504
10505	const APIVersion = "2018-02-01"
10506	queryParameters := map[string]interface{}{
10507		"api-version": APIVersion,
10508	}
10509
10510	preparer := autorest.CreatePreparer(
10511		autorest.AsGet(),
10512		autorest.WithBaseURL(client.BaseURI),
10513		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters),
10514		autorest.WithQueryParameters(queryParameters))
10515	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10516}
10517
10518// GetInstanceMSDeployLogSender sends the GetInstanceMSDeployLog request. The method will close the
10519// http.Response Body if it receives an error.
10520func (client AppsClient) GetInstanceMSDeployLogSender(req *http.Request) (*http.Response, error) {
10521	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10522}
10523
10524// GetInstanceMSDeployLogResponder handles the response to the GetInstanceMSDeployLog request. The method always
10525// closes the http.Response Body.
10526func (client AppsClient) GetInstanceMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) {
10527	err = autorest.Respond(
10528		resp,
10529		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
10530		autorest.ByUnmarshallingJSON(&result),
10531		autorest.ByClosing())
10532	result.Response = autorest.Response{Response: resp}
10533	return
10534}
10535
10536// GetInstanceMSDeployLogSlot get the MSDeploy Log for the last MSDeploy operation.
10537// Parameters:
10538// resourceGroupName - name of the resource group to which the resource belongs.
10539// name - name of web app.
10540// slot - name of web app slot. If not specified then will default to production slot.
10541// instanceID - ID of web app instance.
10542func (client AppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployLog, err error) {
10543	if tracing.IsEnabled() {
10544		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLogSlot")
10545		defer func() {
10546			sc := -1
10547			if result.Response.Response != nil {
10548				sc = result.Response.Response.StatusCode
10549			}
10550			tracing.EndSpan(ctx, sc, err)
10551		}()
10552	}
10553	if err := validation.Validate([]validation.Validation{
10554		{TargetValue: resourceGroupName,
10555			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10556				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10557				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10558		return result, validation.NewError("web.AppsClient", "GetInstanceMSDeployLogSlot", err.Error())
10559	}
10560
10561	req, err := client.GetInstanceMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot, instanceID)
10562	if err != nil {
10563		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", nil, "Failure preparing request")
10564		return
10565	}
10566
10567	resp, err := client.GetInstanceMSDeployLogSlotSender(req)
10568	if err != nil {
10569		result.Response = autorest.Response{Response: resp}
10570		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure sending request")
10571		return
10572	}
10573
10574	result, err = client.GetInstanceMSDeployLogSlotResponder(resp)
10575	if err != nil {
10576		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure responding to request")
10577		return
10578	}
10579
10580	return
10581}
10582
10583// GetInstanceMSDeployLogSlotPreparer prepares the GetInstanceMSDeployLogSlot request.
10584func (client AppsClient) GetInstanceMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) {
10585	pathParameters := map[string]interface{}{
10586		"instanceId":        autorest.Encode("path", instanceID),
10587		"name":              autorest.Encode("path", name),
10588		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10589		"slot":              autorest.Encode("path", slot),
10590		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10591	}
10592
10593	const APIVersion = "2018-02-01"
10594	queryParameters := map[string]interface{}{
10595		"api-version": APIVersion,
10596	}
10597
10598	preparer := autorest.CreatePreparer(
10599		autorest.AsGet(),
10600		autorest.WithBaseURL(client.BaseURI),
10601		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters),
10602		autorest.WithQueryParameters(queryParameters))
10603	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10604}
10605
10606// GetInstanceMSDeployLogSlotSender sends the GetInstanceMSDeployLogSlot request. The method will close the
10607// http.Response Body if it receives an error.
10608func (client AppsClient) GetInstanceMSDeployLogSlotSender(req *http.Request) (*http.Response, error) {
10609	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10610}
10611
10612// GetInstanceMSDeployLogSlotResponder handles the response to the GetInstanceMSDeployLogSlot request. The method always
10613// closes the http.Response Body.
10614func (client AppsClient) GetInstanceMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) {
10615	err = autorest.Respond(
10616		resp,
10617		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
10618		autorest.ByUnmarshallingJSON(&result),
10619		autorest.ByClosing())
10620	result.Response = autorest.Response{Response: resp}
10621	return
10622}
10623
10624// GetInstanceMsDeployStatus get the status of the last MSDeploy operation.
10625// Parameters:
10626// resourceGroupName - name of the resource group to which the resource belongs.
10627// name - name of web app.
10628// instanceID - ID of web app instance.
10629func (client AppsClient) GetInstanceMsDeployStatus(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployStatus, err error) {
10630	if tracing.IsEnabled() {
10631		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatus")
10632		defer func() {
10633			sc := -1
10634			if result.Response.Response != nil {
10635				sc = result.Response.Response.StatusCode
10636			}
10637			tracing.EndSpan(ctx, sc, err)
10638		}()
10639	}
10640	if err := validation.Validate([]validation.Validation{
10641		{TargetValue: resourceGroupName,
10642			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10643				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10644				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10645		return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatus", err.Error())
10646	}
10647
10648	req, err := client.GetInstanceMsDeployStatusPreparer(ctx, resourceGroupName, name, instanceID)
10649	if err != nil {
10650		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", nil, "Failure preparing request")
10651		return
10652	}
10653
10654	resp, err := client.GetInstanceMsDeployStatusSender(req)
10655	if err != nil {
10656		result.Response = autorest.Response{Response: resp}
10657		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure sending request")
10658		return
10659	}
10660
10661	result, err = client.GetInstanceMsDeployStatusResponder(resp)
10662	if err != nil {
10663		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure responding to request")
10664		return
10665	}
10666
10667	return
10668}
10669
10670// GetInstanceMsDeployStatusPreparer prepares the GetInstanceMsDeployStatus request.
10671func (client AppsClient) GetInstanceMsDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) {
10672	pathParameters := map[string]interface{}{
10673		"instanceId":        autorest.Encode("path", instanceID),
10674		"name":              autorest.Encode("path", name),
10675		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10676		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10677	}
10678
10679	const APIVersion = "2018-02-01"
10680	queryParameters := map[string]interface{}{
10681		"api-version": APIVersion,
10682	}
10683
10684	preparer := autorest.CreatePreparer(
10685		autorest.AsGet(),
10686		autorest.WithBaseURL(client.BaseURI),
10687		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
10688		autorest.WithQueryParameters(queryParameters))
10689	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10690}
10691
10692// GetInstanceMsDeployStatusSender sends the GetInstanceMsDeployStatus request. The method will close the
10693// http.Response Body if it receives an error.
10694func (client AppsClient) GetInstanceMsDeployStatusSender(req *http.Request) (*http.Response, error) {
10695	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10696}
10697
10698// GetInstanceMsDeployStatusResponder handles the response to the GetInstanceMsDeployStatus request. The method always
10699// closes the http.Response Body.
10700func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) {
10701	err = autorest.Respond(
10702		resp,
10703		azure.WithErrorUnlessStatusCode(http.StatusOK),
10704		autorest.ByUnmarshallingJSON(&result),
10705		autorest.ByClosing())
10706	result.Response = autorest.Response{Response: resp}
10707	return
10708}
10709
10710// GetInstanceMsDeployStatusSlot get the status of the last MSDeploy operation.
10711// Parameters:
10712// resourceGroupName - name of the resource group to which the resource belongs.
10713// name - name of web app.
10714// slot - name of web app slot. If not specified then will default to production slot.
10715// instanceID - ID of web app instance.
10716func (client AppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployStatus, err error) {
10717	if tracing.IsEnabled() {
10718		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatusSlot")
10719		defer func() {
10720			sc := -1
10721			if result.Response.Response != nil {
10722				sc = result.Response.Response.StatusCode
10723			}
10724			tracing.EndSpan(ctx, sc, err)
10725		}()
10726	}
10727	if err := validation.Validate([]validation.Validation{
10728		{TargetValue: resourceGroupName,
10729			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10730				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10731				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10732		return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatusSlot", err.Error())
10733	}
10734
10735	req, err := client.GetInstanceMsDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot, instanceID)
10736	if err != nil {
10737		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", nil, "Failure preparing request")
10738		return
10739	}
10740
10741	resp, err := client.GetInstanceMsDeployStatusSlotSender(req)
10742	if err != nil {
10743		result.Response = autorest.Response{Response: resp}
10744		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure sending request")
10745		return
10746	}
10747
10748	result, err = client.GetInstanceMsDeployStatusSlotResponder(resp)
10749	if err != nil {
10750		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure responding to request")
10751		return
10752	}
10753
10754	return
10755}
10756
10757// GetInstanceMsDeployStatusSlotPreparer prepares the GetInstanceMsDeployStatusSlot request.
10758func (client AppsClient) GetInstanceMsDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) {
10759	pathParameters := map[string]interface{}{
10760		"instanceId":        autorest.Encode("path", instanceID),
10761		"name":              autorest.Encode("path", name),
10762		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10763		"slot":              autorest.Encode("path", slot),
10764		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10765	}
10766
10767	const APIVersion = "2018-02-01"
10768	queryParameters := map[string]interface{}{
10769		"api-version": APIVersion,
10770	}
10771
10772	preparer := autorest.CreatePreparer(
10773		autorest.AsGet(),
10774		autorest.WithBaseURL(client.BaseURI),
10775		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
10776		autorest.WithQueryParameters(queryParameters))
10777	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10778}
10779
10780// GetInstanceMsDeployStatusSlotSender sends the GetInstanceMsDeployStatusSlot request. The method will close the
10781// http.Response Body if it receives an error.
10782func (client AppsClient) GetInstanceMsDeployStatusSlotSender(req *http.Request) (*http.Response, error) {
10783	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10784}
10785
10786// GetInstanceMsDeployStatusSlotResponder handles the response to the GetInstanceMsDeployStatusSlot request. The method always
10787// closes the http.Response Body.
10788func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
10789	err = autorest.Respond(
10790		resp,
10791		azure.WithErrorUnlessStatusCode(http.StatusOK),
10792		autorest.ByUnmarshallingJSON(&result),
10793		autorest.ByClosing())
10794	result.Response = autorest.Response{Response: resp}
10795	return
10796}
10797
10798// GetInstanceProcess get process information by its ID for a specific scaled-out instance in a web site.
10799// Parameters:
10800// resourceGroupName - name of the resource group to which the resource belongs.
10801// name - site name.
10802// processID - pID.
10803// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
10804// response from "GET api/sites/{siteName}/instances".
10805func (client AppsClient) GetInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessInfo, err error) {
10806	if tracing.IsEnabled() {
10807		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcess")
10808		defer func() {
10809			sc := -1
10810			if result.Response.Response != nil {
10811				sc = result.Response.Response.StatusCode
10812			}
10813			tracing.EndSpan(ctx, sc, err)
10814		}()
10815	}
10816	if err := validation.Validate([]validation.Validation{
10817		{TargetValue: resourceGroupName,
10818			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10819				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10820				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10821		return result, validation.NewError("web.AppsClient", "GetInstanceProcess", err.Error())
10822	}
10823
10824	req, err := client.GetInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID)
10825	if err != nil {
10826		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", nil, "Failure preparing request")
10827		return
10828	}
10829
10830	resp, err := client.GetInstanceProcessSender(req)
10831	if err != nil {
10832		result.Response = autorest.Response{Response: resp}
10833		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure sending request")
10834		return
10835	}
10836
10837	result, err = client.GetInstanceProcessResponder(resp)
10838	if err != nil {
10839		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure responding to request")
10840		return
10841	}
10842
10843	return
10844}
10845
10846// GetInstanceProcessPreparer prepares the GetInstanceProcess request.
10847func (client AppsClient) GetInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
10848	pathParameters := map[string]interface{}{
10849		"instanceId":        autorest.Encode("path", instanceID),
10850		"name":              autorest.Encode("path", name),
10851		"processId":         autorest.Encode("path", processID),
10852		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10853		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10854	}
10855
10856	const APIVersion = "2018-02-01"
10857	queryParameters := map[string]interface{}{
10858		"api-version": APIVersion,
10859	}
10860
10861	preparer := autorest.CreatePreparer(
10862		autorest.AsGet(),
10863		autorest.WithBaseURL(client.BaseURI),
10864		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters),
10865		autorest.WithQueryParameters(queryParameters))
10866	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10867}
10868
10869// GetInstanceProcessSender sends the GetInstanceProcess request. The method will close the
10870// http.Response Body if it receives an error.
10871func (client AppsClient) GetInstanceProcessSender(req *http.Request) (*http.Response, error) {
10872	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10873}
10874
10875// GetInstanceProcessResponder handles the response to the GetInstanceProcess request. The method always
10876// closes the http.Response Body.
10877func (client AppsClient) GetInstanceProcessResponder(resp *http.Response) (result ProcessInfo, err error) {
10878	err = autorest.Respond(
10879		resp,
10880		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
10881		autorest.ByUnmarshallingJSON(&result),
10882		autorest.ByClosing())
10883	result.Response = autorest.Response{Response: resp}
10884	return
10885}
10886
10887// GetInstanceProcessDump get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
10888// Parameters:
10889// resourceGroupName - name of the resource group to which the resource belongs.
10890// name - site name.
10891// processID - pID.
10892// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
10893// response from "GET api/sites/{siteName}/instances".
10894func (client AppsClient) GetInstanceProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ReadCloser, err error) {
10895	if tracing.IsEnabled() {
10896		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDump")
10897		defer func() {
10898			sc := -1
10899			if result.Response.Response != nil {
10900				sc = result.Response.Response.StatusCode
10901			}
10902			tracing.EndSpan(ctx, sc, err)
10903		}()
10904	}
10905	if err := validation.Validate([]validation.Validation{
10906		{TargetValue: resourceGroupName,
10907			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10908				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10909				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10910		return result, validation.NewError("web.AppsClient", "GetInstanceProcessDump", err.Error())
10911	}
10912
10913	req, err := client.GetInstanceProcessDumpPreparer(ctx, resourceGroupName, name, processID, instanceID)
10914	if err != nil {
10915		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", nil, "Failure preparing request")
10916		return
10917	}
10918
10919	resp, err := client.GetInstanceProcessDumpSender(req)
10920	if err != nil {
10921		result.Response = autorest.Response{Response: resp}
10922		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure sending request")
10923		return
10924	}
10925
10926	result, err = client.GetInstanceProcessDumpResponder(resp)
10927	if err != nil {
10928		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure responding to request")
10929		return
10930	}
10931
10932	return
10933}
10934
10935// GetInstanceProcessDumpPreparer prepares the GetInstanceProcessDump request.
10936func (client AppsClient) GetInstanceProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
10937	pathParameters := map[string]interface{}{
10938		"instanceId":        autorest.Encode("path", instanceID),
10939		"name":              autorest.Encode("path", name),
10940		"processId":         autorest.Encode("path", processID),
10941		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10942		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10943	}
10944
10945	const APIVersion = "2018-02-01"
10946	queryParameters := map[string]interface{}{
10947		"api-version": APIVersion,
10948	}
10949
10950	preparer := autorest.CreatePreparer(
10951		autorest.AsGet(),
10952		autorest.WithBaseURL(client.BaseURI),
10953		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump", pathParameters),
10954		autorest.WithQueryParameters(queryParameters))
10955	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10956}
10957
10958// GetInstanceProcessDumpSender sends the GetInstanceProcessDump request. The method will close the
10959// http.Response Body if it receives an error.
10960func (client AppsClient) GetInstanceProcessDumpSender(req *http.Request) (*http.Response, error) {
10961	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10962}
10963
10964// GetInstanceProcessDumpResponder handles the response to the GetInstanceProcessDump request. The method always
10965// closes the http.Response Body.
10966func (client AppsClient) GetInstanceProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) {
10967	result.Value = &resp.Body
10968	err = autorest.Respond(
10969		resp,
10970		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound))
10971	result.Response = autorest.Response{Response: resp}
10972	return
10973}
10974
10975// GetInstanceProcessDumpSlot get a memory dump of a process by its ID for a specific scaled-out instance in a web
10976// site.
10977// Parameters:
10978// resourceGroupName - name of the resource group to which the resource belongs.
10979// name - site name.
10980// processID - pID.
10981// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
10982// production slot.
10983// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
10984// response from "GET api/sites/{siteName}/instances".
10985func (client AppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ReadCloser, err error) {
10986	if tracing.IsEnabled() {
10987		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDumpSlot")
10988		defer func() {
10989			sc := -1
10990			if result.Response.Response != nil {
10991				sc = result.Response.Response.StatusCode
10992			}
10993			tracing.EndSpan(ctx, sc, err)
10994		}()
10995	}
10996	if err := validation.Validate([]validation.Validation{
10997		{TargetValue: resourceGroupName,
10998			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10999				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11000				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11001		return result, validation.NewError("web.AppsClient", "GetInstanceProcessDumpSlot", err.Error())
11002	}
11003
11004	req, err := client.GetInstanceProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
11005	if err != nil {
11006		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", nil, "Failure preparing request")
11007		return
11008	}
11009
11010	resp, err := client.GetInstanceProcessDumpSlotSender(req)
11011	if err != nil {
11012		result.Response = autorest.Response{Response: resp}
11013		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure sending request")
11014		return
11015	}
11016
11017	result, err = client.GetInstanceProcessDumpSlotResponder(resp)
11018	if err != nil {
11019		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure responding to request")
11020		return
11021	}
11022
11023	return
11024}
11025
11026// GetInstanceProcessDumpSlotPreparer prepares the GetInstanceProcessDumpSlot request.
11027func (client AppsClient) GetInstanceProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
11028	pathParameters := map[string]interface{}{
11029		"instanceId":        autorest.Encode("path", instanceID),
11030		"name":              autorest.Encode("path", name),
11031		"processId":         autorest.Encode("path", processID),
11032		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11033		"slot":              autorest.Encode("path", slot),
11034		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11035	}
11036
11037	const APIVersion = "2018-02-01"
11038	queryParameters := map[string]interface{}{
11039		"api-version": APIVersion,
11040	}
11041
11042	preparer := autorest.CreatePreparer(
11043		autorest.AsGet(),
11044		autorest.WithBaseURL(client.BaseURI),
11045		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump", pathParameters),
11046		autorest.WithQueryParameters(queryParameters))
11047	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11048}
11049
11050// GetInstanceProcessDumpSlotSender sends the GetInstanceProcessDumpSlot request. The method will close the
11051// http.Response Body if it receives an error.
11052func (client AppsClient) GetInstanceProcessDumpSlotSender(req *http.Request) (*http.Response, error) {
11053	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11054}
11055
11056// GetInstanceProcessDumpSlotResponder handles the response to the GetInstanceProcessDumpSlot request. The method always
11057// closes the http.Response Body.
11058func (client AppsClient) GetInstanceProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) {
11059	result.Value = &resp.Body
11060	err = autorest.Respond(
11061		resp,
11062		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound))
11063	result.Response = autorest.Response{Response: resp}
11064	return
11065}
11066
11067// GetInstanceProcessModule get process information by its ID for a specific scaled-out instance in a web site.
11068// Parameters:
11069// resourceGroupName - name of the resource group to which the resource belongs.
11070// name - site name.
11071// processID - pID.
11072// baseAddress - module base address.
11073// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
11074// response from "GET api/sites/{siteName}/instances".
11075func (client AppsClient) GetInstanceProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (result ProcessModuleInfo, err error) {
11076	if tracing.IsEnabled() {
11077		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModule")
11078		defer func() {
11079			sc := -1
11080			if result.Response.Response != nil {
11081				sc = result.Response.Response.StatusCode
11082			}
11083			tracing.EndSpan(ctx, sc, err)
11084		}()
11085	}
11086	if err := validation.Validate([]validation.Validation{
11087		{TargetValue: resourceGroupName,
11088			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11089				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11090				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11091		return result, validation.NewError("web.AppsClient", "GetInstanceProcessModule", err.Error())
11092	}
11093
11094	req, err := client.GetInstanceProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress, instanceID)
11095	if err != nil {
11096		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", nil, "Failure preparing request")
11097		return
11098	}
11099
11100	resp, err := client.GetInstanceProcessModuleSender(req)
11101	if err != nil {
11102		result.Response = autorest.Response{Response: resp}
11103		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure sending request")
11104		return
11105	}
11106
11107	result, err = client.GetInstanceProcessModuleResponder(resp)
11108	if err != nil {
11109		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure responding to request")
11110		return
11111	}
11112
11113	return
11114}
11115
11116// GetInstanceProcessModulePreparer prepares the GetInstanceProcessModule request.
11117func (client AppsClient) GetInstanceProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (*http.Request, error) {
11118	pathParameters := map[string]interface{}{
11119		"baseAddress":       autorest.Encode("path", baseAddress),
11120		"instanceId":        autorest.Encode("path", instanceID),
11121		"name":              autorest.Encode("path", name),
11122		"processId":         autorest.Encode("path", processID),
11123		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11124		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11125	}
11126
11127	const APIVersion = "2018-02-01"
11128	queryParameters := map[string]interface{}{
11129		"api-version": APIVersion,
11130	}
11131
11132	preparer := autorest.CreatePreparer(
11133		autorest.AsGet(),
11134		autorest.WithBaseURL(client.BaseURI),
11135		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters),
11136		autorest.WithQueryParameters(queryParameters))
11137	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11138}
11139
11140// GetInstanceProcessModuleSender sends the GetInstanceProcessModule request. The method will close the
11141// http.Response Body if it receives an error.
11142func (client AppsClient) GetInstanceProcessModuleSender(req *http.Request) (*http.Response, error) {
11143	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11144}
11145
11146// GetInstanceProcessModuleResponder handles the response to the GetInstanceProcessModule request. The method always
11147// closes the http.Response Body.
11148func (client AppsClient) GetInstanceProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
11149	err = autorest.Respond(
11150		resp,
11151		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
11152		autorest.ByUnmarshallingJSON(&result),
11153		autorest.ByClosing())
11154	result.Response = autorest.Response{Response: resp}
11155	return
11156}
11157
11158// GetInstanceProcessModuleSlot get process information by its ID for a specific scaled-out instance in a web site.
11159// Parameters:
11160// resourceGroupName - name of the resource group to which the resource belongs.
11161// name - site name.
11162// processID - pID.
11163// baseAddress - module base address.
11164// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
11165// production slot.
11166// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
11167// response from "GET api/sites/{siteName}/instances".
11168func (client AppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (result ProcessModuleInfo, err error) {
11169	if tracing.IsEnabled() {
11170		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModuleSlot")
11171		defer func() {
11172			sc := -1
11173			if result.Response.Response != nil {
11174				sc = result.Response.Response.StatusCode
11175			}
11176			tracing.EndSpan(ctx, sc, err)
11177		}()
11178	}
11179	if err := validation.Validate([]validation.Validation{
11180		{TargetValue: resourceGroupName,
11181			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11182				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11183				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11184		return result, validation.NewError("web.AppsClient", "GetInstanceProcessModuleSlot", err.Error())
11185	}
11186
11187	req, err := client.GetInstanceProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot, instanceID)
11188	if err != nil {
11189		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", nil, "Failure preparing request")
11190		return
11191	}
11192
11193	resp, err := client.GetInstanceProcessModuleSlotSender(req)
11194	if err != nil {
11195		result.Response = autorest.Response{Response: resp}
11196		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure sending request")
11197		return
11198	}
11199
11200	result, err = client.GetInstanceProcessModuleSlotResponder(resp)
11201	if err != nil {
11202		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure responding to request")
11203		return
11204	}
11205
11206	return
11207}
11208
11209// GetInstanceProcessModuleSlotPreparer prepares the GetInstanceProcessModuleSlot request.
11210func (client AppsClient) GetInstanceProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (*http.Request, error) {
11211	pathParameters := map[string]interface{}{
11212		"baseAddress":       autorest.Encode("path", baseAddress),
11213		"instanceId":        autorest.Encode("path", instanceID),
11214		"name":              autorest.Encode("path", name),
11215		"processId":         autorest.Encode("path", processID),
11216		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11217		"slot":              autorest.Encode("path", slot),
11218		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11219	}
11220
11221	const APIVersion = "2018-02-01"
11222	queryParameters := map[string]interface{}{
11223		"api-version": APIVersion,
11224	}
11225
11226	preparer := autorest.CreatePreparer(
11227		autorest.AsGet(),
11228		autorest.WithBaseURL(client.BaseURI),
11229		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters),
11230		autorest.WithQueryParameters(queryParameters))
11231	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11232}
11233
11234// GetInstanceProcessModuleSlotSender sends the GetInstanceProcessModuleSlot request. The method will close the
11235// http.Response Body if it receives an error.
11236func (client AppsClient) GetInstanceProcessModuleSlotSender(req *http.Request) (*http.Response, error) {
11237	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11238}
11239
11240// GetInstanceProcessModuleSlotResponder handles the response to the GetInstanceProcessModuleSlot request. The method always
11241// closes the http.Response Body.
11242func (client AppsClient) GetInstanceProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
11243	err = autorest.Respond(
11244		resp,
11245		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
11246		autorest.ByUnmarshallingJSON(&result),
11247		autorest.ByClosing())
11248	result.Response = autorest.Response{Response: resp}
11249	return
11250}
11251
11252// GetInstanceProcessSlot get process information by its ID for a specific scaled-out instance in a web site.
11253// Parameters:
11254// resourceGroupName - name of the resource group to which the resource belongs.
11255// name - site name.
11256// processID - pID.
11257// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
11258// production slot.
11259// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
11260// response from "GET api/sites/{siteName}/instances".
11261func (client AppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessInfo, err error) {
11262	if tracing.IsEnabled() {
11263		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessSlot")
11264		defer func() {
11265			sc := -1
11266			if result.Response.Response != nil {
11267				sc = result.Response.Response.StatusCode
11268			}
11269			tracing.EndSpan(ctx, sc, err)
11270		}()
11271	}
11272	if err := validation.Validate([]validation.Validation{
11273		{TargetValue: resourceGroupName,
11274			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11275				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11276				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11277		return result, validation.NewError("web.AppsClient", "GetInstanceProcessSlot", err.Error())
11278	}
11279
11280	req, err := client.GetInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
11281	if err != nil {
11282		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", nil, "Failure preparing request")
11283		return
11284	}
11285
11286	resp, err := client.GetInstanceProcessSlotSender(req)
11287	if err != nil {
11288		result.Response = autorest.Response{Response: resp}
11289		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure sending request")
11290		return
11291	}
11292
11293	result, err = client.GetInstanceProcessSlotResponder(resp)
11294	if err != nil {
11295		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure responding to request")
11296		return
11297	}
11298
11299	return
11300}
11301
11302// GetInstanceProcessSlotPreparer prepares the GetInstanceProcessSlot request.
11303func (client AppsClient) GetInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
11304	pathParameters := map[string]interface{}{
11305		"instanceId":        autorest.Encode("path", instanceID),
11306		"name":              autorest.Encode("path", name),
11307		"processId":         autorest.Encode("path", processID),
11308		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11309		"slot":              autorest.Encode("path", slot),
11310		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11311	}
11312
11313	const APIVersion = "2018-02-01"
11314	queryParameters := map[string]interface{}{
11315		"api-version": APIVersion,
11316	}
11317
11318	preparer := autorest.CreatePreparer(
11319		autorest.AsGet(),
11320		autorest.WithBaseURL(client.BaseURI),
11321		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters),
11322		autorest.WithQueryParameters(queryParameters))
11323	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11324}
11325
11326// GetInstanceProcessSlotSender sends the GetInstanceProcessSlot request. The method will close the
11327// http.Response Body if it receives an error.
11328func (client AppsClient) GetInstanceProcessSlotSender(req *http.Request) (*http.Response, error) {
11329	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11330}
11331
11332// GetInstanceProcessSlotResponder handles the response to the GetInstanceProcessSlot request. The method always
11333// closes the http.Response Body.
11334func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) {
11335	err = autorest.Respond(
11336		resp,
11337		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
11338		autorest.ByUnmarshallingJSON(&result),
11339		autorest.ByClosing())
11340	result.Response = autorest.Response{Response: resp}
11341	return
11342}
11343
11344// GetInstanceProcessThread get thread information by Thread ID for a specific process, in a specific scaled-out
11345// instance in a web site.
11346// Parameters:
11347// resourceGroupName - name of the resource group to which the resource belongs.
11348// name - site name.
11349// processID - pID.
11350// threadID - tID.
11351// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
11352// response from "GET api/sites/{siteName}/instances".
11353func (client AppsClient) GetInstanceProcessThread(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, instanceID string) (result ProcessThreadInfo, err error) {
11354	if tracing.IsEnabled() {
11355		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessThread")
11356		defer func() {
11357			sc := -1
11358			if result.Response.Response != nil {
11359				sc = result.Response.Response.StatusCode
11360			}
11361			tracing.EndSpan(ctx, sc, err)
11362		}()
11363	}
11364	if err := validation.Validate([]validation.Validation{
11365		{TargetValue: resourceGroupName,
11366			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11367				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11368				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11369		return result, validation.NewError("web.AppsClient", "GetInstanceProcessThread", err.Error())
11370	}
11371
11372	req, err := client.GetInstanceProcessThreadPreparer(ctx, resourceGroupName, name, processID, threadID, instanceID)
11373	if err != nil {
11374		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThread", nil, "Failure preparing request")
11375		return
11376	}
11377
11378	resp, err := client.GetInstanceProcessThreadSender(req)
11379	if err != nil {
11380		result.Response = autorest.Response{Response: resp}
11381		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThread", resp, "Failure sending request")
11382		return
11383	}
11384
11385	result, err = client.GetInstanceProcessThreadResponder(resp)
11386	if err != nil {
11387		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThread", resp, "Failure responding to request")
11388		return
11389	}
11390
11391	return
11392}
11393
11394// GetInstanceProcessThreadPreparer prepares the GetInstanceProcessThread request.
11395func (client AppsClient) GetInstanceProcessThreadPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, instanceID string) (*http.Request, error) {
11396	pathParameters := map[string]interface{}{
11397		"instanceId":        autorest.Encode("path", instanceID),
11398		"name":              autorest.Encode("path", name),
11399		"processId":         autorest.Encode("path", processID),
11400		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11401		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11402		"threadId":          autorest.Encode("path", threadID),
11403	}
11404
11405	const APIVersion = "2018-02-01"
11406	queryParameters := map[string]interface{}{
11407		"api-version": APIVersion,
11408	}
11409
11410	preparer := autorest.CreatePreparer(
11411		autorest.AsGet(),
11412		autorest.WithBaseURL(client.BaseURI),
11413		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}", pathParameters),
11414		autorest.WithQueryParameters(queryParameters))
11415	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11416}
11417
11418// GetInstanceProcessThreadSender sends the GetInstanceProcessThread request. The method will close the
11419// http.Response Body if it receives an error.
11420func (client AppsClient) GetInstanceProcessThreadSender(req *http.Request) (*http.Response, error) {
11421	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11422}
11423
11424// GetInstanceProcessThreadResponder handles the response to the GetInstanceProcessThread request. The method always
11425// closes the http.Response Body.
11426func (client AppsClient) GetInstanceProcessThreadResponder(resp *http.Response) (result ProcessThreadInfo, err error) {
11427	err = autorest.Respond(
11428		resp,
11429		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
11430		autorest.ByUnmarshallingJSON(&result),
11431		autorest.ByClosing())
11432	result.Response = autorest.Response{Response: resp}
11433	return
11434}
11435
11436// GetInstanceProcessThreadSlot get thread information by Thread ID for a specific process, in a specific scaled-out
11437// instance in a web site.
11438// Parameters:
11439// resourceGroupName - name of the resource group to which the resource belongs.
11440// name - site name.
11441// processID - pID.
11442// threadID - tID.
11443// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
11444// production slot.
11445// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
11446// response from "GET api/sites/{siteName}/instances".
11447func (client AppsClient) GetInstanceProcessThreadSlot(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, slot string, instanceID string) (result ProcessThreadInfo, err error) {
11448	if tracing.IsEnabled() {
11449		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessThreadSlot")
11450		defer func() {
11451			sc := -1
11452			if result.Response.Response != nil {
11453				sc = result.Response.Response.StatusCode
11454			}
11455			tracing.EndSpan(ctx, sc, err)
11456		}()
11457	}
11458	if err := validation.Validate([]validation.Validation{
11459		{TargetValue: resourceGroupName,
11460			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11461				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11462				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11463		return result, validation.NewError("web.AppsClient", "GetInstanceProcessThreadSlot", err.Error())
11464	}
11465
11466	req, err := client.GetInstanceProcessThreadSlotPreparer(ctx, resourceGroupName, name, processID, threadID, slot, instanceID)
11467	if err != nil {
11468		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThreadSlot", nil, "Failure preparing request")
11469		return
11470	}
11471
11472	resp, err := client.GetInstanceProcessThreadSlotSender(req)
11473	if err != nil {
11474		result.Response = autorest.Response{Response: resp}
11475		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThreadSlot", resp, "Failure sending request")
11476		return
11477	}
11478
11479	result, err = client.GetInstanceProcessThreadSlotResponder(resp)
11480	if err != nil {
11481		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThreadSlot", resp, "Failure responding to request")
11482		return
11483	}
11484
11485	return
11486}
11487
11488// GetInstanceProcessThreadSlotPreparer prepares the GetInstanceProcessThreadSlot request.
11489func (client AppsClient) GetInstanceProcessThreadSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, slot string, instanceID string) (*http.Request, error) {
11490	pathParameters := map[string]interface{}{
11491		"instanceId":        autorest.Encode("path", instanceID),
11492		"name":              autorest.Encode("path", name),
11493		"processId":         autorest.Encode("path", processID),
11494		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11495		"slot":              autorest.Encode("path", slot),
11496		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11497		"threadId":          autorest.Encode("path", threadID),
11498	}
11499
11500	const APIVersion = "2018-02-01"
11501	queryParameters := map[string]interface{}{
11502		"api-version": APIVersion,
11503	}
11504
11505	preparer := autorest.CreatePreparer(
11506		autorest.AsGet(),
11507		autorest.WithBaseURL(client.BaseURI),
11508		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}", pathParameters),
11509		autorest.WithQueryParameters(queryParameters))
11510	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11511}
11512
11513// GetInstanceProcessThreadSlotSender sends the GetInstanceProcessThreadSlot request. The method will close the
11514// http.Response Body if it receives an error.
11515func (client AppsClient) GetInstanceProcessThreadSlotSender(req *http.Request) (*http.Response, error) {
11516	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11517}
11518
11519// GetInstanceProcessThreadSlotResponder handles the response to the GetInstanceProcessThreadSlot request. The method always
11520// closes the http.Response Body.
11521func (client AppsClient) GetInstanceProcessThreadSlotResponder(resp *http.Response) (result ProcessThreadInfo, err error) {
11522	err = autorest.Respond(
11523		resp,
11524		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
11525		autorest.ByUnmarshallingJSON(&result),
11526		autorest.ByClosing())
11527	result.Response = autorest.Response{Response: resp}
11528	return
11529}
11530
11531// GetMigrateMySQLStatus returns the status of MySql in app migration, if one is active, and whether or not MySql in
11532// app is enabled
11533// Parameters:
11534// resourceGroupName - name of the resource group to which the resource belongs.
11535// name - name of web app.
11536func (client AppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string) (result MigrateMySQLStatus, err error) {
11537	if tracing.IsEnabled() {
11538		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatus")
11539		defer func() {
11540			sc := -1
11541			if result.Response.Response != nil {
11542				sc = result.Response.Response.StatusCode
11543			}
11544			tracing.EndSpan(ctx, sc, err)
11545		}()
11546	}
11547	if err := validation.Validate([]validation.Validation{
11548		{TargetValue: resourceGroupName,
11549			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11550				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11551				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11552		return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatus", err.Error())
11553	}
11554
11555	req, err := client.GetMigrateMySQLStatusPreparer(ctx, resourceGroupName, name)
11556	if err != nil {
11557		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", nil, "Failure preparing request")
11558		return
11559	}
11560
11561	resp, err := client.GetMigrateMySQLStatusSender(req)
11562	if err != nil {
11563		result.Response = autorest.Response{Response: resp}
11564		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure sending request")
11565		return
11566	}
11567
11568	result, err = client.GetMigrateMySQLStatusResponder(resp)
11569	if err != nil {
11570		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure responding to request")
11571		return
11572	}
11573
11574	return
11575}
11576
11577// GetMigrateMySQLStatusPreparer prepares the GetMigrateMySQLStatus request.
11578func (client AppsClient) GetMigrateMySQLStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
11579	pathParameters := map[string]interface{}{
11580		"name":              autorest.Encode("path", name),
11581		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11582		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11583	}
11584
11585	const APIVersion = "2018-02-01"
11586	queryParameters := map[string]interface{}{
11587		"api-version": APIVersion,
11588	}
11589
11590	preparer := autorest.CreatePreparer(
11591		autorest.AsGet(),
11592		autorest.WithBaseURL(client.BaseURI),
11593		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status", pathParameters),
11594		autorest.WithQueryParameters(queryParameters))
11595	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11596}
11597
11598// GetMigrateMySQLStatusSender sends the GetMigrateMySQLStatus request. The method will close the
11599// http.Response Body if it receives an error.
11600func (client AppsClient) GetMigrateMySQLStatusSender(req *http.Request) (*http.Response, error) {
11601	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11602}
11603
11604// GetMigrateMySQLStatusResponder handles the response to the GetMigrateMySQLStatus request. The method always
11605// closes the http.Response Body.
11606func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (result MigrateMySQLStatus, err error) {
11607	err = autorest.Respond(
11608		resp,
11609		azure.WithErrorUnlessStatusCode(http.StatusOK),
11610		autorest.ByUnmarshallingJSON(&result),
11611		autorest.ByClosing())
11612	result.Response = autorest.Response{Response: resp}
11613	return
11614}
11615
11616// GetMigrateMySQLStatusSlot returns the status of MySql in app migration, if one is active, and whether or not MySql
11617// in app is enabled
11618// Parameters:
11619// resourceGroupName - name of the resource group to which the resource belongs.
11620// name - name of web app.
11621// slot - name of the deployment slot.
11622func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MigrateMySQLStatus, err error) {
11623	if tracing.IsEnabled() {
11624		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatusSlot")
11625		defer func() {
11626			sc := -1
11627			if result.Response.Response != nil {
11628				sc = result.Response.Response.StatusCode
11629			}
11630			tracing.EndSpan(ctx, sc, err)
11631		}()
11632	}
11633	if err := validation.Validate([]validation.Validation{
11634		{TargetValue: resourceGroupName,
11635			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11636				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11637				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11638		return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatusSlot", err.Error())
11639	}
11640
11641	req, err := client.GetMigrateMySQLStatusSlotPreparer(ctx, resourceGroupName, name, slot)
11642	if err != nil {
11643		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", nil, "Failure preparing request")
11644		return
11645	}
11646
11647	resp, err := client.GetMigrateMySQLStatusSlotSender(req)
11648	if err != nil {
11649		result.Response = autorest.Response{Response: resp}
11650		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure sending request")
11651		return
11652	}
11653
11654	result, err = client.GetMigrateMySQLStatusSlotResponder(resp)
11655	if err != nil {
11656		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure responding to request")
11657		return
11658	}
11659
11660	return
11661}
11662
11663// GetMigrateMySQLStatusSlotPreparer prepares the GetMigrateMySQLStatusSlot request.
11664func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
11665	pathParameters := map[string]interface{}{
11666		"name":              autorest.Encode("path", name),
11667		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11668		"slot":              autorest.Encode("path", slot),
11669		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11670	}
11671
11672	const APIVersion = "2018-02-01"
11673	queryParameters := map[string]interface{}{
11674		"api-version": APIVersion,
11675	}
11676
11677	preparer := autorest.CreatePreparer(
11678		autorest.AsGet(),
11679		autorest.WithBaseURL(client.BaseURI),
11680		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status", pathParameters),
11681		autorest.WithQueryParameters(queryParameters))
11682	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11683}
11684
11685// GetMigrateMySQLStatusSlotSender sends the GetMigrateMySQLStatusSlot request. The method will close the
11686// http.Response Body if it receives an error.
11687func (client AppsClient) GetMigrateMySQLStatusSlotSender(req *http.Request) (*http.Response, error) {
11688	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11689}
11690
11691// GetMigrateMySQLStatusSlotResponder handles the response to the GetMigrateMySQLStatusSlot request. The method always
11692// closes the http.Response Body.
11693func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) (result MigrateMySQLStatus, err error) {
11694	err = autorest.Respond(
11695		resp,
11696		azure.WithErrorUnlessStatusCode(http.StatusOK),
11697		autorest.ByUnmarshallingJSON(&result),
11698		autorest.ByClosing())
11699	result.Response = autorest.Response{Response: resp}
11700	return
11701}
11702
11703// GetMSDeployLog get the MSDeploy Log for the last MSDeploy operation.
11704// Parameters:
11705// resourceGroupName - name of the resource group to which the resource belongs.
11706// name - name of web app.
11707func (client AppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string) (result MSDeployLog, err error) {
11708	if tracing.IsEnabled() {
11709		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLog")
11710		defer func() {
11711			sc := -1
11712			if result.Response.Response != nil {
11713				sc = result.Response.Response.StatusCode
11714			}
11715			tracing.EndSpan(ctx, sc, err)
11716		}()
11717	}
11718	if err := validation.Validate([]validation.Validation{
11719		{TargetValue: resourceGroupName,
11720			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11721				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11722				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11723		return result, validation.NewError("web.AppsClient", "GetMSDeployLog", err.Error())
11724	}
11725
11726	req, err := client.GetMSDeployLogPreparer(ctx, resourceGroupName, name)
11727	if err != nil {
11728		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", nil, "Failure preparing request")
11729		return
11730	}
11731
11732	resp, err := client.GetMSDeployLogSender(req)
11733	if err != nil {
11734		result.Response = autorest.Response{Response: resp}
11735		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure sending request")
11736		return
11737	}
11738
11739	result, err = client.GetMSDeployLogResponder(resp)
11740	if err != nil {
11741		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure responding to request")
11742		return
11743	}
11744
11745	return
11746}
11747
11748// GetMSDeployLogPreparer prepares the GetMSDeployLog request.
11749func (client AppsClient) GetMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
11750	pathParameters := map[string]interface{}{
11751		"name":              autorest.Encode("path", name),
11752		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11753		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11754	}
11755
11756	const APIVersion = "2018-02-01"
11757	queryParameters := map[string]interface{}{
11758		"api-version": APIVersion,
11759	}
11760
11761	preparer := autorest.CreatePreparer(
11762		autorest.AsGet(),
11763		autorest.WithBaseURL(client.BaseURI),
11764		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log", pathParameters),
11765		autorest.WithQueryParameters(queryParameters))
11766	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11767}
11768
11769// GetMSDeployLogSender sends the GetMSDeployLog request. The method will close the
11770// http.Response Body if it receives an error.
11771func (client AppsClient) GetMSDeployLogSender(req *http.Request) (*http.Response, error) {
11772	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11773}
11774
11775// GetMSDeployLogResponder handles the response to the GetMSDeployLog request. The method always
11776// closes the http.Response Body.
11777func (client AppsClient) GetMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) {
11778	err = autorest.Respond(
11779		resp,
11780		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
11781		autorest.ByUnmarshallingJSON(&result),
11782		autorest.ByClosing())
11783	result.Response = autorest.Response{Response: resp}
11784	return
11785}
11786
11787// GetMSDeployLogSlot get the MSDeploy Log for the last MSDeploy operation.
11788// Parameters:
11789// resourceGroupName - name of the resource group to which the resource belongs.
11790// name - name of web app.
11791// slot - name of web app slot. If not specified then will default to production slot.
11792func (client AppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployLog, err error) {
11793	if tracing.IsEnabled() {
11794		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLogSlot")
11795		defer func() {
11796			sc := -1
11797			if result.Response.Response != nil {
11798				sc = result.Response.Response.StatusCode
11799			}
11800			tracing.EndSpan(ctx, sc, err)
11801		}()
11802	}
11803	if err := validation.Validate([]validation.Validation{
11804		{TargetValue: resourceGroupName,
11805			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11806				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11807				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11808		return result, validation.NewError("web.AppsClient", "GetMSDeployLogSlot", err.Error())
11809	}
11810
11811	req, err := client.GetMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot)
11812	if err != nil {
11813		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", nil, "Failure preparing request")
11814		return
11815	}
11816
11817	resp, err := client.GetMSDeployLogSlotSender(req)
11818	if err != nil {
11819		result.Response = autorest.Response{Response: resp}
11820		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure sending request")
11821		return
11822	}
11823
11824	result, err = client.GetMSDeployLogSlotResponder(resp)
11825	if err != nil {
11826		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure responding to request")
11827		return
11828	}
11829
11830	return
11831}
11832
11833// GetMSDeployLogSlotPreparer prepares the GetMSDeployLogSlot request.
11834func (client AppsClient) GetMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
11835	pathParameters := map[string]interface{}{
11836		"name":              autorest.Encode("path", name),
11837		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11838		"slot":              autorest.Encode("path", slot),
11839		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11840	}
11841
11842	const APIVersion = "2018-02-01"
11843	queryParameters := map[string]interface{}{
11844		"api-version": APIVersion,
11845	}
11846
11847	preparer := autorest.CreatePreparer(
11848		autorest.AsGet(),
11849		autorest.WithBaseURL(client.BaseURI),
11850		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log", pathParameters),
11851		autorest.WithQueryParameters(queryParameters))
11852	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11853}
11854
11855// GetMSDeployLogSlotSender sends the GetMSDeployLogSlot request. The method will close the
11856// http.Response Body if it receives an error.
11857func (client AppsClient) GetMSDeployLogSlotSender(req *http.Request) (*http.Response, error) {
11858	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11859}
11860
11861// GetMSDeployLogSlotResponder handles the response to the GetMSDeployLogSlot request. The method always
11862// closes the http.Response Body.
11863func (client AppsClient) GetMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) {
11864	err = autorest.Respond(
11865		resp,
11866		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
11867		autorest.ByUnmarshallingJSON(&result),
11868		autorest.ByClosing())
11869	result.Response = autorest.Response{Response: resp}
11870	return
11871}
11872
11873// GetMSDeployStatus get the status of the last MSDeploy operation.
11874// Parameters:
11875// resourceGroupName - name of the resource group to which the resource belongs.
11876// name - name of web app.
11877func (client AppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupName string, name string) (result MSDeployStatus, err error) {
11878	if tracing.IsEnabled() {
11879		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatus")
11880		defer func() {
11881			sc := -1
11882			if result.Response.Response != nil {
11883				sc = result.Response.Response.StatusCode
11884			}
11885			tracing.EndSpan(ctx, sc, err)
11886		}()
11887	}
11888	if err := validation.Validate([]validation.Validation{
11889		{TargetValue: resourceGroupName,
11890			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11891				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11892				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11893		return result, validation.NewError("web.AppsClient", "GetMSDeployStatus", err.Error())
11894	}
11895
11896	req, err := client.GetMSDeployStatusPreparer(ctx, resourceGroupName, name)
11897	if err != nil {
11898		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", nil, "Failure preparing request")
11899		return
11900	}
11901
11902	resp, err := client.GetMSDeployStatusSender(req)
11903	if err != nil {
11904		result.Response = autorest.Response{Response: resp}
11905		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure sending request")
11906		return
11907	}
11908
11909	result, err = client.GetMSDeployStatusResponder(resp)
11910	if err != nil {
11911		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure responding to request")
11912		return
11913	}
11914
11915	return
11916}
11917
11918// GetMSDeployStatusPreparer prepares the GetMSDeployStatus request.
11919func (client AppsClient) GetMSDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
11920	pathParameters := map[string]interface{}{
11921		"name":              autorest.Encode("path", name),
11922		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11923		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11924	}
11925
11926	const APIVersion = "2018-02-01"
11927	queryParameters := map[string]interface{}{
11928		"api-version": APIVersion,
11929	}
11930
11931	preparer := autorest.CreatePreparer(
11932		autorest.AsGet(),
11933		autorest.WithBaseURL(client.BaseURI),
11934		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters),
11935		autorest.WithQueryParameters(queryParameters))
11936	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11937}
11938
11939// GetMSDeployStatusSender sends the GetMSDeployStatus request. The method will close the
11940// http.Response Body if it receives an error.
11941func (client AppsClient) GetMSDeployStatusSender(req *http.Request) (*http.Response, error) {
11942	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11943}
11944
11945// GetMSDeployStatusResponder handles the response to the GetMSDeployStatus request. The method always
11946// closes the http.Response Body.
11947func (client AppsClient) GetMSDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) {
11948	err = autorest.Respond(
11949		resp,
11950		azure.WithErrorUnlessStatusCode(http.StatusOK),
11951		autorest.ByUnmarshallingJSON(&result),
11952		autorest.ByClosing())
11953	result.Response = autorest.Response{Response: resp}
11954	return
11955}
11956
11957// GetMSDeployStatusSlot get the status of the last MSDeploy operation.
11958// Parameters:
11959// resourceGroupName - name of the resource group to which the resource belongs.
11960// name - name of web app.
11961// slot - name of web app slot. If not specified then will default to production slot.
11962func (client AppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployStatus, err error) {
11963	if tracing.IsEnabled() {
11964		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatusSlot")
11965		defer func() {
11966			sc := -1
11967			if result.Response.Response != nil {
11968				sc = result.Response.Response.StatusCode
11969			}
11970			tracing.EndSpan(ctx, sc, err)
11971		}()
11972	}
11973	if err := validation.Validate([]validation.Validation{
11974		{TargetValue: resourceGroupName,
11975			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11976				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11977				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11978		return result, validation.NewError("web.AppsClient", "GetMSDeployStatusSlot", err.Error())
11979	}
11980
11981	req, err := client.GetMSDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot)
11982	if err != nil {
11983		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", nil, "Failure preparing request")
11984		return
11985	}
11986
11987	resp, err := client.GetMSDeployStatusSlotSender(req)
11988	if err != nil {
11989		result.Response = autorest.Response{Response: resp}
11990		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure sending request")
11991		return
11992	}
11993
11994	result, err = client.GetMSDeployStatusSlotResponder(resp)
11995	if err != nil {
11996		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure responding to request")
11997		return
11998	}
11999
12000	return
12001}
12002
12003// GetMSDeployStatusSlotPreparer prepares the GetMSDeployStatusSlot request.
12004func (client AppsClient) GetMSDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
12005	pathParameters := map[string]interface{}{
12006		"name":              autorest.Encode("path", name),
12007		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12008		"slot":              autorest.Encode("path", slot),
12009		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12010	}
12011
12012	const APIVersion = "2018-02-01"
12013	queryParameters := map[string]interface{}{
12014		"api-version": APIVersion,
12015	}
12016
12017	preparer := autorest.CreatePreparer(
12018		autorest.AsGet(),
12019		autorest.WithBaseURL(client.BaseURI),
12020		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters),
12021		autorest.WithQueryParameters(queryParameters))
12022	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12023}
12024
12025// GetMSDeployStatusSlotSender sends the GetMSDeployStatusSlot request. The method will close the
12026// http.Response Body if it receives an error.
12027func (client AppsClient) GetMSDeployStatusSlotSender(req *http.Request) (*http.Response, error) {
12028	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12029}
12030
12031// GetMSDeployStatusSlotResponder handles the response to the GetMSDeployStatusSlot request. The method always
12032// closes the http.Response Body.
12033func (client AppsClient) GetMSDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
12034	err = autorest.Respond(
12035		resp,
12036		azure.WithErrorUnlessStatusCode(http.StatusOK),
12037		autorest.ByUnmarshallingJSON(&result),
12038		autorest.ByClosing())
12039	result.Response = autorest.Response{Response: resp}
12040	return
12041}
12042
12043// GetNetworkTraceOperation gets a named operation for a network trace capturing (or deployment slot, if specified).
12044// Parameters:
12045// resourceGroupName - name of the resource group to which the resource belongs.
12046// name - name of the app.
12047// operationID - GUID of the operation.
12048func (client AppsClient) GetNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
12049	if tracing.IsEnabled() {
12050		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperation")
12051		defer func() {
12052			sc := -1
12053			if result.Response.Response != nil {
12054				sc = result.Response.Response.StatusCode
12055			}
12056			tracing.EndSpan(ctx, sc, err)
12057		}()
12058	}
12059	if err := validation.Validate([]validation.Validation{
12060		{TargetValue: resourceGroupName,
12061			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12062				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12063				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12064		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperation", err.Error())
12065	}
12066
12067	req, err := client.GetNetworkTraceOperationPreparer(ctx, resourceGroupName, name, operationID)
12068	if err != nil {
12069		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", nil, "Failure preparing request")
12070		return
12071	}
12072
12073	resp, err := client.GetNetworkTraceOperationSender(req)
12074	if err != nil {
12075		result.Response = autorest.Response{Response: resp}
12076		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure sending request")
12077		return
12078	}
12079
12080	result, err = client.GetNetworkTraceOperationResponder(resp)
12081	if err != nil {
12082		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure responding to request")
12083		return
12084	}
12085
12086	return
12087}
12088
12089// GetNetworkTraceOperationPreparer prepares the GetNetworkTraceOperation request.
12090func (client AppsClient) GetNetworkTraceOperationPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
12091	pathParameters := map[string]interface{}{
12092		"name":              autorest.Encode("path", name),
12093		"operationId":       autorest.Encode("path", operationID),
12094		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12095		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12096	}
12097
12098	const APIVersion = "2018-02-01"
12099	queryParameters := map[string]interface{}{
12100		"api-version": APIVersion,
12101	}
12102
12103	preparer := autorest.CreatePreparer(
12104		autorest.AsGet(),
12105		autorest.WithBaseURL(client.BaseURI),
12106		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}", pathParameters),
12107		autorest.WithQueryParameters(queryParameters))
12108	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12109}
12110
12111// GetNetworkTraceOperationSender sends the GetNetworkTraceOperation request. The method will close the
12112// http.Response Body if it receives an error.
12113func (client AppsClient) GetNetworkTraceOperationSender(req *http.Request) (*http.Response, error) {
12114	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12115}
12116
12117// GetNetworkTraceOperationResponder handles the response to the GetNetworkTraceOperation request. The method always
12118// closes the http.Response Body.
12119func (client AppsClient) GetNetworkTraceOperationResponder(resp *http.Response) (result ListNetworkTrace, err error) {
12120	err = autorest.Respond(
12121		resp,
12122		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
12123		autorest.ByUnmarshallingJSON(&result.Value),
12124		autorest.ByClosing())
12125	result.Response = autorest.Response{Response: resp}
12126	return
12127}
12128
12129// GetNetworkTraceOperationSlot gets a named operation for a network trace capturing (or deployment slot, if
12130// specified).
12131// Parameters:
12132// resourceGroupName - name of the resource group to which the resource belongs.
12133// name - name of the app.
12134// operationID - GUID of the operation.
12135// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
12136// production slot.
12137func (client AppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
12138	if tracing.IsEnabled() {
12139		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlot")
12140		defer func() {
12141			sc := -1
12142			if result.Response.Response != nil {
12143				sc = result.Response.Response.StatusCode
12144			}
12145			tracing.EndSpan(ctx, sc, err)
12146		}()
12147	}
12148	if err := validation.Validate([]validation.Validation{
12149		{TargetValue: resourceGroupName,
12150			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12151				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12152				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12153		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationSlot", err.Error())
12154	}
12155
12156	req, err := client.GetNetworkTraceOperationSlotPreparer(ctx, resourceGroupName, name, operationID, slot)
12157	if err != nil {
12158		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", nil, "Failure preparing request")
12159		return
12160	}
12161
12162	resp, err := client.GetNetworkTraceOperationSlotSender(req)
12163	if err != nil {
12164		result.Response = autorest.Response{Response: resp}
12165		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure sending request")
12166		return
12167	}
12168
12169	result, err = client.GetNetworkTraceOperationSlotResponder(resp)
12170	if err != nil {
12171		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure responding to request")
12172		return
12173	}
12174
12175	return
12176}
12177
12178// GetNetworkTraceOperationSlotPreparer prepares the GetNetworkTraceOperationSlot request.
12179func (client AppsClient) GetNetworkTraceOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
12180	pathParameters := map[string]interface{}{
12181		"name":              autorest.Encode("path", name),
12182		"operationId":       autorest.Encode("path", operationID),
12183		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12184		"slot":              autorest.Encode("path", slot),
12185		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12186	}
12187
12188	const APIVersion = "2018-02-01"
12189	queryParameters := map[string]interface{}{
12190		"api-version": APIVersion,
12191	}
12192
12193	preparer := autorest.CreatePreparer(
12194		autorest.AsGet(),
12195		autorest.WithBaseURL(client.BaseURI),
12196		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}", pathParameters),
12197		autorest.WithQueryParameters(queryParameters))
12198	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12199}
12200
12201// GetNetworkTraceOperationSlotSender sends the GetNetworkTraceOperationSlot request. The method will close the
12202// http.Response Body if it receives an error.
12203func (client AppsClient) GetNetworkTraceOperationSlotSender(req *http.Request) (*http.Response, error) {
12204	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12205}
12206
12207// GetNetworkTraceOperationSlotResponder handles the response to the GetNetworkTraceOperationSlot request. The method always
12208// closes the http.Response Body.
12209func (client AppsClient) GetNetworkTraceOperationSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
12210	err = autorest.Respond(
12211		resp,
12212		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
12213		autorest.ByUnmarshallingJSON(&result.Value),
12214		autorest.ByClosing())
12215	result.Response = autorest.Response{Response: resp}
12216	return
12217}
12218
12219// GetNetworkTraceOperationSlotV2 gets a named operation for a network trace capturing (or deployment slot, if
12220// specified).
12221// Parameters:
12222// resourceGroupName - name of the resource group to which the resource belongs.
12223// name - name of the app.
12224// operationID - GUID of the operation.
12225// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
12226// production slot.
12227func (client AppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
12228	if tracing.IsEnabled() {
12229		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlotV2")
12230		defer func() {
12231			sc := -1
12232			if result.Response.Response != nil {
12233				sc = result.Response.Response.StatusCode
12234			}
12235			tracing.EndSpan(ctx, sc, err)
12236		}()
12237	}
12238	if err := validation.Validate([]validation.Validation{
12239		{TargetValue: resourceGroupName,
12240			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12241				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12242				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12243		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationSlotV2", err.Error())
12244	}
12245
12246	req, err := client.GetNetworkTraceOperationSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot)
12247	if err != nil {
12248		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", nil, "Failure preparing request")
12249		return
12250	}
12251
12252	resp, err := client.GetNetworkTraceOperationSlotV2Sender(req)
12253	if err != nil {
12254		result.Response = autorest.Response{Response: resp}
12255		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure sending request")
12256		return
12257	}
12258
12259	result, err = client.GetNetworkTraceOperationSlotV2Responder(resp)
12260	if err != nil {
12261		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure responding to request")
12262		return
12263	}
12264
12265	return
12266}
12267
12268// GetNetworkTraceOperationSlotV2Preparer prepares the GetNetworkTraceOperationSlotV2 request.
12269func (client AppsClient) GetNetworkTraceOperationSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
12270	pathParameters := map[string]interface{}{
12271		"name":              autorest.Encode("path", name),
12272		"operationId":       autorest.Encode("path", operationID),
12273		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12274		"slot":              autorest.Encode("path", slot),
12275		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12276	}
12277
12278	const APIVersion = "2018-02-01"
12279	queryParameters := map[string]interface{}{
12280		"api-version": APIVersion,
12281	}
12282
12283	preparer := autorest.CreatePreparer(
12284		autorest.AsGet(),
12285		autorest.WithBaseURL(client.BaseURI),
12286		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}", pathParameters),
12287		autorest.WithQueryParameters(queryParameters))
12288	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12289}
12290
12291// GetNetworkTraceOperationSlotV2Sender sends the GetNetworkTraceOperationSlotV2 request. The method will close the
12292// http.Response Body if it receives an error.
12293func (client AppsClient) GetNetworkTraceOperationSlotV2Sender(req *http.Request) (*http.Response, error) {
12294	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12295}
12296
12297// GetNetworkTraceOperationSlotV2Responder handles the response to the GetNetworkTraceOperationSlotV2 request. The method always
12298// closes the http.Response Body.
12299func (client AppsClient) GetNetworkTraceOperationSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
12300	err = autorest.Respond(
12301		resp,
12302		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
12303		autorest.ByUnmarshallingJSON(&result.Value),
12304		autorest.ByClosing())
12305	result.Response = autorest.Response{Response: resp}
12306	return
12307}
12308
12309// GetNetworkTraceOperationV2 gets a named operation for a network trace capturing (or deployment slot, if specified).
12310// Parameters:
12311// resourceGroupName - name of the resource group to which the resource belongs.
12312// name - name of the app.
12313// operationID - GUID of the operation.
12314func (client AppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
12315	if tracing.IsEnabled() {
12316		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationV2")
12317		defer func() {
12318			sc := -1
12319			if result.Response.Response != nil {
12320				sc = result.Response.Response.StatusCode
12321			}
12322			tracing.EndSpan(ctx, sc, err)
12323		}()
12324	}
12325	if err := validation.Validate([]validation.Validation{
12326		{TargetValue: resourceGroupName,
12327			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12328				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12329				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12330		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationV2", err.Error())
12331	}
12332
12333	req, err := client.GetNetworkTraceOperationV2Preparer(ctx, resourceGroupName, name, operationID)
12334	if err != nil {
12335		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", nil, "Failure preparing request")
12336		return
12337	}
12338
12339	resp, err := client.GetNetworkTraceOperationV2Sender(req)
12340	if err != nil {
12341		result.Response = autorest.Response{Response: resp}
12342		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure sending request")
12343		return
12344	}
12345
12346	result, err = client.GetNetworkTraceOperationV2Responder(resp)
12347	if err != nil {
12348		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure responding to request")
12349		return
12350	}
12351
12352	return
12353}
12354
12355// GetNetworkTraceOperationV2Preparer prepares the GetNetworkTraceOperationV2 request.
12356func (client AppsClient) GetNetworkTraceOperationV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
12357	pathParameters := map[string]interface{}{
12358		"name":              autorest.Encode("path", name),
12359		"operationId":       autorest.Encode("path", operationID),
12360		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12361		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12362	}
12363
12364	const APIVersion = "2018-02-01"
12365	queryParameters := map[string]interface{}{
12366		"api-version": APIVersion,
12367	}
12368
12369	preparer := autorest.CreatePreparer(
12370		autorest.AsGet(),
12371		autorest.WithBaseURL(client.BaseURI),
12372		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}", pathParameters),
12373		autorest.WithQueryParameters(queryParameters))
12374	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12375}
12376
12377// GetNetworkTraceOperationV2Sender sends the GetNetworkTraceOperationV2 request. The method will close the
12378// http.Response Body if it receives an error.
12379func (client AppsClient) GetNetworkTraceOperationV2Sender(req *http.Request) (*http.Response, error) {
12380	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12381}
12382
12383// GetNetworkTraceOperationV2Responder handles the response to the GetNetworkTraceOperationV2 request. The method always
12384// closes the http.Response Body.
12385func (client AppsClient) GetNetworkTraceOperationV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
12386	err = autorest.Respond(
12387		resp,
12388		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
12389		autorest.ByUnmarshallingJSON(&result.Value),
12390		autorest.ByClosing())
12391	result.Response = autorest.Response{Response: resp}
12392	return
12393}
12394
12395// GetNetworkTraces gets a named operation for a network trace capturing (or deployment slot, if specified).
12396// Parameters:
12397// resourceGroupName - name of the resource group to which the resource belongs.
12398// name - name of the app.
12399// operationID - GUID of the operation.
12400func (client AppsClient) GetNetworkTraces(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
12401	if tracing.IsEnabled() {
12402		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraces")
12403		defer func() {
12404			sc := -1
12405			if result.Response.Response != nil {
12406				sc = result.Response.Response.StatusCode
12407			}
12408			tracing.EndSpan(ctx, sc, err)
12409		}()
12410	}
12411	if err := validation.Validate([]validation.Validation{
12412		{TargetValue: resourceGroupName,
12413			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12414				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12415				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12416		return result, validation.NewError("web.AppsClient", "GetNetworkTraces", err.Error())
12417	}
12418
12419	req, err := client.GetNetworkTracesPreparer(ctx, resourceGroupName, name, operationID)
12420	if err != nil {
12421		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", nil, "Failure preparing request")
12422		return
12423	}
12424
12425	resp, err := client.GetNetworkTracesSender(req)
12426	if err != nil {
12427		result.Response = autorest.Response{Response: resp}
12428		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure sending request")
12429		return
12430	}
12431
12432	result, err = client.GetNetworkTracesResponder(resp)
12433	if err != nil {
12434		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure responding to request")
12435		return
12436	}
12437
12438	return
12439}
12440
12441// GetNetworkTracesPreparer prepares the GetNetworkTraces request.
12442func (client AppsClient) GetNetworkTracesPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
12443	pathParameters := map[string]interface{}{
12444		"name":              autorest.Encode("path", name),
12445		"operationId":       autorest.Encode("path", operationID),
12446		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12447		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12448	}
12449
12450	const APIVersion = "2018-02-01"
12451	queryParameters := map[string]interface{}{
12452		"api-version": APIVersion,
12453	}
12454
12455	preparer := autorest.CreatePreparer(
12456		autorest.AsGet(),
12457		autorest.WithBaseURL(client.BaseURI),
12458		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}", pathParameters),
12459		autorest.WithQueryParameters(queryParameters))
12460	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12461}
12462
12463// GetNetworkTracesSender sends the GetNetworkTraces request. The method will close the
12464// http.Response Body if it receives an error.
12465func (client AppsClient) GetNetworkTracesSender(req *http.Request) (*http.Response, error) {
12466	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12467}
12468
12469// GetNetworkTracesResponder handles the response to the GetNetworkTraces request. The method always
12470// closes the http.Response Body.
12471func (client AppsClient) GetNetworkTracesResponder(resp *http.Response) (result ListNetworkTrace, err error) {
12472	err = autorest.Respond(
12473		resp,
12474		azure.WithErrorUnlessStatusCode(http.StatusOK),
12475		autorest.ByUnmarshallingJSON(&result.Value),
12476		autorest.ByClosing())
12477	result.Response = autorest.Response{Response: resp}
12478	return
12479}
12480
12481// GetNetworkTracesSlot gets a named operation for a network trace capturing (or deployment slot, if specified).
12482// Parameters:
12483// resourceGroupName - name of the resource group to which the resource belongs.
12484// name - name of the app.
12485// operationID - GUID of the operation.
12486// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
12487// production slot.
12488func (client AppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
12489	if tracing.IsEnabled() {
12490		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlot")
12491		defer func() {
12492			sc := -1
12493			if result.Response.Response != nil {
12494				sc = result.Response.Response.StatusCode
12495			}
12496			tracing.EndSpan(ctx, sc, err)
12497		}()
12498	}
12499	if err := validation.Validate([]validation.Validation{
12500		{TargetValue: resourceGroupName,
12501			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12502				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12503				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12504		return result, validation.NewError("web.AppsClient", "GetNetworkTracesSlot", err.Error())
12505	}
12506
12507	req, err := client.GetNetworkTracesSlotPreparer(ctx, resourceGroupName, name, operationID, slot)
12508	if err != nil {
12509		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", nil, "Failure preparing request")
12510		return
12511	}
12512
12513	resp, err := client.GetNetworkTracesSlotSender(req)
12514	if err != nil {
12515		result.Response = autorest.Response{Response: resp}
12516		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure sending request")
12517		return
12518	}
12519
12520	result, err = client.GetNetworkTracesSlotResponder(resp)
12521	if err != nil {
12522		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure responding to request")
12523		return
12524	}
12525
12526	return
12527}
12528
12529// GetNetworkTracesSlotPreparer prepares the GetNetworkTracesSlot request.
12530func (client AppsClient) GetNetworkTracesSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
12531	pathParameters := map[string]interface{}{
12532		"name":              autorest.Encode("path", name),
12533		"operationId":       autorest.Encode("path", operationID),
12534		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12535		"slot":              autorest.Encode("path", slot),
12536		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12537	}
12538
12539	const APIVersion = "2018-02-01"
12540	queryParameters := map[string]interface{}{
12541		"api-version": APIVersion,
12542	}
12543
12544	preparer := autorest.CreatePreparer(
12545		autorest.AsGet(),
12546		autorest.WithBaseURL(client.BaseURI),
12547		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}", pathParameters),
12548		autorest.WithQueryParameters(queryParameters))
12549	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12550}
12551
12552// GetNetworkTracesSlotSender sends the GetNetworkTracesSlot request. The method will close the
12553// http.Response Body if it receives an error.
12554func (client AppsClient) GetNetworkTracesSlotSender(req *http.Request) (*http.Response, error) {
12555	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12556}
12557
12558// GetNetworkTracesSlotResponder handles the response to the GetNetworkTracesSlot request. The method always
12559// closes the http.Response Body.
12560func (client AppsClient) GetNetworkTracesSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
12561	err = autorest.Respond(
12562		resp,
12563		azure.WithErrorUnlessStatusCode(http.StatusOK),
12564		autorest.ByUnmarshallingJSON(&result.Value),
12565		autorest.ByClosing())
12566	result.Response = autorest.Response{Response: resp}
12567	return
12568}
12569
12570// GetNetworkTracesSlotV2 gets a named operation for a network trace capturing (or deployment slot, if specified).
12571// Parameters:
12572// resourceGroupName - name of the resource group to which the resource belongs.
12573// name - name of the app.
12574// operationID - GUID of the operation.
12575// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
12576// production slot.
12577func (client AppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
12578	if tracing.IsEnabled() {
12579		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlotV2")
12580		defer func() {
12581			sc := -1
12582			if result.Response.Response != nil {
12583				sc = result.Response.Response.StatusCode
12584			}
12585			tracing.EndSpan(ctx, sc, err)
12586		}()
12587	}
12588	if err := validation.Validate([]validation.Validation{
12589		{TargetValue: resourceGroupName,
12590			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12591				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12592				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12593		return result, validation.NewError("web.AppsClient", "GetNetworkTracesSlotV2", err.Error())
12594	}
12595
12596	req, err := client.GetNetworkTracesSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot)
12597	if err != nil {
12598		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", nil, "Failure preparing request")
12599		return
12600	}
12601
12602	resp, err := client.GetNetworkTracesSlotV2Sender(req)
12603	if err != nil {
12604		result.Response = autorest.Response{Response: resp}
12605		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure sending request")
12606		return
12607	}
12608
12609	result, err = client.GetNetworkTracesSlotV2Responder(resp)
12610	if err != nil {
12611		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure responding to request")
12612		return
12613	}
12614
12615	return
12616}
12617
12618// GetNetworkTracesSlotV2Preparer prepares the GetNetworkTracesSlotV2 request.
12619func (client AppsClient) GetNetworkTracesSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
12620	pathParameters := map[string]interface{}{
12621		"name":              autorest.Encode("path", name),
12622		"operationId":       autorest.Encode("path", operationID),
12623		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12624		"slot":              autorest.Encode("path", slot),
12625		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12626	}
12627
12628	const APIVersion = "2018-02-01"
12629	queryParameters := map[string]interface{}{
12630		"api-version": APIVersion,
12631	}
12632
12633	preparer := autorest.CreatePreparer(
12634		autorest.AsGet(),
12635		autorest.WithBaseURL(client.BaseURI),
12636		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}", pathParameters),
12637		autorest.WithQueryParameters(queryParameters))
12638	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12639}
12640
12641// GetNetworkTracesSlotV2Sender sends the GetNetworkTracesSlotV2 request. The method will close the
12642// http.Response Body if it receives an error.
12643func (client AppsClient) GetNetworkTracesSlotV2Sender(req *http.Request) (*http.Response, error) {
12644	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12645}
12646
12647// GetNetworkTracesSlotV2Responder handles the response to the GetNetworkTracesSlotV2 request. The method always
12648// closes the http.Response Body.
12649func (client AppsClient) GetNetworkTracesSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
12650	err = autorest.Respond(
12651		resp,
12652		azure.WithErrorUnlessStatusCode(http.StatusOK),
12653		autorest.ByUnmarshallingJSON(&result.Value),
12654		autorest.ByClosing())
12655	result.Response = autorest.Response{Response: resp}
12656	return
12657}
12658
12659// GetNetworkTracesV2 gets a named operation for a network trace capturing (or deployment slot, if specified).
12660// Parameters:
12661// resourceGroupName - name of the resource group to which the resource belongs.
12662// name - name of the app.
12663// operationID - GUID of the operation.
12664func (client AppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
12665	if tracing.IsEnabled() {
12666		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesV2")
12667		defer func() {
12668			sc := -1
12669			if result.Response.Response != nil {
12670				sc = result.Response.Response.StatusCode
12671			}
12672			tracing.EndSpan(ctx, sc, err)
12673		}()
12674	}
12675	if err := validation.Validate([]validation.Validation{
12676		{TargetValue: resourceGroupName,
12677			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12678				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12679				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12680		return result, validation.NewError("web.AppsClient", "GetNetworkTracesV2", err.Error())
12681	}
12682
12683	req, err := client.GetNetworkTracesV2Preparer(ctx, resourceGroupName, name, operationID)
12684	if err != nil {
12685		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", nil, "Failure preparing request")
12686		return
12687	}
12688
12689	resp, err := client.GetNetworkTracesV2Sender(req)
12690	if err != nil {
12691		result.Response = autorest.Response{Response: resp}
12692		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure sending request")
12693		return
12694	}
12695
12696	result, err = client.GetNetworkTracesV2Responder(resp)
12697	if err != nil {
12698		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure responding to request")
12699		return
12700	}
12701
12702	return
12703}
12704
12705// GetNetworkTracesV2Preparer prepares the GetNetworkTracesV2 request.
12706func (client AppsClient) GetNetworkTracesV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
12707	pathParameters := map[string]interface{}{
12708		"name":              autorest.Encode("path", name),
12709		"operationId":       autorest.Encode("path", operationID),
12710		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12711		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12712	}
12713
12714	const APIVersion = "2018-02-01"
12715	queryParameters := map[string]interface{}{
12716		"api-version": APIVersion,
12717	}
12718
12719	preparer := autorest.CreatePreparer(
12720		autorest.AsGet(),
12721		autorest.WithBaseURL(client.BaseURI),
12722		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}", pathParameters),
12723		autorest.WithQueryParameters(queryParameters))
12724	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12725}
12726
12727// GetNetworkTracesV2Sender sends the GetNetworkTracesV2 request. The method will close the
12728// http.Response Body if it receives an error.
12729func (client AppsClient) GetNetworkTracesV2Sender(req *http.Request) (*http.Response, error) {
12730	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12731}
12732
12733// GetNetworkTracesV2Responder handles the response to the GetNetworkTracesV2 request. The method always
12734// closes the http.Response Body.
12735func (client AppsClient) GetNetworkTracesV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
12736	err = autorest.Respond(
12737		resp,
12738		azure.WithErrorUnlessStatusCode(http.StatusOK),
12739		autorest.ByUnmarshallingJSON(&result.Value),
12740		autorest.ByClosing())
12741	result.Response = autorest.Response{Response: resp}
12742	return
12743}
12744
12745// GetPremierAddOn gets a named add-on of an app.
12746// Parameters:
12747// resourceGroupName - name of the resource group to which the resource belongs.
12748// name - name of the app.
12749// premierAddOnName - add-on name.
12750func (client AppsClient) GetPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result PremierAddOn, err error) {
12751	if tracing.IsEnabled() {
12752		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOn")
12753		defer func() {
12754			sc := -1
12755			if result.Response.Response != nil {
12756				sc = result.Response.Response.StatusCode
12757			}
12758			tracing.EndSpan(ctx, sc, err)
12759		}()
12760	}
12761	if err := validation.Validate([]validation.Validation{
12762		{TargetValue: resourceGroupName,
12763			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12764				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12765				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12766		return result, validation.NewError("web.AppsClient", "GetPremierAddOn", err.Error())
12767	}
12768
12769	req, err := client.GetPremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName)
12770	if err != nil {
12771		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", nil, "Failure preparing request")
12772		return
12773	}
12774
12775	resp, err := client.GetPremierAddOnSender(req)
12776	if err != nil {
12777		result.Response = autorest.Response{Response: resp}
12778		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure sending request")
12779		return
12780	}
12781
12782	result, err = client.GetPremierAddOnResponder(resp)
12783	if err != nil {
12784		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure responding to request")
12785		return
12786	}
12787
12788	return
12789}
12790
12791// GetPremierAddOnPreparer prepares the GetPremierAddOn request.
12792func (client AppsClient) GetPremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) {
12793	pathParameters := map[string]interface{}{
12794		"name":              autorest.Encode("path", name),
12795		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
12796		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12797		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12798	}
12799
12800	const APIVersion = "2018-02-01"
12801	queryParameters := map[string]interface{}{
12802		"api-version": APIVersion,
12803	}
12804
12805	preparer := autorest.CreatePreparer(
12806		autorest.AsGet(),
12807		autorest.WithBaseURL(client.BaseURI),
12808		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters),
12809		autorest.WithQueryParameters(queryParameters))
12810	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12811}
12812
12813// GetPremierAddOnSender sends the GetPremierAddOn request. The method will close the
12814// http.Response Body if it receives an error.
12815func (client AppsClient) GetPremierAddOnSender(req *http.Request) (*http.Response, error) {
12816	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12817}
12818
12819// GetPremierAddOnResponder handles the response to the GetPremierAddOn request. The method always
12820// closes the http.Response Body.
12821func (client AppsClient) GetPremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) {
12822	err = autorest.Respond(
12823		resp,
12824		azure.WithErrorUnlessStatusCode(http.StatusOK),
12825		autorest.ByUnmarshallingJSON(&result),
12826		autorest.ByClosing())
12827	result.Response = autorest.Response{Response: resp}
12828	return
12829}
12830
12831// GetPremierAddOnSlot gets a named add-on of an app.
12832// Parameters:
12833// resourceGroupName - name of the resource group to which the resource belongs.
12834// name - name of the app.
12835// premierAddOnName - add-on name.
12836// slot - name of the deployment slot. If a slot is not specified, the API will get the named add-on for the
12837// production slot.
12838func (client AppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result PremierAddOn, err error) {
12839	if tracing.IsEnabled() {
12840		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOnSlot")
12841		defer func() {
12842			sc := -1
12843			if result.Response.Response != nil {
12844				sc = result.Response.Response.StatusCode
12845			}
12846			tracing.EndSpan(ctx, sc, err)
12847		}()
12848	}
12849	if err := validation.Validate([]validation.Validation{
12850		{TargetValue: resourceGroupName,
12851			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12852				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12853				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12854		return result, validation.NewError("web.AppsClient", "GetPremierAddOnSlot", err.Error())
12855	}
12856
12857	req, err := client.GetPremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot)
12858	if err != nil {
12859		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", nil, "Failure preparing request")
12860		return
12861	}
12862
12863	resp, err := client.GetPremierAddOnSlotSender(req)
12864	if err != nil {
12865		result.Response = autorest.Response{Response: resp}
12866		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure sending request")
12867		return
12868	}
12869
12870	result, err = client.GetPremierAddOnSlotResponder(resp)
12871	if err != nil {
12872		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure responding to request")
12873		return
12874	}
12875
12876	return
12877}
12878
12879// GetPremierAddOnSlotPreparer prepares the GetPremierAddOnSlot request.
12880func (client AppsClient) GetPremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) {
12881	pathParameters := map[string]interface{}{
12882		"name":              autorest.Encode("path", name),
12883		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
12884		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12885		"slot":              autorest.Encode("path", slot),
12886		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12887	}
12888
12889	const APIVersion = "2018-02-01"
12890	queryParameters := map[string]interface{}{
12891		"api-version": APIVersion,
12892	}
12893
12894	preparer := autorest.CreatePreparer(
12895		autorest.AsGet(),
12896		autorest.WithBaseURL(client.BaseURI),
12897		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters),
12898		autorest.WithQueryParameters(queryParameters))
12899	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12900}
12901
12902// GetPremierAddOnSlotSender sends the GetPremierAddOnSlot request. The method will close the
12903// http.Response Body if it receives an error.
12904func (client AppsClient) GetPremierAddOnSlotSender(req *http.Request) (*http.Response, error) {
12905	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12906}
12907
12908// GetPremierAddOnSlotResponder handles the response to the GetPremierAddOnSlot request. The method always
12909// closes the http.Response Body.
12910func (client AppsClient) GetPremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) {
12911	err = autorest.Respond(
12912		resp,
12913		azure.WithErrorUnlessStatusCode(http.StatusOK),
12914		autorest.ByUnmarshallingJSON(&result),
12915		autorest.ByClosing())
12916	result.Response = autorest.Response{Response: resp}
12917	return
12918}
12919
12920// GetPrivateAccess gets data around private site access enablement and authorized Virtual Networks that can access the
12921// site.
12922// Parameters:
12923// resourceGroupName - name of the resource group to which the resource belongs.
12924// name - the name of the web app.
12925func (client AppsClient) GetPrivateAccess(ctx context.Context, resourceGroupName string, name string) (result PrivateAccess, err error) {
12926	if tracing.IsEnabled() {
12927		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccess")
12928		defer func() {
12929			sc := -1
12930			if result.Response.Response != nil {
12931				sc = result.Response.Response.StatusCode
12932			}
12933			tracing.EndSpan(ctx, sc, err)
12934		}()
12935	}
12936	if err := validation.Validate([]validation.Validation{
12937		{TargetValue: resourceGroupName,
12938			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12939				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12940				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12941		return result, validation.NewError("web.AppsClient", "GetPrivateAccess", err.Error())
12942	}
12943
12944	req, err := client.GetPrivateAccessPreparer(ctx, resourceGroupName, name)
12945	if err != nil {
12946		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", nil, "Failure preparing request")
12947		return
12948	}
12949
12950	resp, err := client.GetPrivateAccessSender(req)
12951	if err != nil {
12952		result.Response = autorest.Response{Response: resp}
12953		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure sending request")
12954		return
12955	}
12956
12957	result, err = client.GetPrivateAccessResponder(resp)
12958	if err != nil {
12959		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure responding to request")
12960		return
12961	}
12962
12963	return
12964}
12965
12966// GetPrivateAccessPreparer prepares the GetPrivateAccess request.
12967func (client AppsClient) GetPrivateAccessPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
12968	pathParameters := map[string]interface{}{
12969		"name":              autorest.Encode("path", name),
12970		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12971		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12972	}
12973
12974	const APIVersion = "2018-02-01"
12975	queryParameters := map[string]interface{}{
12976		"api-version": APIVersion,
12977	}
12978
12979	preparer := autorest.CreatePreparer(
12980		autorest.AsGet(),
12981		autorest.WithBaseURL(client.BaseURI),
12982		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks", pathParameters),
12983		autorest.WithQueryParameters(queryParameters))
12984	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12985}
12986
12987// GetPrivateAccessSender sends the GetPrivateAccess request. The method will close the
12988// http.Response Body if it receives an error.
12989func (client AppsClient) GetPrivateAccessSender(req *http.Request) (*http.Response, error) {
12990	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12991}
12992
12993// GetPrivateAccessResponder handles the response to the GetPrivateAccess request. The method always
12994// closes the http.Response Body.
12995func (client AppsClient) GetPrivateAccessResponder(resp *http.Response) (result PrivateAccess, err error) {
12996	err = autorest.Respond(
12997		resp,
12998		azure.WithErrorUnlessStatusCode(http.StatusOK),
12999		autorest.ByUnmarshallingJSON(&result),
13000		autorest.ByClosing())
13001	result.Response = autorest.Response{Response: resp}
13002	return
13003}
13004
13005// GetPrivateAccessSlot gets data around private site access enablement and authorized Virtual Networks that can access
13006// the site.
13007// Parameters:
13008// resourceGroupName - name of the resource group to which the resource belongs.
13009// name - the name of the web app.
13010// slot - the name of the slot for the web app.
13011func (client AppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PrivateAccess, err error) {
13012	if tracing.IsEnabled() {
13013		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccessSlot")
13014		defer func() {
13015			sc := -1
13016			if result.Response.Response != nil {
13017				sc = result.Response.Response.StatusCode
13018			}
13019			tracing.EndSpan(ctx, sc, err)
13020		}()
13021	}
13022	if err := validation.Validate([]validation.Validation{
13023		{TargetValue: resourceGroupName,
13024			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13025				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13026				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13027		return result, validation.NewError("web.AppsClient", "GetPrivateAccessSlot", err.Error())
13028	}
13029
13030	req, err := client.GetPrivateAccessSlotPreparer(ctx, resourceGroupName, name, slot)
13031	if err != nil {
13032		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", nil, "Failure preparing request")
13033		return
13034	}
13035
13036	resp, err := client.GetPrivateAccessSlotSender(req)
13037	if err != nil {
13038		result.Response = autorest.Response{Response: resp}
13039		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure sending request")
13040		return
13041	}
13042
13043	result, err = client.GetPrivateAccessSlotResponder(resp)
13044	if err != nil {
13045		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure responding to request")
13046		return
13047	}
13048
13049	return
13050}
13051
13052// GetPrivateAccessSlotPreparer prepares the GetPrivateAccessSlot request.
13053func (client AppsClient) GetPrivateAccessSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
13054	pathParameters := map[string]interface{}{
13055		"name":              autorest.Encode("path", name),
13056		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13057		"slot":              autorest.Encode("path", slot),
13058		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13059	}
13060
13061	const APIVersion = "2018-02-01"
13062	queryParameters := map[string]interface{}{
13063		"api-version": APIVersion,
13064	}
13065
13066	preparer := autorest.CreatePreparer(
13067		autorest.AsGet(),
13068		autorest.WithBaseURL(client.BaseURI),
13069		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks", pathParameters),
13070		autorest.WithQueryParameters(queryParameters))
13071	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13072}
13073
13074// GetPrivateAccessSlotSender sends the GetPrivateAccessSlot request. The method will close the
13075// http.Response Body if it receives an error.
13076func (client AppsClient) GetPrivateAccessSlotSender(req *http.Request) (*http.Response, error) {
13077	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13078}
13079
13080// GetPrivateAccessSlotResponder handles the response to the GetPrivateAccessSlot request. The method always
13081// closes the http.Response Body.
13082func (client AppsClient) GetPrivateAccessSlotResponder(resp *http.Response) (result PrivateAccess, err error) {
13083	err = autorest.Respond(
13084		resp,
13085		azure.WithErrorUnlessStatusCode(http.StatusOK),
13086		autorest.ByUnmarshallingJSON(&result),
13087		autorest.ByClosing())
13088	result.Response = autorest.Response{Response: resp}
13089	return
13090}
13091
13092// GetProcess get process information by its ID for a specific scaled-out instance in a web site.
13093// Parameters:
13094// resourceGroupName - name of the resource group to which the resource belongs.
13095// name - site name.
13096// processID - pID.
13097func (client AppsClient) GetProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessInfo, err error) {
13098	if tracing.IsEnabled() {
13099		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcess")
13100		defer func() {
13101			sc := -1
13102			if result.Response.Response != nil {
13103				sc = result.Response.Response.StatusCode
13104			}
13105			tracing.EndSpan(ctx, sc, err)
13106		}()
13107	}
13108	if err := validation.Validate([]validation.Validation{
13109		{TargetValue: resourceGroupName,
13110			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13111				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13112				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13113		return result, validation.NewError("web.AppsClient", "GetProcess", err.Error())
13114	}
13115
13116	req, err := client.GetProcessPreparer(ctx, resourceGroupName, name, processID)
13117	if err != nil {
13118		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", nil, "Failure preparing request")
13119		return
13120	}
13121
13122	resp, err := client.GetProcessSender(req)
13123	if err != nil {
13124		result.Response = autorest.Response{Response: resp}
13125		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure sending request")
13126		return
13127	}
13128
13129	result, err = client.GetProcessResponder(resp)
13130	if err != nil {
13131		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure responding to request")
13132		return
13133	}
13134
13135	return
13136}
13137
13138// GetProcessPreparer prepares the GetProcess request.
13139func (client AppsClient) GetProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
13140	pathParameters := map[string]interface{}{
13141		"name":              autorest.Encode("path", name),
13142		"processId":         autorest.Encode("path", processID),
13143		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13144		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13145	}
13146
13147	const APIVersion = "2018-02-01"
13148	queryParameters := map[string]interface{}{
13149		"api-version": APIVersion,
13150	}
13151
13152	preparer := autorest.CreatePreparer(
13153		autorest.AsGet(),
13154		autorest.WithBaseURL(client.BaseURI),
13155		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters),
13156		autorest.WithQueryParameters(queryParameters))
13157	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13158}
13159
13160// GetProcessSender sends the GetProcess request. The method will close the
13161// http.Response Body if it receives an error.
13162func (client AppsClient) GetProcessSender(req *http.Request) (*http.Response, error) {
13163	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13164}
13165
13166// GetProcessResponder handles the response to the GetProcess request. The method always
13167// closes the http.Response Body.
13168func (client AppsClient) GetProcessResponder(resp *http.Response) (result ProcessInfo, err error) {
13169	err = autorest.Respond(
13170		resp,
13171		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
13172		autorest.ByUnmarshallingJSON(&result),
13173		autorest.ByClosing())
13174	result.Response = autorest.Response{Response: resp}
13175	return
13176}
13177
13178// GetProcessDump get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
13179// Parameters:
13180// resourceGroupName - name of the resource group to which the resource belongs.
13181// name - site name.
13182// processID - pID.
13183func (client AppsClient) GetProcessDump(ctx context.Context, resourceGroupName string, name string, processID string) (result ReadCloser, err error) {
13184	if tracing.IsEnabled() {
13185		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDump")
13186		defer func() {
13187			sc := -1
13188			if result.Response.Response != nil {
13189				sc = result.Response.Response.StatusCode
13190			}
13191			tracing.EndSpan(ctx, sc, err)
13192		}()
13193	}
13194	if err := validation.Validate([]validation.Validation{
13195		{TargetValue: resourceGroupName,
13196			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13197				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13198				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13199		return result, validation.NewError("web.AppsClient", "GetProcessDump", err.Error())
13200	}
13201
13202	req, err := client.GetProcessDumpPreparer(ctx, resourceGroupName, name, processID)
13203	if err != nil {
13204		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", nil, "Failure preparing request")
13205		return
13206	}
13207
13208	resp, err := client.GetProcessDumpSender(req)
13209	if err != nil {
13210		result.Response = autorest.Response{Response: resp}
13211		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure sending request")
13212		return
13213	}
13214
13215	result, err = client.GetProcessDumpResponder(resp)
13216	if err != nil {
13217		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure responding to request")
13218		return
13219	}
13220
13221	return
13222}
13223
13224// GetProcessDumpPreparer prepares the GetProcessDump request.
13225func (client AppsClient) GetProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
13226	pathParameters := map[string]interface{}{
13227		"name":              autorest.Encode("path", name),
13228		"processId":         autorest.Encode("path", processID),
13229		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13230		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13231	}
13232
13233	const APIVersion = "2018-02-01"
13234	queryParameters := map[string]interface{}{
13235		"api-version": APIVersion,
13236	}
13237
13238	preparer := autorest.CreatePreparer(
13239		autorest.AsGet(),
13240		autorest.WithBaseURL(client.BaseURI),
13241		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump", pathParameters),
13242		autorest.WithQueryParameters(queryParameters))
13243	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13244}
13245
13246// GetProcessDumpSender sends the GetProcessDump request. The method will close the
13247// http.Response Body if it receives an error.
13248func (client AppsClient) GetProcessDumpSender(req *http.Request) (*http.Response, error) {
13249	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13250}
13251
13252// GetProcessDumpResponder handles the response to the GetProcessDump request. The method always
13253// closes the http.Response Body.
13254func (client AppsClient) GetProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) {
13255	result.Value = &resp.Body
13256	err = autorest.Respond(
13257		resp,
13258		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound))
13259	result.Response = autorest.Response{Response: resp}
13260	return
13261}
13262
13263// GetProcessDumpSlot get a memory dump of a process by its ID for a specific scaled-out instance in a web site.
13264// Parameters:
13265// resourceGroupName - name of the resource group to which the resource belongs.
13266// name - site name.
13267// processID - pID.
13268// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
13269// production slot.
13270func (client AppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ReadCloser, err error) {
13271	if tracing.IsEnabled() {
13272		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDumpSlot")
13273		defer func() {
13274			sc := -1
13275			if result.Response.Response != nil {
13276				sc = result.Response.Response.StatusCode
13277			}
13278			tracing.EndSpan(ctx, sc, err)
13279		}()
13280	}
13281	if err := validation.Validate([]validation.Validation{
13282		{TargetValue: resourceGroupName,
13283			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13284				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13285				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13286		return result, validation.NewError("web.AppsClient", "GetProcessDumpSlot", err.Error())
13287	}
13288
13289	req, err := client.GetProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot)
13290	if err != nil {
13291		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", nil, "Failure preparing request")
13292		return
13293	}
13294
13295	resp, err := client.GetProcessDumpSlotSender(req)
13296	if err != nil {
13297		result.Response = autorest.Response{Response: resp}
13298		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure sending request")
13299		return
13300	}
13301
13302	result, err = client.GetProcessDumpSlotResponder(resp)
13303	if err != nil {
13304		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure responding to request")
13305		return
13306	}
13307
13308	return
13309}
13310
13311// GetProcessDumpSlotPreparer prepares the GetProcessDumpSlot request.
13312func (client AppsClient) GetProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
13313	pathParameters := map[string]interface{}{
13314		"name":              autorest.Encode("path", name),
13315		"processId":         autorest.Encode("path", processID),
13316		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13317		"slot":              autorest.Encode("path", slot),
13318		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13319	}
13320
13321	const APIVersion = "2018-02-01"
13322	queryParameters := map[string]interface{}{
13323		"api-version": APIVersion,
13324	}
13325
13326	preparer := autorest.CreatePreparer(
13327		autorest.AsGet(),
13328		autorest.WithBaseURL(client.BaseURI),
13329		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump", pathParameters),
13330		autorest.WithQueryParameters(queryParameters))
13331	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13332}
13333
13334// GetProcessDumpSlotSender sends the GetProcessDumpSlot request. The method will close the
13335// http.Response Body if it receives an error.
13336func (client AppsClient) GetProcessDumpSlotSender(req *http.Request) (*http.Response, error) {
13337	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13338}
13339
13340// GetProcessDumpSlotResponder handles the response to the GetProcessDumpSlot request. The method always
13341// closes the http.Response Body.
13342func (client AppsClient) GetProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) {
13343	result.Value = &resp.Body
13344	err = autorest.Respond(
13345		resp,
13346		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound))
13347	result.Response = autorest.Response{Response: resp}
13348	return
13349}
13350
13351// GetProcessModule get process information by its ID for a specific scaled-out instance in a web site.
13352// Parameters:
13353// resourceGroupName - name of the resource group to which the resource belongs.
13354// name - site name.
13355// processID - pID.
13356// baseAddress - module base address.
13357func (client AppsClient) GetProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (result ProcessModuleInfo, err error) {
13358	if tracing.IsEnabled() {
13359		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModule")
13360		defer func() {
13361			sc := -1
13362			if result.Response.Response != nil {
13363				sc = result.Response.Response.StatusCode
13364			}
13365			tracing.EndSpan(ctx, sc, err)
13366		}()
13367	}
13368	if err := validation.Validate([]validation.Validation{
13369		{TargetValue: resourceGroupName,
13370			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13371				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13372				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13373		return result, validation.NewError("web.AppsClient", "GetProcessModule", err.Error())
13374	}
13375
13376	req, err := client.GetProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress)
13377	if err != nil {
13378		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", nil, "Failure preparing request")
13379		return
13380	}
13381
13382	resp, err := client.GetProcessModuleSender(req)
13383	if err != nil {
13384		result.Response = autorest.Response{Response: resp}
13385		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure sending request")
13386		return
13387	}
13388
13389	result, err = client.GetProcessModuleResponder(resp)
13390	if err != nil {
13391		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure responding to request")
13392		return
13393	}
13394
13395	return
13396}
13397
13398// GetProcessModulePreparer prepares the GetProcessModule request.
13399func (client AppsClient) GetProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (*http.Request, error) {
13400	pathParameters := map[string]interface{}{
13401		"baseAddress":       autorest.Encode("path", baseAddress),
13402		"name":              autorest.Encode("path", name),
13403		"processId":         autorest.Encode("path", processID),
13404		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13405		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13406	}
13407
13408	const APIVersion = "2018-02-01"
13409	queryParameters := map[string]interface{}{
13410		"api-version": APIVersion,
13411	}
13412
13413	preparer := autorest.CreatePreparer(
13414		autorest.AsGet(),
13415		autorest.WithBaseURL(client.BaseURI),
13416		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}", pathParameters),
13417		autorest.WithQueryParameters(queryParameters))
13418	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13419}
13420
13421// GetProcessModuleSender sends the GetProcessModule request. The method will close the
13422// http.Response Body if it receives an error.
13423func (client AppsClient) GetProcessModuleSender(req *http.Request) (*http.Response, error) {
13424	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13425}
13426
13427// GetProcessModuleResponder handles the response to the GetProcessModule request. The method always
13428// closes the http.Response Body.
13429func (client AppsClient) GetProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
13430	err = autorest.Respond(
13431		resp,
13432		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
13433		autorest.ByUnmarshallingJSON(&result),
13434		autorest.ByClosing())
13435	result.Response = autorest.Response{Response: resp}
13436	return
13437}
13438
13439// GetProcessModuleSlot get process information by its ID for a specific scaled-out instance in a web site.
13440// Parameters:
13441// resourceGroupName - name of the resource group to which the resource belongs.
13442// name - site name.
13443// processID - pID.
13444// baseAddress - module base address.
13445// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
13446// production slot.
13447func (client AppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (result ProcessModuleInfo, err error) {
13448	if tracing.IsEnabled() {
13449		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModuleSlot")
13450		defer func() {
13451			sc := -1
13452			if result.Response.Response != nil {
13453				sc = result.Response.Response.StatusCode
13454			}
13455			tracing.EndSpan(ctx, sc, err)
13456		}()
13457	}
13458	if err := validation.Validate([]validation.Validation{
13459		{TargetValue: resourceGroupName,
13460			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13461				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13462				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13463		return result, validation.NewError("web.AppsClient", "GetProcessModuleSlot", err.Error())
13464	}
13465
13466	req, err := client.GetProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot)
13467	if err != nil {
13468		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", nil, "Failure preparing request")
13469		return
13470	}
13471
13472	resp, err := client.GetProcessModuleSlotSender(req)
13473	if err != nil {
13474		result.Response = autorest.Response{Response: resp}
13475		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure sending request")
13476		return
13477	}
13478
13479	result, err = client.GetProcessModuleSlotResponder(resp)
13480	if err != nil {
13481		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure responding to request")
13482		return
13483	}
13484
13485	return
13486}
13487
13488// GetProcessModuleSlotPreparer prepares the GetProcessModuleSlot request.
13489func (client AppsClient) GetProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (*http.Request, error) {
13490	pathParameters := map[string]interface{}{
13491		"baseAddress":       autorest.Encode("path", baseAddress),
13492		"name":              autorest.Encode("path", name),
13493		"processId":         autorest.Encode("path", processID),
13494		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13495		"slot":              autorest.Encode("path", slot),
13496		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13497	}
13498
13499	const APIVersion = "2018-02-01"
13500	queryParameters := map[string]interface{}{
13501		"api-version": APIVersion,
13502	}
13503
13504	preparer := autorest.CreatePreparer(
13505		autorest.AsGet(),
13506		autorest.WithBaseURL(client.BaseURI),
13507		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}", pathParameters),
13508		autorest.WithQueryParameters(queryParameters))
13509	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13510}
13511
13512// GetProcessModuleSlotSender sends the GetProcessModuleSlot request. The method will close the
13513// http.Response Body if it receives an error.
13514func (client AppsClient) GetProcessModuleSlotSender(req *http.Request) (*http.Response, error) {
13515	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13516}
13517
13518// GetProcessModuleSlotResponder handles the response to the GetProcessModuleSlot request. The method always
13519// closes the http.Response Body.
13520func (client AppsClient) GetProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
13521	err = autorest.Respond(
13522		resp,
13523		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
13524		autorest.ByUnmarshallingJSON(&result),
13525		autorest.ByClosing())
13526	result.Response = autorest.Response{Response: resp}
13527	return
13528}
13529
13530// GetProcessSlot get process information by its ID for a specific scaled-out instance in a web site.
13531// Parameters:
13532// resourceGroupName - name of the resource group to which the resource belongs.
13533// name - site name.
13534// processID - pID.
13535// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
13536// production slot.
13537func (client AppsClient) GetProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessInfo, err error) {
13538	if tracing.IsEnabled() {
13539		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessSlot")
13540		defer func() {
13541			sc := -1
13542			if result.Response.Response != nil {
13543				sc = result.Response.Response.StatusCode
13544			}
13545			tracing.EndSpan(ctx, sc, err)
13546		}()
13547	}
13548	if err := validation.Validate([]validation.Validation{
13549		{TargetValue: resourceGroupName,
13550			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13551				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13552				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13553		return result, validation.NewError("web.AppsClient", "GetProcessSlot", err.Error())
13554	}
13555
13556	req, err := client.GetProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot)
13557	if err != nil {
13558		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", nil, "Failure preparing request")
13559		return
13560	}
13561
13562	resp, err := client.GetProcessSlotSender(req)
13563	if err != nil {
13564		result.Response = autorest.Response{Response: resp}
13565		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure sending request")
13566		return
13567	}
13568
13569	result, err = client.GetProcessSlotResponder(resp)
13570	if err != nil {
13571		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure responding to request")
13572		return
13573	}
13574
13575	return
13576}
13577
13578// GetProcessSlotPreparer prepares the GetProcessSlot request.
13579func (client AppsClient) GetProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
13580	pathParameters := map[string]interface{}{
13581		"name":              autorest.Encode("path", name),
13582		"processId":         autorest.Encode("path", processID),
13583		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13584		"slot":              autorest.Encode("path", slot),
13585		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13586	}
13587
13588	const APIVersion = "2018-02-01"
13589	queryParameters := map[string]interface{}{
13590		"api-version": APIVersion,
13591	}
13592
13593	preparer := autorest.CreatePreparer(
13594		autorest.AsGet(),
13595		autorest.WithBaseURL(client.BaseURI),
13596		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters),
13597		autorest.WithQueryParameters(queryParameters))
13598	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13599}
13600
13601// GetProcessSlotSender sends the GetProcessSlot request. The method will close the
13602// http.Response Body if it receives an error.
13603func (client AppsClient) GetProcessSlotSender(req *http.Request) (*http.Response, error) {
13604	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13605}
13606
13607// GetProcessSlotResponder handles the response to the GetProcessSlot request. The method always
13608// closes the http.Response Body.
13609func (client AppsClient) GetProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) {
13610	err = autorest.Respond(
13611		resp,
13612		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
13613		autorest.ByUnmarshallingJSON(&result),
13614		autorest.ByClosing())
13615	result.Response = autorest.Response{Response: resp}
13616	return
13617}
13618
13619// GetProcessThread get thread information by Thread ID for a specific process, in a specific scaled-out instance in a
13620// web site.
13621// Parameters:
13622// resourceGroupName - name of the resource group to which the resource belongs.
13623// name - site name.
13624// processID - pID.
13625// threadID - tID.
13626func (client AppsClient) GetProcessThread(ctx context.Context, resourceGroupName string, name string, processID string, threadID string) (result ProcessThreadInfo, err error) {
13627	if tracing.IsEnabled() {
13628		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessThread")
13629		defer func() {
13630			sc := -1
13631			if result.Response.Response != nil {
13632				sc = result.Response.Response.StatusCode
13633			}
13634			tracing.EndSpan(ctx, sc, err)
13635		}()
13636	}
13637	if err := validation.Validate([]validation.Validation{
13638		{TargetValue: resourceGroupName,
13639			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13640				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13641				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13642		return result, validation.NewError("web.AppsClient", "GetProcessThread", err.Error())
13643	}
13644
13645	req, err := client.GetProcessThreadPreparer(ctx, resourceGroupName, name, processID, threadID)
13646	if err != nil {
13647		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThread", nil, "Failure preparing request")
13648		return
13649	}
13650
13651	resp, err := client.GetProcessThreadSender(req)
13652	if err != nil {
13653		result.Response = autorest.Response{Response: resp}
13654		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThread", resp, "Failure sending request")
13655		return
13656	}
13657
13658	result, err = client.GetProcessThreadResponder(resp)
13659	if err != nil {
13660		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThread", resp, "Failure responding to request")
13661		return
13662	}
13663
13664	return
13665}
13666
13667// GetProcessThreadPreparer prepares the GetProcessThread request.
13668func (client AppsClient) GetProcessThreadPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID string) (*http.Request, error) {
13669	pathParameters := map[string]interface{}{
13670		"name":              autorest.Encode("path", name),
13671		"processId":         autorest.Encode("path", processID),
13672		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13673		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13674		"threadId":          autorest.Encode("path", threadID),
13675	}
13676
13677	const APIVersion = "2018-02-01"
13678	queryParameters := map[string]interface{}{
13679		"api-version": APIVersion,
13680	}
13681
13682	preparer := autorest.CreatePreparer(
13683		autorest.AsGet(),
13684		autorest.WithBaseURL(client.BaseURI),
13685		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}", pathParameters),
13686		autorest.WithQueryParameters(queryParameters))
13687	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13688}
13689
13690// GetProcessThreadSender sends the GetProcessThread request. The method will close the
13691// http.Response Body if it receives an error.
13692func (client AppsClient) GetProcessThreadSender(req *http.Request) (*http.Response, error) {
13693	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13694}
13695
13696// GetProcessThreadResponder handles the response to the GetProcessThread request. The method always
13697// closes the http.Response Body.
13698func (client AppsClient) GetProcessThreadResponder(resp *http.Response) (result ProcessThreadInfo, err error) {
13699	err = autorest.Respond(
13700		resp,
13701		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
13702		autorest.ByUnmarshallingJSON(&result),
13703		autorest.ByClosing())
13704	result.Response = autorest.Response{Response: resp}
13705	return
13706}
13707
13708// GetProcessThreadSlot get thread information by Thread ID for a specific process, in a specific scaled-out instance
13709// in a web site.
13710// Parameters:
13711// resourceGroupName - name of the resource group to which the resource belongs.
13712// name - site name.
13713// processID - pID.
13714// threadID - tID.
13715// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
13716// production slot.
13717func (client AppsClient) GetProcessThreadSlot(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, slot string) (result ProcessThreadInfo, err error) {
13718	if tracing.IsEnabled() {
13719		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessThreadSlot")
13720		defer func() {
13721			sc := -1
13722			if result.Response.Response != nil {
13723				sc = result.Response.Response.StatusCode
13724			}
13725			tracing.EndSpan(ctx, sc, err)
13726		}()
13727	}
13728	if err := validation.Validate([]validation.Validation{
13729		{TargetValue: resourceGroupName,
13730			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13731				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13732				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13733		return result, validation.NewError("web.AppsClient", "GetProcessThreadSlot", err.Error())
13734	}
13735
13736	req, err := client.GetProcessThreadSlotPreparer(ctx, resourceGroupName, name, processID, threadID, slot)
13737	if err != nil {
13738		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThreadSlot", nil, "Failure preparing request")
13739		return
13740	}
13741
13742	resp, err := client.GetProcessThreadSlotSender(req)
13743	if err != nil {
13744		result.Response = autorest.Response{Response: resp}
13745		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThreadSlot", resp, "Failure sending request")
13746		return
13747	}
13748
13749	result, err = client.GetProcessThreadSlotResponder(resp)
13750	if err != nil {
13751		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThreadSlot", resp, "Failure responding to request")
13752		return
13753	}
13754
13755	return
13756}
13757
13758// GetProcessThreadSlotPreparer prepares the GetProcessThreadSlot request.
13759func (client AppsClient) GetProcessThreadSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, threadID string, slot string) (*http.Request, error) {
13760	pathParameters := map[string]interface{}{
13761		"name":              autorest.Encode("path", name),
13762		"processId":         autorest.Encode("path", processID),
13763		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13764		"slot":              autorest.Encode("path", slot),
13765		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13766		"threadId":          autorest.Encode("path", threadID),
13767	}
13768
13769	const APIVersion = "2018-02-01"
13770	queryParameters := map[string]interface{}{
13771		"api-version": APIVersion,
13772	}
13773
13774	preparer := autorest.CreatePreparer(
13775		autorest.AsGet(),
13776		autorest.WithBaseURL(client.BaseURI),
13777		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}", pathParameters),
13778		autorest.WithQueryParameters(queryParameters))
13779	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13780}
13781
13782// GetProcessThreadSlotSender sends the GetProcessThreadSlot request. The method will close the
13783// http.Response Body if it receives an error.
13784func (client AppsClient) GetProcessThreadSlotSender(req *http.Request) (*http.Response, error) {
13785	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13786}
13787
13788// GetProcessThreadSlotResponder handles the response to the GetProcessThreadSlot request. The method always
13789// closes the http.Response Body.
13790func (client AppsClient) GetProcessThreadSlotResponder(resp *http.Response) (result ProcessThreadInfo, err error) {
13791	err = autorest.Respond(
13792		resp,
13793		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
13794		autorest.ByUnmarshallingJSON(&result),
13795		autorest.ByClosing())
13796	result.Response = autorest.Response{Response: resp}
13797	return
13798}
13799
13800// GetPublicCertificate get the named public certificate for an app (or deployment slot, if specified).
13801// Parameters:
13802// resourceGroupName - name of the resource group to which the resource belongs.
13803// name - name of the app.
13804// publicCertificateName - public certificate name.
13805func (client AppsClient) GetPublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result PublicCertificate, err error) {
13806	if tracing.IsEnabled() {
13807		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificate")
13808		defer func() {
13809			sc := -1
13810			if result.Response.Response != nil {
13811				sc = result.Response.Response.StatusCode
13812			}
13813			tracing.EndSpan(ctx, sc, err)
13814		}()
13815	}
13816	if err := validation.Validate([]validation.Validation{
13817		{TargetValue: resourceGroupName,
13818			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13819				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13820				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13821		return result, validation.NewError("web.AppsClient", "GetPublicCertificate", err.Error())
13822	}
13823
13824	req, err := client.GetPublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName)
13825	if err != nil {
13826		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", nil, "Failure preparing request")
13827		return
13828	}
13829
13830	resp, err := client.GetPublicCertificateSender(req)
13831	if err != nil {
13832		result.Response = autorest.Response{Response: resp}
13833		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure sending request")
13834		return
13835	}
13836
13837	result, err = client.GetPublicCertificateResponder(resp)
13838	if err != nil {
13839		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure responding to request")
13840		return
13841	}
13842
13843	return
13844}
13845
13846// GetPublicCertificatePreparer prepares the GetPublicCertificate request.
13847func (client AppsClient) GetPublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) {
13848	pathParameters := map[string]interface{}{
13849		"name":                  autorest.Encode("path", name),
13850		"publicCertificateName": autorest.Encode("path", publicCertificateName),
13851		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
13852		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
13853	}
13854
13855	const APIVersion = "2018-02-01"
13856	queryParameters := map[string]interface{}{
13857		"api-version": APIVersion,
13858	}
13859
13860	preparer := autorest.CreatePreparer(
13861		autorest.AsGet(),
13862		autorest.WithBaseURL(client.BaseURI),
13863		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters),
13864		autorest.WithQueryParameters(queryParameters))
13865	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13866}
13867
13868// GetPublicCertificateSender sends the GetPublicCertificate request. The method will close the
13869// http.Response Body if it receives an error.
13870func (client AppsClient) GetPublicCertificateSender(req *http.Request) (*http.Response, error) {
13871	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13872}
13873
13874// GetPublicCertificateResponder handles the response to the GetPublicCertificate request. The method always
13875// closes the http.Response Body.
13876func (client AppsClient) GetPublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) {
13877	err = autorest.Respond(
13878		resp,
13879		azure.WithErrorUnlessStatusCode(http.StatusOK),
13880		autorest.ByUnmarshallingJSON(&result),
13881		autorest.ByClosing())
13882	result.Response = autorest.Response{Response: resp}
13883	return
13884}
13885
13886// GetPublicCertificateSlot get the named public certificate for an app (or deployment slot, if specified).
13887// Parameters:
13888// resourceGroupName - name of the resource group to which the resource belongs.
13889// name - name of the app.
13890// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production
13891// slot.
13892// publicCertificateName - public certificate name.
13893func (client AppsClient) GetPublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result PublicCertificate, err error) {
13894	if tracing.IsEnabled() {
13895		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificateSlot")
13896		defer func() {
13897			sc := -1
13898			if result.Response.Response != nil {
13899				sc = result.Response.Response.StatusCode
13900			}
13901			tracing.EndSpan(ctx, sc, err)
13902		}()
13903	}
13904	if err := validation.Validate([]validation.Validation{
13905		{TargetValue: resourceGroupName,
13906			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13907				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13908				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13909		return result, validation.NewError("web.AppsClient", "GetPublicCertificateSlot", err.Error())
13910	}
13911
13912	req, err := client.GetPublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName)
13913	if err != nil {
13914		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", nil, "Failure preparing request")
13915		return
13916	}
13917
13918	resp, err := client.GetPublicCertificateSlotSender(req)
13919	if err != nil {
13920		result.Response = autorest.Response{Response: resp}
13921		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure sending request")
13922		return
13923	}
13924
13925	result, err = client.GetPublicCertificateSlotResponder(resp)
13926	if err != nil {
13927		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure responding to request")
13928		return
13929	}
13930
13931	return
13932}
13933
13934// GetPublicCertificateSlotPreparer prepares the GetPublicCertificateSlot request.
13935func (client AppsClient) GetPublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) {
13936	pathParameters := map[string]interface{}{
13937		"name":                  autorest.Encode("path", name),
13938		"publicCertificateName": autorest.Encode("path", publicCertificateName),
13939		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
13940		"slot":                  autorest.Encode("path", slot),
13941		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
13942	}
13943
13944	const APIVersion = "2018-02-01"
13945	queryParameters := map[string]interface{}{
13946		"api-version": APIVersion,
13947	}
13948
13949	preparer := autorest.CreatePreparer(
13950		autorest.AsGet(),
13951		autorest.WithBaseURL(client.BaseURI),
13952		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters),
13953		autorest.WithQueryParameters(queryParameters))
13954	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13955}
13956
13957// GetPublicCertificateSlotSender sends the GetPublicCertificateSlot request. The method will close the
13958// http.Response Body if it receives an error.
13959func (client AppsClient) GetPublicCertificateSlotSender(req *http.Request) (*http.Response, error) {
13960	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13961}
13962
13963// GetPublicCertificateSlotResponder handles the response to the GetPublicCertificateSlot request. The method always
13964// closes the http.Response Body.
13965func (client AppsClient) GetPublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) {
13966	err = autorest.Respond(
13967		resp,
13968		azure.WithErrorUnlessStatusCode(http.StatusOK),
13969		autorest.ByUnmarshallingJSON(&result),
13970		autorest.ByClosing())
13971	result.Response = autorest.Response{Response: resp}
13972	return
13973}
13974
13975// GetRelayServiceConnection gets a hybrid connection configuration by its name.
13976// Parameters:
13977// resourceGroupName - name of the resource group to which the resource belongs.
13978// name - name of the app.
13979// entityName - name of the hybrid connection.
13980func (client AppsClient) GetRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result RelayServiceConnectionEntity, err error) {
13981	if tracing.IsEnabled() {
13982		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnection")
13983		defer func() {
13984			sc := -1
13985			if result.Response.Response != nil {
13986				sc = result.Response.Response.StatusCode
13987			}
13988			tracing.EndSpan(ctx, sc, err)
13989		}()
13990	}
13991	if err := validation.Validate([]validation.Validation{
13992		{TargetValue: resourceGroupName,
13993			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13994				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13995				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13996		return result, validation.NewError("web.AppsClient", "GetRelayServiceConnection", err.Error())
13997	}
13998
13999	req, err := client.GetRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName)
14000	if err != nil {
14001		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", nil, "Failure preparing request")
14002		return
14003	}
14004
14005	resp, err := client.GetRelayServiceConnectionSender(req)
14006	if err != nil {
14007		result.Response = autorest.Response{Response: resp}
14008		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure sending request")
14009		return
14010	}
14011
14012	result, err = client.GetRelayServiceConnectionResponder(resp)
14013	if err != nil {
14014		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure responding to request")
14015		return
14016	}
14017
14018	return
14019}
14020
14021// GetRelayServiceConnectionPreparer prepares the GetRelayServiceConnection request.
14022func (client AppsClient) GetRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) {
14023	pathParameters := map[string]interface{}{
14024		"entityName":        autorest.Encode("path", entityName),
14025		"name":              autorest.Encode("path", name),
14026		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14027		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14028	}
14029
14030	const APIVersion = "2018-02-01"
14031	queryParameters := map[string]interface{}{
14032		"api-version": APIVersion,
14033	}
14034
14035	preparer := autorest.CreatePreparer(
14036		autorest.AsGet(),
14037		autorest.WithBaseURL(client.BaseURI),
14038		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
14039		autorest.WithQueryParameters(queryParameters))
14040	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14041}
14042
14043// GetRelayServiceConnectionSender sends the GetRelayServiceConnection request. The method will close the
14044// http.Response Body if it receives an error.
14045func (client AppsClient) GetRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
14046	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14047}
14048
14049// GetRelayServiceConnectionResponder handles the response to the GetRelayServiceConnection request. The method always
14050// closes the http.Response Body.
14051func (client AppsClient) GetRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
14052	err = autorest.Respond(
14053		resp,
14054		azure.WithErrorUnlessStatusCode(http.StatusOK),
14055		autorest.ByUnmarshallingJSON(&result),
14056		autorest.ByClosing())
14057	result.Response = autorest.Response{Response: resp}
14058	return
14059}
14060
14061// GetRelayServiceConnectionSlot gets a hybrid connection configuration by its name.
14062// Parameters:
14063// resourceGroupName - name of the resource group to which the resource belongs.
14064// name - name of the app.
14065// entityName - name of the hybrid connection.
14066// slot - name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the
14067// production slot.
14068func (client AppsClient) GetRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result RelayServiceConnectionEntity, err error) {
14069	if tracing.IsEnabled() {
14070		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnectionSlot")
14071		defer func() {
14072			sc := -1
14073			if result.Response.Response != nil {
14074				sc = result.Response.Response.StatusCode
14075			}
14076			tracing.EndSpan(ctx, sc, err)
14077		}()
14078	}
14079	if err := validation.Validate([]validation.Validation{
14080		{TargetValue: resourceGroupName,
14081			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14082				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14083				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14084		return result, validation.NewError("web.AppsClient", "GetRelayServiceConnectionSlot", err.Error())
14085	}
14086
14087	req, err := client.GetRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot)
14088	if err != nil {
14089		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", nil, "Failure preparing request")
14090		return
14091	}
14092
14093	resp, err := client.GetRelayServiceConnectionSlotSender(req)
14094	if err != nil {
14095		result.Response = autorest.Response{Response: resp}
14096		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure sending request")
14097		return
14098	}
14099
14100	result, err = client.GetRelayServiceConnectionSlotResponder(resp)
14101	if err != nil {
14102		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure responding to request")
14103		return
14104	}
14105
14106	return
14107}
14108
14109// GetRelayServiceConnectionSlotPreparer prepares the GetRelayServiceConnectionSlot request.
14110func (client AppsClient) GetRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) {
14111	pathParameters := map[string]interface{}{
14112		"entityName":        autorest.Encode("path", entityName),
14113		"name":              autorest.Encode("path", name),
14114		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14115		"slot":              autorest.Encode("path", slot),
14116		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14117	}
14118
14119	const APIVersion = "2018-02-01"
14120	queryParameters := map[string]interface{}{
14121		"api-version": APIVersion,
14122	}
14123
14124	preparer := autorest.CreatePreparer(
14125		autorest.AsGet(),
14126		autorest.WithBaseURL(client.BaseURI),
14127		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
14128		autorest.WithQueryParameters(queryParameters))
14129	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14130}
14131
14132// GetRelayServiceConnectionSlotSender sends the GetRelayServiceConnectionSlot request. The method will close the
14133// http.Response Body if it receives an error.
14134func (client AppsClient) GetRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
14135	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14136}
14137
14138// GetRelayServiceConnectionSlotResponder handles the response to the GetRelayServiceConnectionSlot request. The method always
14139// closes the http.Response Body.
14140func (client AppsClient) GetRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
14141	err = autorest.Respond(
14142		resp,
14143		azure.WithErrorUnlessStatusCode(http.StatusOK),
14144		autorest.ByUnmarshallingJSON(&result),
14145		autorest.ByClosing())
14146	result.Response = autorest.Response{Response: resp}
14147	return
14148}
14149
14150// GetSiteExtension get site extension information by its ID for a web site, or a deployment slot.
14151// Parameters:
14152// resourceGroupName - name of the resource group to which the resource belongs.
14153// name - site name.
14154// siteExtensionID - site extension name.
14155func (client AppsClient) GetSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result SiteExtensionInfo, err error) {
14156	if tracing.IsEnabled() {
14157		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtension")
14158		defer func() {
14159			sc := -1
14160			if result.Response.Response != nil {
14161				sc = result.Response.Response.StatusCode
14162			}
14163			tracing.EndSpan(ctx, sc, err)
14164		}()
14165	}
14166	if err := validation.Validate([]validation.Validation{
14167		{TargetValue: resourceGroupName,
14168			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14169				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14170				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14171		return result, validation.NewError("web.AppsClient", "GetSiteExtension", err.Error())
14172	}
14173
14174	req, err := client.GetSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID)
14175	if err != nil {
14176		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", nil, "Failure preparing request")
14177		return
14178	}
14179
14180	resp, err := client.GetSiteExtensionSender(req)
14181	if err != nil {
14182		result.Response = autorest.Response{Response: resp}
14183		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure sending request")
14184		return
14185	}
14186
14187	result, err = client.GetSiteExtensionResponder(resp)
14188	if err != nil {
14189		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure responding to request")
14190		return
14191	}
14192
14193	return
14194}
14195
14196// GetSiteExtensionPreparer prepares the GetSiteExtension request.
14197func (client AppsClient) GetSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) {
14198	pathParameters := map[string]interface{}{
14199		"name":              autorest.Encode("path", name),
14200		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14201		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
14202		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14203	}
14204
14205	const APIVersion = "2018-02-01"
14206	queryParameters := map[string]interface{}{
14207		"api-version": APIVersion,
14208	}
14209
14210	preparer := autorest.CreatePreparer(
14211		autorest.AsGet(),
14212		autorest.WithBaseURL(client.BaseURI),
14213		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters),
14214		autorest.WithQueryParameters(queryParameters))
14215	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14216}
14217
14218// GetSiteExtensionSender sends the GetSiteExtension request. The method will close the
14219// http.Response Body if it receives an error.
14220func (client AppsClient) GetSiteExtensionSender(req *http.Request) (*http.Response, error) {
14221	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14222}
14223
14224// GetSiteExtensionResponder handles the response to the GetSiteExtension request. The method always
14225// closes the http.Response Body.
14226func (client AppsClient) GetSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
14227	err = autorest.Respond(
14228		resp,
14229		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
14230		autorest.ByUnmarshallingJSON(&result),
14231		autorest.ByClosing())
14232	result.Response = autorest.Response{Response: resp}
14233	return
14234}
14235
14236// GetSiteExtensionSlot get site extension information by its ID for a web site, or a deployment slot.
14237// Parameters:
14238// resourceGroupName - name of the resource group to which the resource belongs.
14239// name - site name.
14240// siteExtensionID - site extension name.
14241// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
14242// production slot.
14243func (client AppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result SiteExtensionInfo, err error) {
14244	if tracing.IsEnabled() {
14245		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtensionSlot")
14246		defer func() {
14247			sc := -1
14248			if result.Response.Response != nil {
14249				sc = result.Response.Response.StatusCode
14250			}
14251			tracing.EndSpan(ctx, sc, err)
14252		}()
14253	}
14254	if err := validation.Validate([]validation.Validation{
14255		{TargetValue: resourceGroupName,
14256			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14257				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14258				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14259		return result, validation.NewError("web.AppsClient", "GetSiteExtensionSlot", err.Error())
14260	}
14261
14262	req, err := client.GetSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot)
14263	if err != nil {
14264		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", nil, "Failure preparing request")
14265		return
14266	}
14267
14268	resp, err := client.GetSiteExtensionSlotSender(req)
14269	if err != nil {
14270		result.Response = autorest.Response{Response: resp}
14271		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure sending request")
14272		return
14273	}
14274
14275	result, err = client.GetSiteExtensionSlotResponder(resp)
14276	if err != nil {
14277		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure responding to request")
14278		return
14279	}
14280
14281	return
14282}
14283
14284// GetSiteExtensionSlotPreparer prepares the GetSiteExtensionSlot request.
14285func (client AppsClient) GetSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) {
14286	pathParameters := map[string]interface{}{
14287		"name":              autorest.Encode("path", name),
14288		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14289		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
14290		"slot":              autorest.Encode("path", slot),
14291		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14292	}
14293
14294	const APIVersion = "2018-02-01"
14295	queryParameters := map[string]interface{}{
14296		"api-version": APIVersion,
14297	}
14298
14299	preparer := autorest.CreatePreparer(
14300		autorest.AsGet(),
14301		autorest.WithBaseURL(client.BaseURI),
14302		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters),
14303		autorest.WithQueryParameters(queryParameters))
14304	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14305}
14306
14307// GetSiteExtensionSlotSender sends the GetSiteExtensionSlot request. The method will close the
14308// http.Response Body if it receives an error.
14309func (client AppsClient) GetSiteExtensionSlotSender(req *http.Request) (*http.Response, error) {
14310	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14311}
14312
14313// GetSiteExtensionSlotResponder handles the response to the GetSiteExtensionSlot request. The method always
14314// closes the http.Response Body.
14315func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
14316	err = autorest.Respond(
14317		resp,
14318		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
14319		autorest.ByUnmarshallingJSON(&result),
14320		autorest.ByClosing())
14321	result.Response = autorest.Response{Response: resp}
14322	return
14323}
14324
14325// GetSitePhpErrorLogFlag gets web app's event logs.
14326// Parameters:
14327// resourceGroupName - name of the resource group to which the resource belongs.
14328// name - name of web app.
14329func (client AppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGroupName string, name string) (result SitePhpErrorLogFlag, err error) {
14330	if tracing.IsEnabled() {
14331		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlag")
14332		defer func() {
14333			sc := -1
14334			if result.Response.Response != nil {
14335				sc = result.Response.Response.StatusCode
14336			}
14337			tracing.EndSpan(ctx, sc, err)
14338		}()
14339	}
14340	if err := validation.Validate([]validation.Validation{
14341		{TargetValue: resourceGroupName,
14342			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14343				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14344				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14345		return result, validation.NewError("web.AppsClient", "GetSitePhpErrorLogFlag", err.Error())
14346	}
14347
14348	req, err := client.GetSitePhpErrorLogFlagPreparer(ctx, resourceGroupName, name)
14349	if err != nil {
14350		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", nil, "Failure preparing request")
14351		return
14352	}
14353
14354	resp, err := client.GetSitePhpErrorLogFlagSender(req)
14355	if err != nil {
14356		result.Response = autorest.Response{Response: resp}
14357		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure sending request")
14358		return
14359	}
14360
14361	result, err = client.GetSitePhpErrorLogFlagResponder(resp)
14362	if err != nil {
14363		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure responding to request")
14364		return
14365	}
14366
14367	return
14368}
14369
14370// GetSitePhpErrorLogFlagPreparer prepares the GetSitePhpErrorLogFlag request.
14371func (client AppsClient) GetSitePhpErrorLogFlagPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
14372	pathParameters := map[string]interface{}{
14373		"name":              autorest.Encode("path", name),
14374		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14375		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14376	}
14377
14378	const APIVersion = "2018-02-01"
14379	queryParameters := map[string]interface{}{
14380		"api-version": APIVersion,
14381	}
14382
14383	preparer := autorest.CreatePreparer(
14384		autorest.AsGet(),
14385		autorest.WithBaseURL(client.BaseURI),
14386		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging", pathParameters),
14387		autorest.WithQueryParameters(queryParameters))
14388	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14389}
14390
14391// GetSitePhpErrorLogFlagSender sends the GetSitePhpErrorLogFlag request. The method will close the
14392// http.Response Body if it receives an error.
14393func (client AppsClient) GetSitePhpErrorLogFlagSender(req *http.Request) (*http.Response, error) {
14394	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14395}
14396
14397// GetSitePhpErrorLogFlagResponder handles the response to the GetSitePhpErrorLogFlag request. The method always
14398// closes the http.Response Body.
14399func (client AppsClient) GetSitePhpErrorLogFlagResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) {
14400	err = autorest.Respond(
14401		resp,
14402		azure.WithErrorUnlessStatusCode(http.StatusOK),
14403		autorest.ByUnmarshallingJSON(&result),
14404		autorest.ByClosing())
14405	result.Response = autorest.Response{Response: resp}
14406	return
14407}
14408
14409// GetSitePhpErrorLogFlagSlot gets web app's event logs.
14410// Parameters:
14411// resourceGroupName - name of the resource group to which the resource belongs.
14412// name - name of web app.
14413// slot - name of web app slot. If not specified then will default to production slot.
14414func (client AppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SitePhpErrorLogFlag, err error) {
14415	if tracing.IsEnabled() {
14416		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlagSlot")
14417		defer func() {
14418			sc := -1
14419			if result.Response.Response != nil {
14420				sc = result.Response.Response.StatusCode
14421			}
14422			tracing.EndSpan(ctx, sc, err)
14423		}()
14424	}
14425	if err := validation.Validate([]validation.Validation{
14426		{TargetValue: resourceGroupName,
14427			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14428				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14429				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14430		return result, validation.NewError("web.AppsClient", "GetSitePhpErrorLogFlagSlot", err.Error())
14431	}
14432
14433	req, err := client.GetSitePhpErrorLogFlagSlotPreparer(ctx, resourceGroupName, name, slot)
14434	if err != nil {
14435		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", nil, "Failure preparing request")
14436		return
14437	}
14438
14439	resp, err := client.GetSitePhpErrorLogFlagSlotSender(req)
14440	if err != nil {
14441		result.Response = autorest.Response{Response: resp}
14442		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure sending request")
14443		return
14444	}
14445
14446	result, err = client.GetSitePhpErrorLogFlagSlotResponder(resp)
14447	if err != nil {
14448		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure responding to request")
14449		return
14450	}
14451
14452	return
14453}
14454
14455// GetSitePhpErrorLogFlagSlotPreparer prepares the GetSitePhpErrorLogFlagSlot request.
14456func (client AppsClient) GetSitePhpErrorLogFlagSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
14457	pathParameters := map[string]interface{}{
14458		"name":              autorest.Encode("path", name),
14459		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14460		"slot":              autorest.Encode("path", slot),
14461		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14462	}
14463
14464	const APIVersion = "2018-02-01"
14465	queryParameters := map[string]interface{}{
14466		"api-version": APIVersion,
14467	}
14468
14469	preparer := autorest.CreatePreparer(
14470		autorest.AsGet(),
14471		autorest.WithBaseURL(client.BaseURI),
14472		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging", pathParameters),
14473		autorest.WithQueryParameters(queryParameters))
14474	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14475}
14476
14477// GetSitePhpErrorLogFlagSlotSender sends the GetSitePhpErrorLogFlagSlot request. The method will close the
14478// http.Response Body if it receives an error.
14479func (client AppsClient) GetSitePhpErrorLogFlagSlotSender(req *http.Request) (*http.Response, error) {
14480	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14481}
14482
14483// GetSitePhpErrorLogFlagSlotResponder handles the response to the GetSitePhpErrorLogFlagSlot request. The method always
14484// closes the http.Response Body.
14485func (client AppsClient) GetSitePhpErrorLogFlagSlotResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) {
14486	err = autorest.Respond(
14487		resp,
14488		azure.WithErrorUnlessStatusCode(http.StatusOK),
14489		autorest.ByUnmarshallingJSON(&result),
14490		autorest.ByClosing())
14491	result.Response = autorest.Response{Response: resp}
14492	return
14493}
14494
14495// GetSlot gets the details of a web, mobile, or API app.
14496// Parameters:
14497// resourceGroupName - name of the resource group to which the resource belongs.
14498// name - name of the app.
14499// slot - name of the deployment slot. By default, this API returns the production slot.
14500func (client AppsClient) GetSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result Site, err error) {
14501	if tracing.IsEnabled() {
14502		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSlot")
14503		defer func() {
14504			sc := -1
14505			if result.Response.Response != nil {
14506				sc = result.Response.Response.StatusCode
14507			}
14508			tracing.EndSpan(ctx, sc, err)
14509		}()
14510	}
14511	if err := validation.Validate([]validation.Validation{
14512		{TargetValue: resourceGroupName,
14513			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14514				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14515				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14516		return result, validation.NewError("web.AppsClient", "GetSlot", err.Error())
14517	}
14518
14519	req, err := client.GetSlotPreparer(ctx, resourceGroupName, name, slot)
14520	if err != nil {
14521		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", nil, "Failure preparing request")
14522		return
14523	}
14524
14525	resp, err := client.GetSlotSender(req)
14526	if err != nil {
14527		result.Response = autorest.Response{Response: resp}
14528		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure sending request")
14529		return
14530	}
14531
14532	result, err = client.GetSlotResponder(resp)
14533	if err != nil {
14534		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure responding to request")
14535		return
14536	}
14537
14538	return
14539}
14540
14541// GetSlotPreparer prepares the GetSlot request.
14542func (client AppsClient) GetSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
14543	pathParameters := map[string]interface{}{
14544		"name":              autorest.Encode("path", name),
14545		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14546		"slot":              autorest.Encode("path", slot),
14547		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14548	}
14549
14550	const APIVersion = "2018-02-01"
14551	queryParameters := map[string]interface{}{
14552		"api-version": APIVersion,
14553	}
14554
14555	preparer := autorest.CreatePreparer(
14556		autorest.AsGet(),
14557		autorest.WithBaseURL(client.BaseURI),
14558		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
14559		autorest.WithQueryParameters(queryParameters))
14560	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14561}
14562
14563// GetSlotSender sends the GetSlot request. The method will close the
14564// http.Response Body if it receives an error.
14565func (client AppsClient) GetSlotSender(req *http.Request) (*http.Response, error) {
14566	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14567}
14568
14569// GetSlotResponder handles the response to the GetSlot request. The method always
14570// closes the http.Response Body.
14571func (client AppsClient) GetSlotResponder(resp *http.Response) (result Site, err error) {
14572	err = autorest.Respond(
14573		resp,
14574		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
14575		autorest.ByUnmarshallingJSON(&result),
14576		autorest.ByClosing())
14577	result.Response = autorest.Response{Response: resp}
14578	return
14579}
14580
14581// GetSourceControl gets the source control configuration of an app.
14582// Parameters:
14583// resourceGroupName - name of the resource group to which the resource belongs.
14584// name - name of the app.
14585func (client AppsClient) GetSourceControl(ctx context.Context, resourceGroupName string, name string) (result SiteSourceControl, err error) {
14586	if tracing.IsEnabled() {
14587		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControl")
14588		defer func() {
14589			sc := -1
14590			if result.Response.Response != nil {
14591				sc = result.Response.Response.StatusCode
14592			}
14593			tracing.EndSpan(ctx, sc, err)
14594		}()
14595	}
14596	if err := validation.Validate([]validation.Validation{
14597		{TargetValue: resourceGroupName,
14598			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14599				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14600				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14601		return result, validation.NewError("web.AppsClient", "GetSourceControl", err.Error())
14602	}
14603
14604	req, err := client.GetSourceControlPreparer(ctx, resourceGroupName, name)
14605	if err != nil {
14606		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", nil, "Failure preparing request")
14607		return
14608	}
14609
14610	resp, err := client.GetSourceControlSender(req)
14611	if err != nil {
14612		result.Response = autorest.Response{Response: resp}
14613		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure sending request")
14614		return
14615	}
14616
14617	result, err = client.GetSourceControlResponder(resp)
14618	if err != nil {
14619		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure responding to request")
14620		return
14621	}
14622
14623	return
14624}
14625
14626// GetSourceControlPreparer prepares the GetSourceControl request.
14627func (client AppsClient) GetSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
14628	pathParameters := map[string]interface{}{
14629		"name":              autorest.Encode("path", name),
14630		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14631		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14632	}
14633
14634	const APIVersion = "2018-02-01"
14635	queryParameters := map[string]interface{}{
14636		"api-version": APIVersion,
14637	}
14638
14639	preparer := autorest.CreatePreparer(
14640		autorest.AsGet(),
14641		autorest.WithBaseURL(client.BaseURI),
14642		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
14643		autorest.WithQueryParameters(queryParameters))
14644	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14645}
14646
14647// GetSourceControlSender sends the GetSourceControl request. The method will close the
14648// http.Response Body if it receives an error.
14649func (client AppsClient) GetSourceControlSender(req *http.Request) (*http.Response, error) {
14650	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14651}
14652
14653// GetSourceControlResponder handles the response to the GetSourceControl request. The method always
14654// closes the http.Response Body.
14655func (client AppsClient) GetSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) {
14656	err = autorest.Respond(
14657		resp,
14658		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
14659		autorest.ByUnmarshallingJSON(&result),
14660		autorest.ByClosing())
14661	result.Response = autorest.Response{Response: resp}
14662	return
14663}
14664
14665// GetSourceControlSlot gets the source control configuration of an app.
14666// Parameters:
14667// resourceGroupName - name of the resource group to which the resource belongs.
14668// name - name of the app.
14669// slot - name of the deployment slot. If a slot is not specified, the API will get the source control
14670// configuration for the production slot.
14671func (client AppsClient) GetSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteSourceControl, err error) {
14672	if tracing.IsEnabled() {
14673		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControlSlot")
14674		defer func() {
14675			sc := -1
14676			if result.Response.Response != nil {
14677				sc = result.Response.Response.StatusCode
14678			}
14679			tracing.EndSpan(ctx, sc, err)
14680		}()
14681	}
14682	if err := validation.Validate([]validation.Validation{
14683		{TargetValue: resourceGroupName,
14684			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14685				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14686				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14687		return result, validation.NewError("web.AppsClient", "GetSourceControlSlot", err.Error())
14688	}
14689
14690	req, err := client.GetSourceControlSlotPreparer(ctx, resourceGroupName, name, slot)
14691	if err != nil {
14692		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", nil, "Failure preparing request")
14693		return
14694	}
14695
14696	resp, err := client.GetSourceControlSlotSender(req)
14697	if err != nil {
14698		result.Response = autorest.Response{Response: resp}
14699		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure sending request")
14700		return
14701	}
14702
14703	result, err = client.GetSourceControlSlotResponder(resp)
14704	if err != nil {
14705		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure responding to request")
14706		return
14707	}
14708
14709	return
14710}
14711
14712// GetSourceControlSlotPreparer prepares the GetSourceControlSlot request.
14713func (client AppsClient) GetSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
14714	pathParameters := map[string]interface{}{
14715		"name":              autorest.Encode("path", name),
14716		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14717		"slot":              autorest.Encode("path", slot),
14718		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14719	}
14720
14721	const APIVersion = "2018-02-01"
14722	queryParameters := map[string]interface{}{
14723		"api-version": APIVersion,
14724	}
14725
14726	preparer := autorest.CreatePreparer(
14727		autorest.AsGet(),
14728		autorest.WithBaseURL(client.BaseURI),
14729		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
14730		autorest.WithQueryParameters(queryParameters))
14731	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14732}
14733
14734// GetSourceControlSlotSender sends the GetSourceControlSlot request. The method will close the
14735// http.Response Body if it receives an error.
14736func (client AppsClient) GetSourceControlSlotSender(req *http.Request) (*http.Response, error) {
14737	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14738}
14739
14740// GetSourceControlSlotResponder handles the response to the GetSourceControlSlot request. The method always
14741// closes the http.Response Body.
14742func (client AppsClient) GetSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) {
14743	err = autorest.Respond(
14744		resp,
14745		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
14746		autorest.ByUnmarshallingJSON(&result),
14747		autorest.ByClosing())
14748	result.Response = autorest.Response{Response: resp}
14749	return
14750}
14751
14752// GetSwiftVirtualNetworkConnection gets a Swift Virtual Network connection.
14753// Parameters:
14754// resourceGroupName - name of the resource group to which the resource belongs.
14755// name - name of the app.
14756func (client AppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string) (result SwiftVirtualNetwork, err error) {
14757	if tracing.IsEnabled() {
14758		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnection")
14759		defer func() {
14760			sc := -1
14761			if result.Response.Response != nil {
14762				sc = result.Response.Response.StatusCode
14763			}
14764			tracing.EndSpan(ctx, sc, err)
14765		}()
14766	}
14767	if err := validation.Validate([]validation.Validation{
14768		{TargetValue: resourceGroupName,
14769			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14770				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14771				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14772		return result, validation.NewError("web.AppsClient", "GetSwiftVirtualNetworkConnection", err.Error())
14773	}
14774
14775	req, err := client.GetSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name)
14776	if err != nil {
14777		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", nil, "Failure preparing request")
14778		return
14779	}
14780
14781	resp, err := client.GetSwiftVirtualNetworkConnectionSender(req)
14782	if err != nil {
14783		result.Response = autorest.Response{Response: resp}
14784		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure sending request")
14785		return
14786	}
14787
14788	result, err = client.GetSwiftVirtualNetworkConnectionResponder(resp)
14789	if err != nil {
14790		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure responding to request")
14791		return
14792	}
14793
14794	return
14795}
14796
14797// GetSwiftVirtualNetworkConnectionPreparer prepares the GetSwiftVirtualNetworkConnection request.
14798func (client AppsClient) GetSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
14799	pathParameters := map[string]interface{}{
14800		"name":              autorest.Encode("path", name),
14801		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14802		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14803	}
14804
14805	const APIVersion = "2018-02-01"
14806	queryParameters := map[string]interface{}{
14807		"api-version": APIVersion,
14808	}
14809
14810	preparer := autorest.CreatePreparer(
14811		autorest.AsGet(),
14812		autorest.WithBaseURL(client.BaseURI),
14813		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
14814		autorest.WithQueryParameters(queryParameters))
14815	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14816}
14817
14818// GetSwiftVirtualNetworkConnectionSender sends the GetSwiftVirtualNetworkConnection request. The method will close the
14819// http.Response Body if it receives an error.
14820func (client AppsClient) GetSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) {
14821	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14822}
14823
14824// GetSwiftVirtualNetworkConnectionResponder handles the response to the GetSwiftVirtualNetworkConnection request. The method always
14825// closes the http.Response Body.
14826func (client AppsClient) GetSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
14827	err = autorest.Respond(
14828		resp,
14829		azure.WithErrorUnlessStatusCode(http.StatusOK),
14830		autorest.ByUnmarshallingJSON(&result),
14831		autorest.ByClosing())
14832	result.Response = autorest.Response{Response: resp}
14833	return
14834}
14835
14836// GetSwiftVirtualNetworkConnectionSlot gets a Swift Virtual Network connection.
14837// Parameters:
14838// resourceGroupName - name of the resource group to which the resource belongs.
14839// name - name of the app.
14840// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the
14841// production slot's Virtual Network.
14842func (client AppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SwiftVirtualNetwork, err error) {
14843	if tracing.IsEnabled() {
14844		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnectionSlot")
14845		defer func() {
14846			sc := -1
14847			if result.Response.Response != nil {
14848				sc = result.Response.Response.StatusCode
14849			}
14850			tracing.EndSpan(ctx, sc, err)
14851		}()
14852	}
14853	if err := validation.Validate([]validation.Validation{
14854		{TargetValue: resourceGroupName,
14855			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14856				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14857				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14858		return result, validation.NewError("web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", err.Error())
14859	}
14860
14861	req, err := client.GetSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, slot)
14862	if err != nil {
14863		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request")
14864		return
14865	}
14866
14867	resp, err := client.GetSwiftVirtualNetworkConnectionSlotSender(req)
14868	if err != nil {
14869		result.Response = autorest.Response{Response: resp}
14870		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request")
14871		return
14872	}
14873
14874	result, err = client.GetSwiftVirtualNetworkConnectionSlotResponder(resp)
14875	if err != nil {
14876		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request")
14877		return
14878	}
14879
14880	return
14881}
14882
14883// GetSwiftVirtualNetworkConnectionSlotPreparer prepares the GetSwiftVirtualNetworkConnectionSlot request.
14884func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
14885	pathParameters := map[string]interface{}{
14886		"name":              autorest.Encode("path", name),
14887		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14888		"slot":              autorest.Encode("path", slot),
14889		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14890	}
14891
14892	const APIVersion = "2018-02-01"
14893	queryParameters := map[string]interface{}{
14894		"api-version": APIVersion,
14895	}
14896
14897	preparer := autorest.CreatePreparer(
14898		autorest.AsGet(),
14899		autorest.WithBaseURL(client.BaseURI),
14900		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
14901		autorest.WithQueryParameters(queryParameters))
14902	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14903}
14904
14905// GetSwiftVirtualNetworkConnectionSlotSender sends the GetSwiftVirtualNetworkConnectionSlot request. The method will close the
14906// http.Response Body if it receives an error.
14907func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) {
14908	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14909}
14910
14911// GetSwiftVirtualNetworkConnectionSlotResponder handles the response to the GetSwiftVirtualNetworkConnectionSlot request. The method always
14912// closes the http.Response Body.
14913func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
14914	err = autorest.Respond(
14915		resp,
14916		azure.WithErrorUnlessStatusCode(http.StatusOK),
14917		autorest.ByUnmarshallingJSON(&result),
14918		autorest.ByClosing())
14919	result.Response = autorest.Response{Response: resp}
14920	return
14921}
14922
14923// GetTriggeredWebJob gets a triggered web job by its ID for an app, or a deployment slot.
14924// Parameters:
14925// resourceGroupName - name of the resource group to which the resource belongs.
14926// name - site name.
14927// webJobName - name of Web Job.
14928func (client AppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredWebJob, err error) {
14929	if tracing.IsEnabled() {
14930		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJob")
14931		defer func() {
14932			sc := -1
14933			if result.Response.Response != nil {
14934				sc = result.Response.Response.StatusCode
14935			}
14936			tracing.EndSpan(ctx, sc, err)
14937		}()
14938	}
14939	if err := validation.Validate([]validation.Validation{
14940		{TargetValue: resourceGroupName,
14941			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14942				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14943				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14944		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJob", err.Error())
14945	}
14946
14947	req, err := client.GetTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName)
14948	if err != nil {
14949		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", nil, "Failure preparing request")
14950		return
14951	}
14952
14953	resp, err := client.GetTriggeredWebJobSender(req)
14954	if err != nil {
14955		result.Response = autorest.Response{Response: resp}
14956		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure sending request")
14957		return
14958	}
14959
14960	result, err = client.GetTriggeredWebJobResponder(resp)
14961	if err != nil {
14962		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure responding to request")
14963		return
14964	}
14965
14966	return
14967}
14968
14969// GetTriggeredWebJobPreparer prepares the GetTriggeredWebJob request.
14970func (client AppsClient) GetTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
14971	pathParameters := map[string]interface{}{
14972		"name":              autorest.Encode("path", name),
14973		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14974		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14975		"webJobName":        autorest.Encode("path", webJobName),
14976	}
14977
14978	const APIVersion = "2018-02-01"
14979	queryParameters := map[string]interface{}{
14980		"api-version": APIVersion,
14981	}
14982
14983	preparer := autorest.CreatePreparer(
14984		autorest.AsGet(),
14985		autorest.WithBaseURL(client.BaseURI),
14986		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters),
14987		autorest.WithQueryParameters(queryParameters))
14988	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14989}
14990
14991// GetTriggeredWebJobSender sends the GetTriggeredWebJob request. The method will close the
14992// http.Response Body if it receives an error.
14993func (client AppsClient) GetTriggeredWebJobSender(req *http.Request) (*http.Response, error) {
14994	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14995}
14996
14997// GetTriggeredWebJobResponder handles the response to the GetTriggeredWebJob request. The method always
14998// closes the http.Response Body.
14999func (client AppsClient) GetTriggeredWebJobResponder(resp *http.Response) (result TriggeredWebJob, err error) {
15000	err = autorest.Respond(
15001		resp,
15002		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
15003		autorest.ByUnmarshallingJSON(&result),
15004		autorest.ByClosing())
15005	result.Response = autorest.Response{Response: resp}
15006	return
15007}
15008
15009// GetTriggeredWebJobHistory gets a triggered web job's history by its ID for an app, , or a deployment slot.
15010// Parameters:
15011// resourceGroupName - name of the resource group to which the resource belongs.
15012// name - site name.
15013// webJobName - name of Web Job.
15014// ID - history ID.
15015func (client AppsClient) GetTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (result TriggeredJobHistory, err error) {
15016	if tracing.IsEnabled() {
15017		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistory")
15018		defer func() {
15019			sc := -1
15020			if result.Response.Response != nil {
15021				sc = result.Response.Response.StatusCode
15022			}
15023			tracing.EndSpan(ctx, sc, err)
15024		}()
15025	}
15026	if err := validation.Validate([]validation.Validation{
15027		{TargetValue: resourceGroupName,
15028			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15029				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15030				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15031		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobHistory", err.Error())
15032	}
15033
15034	req, err := client.GetTriggeredWebJobHistoryPreparer(ctx, resourceGroupName, name, webJobName, ID)
15035	if err != nil {
15036		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", nil, "Failure preparing request")
15037		return
15038	}
15039
15040	resp, err := client.GetTriggeredWebJobHistorySender(req)
15041	if err != nil {
15042		result.Response = autorest.Response{Response: resp}
15043		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure sending request")
15044		return
15045	}
15046
15047	result, err = client.GetTriggeredWebJobHistoryResponder(resp)
15048	if err != nil {
15049		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure responding to request")
15050		return
15051	}
15052
15053	return
15054}
15055
15056// GetTriggeredWebJobHistoryPreparer prepares the GetTriggeredWebJobHistory request.
15057func (client AppsClient) GetTriggeredWebJobHistoryPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (*http.Request, error) {
15058	pathParameters := map[string]interface{}{
15059		"id":                autorest.Encode("path", ID),
15060		"name":              autorest.Encode("path", name),
15061		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15062		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15063		"webJobName":        autorest.Encode("path", webJobName),
15064	}
15065
15066	const APIVersion = "2018-02-01"
15067	queryParameters := map[string]interface{}{
15068		"api-version": APIVersion,
15069	}
15070
15071	preparer := autorest.CreatePreparer(
15072		autorest.AsGet(),
15073		autorest.WithBaseURL(client.BaseURI),
15074		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters),
15075		autorest.WithQueryParameters(queryParameters))
15076	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15077}
15078
15079// GetTriggeredWebJobHistorySender sends the GetTriggeredWebJobHistory request. The method will close the
15080// http.Response Body if it receives an error.
15081func (client AppsClient) GetTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) {
15082	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15083}
15084
15085// GetTriggeredWebJobHistoryResponder handles the response to the GetTriggeredWebJobHistory request. The method always
15086// closes the http.Response Body.
15087func (client AppsClient) GetTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistory, err error) {
15088	err = autorest.Respond(
15089		resp,
15090		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
15091		autorest.ByUnmarshallingJSON(&result),
15092		autorest.ByClosing())
15093	result.Response = autorest.Response{Response: resp}
15094	return
15095}
15096
15097// GetTriggeredWebJobHistorySlot gets a triggered web job's history by its ID for an app, , or a deployment slot.
15098// Parameters:
15099// resourceGroupName - name of the resource group to which the resource belongs.
15100// name - site name.
15101// webJobName - name of Web Job.
15102// ID - history ID.
15103// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
15104// production slot.
15105func (client AppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (result TriggeredJobHistory, err error) {
15106	if tracing.IsEnabled() {
15107		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistorySlot")
15108		defer func() {
15109			sc := -1
15110			if result.Response.Response != nil {
15111				sc = result.Response.Response.StatusCode
15112			}
15113			tracing.EndSpan(ctx, sc, err)
15114		}()
15115	}
15116	if err := validation.Validate([]validation.Validation{
15117		{TargetValue: resourceGroupName,
15118			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15119				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15120				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15121		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobHistorySlot", err.Error())
15122	}
15123
15124	req, err := client.GetTriggeredWebJobHistorySlotPreparer(ctx, resourceGroupName, name, webJobName, ID, slot)
15125	if err != nil {
15126		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", nil, "Failure preparing request")
15127		return
15128	}
15129
15130	resp, err := client.GetTriggeredWebJobHistorySlotSender(req)
15131	if err != nil {
15132		result.Response = autorest.Response{Response: resp}
15133		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure sending request")
15134		return
15135	}
15136
15137	result, err = client.GetTriggeredWebJobHistorySlotResponder(resp)
15138	if err != nil {
15139		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure responding to request")
15140		return
15141	}
15142
15143	return
15144}
15145
15146// GetTriggeredWebJobHistorySlotPreparer prepares the GetTriggeredWebJobHistorySlot request.
15147func (client AppsClient) GetTriggeredWebJobHistorySlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (*http.Request, error) {
15148	pathParameters := map[string]interface{}{
15149		"id":                autorest.Encode("path", ID),
15150		"name":              autorest.Encode("path", name),
15151		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15152		"slot":              autorest.Encode("path", slot),
15153		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15154		"webJobName":        autorest.Encode("path", webJobName),
15155	}
15156
15157	const APIVersion = "2018-02-01"
15158	queryParameters := map[string]interface{}{
15159		"api-version": APIVersion,
15160	}
15161
15162	preparer := autorest.CreatePreparer(
15163		autorest.AsGet(),
15164		autorest.WithBaseURL(client.BaseURI),
15165		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters),
15166		autorest.WithQueryParameters(queryParameters))
15167	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15168}
15169
15170// GetTriggeredWebJobHistorySlotSender sends the GetTriggeredWebJobHistorySlot request. The method will close the
15171// http.Response Body if it receives an error.
15172func (client AppsClient) GetTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) {
15173	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15174}
15175
15176// GetTriggeredWebJobHistorySlotResponder handles the response to the GetTriggeredWebJobHistorySlot request. The method always
15177// closes the http.Response Body.
15178func (client AppsClient) GetTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistory, err error) {
15179	err = autorest.Respond(
15180		resp,
15181		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
15182		autorest.ByUnmarshallingJSON(&result),
15183		autorest.ByClosing())
15184	result.Response = autorest.Response{Response: resp}
15185	return
15186}
15187
15188// GetTriggeredWebJobSlot gets a triggered web job by its ID for an app, or a deployment slot.
15189// Parameters:
15190// resourceGroupName - name of the resource group to which the resource belongs.
15191// name - site name.
15192// webJobName - name of Web Job.
15193// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
15194// production slot.
15195func (client AppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredWebJob, err error) {
15196	if tracing.IsEnabled() {
15197		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobSlot")
15198		defer func() {
15199			sc := -1
15200			if result.Response.Response != nil {
15201				sc = result.Response.Response.StatusCode
15202			}
15203			tracing.EndSpan(ctx, sc, err)
15204		}()
15205	}
15206	if err := validation.Validate([]validation.Validation{
15207		{TargetValue: resourceGroupName,
15208			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15209				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15210				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15211		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobSlot", err.Error())
15212	}
15213
15214	req, err := client.GetTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
15215	if err != nil {
15216		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", nil, "Failure preparing request")
15217		return
15218	}
15219
15220	resp, err := client.GetTriggeredWebJobSlotSender(req)
15221	if err != nil {
15222		result.Response = autorest.Response{Response: resp}
15223		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure sending request")
15224		return
15225	}
15226
15227	result, err = client.GetTriggeredWebJobSlotResponder(resp)
15228	if err != nil {
15229		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure responding to request")
15230		return
15231	}
15232
15233	return
15234}
15235
15236// GetTriggeredWebJobSlotPreparer prepares the GetTriggeredWebJobSlot request.
15237func (client AppsClient) GetTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
15238	pathParameters := map[string]interface{}{
15239		"name":              autorest.Encode("path", name),
15240		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15241		"slot":              autorest.Encode("path", slot),
15242		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15243		"webJobName":        autorest.Encode("path", webJobName),
15244	}
15245
15246	const APIVersion = "2018-02-01"
15247	queryParameters := map[string]interface{}{
15248		"api-version": APIVersion,
15249	}
15250
15251	preparer := autorest.CreatePreparer(
15252		autorest.AsGet(),
15253		autorest.WithBaseURL(client.BaseURI),
15254		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters),
15255		autorest.WithQueryParameters(queryParameters))
15256	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15257}
15258
15259// GetTriggeredWebJobSlotSender sends the GetTriggeredWebJobSlot request. The method will close the
15260// http.Response Body if it receives an error.
15261func (client AppsClient) GetTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) {
15262	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15263}
15264
15265// GetTriggeredWebJobSlotResponder handles the response to the GetTriggeredWebJobSlot request. The method always
15266// closes the http.Response Body.
15267func (client AppsClient) GetTriggeredWebJobSlotResponder(resp *http.Response) (result TriggeredWebJob, err error) {
15268	err = autorest.Respond(
15269		resp,
15270		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
15271		autorest.ByUnmarshallingJSON(&result),
15272		autorest.ByClosing())
15273	result.Response = autorest.Response{Response: resp}
15274	return
15275}
15276
15277// GetVnetConnection gets a virtual network the app (or deployment slot) is connected to by name.
15278// Parameters:
15279// resourceGroupName - name of the resource group to which the resource belongs.
15280// name - name of the app.
15281// vnetName - name of the virtual network.
15282func (client AppsClient) GetVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result VnetInfo, err error) {
15283	if tracing.IsEnabled() {
15284		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnection")
15285		defer func() {
15286			sc := -1
15287			if result.Response.Response != nil {
15288				sc = result.Response.Response.StatusCode
15289			}
15290			tracing.EndSpan(ctx, sc, err)
15291		}()
15292	}
15293	if err := validation.Validate([]validation.Validation{
15294		{TargetValue: resourceGroupName,
15295			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15296				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15297				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15298		return result, validation.NewError("web.AppsClient", "GetVnetConnection", err.Error())
15299	}
15300
15301	req, err := client.GetVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName)
15302	if err != nil {
15303		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", nil, "Failure preparing request")
15304		return
15305	}
15306
15307	resp, err := client.GetVnetConnectionSender(req)
15308	if err != nil {
15309		result.Response = autorest.Response{Response: resp}
15310		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure sending request")
15311		return
15312	}
15313
15314	result, err = client.GetVnetConnectionResponder(resp)
15315	if err != nil {
15316		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure responding to request")
15317		return
15318	}
15319
15320	return
15321}
15322
15323// GetVnetConnectionPreparer prepares the GetVnetConnection request.
15324func (client AppsClient) GetVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) {
15325	pathParameters := map[string]interface{}{
15326		"name":              autorest.Encode("path", name),
15327		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15328		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15329		"vnetName":          autorest.Encode("path", vnetName),
15330	}
15331
15332	const APIVersion = "2018-02-01"
15333	queryParameters := map[string]interface{}{
15334		"api-version": APIVersion,
15335	}
15336
15337	preparer := autorest.CreatePreparer(
15338		autorest.AsGet(),
15339		autorest.WithBaseURL(client.BaseURI),
15340		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
15341		autorest.WithQueryParameters(queryParameters))
15342	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15343}
15344
15345// GetVnetConnectionSender sends the GetVnetConnection request. The method will close the
15346// http.Response Body if it receives an error.
15347func (client AppsClient) GetVnetConnectionSender(req *http.Request) (*http.Response, error) {
15348	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15349}
15350
15351// GetVnetConnectionResponder handles the response to the GetVnetConnection request. The method always
15352// closes the http.Response Body.
15353func (client AppsClient) GetVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) {
15354	err = autorest.Respond(
15355		resp,
15356		azure.WithErrorUnlessStatusCode(http.StatusOK),
15357		autorest.ByUnmarshallingJSON(&result),
15358		autorest.ByClosing())
15359	result.Response = autorest.Response{Response: resp}
15360	return
15361}
15362
15363// GetVnetConnectionGateway gets an app's Virtual Network gateway.
15364// Parameters:
15365// resourceGroupName - name of the resource group to which the resource belongs.
15366// name - name of the app.
15367// vnetName - name of the Virtual Network.
15368// gatewayName - name of the gateway. Currently, the only supported string is "primary".
15369func (client AppsClient) GetVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (result VnetGateway, err error) {
15370	if tracing.IsEnabled() {
15371		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGateway")
15372		defer func() {
15373			sc := -1
15374			if result.Response.Response != nil {
15375				sc = result.Response.Response.StatusCode
15376			}
15377			tracing.EndSpan(ctx, sc, err)
15378		}()
15379	}
15380	if err := validation.Validate([]validation.Validation{
15381		{TargetValue: resourceGroupName,
15382			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15383				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15384				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15385		return result, validation.NewError("web.AppsClient", "GetVnetConnectionGateway", err.Error())
15386	}
15387
15388	req, err := client.GetVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName)
15389	if err != nil {
15390		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", nil, "Failure preparing request")
15391		return
15392	}
15393
15394	resp, err := client.GetVnetConnectionGatewaySender(req)
15395	if err != nil {
15396		result.Response = autorest.Response{Response: resp}
15397		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure sending request")
15398		return
15399	}
15400
15401	result, err = client.GetVnetConnectionGatewayResponder(resp)
15402	if err != nil {
15403		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure responding to request")
15404		return
15405	}
15406
15407	return
15408}
15409
15410// GetVnetConnectionGatewayPreparer prepares the GetVnetConnectionGateway request.
15411func (client AppsClient) GetVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (*http.Request, error) {
15412	pathParameters := map[string]interface{}{
15413		"gatewayName":       autorest.Encode("path", gatewayName),
15414		"name":              autorest.Encode("path", name),
15415		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15416		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15417		"vnetName":          autorest.Encode("path", vnetName),
15418	}
15419
15420	const APIVersion = "2018-02-01"
15421	queryParameters := map[string]interface{}{
15422		"api-version": APIVersion,
15423	}
15424
15425	preparer := autorest.CreatePreparer(
15426		autorest.AsGet(),
15427		autorest.WithBaseURL(client.BaseURI),
15428		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
15429		autorest.WithQueryParameters(queryParameters))
15430	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15431}
15432
15433// GetVnetConnectionGatewaySender sends the GetVnetConnectionGateway request. The method will close the
15434// http.Response Body if it receives an error.
15435func (client AppsClient) GetVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) {
15436	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15437}
15438
15439// GetVnetConnectionGatewayResponder handles the response to the GetVnetConnectionGateway request. The method always
15440// closes the http.Response Body.
15441func (client AppsClient) GetVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) {
15442	err = autorest.Respond(
15443		resp,
15444		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
15445		autorest.ByUnmarshallingJSON(&result),
15446		autorest.ByClosing())
15447	result.Response = autorest.Response{Response: resp}
15448	return
15449}
15450
15451// GetVnetConnectionGatewaySlot gets an app's Virtual Network gateway.
15452// Parameters:
15453// resourceGroupName - name of the resource group to which the resource belongs.
15454// name - name of the app.
15455// vnetName - name of the Virtual Network.
15456// gatewayName - name of the gateway. Currently, the only supported string is "primary".
15457// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the
15458// production slot's Virtual Network.
15459func (client AppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (result VnetGateway, err error) {
15460	if tracing.IsEnabled() {
15461		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGatewaySlot")
15462		defer func() {
15463			sc := -1
15464			if result.Response.Response != nil {
15465				sc = result.Response.Response.StatusCode
15466			}
15467			tracing.EndSpan(ctx, sc, err)
15468		}()
15469	}
15470	if err := validation.Validate([]validation.Validation{
15471		{TargetValue: resourceGroupName,
15472			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15473				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15474				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15475		return result, validation.NewError("web.AppsClient", "GetVnetConnectionGatewaySlot", err.Error())
15476	}
15477
15478	req, err := client.GetVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, slot)
15479	if err != nil {
15480		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", nil, "Failure preparing request")
15481		return
15482	}
15483
15484	resp, err := client.GetVnetConnectionGatewaySlotSender(req)
15485	if err != nil {
15486		result.Response = autorest.Response{Response: resp}
15487		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure sending request")
15488		return
15489	}
15490
15491	result, err = client.GetVnetConnectionGatewaySlotResponder(resp)
15492	if err != nil {
15493		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure responding to request")
15494		return
15495	}
15496
15497	return
15498}
15499
15500// GetVnetConnectionGatewaySlotPreparer prepares the GetVnetConnectionGatewaySlot request.
15501func (client AppsClient) GetVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (*http.Request, error) {
15502	pathParameters := map[string]interface{}{
15503		"gatewayName":       autorest.Encode("path", gatewayName),
15504		"name":              autorest.Encode("path", name),
15505		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15506		"slot":              autorest.Encode("path", slot),
15507		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15508		"vnetName":          autorest.Encode("path", vnetName),
15509	}
15510
15511	const APIVersion = "2018-02-01"
15512	queryParameters := map[string]interface{}{
15513		"api-version": APIVersion,
15514	}
15515
15516	preparer := autorest.CreatePreparer(
15517		autorest.AsGet(),
15518		autorest.WithBaseURL(client.BaseURI),
15519		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
15520		autorest.WithQueryParameters(queryParameters))
15521	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15522}
15523
15524// GetVnetConnectionGatewaySlotSender sends the GetVnetConnectionGatewaySlot request. The method will close the
15525// http.Response Body if it receives an error.
15526func (client AppsClient) GetVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) {
15527	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15528}
15529
15530// GetVnetConnectionGatewaySlotResponder handles the response to the GetVnetConnectionGatewaySlot request. The method always
15531// closes the http.Response Body.
15532func (client AppsClient) GetVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) {
15533	err = autorest.Respond(
15534		resp,
15535		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
15536		autorest.ByUnmarshallingJSON(&result),
15537		autorest.ByClosing())
15538	result.Response = autorest.Response{Response: resp}
15539	return
15540}
15541
15542// GetVnetConnectionSlot gets a virtual network the app (or deployment slot) is connected to by name.
15543// Parameters:
15544// resourceGroupName - name of the resource group to which the resource belongs.
15545// name - name of the app.
15546// vnetName - name of the virtual network.
15547// slot - name of the deployment slot. If a slot is not specified, the API will get the named virtual network
15548// for the production slot.
15549func (client AppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result VnetInfo, err error) {
15550	if tracing.IsEnabled() {
15551		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionSlot")
15552		defer func() {
15553			sc := -1
15554			if result.Response.Response != nil {
15555				sc = result.Response.Response.StatusCode
15556			}
15557			tracing.EndSpan(ctx, sc, err)
15558		}()
15559	}
15560	if err := validation.Validate([]validation.Validation{
15561		{TargetValue: resourceGroupName,
15562			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15563				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15564				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15565		return result, validation.NewError("web.AppsClient", "GetVnetConnectionSlot", err.Error())
15566	}
15567
15568	req, err := client.GetVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot)
15569	if err != nil {
15570		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", nil, "Failure preparing request")
15571		return
15572	}
15573
15574	resp, err := client.GetVnetConnectionSlotSender(req)
15575	if err != nil {
15576		result.Response = autorest.Response{Response: resp}
15577		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure sending request")
15578		return
15579	}
15580
15581	result, err = client.GetVnetConnectionSlotResponder(resp)
15582	if err != nil {
15583		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure responding to request")
15584		return
15585	}
15586
15587	return
15588}
15589
15590// GetVnetConnectionSlotPreparer prepares the GetVnetConnectionSlot request.
15591func (client AppsClient) GetVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) {
15592	pathParameters := map[string]interface{}{
15593		"name":              autorest.Encode("path", name),
15594		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15595		"slot":              autorest.Encode("path", slot),
15596		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15597		"vnetName":          autorest.Encode("path", vnetName),
15598	}
15599
15600	const APIVersion = "2018-02-01"
15601	queryParameters := map[string]interface{}{
15602		"api-version": APIVersion,
15603	}
15604
15605	preparer := autorest.CreatePreparer(
15606		autorest.AsGet(),
15607		autorest.WithBaseURL(client.BaseURI),
15608		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
15609		autorest.WithQueryParameters(queryParameters))
15610	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15611}
15612
15613// GetVnetConnectionSlotSender sends the GetVnetConnectionSlot request. The method will close the
15614// http.Response Body if it receives an error.
15615func (client AppsClient) GetVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
15616	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15617}
15618
15619// GetVnetConnectionSlotResponder handles the response to the GetVnetConnectionSlot request. The method always
15620// closes the http.Response Body.
15621func (client AppsClient) GetVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) {
15622	err = autorest.Respond(
15623		resp,
15624		azure.WithErrorUnlessStatusCode(http.StatusOK),
15625		autorest.ByUnmarshallingJSON(&result),
15626		autorest.ByClosing())
15627	result.Response = autorest.Response{Response: resp}
15628	return
15629}
15630
15631// GetWebJob get webjob information for an app, or a deployment slot.
15632// Parameters:
15633// resourceGroupName - name of the resource group to which the resource belongs.
15634// name - site name.
15635// webJobName - name of the web job.
15636func (client AppsClient) GetWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result Job, err error) {
15637	if tracing.IsEnabled() {
15638		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJob")
15639		defer func() {
15640			sc := -1
15641			if result.Response.Response != nil {
15642				sc = result.Response.Response.StatusCode
15643			}
15644			tracing.EndSpan(ctx, sc, err)
15645		}()
15646	}
15647	if err := validation.Validate([]validation.Validation{
15648		{TargetValue: resourceGroupName,
15649			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15650				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15651				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15652		return result, validation.NewError("web.AppsClient", "GetWebJob", err.Error())
15653	}
15654
15655	req, err := client.GetWebJobPreparer(ctx, resourceGroupName, name, webJobName)
15656	if err != nil {
15657		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", nil, "Failure preparing request")
15658		return
15659	}
15660
15661	resp, err := client.GetWebJobSender(req)
15662	if err != nil {
15663		result.Response = autorest.Response{Response: resp}
15664		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure sending request")
15665		return
15666	}
15667
15668	result, err = client.GetWebJobResponder(resp)
15669	if err != nil {
15670		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure responding to request")
15671		return
15672	}
15673
15674	return
15675}
15676
15677// GetWebJobPreparer prepares the GetWebJob request.
15678func (client AppsClient) GetWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
15679	pathParameters := map[string]interface{}{
15680		"name":              autorest.Encode("path", name),
15681		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15682		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15683		"webJobName":        autorest.Encode("path", webJobName),
15684	}
15685
15686	const APIVersion = "2018-02-01"
15687	queryParameters := map[string]interface{}{
15688		"api-version": APIVersion,
15689	}
15690
15691	preparer := autorest.CreatePreparer(
15692		autorest.AsGet(),
15693		autorest.WithBaseURL(client.BaseURI),
15694		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}", pathParameters),
15695		autorest.WithQueryParameters(queryParameters))
15696	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15697}
15698
15699// GetWebJobSender sends the GetWebJob request. The method will close the
15700// http.Response Body if it receives an error.
15701func (client AppsClient) GetWebJobSender(req *http.Request) (*http.Response, error) {
15702	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15703}
15704
15705// GetWebJobResponder handles the response to the GetWebJob request. The method always
15706// closes the http.Response Body.
15707func (client AppsClient) GetWebJobResponder(resp *http.Response) (result Job, err error) {
15708	err = autorest.Respond(
15709		resp,
15710		azure.WithErrorUnlessStatusCode(http.StatusOK),
15711		autorest.ByUnmarshallingJSON(&result),
15712		autorest.ByClosing())
15713	result.Response = autorest.Response{Response: resp}
15714	return
15715}
15716
15717// GetWebJobSlot get webjob information for an app, or a deployment slot.
15718// Parameters:
15719// resourceGroupName - name of the resource group to which the resource belongs.
15720// name - site name.
15721// webJobName - name of the web job.
15722// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
15723// production slot.
15724func (client AppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result Job, err error) {
15725	if tracing.IsEnabled() {
15726		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJobSlot")
15727		defer func() {
15728			sc := -1
15729			if result.Response.Response != nil {
15730				sc = result.Response.Response.StatusCode
15731			}
15732			tracing.EndSpan(ctx, sc, err)
15733		}()
15734	}
15735	if err := validation.Validate([]validation.Validation{
15736		{TargetValue: resourceGroupName,
15737			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15738				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15739				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15740		return result, validation.NewError("web.AppsClient", "GetWebJobSlot", err.Error())
15741	}
15742
15743	req, err := client.GetWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
15744	if err != nil {
15745		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", nil, "Failure preparing request")
15746		return
15747	}
15748
15749	resp, err := client.GetWebJobSlotSender(req)
15750	if err != nil {
15751		result.Response = autorest.Response{Response: resp}
15752		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure sending request")
15753		return
15754	}
15755
15756	result, err = client.GetWebJobSlotResponder(resp)
15757	if err != nil {
15758		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure responding to request")
15759		return
15760	}
15761
15762	return
15763}
15764
15765// GetWebJobSlotPreparer prepares the GetWebJobSlot request.
15766func (client AppsClient) GetWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
15767	pathParameters := map[string]interface{}{
15768		"name":              autorest.Encode("path", name),
15769		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15770		"slot":              autorest.Encode("path", slot),
15771		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15772		"webJobName":        autorest.Encode("path", webJobName),
15773	}
15774
15775	const APIVersion = "2018-02-01"
15776	queryParameters := map[string]interface{}{
15777		"api-version": APIVersion,
15778	}
15779
15780	preparer := autorest.CreatePreparer(
15781		autorest.AsGet(),
15782		autorest.WithBaseURL(client.BaseURI),
15783		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}", pathParameters),
15784		autorest.WithQueryParameters(queryParameters))
15785	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15786}
15787
15788// GetWebJobSlotSender sends the GetWebJobSlot request. The method will close the
15789// http.Response Body if it receives an error.
15790func (client AppsClient) GetWebJobSlotSender(req *http.Request) (*http.Response, error) {
15791	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15792}
15793
15794// GetWebJobSlotResponder handles the response to the GetWebJobSlot request. The method always
15795// closes the http.Response Body.
15796func (client AppsClient) GetWebJobSlotResponder(resp *http.Response) (result Job, err error) {
15797	err = autorest.Respond(
15798		resp,
15799		azure.WithErrorUnlessStatusCode(http.StatusOK),
15800		autorest.ByUnmarshallingJSON(&result),
15801		autorest.ByClosing())
15802	result.Response = autorest.Response{Response: resp}
15803	return
15804}
15805
15806// GetWebSiteContainerLogs gets the last lines of docker logs for the given site
15807// Parameters:
15808// resourceGroupName - name of the resource group to which the resource belongs.
15809// name - name of web app.
15810func (client AppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) {
15811	if tracing.IsEnabled() {
15812		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogs")
15813		defer func() {
15814			sc := -1
15815			if result.Response.Response != nil {
15816				sc = result.Response.Response.StatusCode
15817			}
15818			tracing.EndSpan(ctx, sc, err)
15819		}()
15820	}
15821	if err := validation.Validate([]validation.Validation{
15822		{TargetValue: resourceGroupName,
15823			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15824				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15825				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15826		return result, validation.NewError("web.AppsClient", "GetWebSiteContainerLogs", err.Error())
15827	}
15828
15829	req, err := client.GetWebSiteContainerLogsPreparer(ctx, resourceGroupName, name)
15830	if err != nil {
15831		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", nil, "Failure preparing request")
15832		return
15833	}
15834
15835	resp, err := client.GetWebSiteContainerLogsSender(req)
15836	if err != nil {
15837		result.Response = autorest.Response{Response: resp}
15838		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure sending request")
15839		return
15840	}
15841
15842	result, err = client.GetWebSiteContainerLogsResponder(resp)
15843	if err != nil {
15844		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure responding to request")
15845		return
15846	}
15847
15848	return
15849}
15850
15851// GetWebSiteContainerLogsPreparer prepares the GetWebSiteContainerLogs request.
15852func (client AppsClient) GetWebSiteContainerLogsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
15853	pathParameters := map[string]interface{}{
15854		"name":              autorest.Encode("path", name),
15855		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15856		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15857	}
15858
15859	const APIVersion = "2018-02-01"
15860	queryParameters := map[string]interface{}{
15861		"api-version": APIVersion,
15862	}
15863
15864	preparer := autorest.CreatePreparer(
15865		autorest.AsPost(),
15866		autorest.WithBaseURL(client.BaseURI),
15867		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs", pathParameters),
15868		autorest.WithQueryParameters(queryParameters))
15869	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15870}
15871
15872// GetWebSiteContainerLogsSender sends the GetWebSiteContainerLogs request. The method will close the
15873// http.Response Body if it receives an error.
15874func (client AppsClient) GetWebSiteContainerLogsSender(req *http.Request) (*http.Response, error) {
15875	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15876}
15877
15878// GetWebSiteContainerLogsResponder handles the response to the GetWebSiteContainerLogs request. The method always
15879// closes the http.Response Body.
15880func (client AppsClient) GetWebSiteContainerLogsResponder(resp *http.Response) (result ReadCloser, err error) {
15881	result.Value = &resp.Body
15882	err = autorest.Respond(
15883		resp,
15884		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
15885	result.Response = autorest.Response{Response: resp}
15886	return
15887}
15888
15889// GetWebSiteContainerLogsSlot gets the last lines of docker logs for the given site
15890// Parameters:
15891// resourceGroupName - name of the resource group to which the resource belongs.
15892// name - name of web app.
15893// slot - name of web app slot. If not specified then will default to production slot.
15894func (client AppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) {
15895	if tracing.IsEnabled() {
15896		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogsSlot")
15897		defer func() {
15898			sc := -1
15899			if result.Response.Response != nil {
15900				sc = result.Response.Response.StatusCode
15901			}
15902			tracing.EndSpan(ctx, sc, err)
15903		}()
15904	}
15905	if err := validation.Validate([]validation.Validation{
15906		{TargetValue: resourceGroupName,
15907			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15908				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15909				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15910		return result, validation.NewError("web.AppsClient", "GetWebSiteContainerLogsSlot", err.Error())
15911	}
15912
15913	req, err := client.GetWebSiteContainerLogsSlotPreparer(ctx, resourceGroupName, name, slot)
15914	if err != nil {
15915		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", nil, "Failure preparing request")
15916		return
15917	}
15918
15919	resp, err := client.GetWebSiteContainerLogsSlotSender(req)
15920	if err != nil {
15921		result.Response = autorest.Response{Response: resp}
15922		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure sending request")
15923		return
15924	}
15925
15926	result, err = client.GetWebSiteContainerLogsSlotResponder(resp)
15927	if err != nil {
15928		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure responding to request")
15929		return
15930	}
15931
15932	return
15933}
15934
15935// GetWebSiteContainerLogsSlotPreparer prepares the GetWebSiteContainerLogsSlot request.
15936func (client AppsClient) GetWebSiteContainerLogsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
15937	pathParameters := map[string]interface{}{
15938		"name":              autorest.Encode("path", name),
15939		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15940		"slot":              autorest.Encode("path", slot),
15941		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15942	}
15943
15944	const APIVersion = "2018-02-01"
15945	queryParameters := map[string]interface{}{
15946		"api-version": APIVersion,
15947	}
15948
15949	preparer := autorest.CreatePreparer(
15950		autorest.AsPost(),
15951		autorest.WithBaseURL(client.BaseURI),
15952		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs", pathParameters),
15953		autorest.WithQueryParameters(queryParameters))
15954	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15955}
15956
15957// GetWebSiteContainerLogsSlotSender sends the GetWebSiteContainerLogsSlot request. The method will close the
15958// http.Response Body if it receives an error.
15959func (client AppsClient) GetWebSiteContainerLogsSlotSender(req *http.Request) (*http.Response, error) {
15960	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15961}
15962
15963// GetWebSiteContainerLogsSlotResponder handles the response to the GetWebSiteContainerLogsSlot request. The method always
15964// closes the http.Response Body.
15965func (client AppsClient) GetWebSiteContainerLogsSlotResponder(resp *http.Response) (result ReadCloser, err error) {
15966	result.Value = &resp.Body
15967	err = autorest.Respond(
15968		resp,
15969		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
15970	result.Response = autorest.Response{Response: resp}
15971	return
15972}
15973
15974// InstallSiteExtension install site extension on a web site, or a deployment slot.
15975// Parameters:
15976// resourceGroupName - name of the resource group to which the resource belongs.
15977// name - site name.
15978// siteExtensionID - site extension name.
15979func (client AppsClient) InstallSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result AppsInstallSiteExtensionFuture, err error) {
15980	if tracing.IsEnabled() {
15981		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtension")
15982		defer func() {
15983			sc := -1
15984			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
15985				sc = result.FutureAPI.Response().StatusCode
15986			}
15987			tracing.EndSpan(ctx, sc, err)
15988		}()
15989	}
15990	if err := validation.Validate([]validation.Validation{
15991		{TargetValue: resourceGroupName,
15992			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15993				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15994				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15995		return result, validation.NewError("web.AppsClient", "InstallSiteExtension", err.Error())
15996	}
15997
15998	req, err := client.InstallSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID)
15999	if err != nil {
16000		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", nil, "Failure preparing request")
16001		return
16002	}
16003
16004	result, err = client.InstallSiteExtensionSender(req)
16005	if err != nil {
16006		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", nil, "Failure sending request")
16007		return
16008	}
16009
16010	return
16011}
16012
16013// InstallSiteExtensionPreparer prepares the InstallSiteExtension request.
16014func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) {
16015	pathParameters := map[string]interface{}{
16016		"name":              autorest.Encode("path", name),
16017		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16018		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
16019		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16020	}
16021
16022	const APIVersion = "2018-02-01"
16023	queryParameters := map[string]interface{}{
16024		"api-version": APIVersion,
16025	}
16026
16027	preparer := autorest.CreatePreparer(
16028		autorest.AsPut(),
16029		autorest.WithBaseURL(client.BaseURI),
16030		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters),
16031		autorest.WithQueryParameters(queryParameters))
16032	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16033}
16034
16035// InstallSiteExtensionSender sends the InstallSiteExtension request. The method will close the
16036// http.Response Body if it receives an error.
16037func (client AppsClient) InstallSiteExtensionSender(req *http.Request) (future AppsInstallSiteExtensionFuture, err error) {
16038	var resp *http.Response
16039	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
16040	if err != nil {
16041		return
16042	}
16043	var azf azure.Future
16044	azf, err = azure.NewFutureFromResponse(resp)
16045	future.FutureAPI = &azf
16046	future.Result = future.result
16047	return
16048}
16049
16050// InstallSiteExtensionResponder handles the response to the InstallSiteExtension request. The method always
16051// closes the http.Response Body.
16052func (client AppsClient) InstallSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
16053	err = autorest.Respond(
16054		resp,
16055		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests),
16056		autorest.ByUnmarshallingJSON(&result),
16057		autorest.ByClosing())
16058	result.Response = autorest.Response{Response: resp}
16059	return
16060}
16061
16062// InstallSiteExtensionSlot install site extension on a web site, or a deployment slot.
16063// Parameters:
16064// resourceGroupName - name of the resource group to which the resource belongs.
16065// name - site name.
16066// siteExtensionID - site extension name.
16067// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
16068// production slot.
16069func (client AppsClient) InstallSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result AppsInstallSiteExtensionSlotFuture, err error) {
16070	if tracing.IsEnabled() {
16071		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtensionSlot")
16072		defer func() {
16073			sc := -1
16074			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
16075				sc = result.FutureAPI.Response().StatusCode
16076			}
16077			tracing.EndSpan(ctx, sc, err)
16078		}()
16079	}
16080	if err := validation.Validate([]validation.Validation{
16081		{TargetValue: resourceGroupName,
16082			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16083				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16084				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16085		return result, validation.NewError("web.AppsClient", "InstallSiteExtensionSlot", err.Error())
16086	}
16087
16088	req, err := client.InstallSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot)
16089	if err != nil {
16090		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure preparing request")
16091		return
16092	}
16093
16094	result, err = client.InstallSiteExtensionSlotSender(req)
16095	if err != nil {
16096		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure sending request")
16097		return
16098	}
16099
16100	return
16101}
16102
16103// InstallSiteExtensionSlotPreparer prepares the InstallSiteExtensionSlot request.
16104func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) {
16105	pathParameters := map[string]interface{}{
16106		"name":              autorest.Encode("path", name),
16107		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16108		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
16109		"slot":              autorest.Encode("path", slot),
16110		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16111	}
16112
16113	const APIVersion = "2018-02-01"
16114	queryParameters := map[string]interface{}{
16115		"api-version": APIVersion,
16116	}
16117
16118	preparer := autorest.CreatePreparer(
16119		autorest.AsPut(),
16120		autorest.WithBaseURL(client.BaseURI),
16121		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters),
16122		autorest.WithQueryParameters(queryParameters))
16123	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16124}
16125
16126// InstallSiteExtensionSlotSender sends the InstallSiteExtensionSlot request. The method will close the
16127// http.Response Body if it receives an error.
16128func (client AppsClient) InstallSiteExtensionSlotSender(req *http.Request) (future AppsInstallSiteExtensionSlotFuture, err error) {
16129	var resp *http.Response
16130	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
16131	if err != nil {
16132		return
16133	}
16134	var azf azure.Future
16135	azf, err = azure.NewFutureFromResponse(resp)
16136	future.FutureAPI = &azf
16137	future.Result = future.result
16138	return
16139}
16140
16141// InstallSiteExtensionSlotResponder handles the response to the InstallSiteExtensionSlot request. The method always
16142// closes the http.Response Body.
16143func (client AppsClient) InstallSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
16144	err = autorest.Respond(
16145		resp,
16146		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests),
16147		autorest.ByUnmarshallingJSON(&result),
16148		autorest.ByClosing())
16149	result.Response = autorest.Response{Response: resp}
16150	return
16151}
16152
16153// IsCloneable shows whether an app can be cloned to another resource group or subscription.
16154// Parameters:
16155// resourceGroupName - name of the resource group to which the resource belongs.
16156// name - name of the app.
16157func (client AppsClient) IsCloneable(ctx context.Context, resourceGroupName string, name string) (result SiteCloneability, err error) {
16158	if tracing.IsEnabled() {
16159		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneable")
16160		defer func() {
16161			sc := -1
16162			if result.Response.Response != nil {
16163				sc = result.Response.Response.StatusCode
16164			}
16165			tracing.EndSpan(ctx, sc, err)
16166		}()
16167	}
16168	if err := validation.Validate([]validation.Validation{
16169		{TargetValue: resourceGroupName,
16170			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16171				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16172				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16173		return result, validation.NewError("web.AppsClient", "IsCloneable", err.Error())
16174	}
16175
16176	req, err := client.IsCloneablePreparer(ctx, resourceGroupName, name)
16177	if err != nil {
16178		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", nil, "Failure preparing request")
16179		return
16180	}
16181
16182	resp, err := client.IsCloneableSender(req)
16183	if err != nil {
16184		result.Response = autorest.Response{Response: resp}
16185		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure sending request")
16186		return
16187	}
16188
16189	result, err = client.IsCloneableResponder(resp)
16190	if err != nil {
16191		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure responding to request")
16192		return
16193	}
16194
16195	return
16196}
16197
16198// IsCloneablePreparer prepares the IsCloneable request.
16199func (client AppsClient) IsCloneablePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
16200	pathParameters := map[string]interface{}{
16201		"name":              autorest.Encode("path", name),
16202		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16203		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16204	}
16205
16206	const APIVersion = "2018-02-01"
16207	queryParameters := map[string]interface{}{
16208		"api-version": APIVersion,
16209	}
16210
16211	preparer := autorest.CreatePreparer(
16212		autorest.AsPost(),
16213		autorest.WithBaseURL(client.BaseURI),
16214		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable", pathParameters),
16215		autorest.WithQueryParameters(queryParameters))
16216	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16217}
16218
16219// IsCloneableSender sends the IsCloneable request. The method will close the
16220// http.Response Body if it receives an error.
16221func (client AppsClient) IsCloneableSender(req *http.Request) (*http.Response, error) {
16222	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16223}
16224
16225// IsCloneableResponder handles the response to the IsCloneable request. The method always
16226// closes the http.Response Body.
16227func (client AppsClient) IsCloneableResponder(resp *http.Response) (result SiteCloneability, err error) {
16228	err = autorest.Respond(
16229		resp,
16230		azure.WithErrorUnlessStatusCode(http.StatusOK),
16231		autorest.ByUnmarshallingJSON(&result),
16232		autorest.ByClosing())
16233	result.Response = autorest.Response{Response: resp}
16234	return
16235}
16236
16237// IsCloneableSlot shows whether an app can be cloned to another resource group or subscription.
16238// Parameters:
16239// resourceGroupName - name of the resource group to which the resource belongs.
16240// name - name of the app.
16241// slot - name of the deployment slot. By default, this API returns information on the production slot.
16242func (client AppsClient) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteCloneability, err error) {
16243	if tracing.IsEnabled() {
16244		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneableSlot")
16245		defer func() {
16246			sc := -1
16247			if result.Response.Response != nil {
16248				sc = result.Response.Response.StatusCode
16249			}
16250			tracing.EndSpan(ctx, sc, err)
16251		}()
16252	}
16253	if err := validation.Validate([]validation.Validation{
16254		{TargetValue: resourceGroupName,
16255			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16256				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16257				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16258		return result, validation.NewError("web.AppsClient", "IsCloneableSlot", err.Error())
16259	}
16260
16261	req, err := client.IsCloneableSlotPreparer(ctx, resourceGroupName, name, slot)
16262	if err != nil {
16263		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", nil, "Failure preparing request")
16264		return
16265	}
16266
16267	resp, err := client.IsCloneableSlotSender(req)
16268	if err != nil {
16269		result.Response = autorest.Response{Response: resp}
16270		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure sending request")
16271		return
16272	}
16273
16274	result, err = client.IsCloneableSlotResponder(resp)
16275	if err != nil {
16276		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure responding to request")
16277		return
16278	}
16279
16280	return
16281}
16282
16283// IsCloneableSlotPreparer prepares the IsCloneableSlot request.
16284func (client AppsClient) IsCloneableSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
16285	pathParameters := map[string]interface{}{
16286		"name":              autorest.Encode("path", name),
16287		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16288		"slot":              autorest.Encode("path", slot),
16289		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16290	}
16291
16292	const APIVersion = "2018-02-01"
16293	queryParameters := map[string]interface{}{
16294		"api-version": APIVersion,
16295	}
16296
16297	preparer := autorest.CreatePreparer(
16298		autorest.AsPost(),
16299		autorest.WithBaseURL(client.BaseURI),
16300		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable", pathParameters),
16301		autorest.WithQueryParameters(queryParameters))
16302	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16303}
16304
16305// IsCloneableSlotSender sends the IsCloneableSlot request. The method will close the
16306// http.Response Body if it receives an error.
16307func (client AppsClient) IsCloneableSlotSender(req *http.Request) (*http.Response, error) {
16308	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16309}
16310
16311// IsCloneableSlotResponder handles the response to the IsCloneableSlot request. The method always
16312// closes the http.Response Body.
16313func (client AppsClient) IsCloneableSlotResponder(resp *http.Response) (result SiteCloneability, err error) {
16314	err = autorest.Respond(
16315		resp,
16316		azure.WithErrorUnlessStatusCode(http.StatusOK),
16317		autorest.ByUnmarshallingJSON(&result),
16318		autorest.ByClosing())
16319	result.Response = autorest.Response{Response: resp}
16320	return
16321}
16322
16323// List get all apps for a subscription.
16324func (client AppsClient) List(ctx context.Context) (result AppCollectionPage, err error) {
16325	if tracing.IsEnabled() {
16326		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List")
16327		defer func() {
16328			sc := -1
16329			if result.ac.Response.Response != nil {
16330				sc = result.ac.Response.Response.StatusCode
16331			}
16332			tracing.EndSpan(ctx, sc, err)
16333		}()
16334	}
16335	result.fn = client.listNextResults
16336	req, err := client.ListPreparer(ctx)
16337	if err != nil {
16338		err = autorest.NewErrorWithError(err, "web.AppsClient", "List", nil, "Failure preparing request")
16339		return
16340	}
16341
16342	resp, err := client.ListSender(req)
16343	if err != nil {
16344		result.ac.Response = autorest.Response{Response: resp}
16345		err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure sending request")
16346		return
16347	}
16348
16349	result.ac, err = client.ListResponder(resp)
16350	if err != nil {
16351		err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure responding to request")
16352		return
16353	}
16354	if result.ac.hasNextLink() && result.ac.IsEmpty() {
16355		err = result.NextWithContext(ctx)
16356		return
16357	}
16358
16359	return
16360}
16361
16362// ListPreparer prepares the List request.
16363func (client AppsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
16364	pathParameters := map[string]interface{}{
16365		"subscriptionId": autorest.Encode("path", client.SubscriptionID),
16366	}
16367
16368	const APIVersion = "2018-02-01"
16369	queryParameters := map[string]interface{}{
16370		"api-version": APIVersion,
16371	}
16372
16373	preparer := autorest.CreatePreparer(
16374		autorest.AsGet(),
16375		autorest.WithBaseURL(client.BaseURI),
16376		autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites", pathParameters),
16377		autorest.WithQueryParameters(queryParameters))
16378	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16379}
16380
16381// ListSender sends the List request. The method will close the
16382// http.Response Body if it receives an error.
16383func (client AppsClient) ListSender(req *http.Request) (*http.Response, error) {
16384	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16385}
16386
16387// ListResponder handles the response to the List request. The method always
16388// closes the http.Response Body.
16389func (client AppsClient) ListResponder(resp *http.Response) (result AppCollection, err error) {
16390	err = autorest.Respond(
16391		resp,
16392		azure.WithErrorUnlessStatusCode(http.StatusOK),
16393		autorest.ByUnmarshallingJSON(&result),
16394		autorest.ByClosing())
16395	result.Response = autorest.Response{Response: resp}
16396	return
16397}
16398
16399// listNextResults retrieves the next set of results, if any.
16400func (client AppsClient) listNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) {
16401	req, err := lastResults.appCollectionPreparer(ctx)
16402	if err != nil {
16403		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", nil, "Failure preparing next results request")
16404	}
16405	if req == nil {
16406		return
16407	}
16408	resp, err := client.ListSender(req)
16409	if err != nil {
16410		result.Response = autorest.Response{Response: resp}
16411		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure sending next results request")
16412	}
16413	result, err = client.ListResponder(resp)
16414	if err != nil {
16415		err = autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure responding to next results request")
16416	}
16417	return
16418}
16419
16420// ListComplete enumerates all values, automatically crossing page boundaries as required.
16421func (client AppsClient) ListComplete(ctx context.Context) (result AppCollectionIterator, err error) {
16422	if tracing.IsEnabled() {
16423		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List")
16424		defer func() {
16425			sc := -1
16426			if result.Response().Response.Response != nil {
16427				sc = result.page.Response().Response.Response.StatusCode
16428			}
16429			tracing.EndSpan(ctx, sc, err)
16430		}()
16431	}
16432	result.page, err = client.List(ctx)
16433	return
16434}
16435
16436// ListApplicationSettings gets the application settings of an app.
16437// Parameters:
16438// resourceGroupName - name of the resource group to which the resource belongs.
16439// name - name of the app.
16440func (client AppsClient) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) {
16441	if tracing.IsEnabled() {
16442		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettings")
16443		defer func() {
16444			sc := -1
16445			if result.Response.Response != nil {
16446				sc = result.Response.Response.StatusCode
16447			}
16448			tracing.EndSpan(ctx, sc, err)
16449		}()
16450	}
16451	if err := validation.Validate([]validation.Validation{
16452		{TargetValue: resourceGroupName,
16453			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16454				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16455				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16456		return result, validation.NewError("web.AppsClient", "ListApplicationSettings", err.Error())
16457	}
16458
16459	req, err := client.ListApplicationSettingsPreparer(ctx, resourceGroupName, name)
16460	if err != nil {
16461		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", nil, "Failure preparing request")
16462		return
16463	}
16464
16465	resp, err := client.ListApplicationSettingsSender(req)
16466	if err != nil {
16467		result.Response = autorest.Response{Response: resp}
16468		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure sending request")
16469		return
16470	}
16471
16472	result, err = client.ListApplicationSettingsResponder(resp)
16473	if err != nil {
16474		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure responding to request")
16475		return
16476	}
16477
16478	return
16479}
16480
16481// ListApplicationSettingsPreparer prepares the ListApplicationSettings request.
16482func (client AppsClient) ListApplicationSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
16483	pathParameters := map[string]interface{}{
16484		"name":              autorest.Encode("path", name),
16485		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16486		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16487	}
16488
16489	const APIVersion = "2018-02-01"
16490	queryParameters := map[string]interface{}{
16491		"api-version": APIVersion,
16492	}
16493
16494	preparer := autorest.CreatePreparer(
16495		autorest.AsPost(),
16496		autorest.WithBaseURL(client.BaseURI),
16497		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list", pathParameters),
16498		autorest.WithQueryParameters(queryParameters))
16499	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16500}
16501
16502// ListApplicationSettingsSender sends the ListApplicationSettings request. The method will close the
16503// http.Response Body if it receives an error.
16504func (client AppsClient) ListApplicationSettingsSender(req *http.Request) (*http.Response, error) {
16505	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16506}
16507
16508// ListApplicationSettingsResponder handles the response to the ListApplicationSettings request. The method always
16509// closes the http.Response Body.
16510func (client AppsClient) ListApplicationSettingsResponder(resp *http.Response) (result StringDictionary, err error) {
16511	err = autorest.Respond(
16512		resp,
16513		azure.WithErrorUnlessStatusCode(http.StatusOK),
16514		autorest.ByUnmarshallingJSON(&result),
16515		autorest.ByClosing())
16516	result.Response = autorest.Response{Response: resp}
16517	return
16518}
16519
16520// ListApplicationSettingsSlot gets the application settings of an app.
16521// Parameters:
16522// resourceGroupName - name of the resource group to which the resource belongs.
16523// name - name of the app.
16524// slot - name of the deployment slot. If a slot is not specified, the API will get the application settings
16525// for the production slot.
16526func (client AppsClient) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result StringDictionary, err error) {
16527	if tracing.IsEnabled() {
16528		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettingsSlot")
16529		defer func() {
16530			sc := -1
16531			if result.Response.Response != nil {
16532				sc = result.Response.Response.StatusCode
16533			}
16534			tracing.EndSpan(ctx, sc, err)
16535		}()
16536	}
16537	if err := validation.Validate([]validation.Validation{
16538		{TargetValue: resourceGroupName,
16539			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16540				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16541				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16542		return result, validation.NewError("web.AppsClient", "ListApplicationSettingsSlot", err.Error())
16543	}
16544
16545	req, err := client.ListApplicationSettingsSlotPreparer(ctx, resourceGroupName, name, slot)
16546	if err != nil {
16547		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", nil, "Failure preparing request")
16548		return
16549	}
16550
16551	resp, err := client.ListApplicationSettingsSlotSender(req)
16552	if err != nil {
16553		result.Response = autorest.Response{Response: resp}
16554		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure sending request")
16555		return
16556	}
16557
16558	result, err = client.ListApplicationSettingsSlotResponder(resp)
16559	if err != nil {
16560		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure responding to request")
16561		return
16562	}
16563
16564	return
16565}
16566
16567// ListApplicationSettingsSlotPreparer prepares the ListApplicationSettingsSlot request.
16568func (client AppsClient) ListApplicationSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
16569	pathParameters := map[string]interface{}{
16570		"name":              autorest.Encode("path", name),
16571		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16572		"slot":              autorest.Encode("path", slot),
16573		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16574	}
16575
16576	const APIVersion = "2018-02-01"
16577	queryParameters := map[string]interface{}{
16578		"api-version": APIVersion,
16579	}
16580
16581	preparer := autorest.CreatePreparer(
16582		autorest.AsPost(),
16583		autorest.WithBaseURL(client.BaseURI),
16584		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list", pathParameters),
16585		autorest.WithQueryParameters(queryParameters))
16586	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16587}
16588
16589// ListApplicationSettingsSlotSender sends the ListApplicationSettingsSlot request. The method will close the
16590// http.Response Body if it receives an error.
16591func (client AppsClient) ListApplicationSettingsSlotSender(req *http.Request) (*http.Response, error) {
16592	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16593}
16594
16595// ListApplicationSettingsSlotResponder handles the response to the ListApplicationSettingsSlot request. The method always
16596// closes the http.Response Body.
16597func (client AppsClient) ListApplicationSettingsSlotResponder(resp *http.Response) (result StringDictionary, err error) {
16598	err = autorest.Respond(
16599		resp,
16600		azure.WithErrorUnlessStatusCode(http.StatusOK),
16601		autorest.ByUnmarshallingJSON(&result),
16602		autorest.ByClosing())
16603	result.Response = autorest.Response{Response: resp}
16604	return
16605}
16606
16607// ListAzureStorageAccounts gets the Azure storage account configurations of an app.
16608// Parameters:
16609// resourceGroupName - name of the resource group to which the resource belongs.
16610// name - name of the app.
16611func (client AppsClient) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string) (result AzureStoragePropertyDictionaryResource, err error) {
16612	if tracing.IsEnabled() {
16613		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccounts")
16614		defer func() {
16615			sc := -1
16616			if result.Response.Response != nil {
16617				sc = result.Response.Response.StatusCode
16618			}
16619			tracing.EndSpan(ctx, sc, err)
16620		}()
16621	}
16622	if err := validation.Validate([]validation.Validation{
16623		{TargetValue: resourceGroupName,
16624			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16625				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16626				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16627		return result, validation.NewError("web.AppsClient", "ListAzureStorageAccounts", err.Error())
16628	}
16629
16630	req, err := client.ListAzureStorageAccountsPreparer(ctx, resourceGroupName, name)
16631	if err != nil {
16632		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", nil, "Failure preparing request")
16633		return
16634	}
16635
16636	resp, err := client.ListAzureStorageAccountsSender(req)
16637	if err != nil {
16638		result.Response = autorest.Response{Response: resp}
16639		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure sending request")
16640		return
16641	}
16642
16643	result, err = client.ListAzureStorageAccountsResponder(resp)
16644	if err != nil {
16645		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure responding to request")
16646		return
16647	}
16648
16649	return
16650}
16651
16652// ListAzureStorageAccountsPreparer prepares the ListAzureStorageAccounts request.
16653func (client AppsClient) ListAzureStorageAccountsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
16654	pathParameters := map[string]interface{}{
16655		"name":              autorest.Encode("path", name),
16656		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16657		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16658	}
16659
16660	const APIVersion = "2018-02-01"
16661	queryParameters := map[string]interface{}{
16662		"api-version": APIVersion,
16663	}
16664
16665	preparer := autorest.CreatePreparer(
16666		autorest.AsPost(),
16667		autorest.WithBaseURL(client.BaseURI),
16668		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list", pathParameters),
16669		autorest.WithQueryParameters(queryParameters))
16670	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16671}
16672
16673// ListAzureStorageAccountsSender sends the ListAzureStorageAccounts request. The method will close the
16674// http.Response Body if it receives an error.
16675func (client AppsClient) ListAzureStorageAccountsSender(req *http.Request) (*http.Response, error) {
16676	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16677}
16678
16679// ListAzureStorageAccountsResponder handles the response to the ListAzureStorageAccounts request. The method always
16680// closes the http.Response Body.
16681func (client AppsClient) ListAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
16682	err = autorest.Respond(
16683		resp,
16684		azure.WithErrorUnlessStatusCode(http.StatusOK),
16685		autorest.ByUnmarshallingJSON(&result),
16686		autorest.ByClosing())
16687	result.Response = autorest.Response{Response: resp}
16688	return
16689}
16690
16691// ListAzureStorageAccountsSlot gets the Azure storage account configurations of an app.
16692// Parameters:
16693// resourceGroupName - name of the resource group to which the resource belongs.
16694// name - name of the app.
16695// slot - name of the deployment slot. If a slot is not specified, the API will update the Azure storage
16696// account configurations for the production slot.
16697func (client AppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AzureStoragePropertyDictionaryResource, err error) {
16698	if tracing.IsEnabled() {
16699		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccountsSlot")
16700		defer func() {
16701			sc := -1
16702			if result.Response.Response != nil {
16703				sc = result.Response.Response.StatusCode
16704			}
16705			tracing.EndSpan(ctx, sc, err)
16706		}()
16707	}
16708	if err := validation.Validate([]validation.Validation{
16709		{TargetValue: resourceGroupName,
16710			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16711				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16712				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16713		return result, validation.NewError("web.AppsClient", "ListAzureStorageAccountsSlot", err.Error())
16714	}
16715
16716	req, err := client.ListAzureStorageAccountsSlotPreparer(ctx, resourceGroupName, name, slot)
16717	if err != nil {
16718		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", nil, "Failure preparing request")
16719		return
16720	}
16721
16722	resp, err := client.ListAzureStorageAccountsSlotSender(req)
16723	if err != nil {
16724		result.Response = autorest.Response{Response: resp}
16725		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure sending request")
16726		return
16727	}
16728
16729	result, err = client.ListAzureStorageAccountsSlotResponder(resp)
16730	if err != nil {
16731		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure responding to request")
16732		return
16733	}
16734
16735	return
16736}
16737
16738// ListAzureStorageAccountsSlotPreparer prepares the ListAzureStorageAccountsSlot request.
16739func (client AppsClient) ListAzureStorageAccountsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
16740	pathParameters := map[string]interface{}{
16741		"name":              autorest.Encode("path", name),
16742		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16743		"slot":              autorest.Encode("path", slot),
16744		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16745	}
16746
16747	const APIVersion = "2018-02-01"
16748	queryParameters := map[string]interface{}{
16749		"api-version": APIVersion,
16750	}
16751
16752	preparer := autorest.CreatePreparer(
16753		autorest.AsPost(),
16754		autorest.WithBaseURL(client.BaseURI),
16755		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list", pathParameters),
16756		autorest.WithQueryParameters(queryParameters))
16757	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16758}
16759
16760// ListAzureStorageAccountsSlotSender sends the ListAzureStorageAccountsSlot request. The method will close the
16761// http.Response Body if it receives an error.
16762func (client AppsClient) ListAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) {
16763	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16764}
16765
16766// ListAzureStorageAccountsSlotResponder handles the response to the ListAzureStorageAccountsSlot request. The method always
16767// closes the http.Response Body.
16768func (client AppsClient) ListAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
16769	err = autorest.Respond(
16770		resp,
16771		azure.WithErrorUnlessStatusCode(http.StatusOK),
16772		autorest.ByUnmarshallingJSON(&result),
16773		autorest.ByClosing())
16774	result.Response = autorest.Response{Response: resp}
16775	return
16776}
16777
16778// ListBackups gets existing backups of an app.
16779// Parameters:
16780// resourceGroupName - name of the resource group to which the resource belongs.
16781// name - name of the app.
16782func (client AppsClient) ListBackups(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionPage, err error) {
16783	if tracing.IsEnabled() {
16784		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups")
16785		defer func() {
16786			sc := -1
16787			if result.bic.Response.Response != nil {
16788				sc = result.bic.Response.Response.StatusCode
16789			}
16790			tracing.EndSpan(ctx, sc, err)
16791		}()
16792	}
16793	if err := validation.Validate([]validation.Validation{
16794		{TargetValue: resourceGroupName,
16795			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16796				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16797				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16798		return result, validation.NewError("web.AppsClient", "ListBackups", err.Error())
16799	}
16800
16801	result.fn = client.listBackupsNextResults
16802	req, err := client.ListBackupsPreparer(ctx, resourceGroupName, name)
16803	if err != nil {
16804		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", nil, "Failure preparing request")
16805		return
16806	}
16807
16808	resp, err := client.ListBackupsSender(req)
16809	if err != nil {
16810		result.bic.Response = autorest.Response{Response: resp}
16811		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure sending request")
16812		return
16813	}
16814
16815	result.bic, err = client.ListBackupsResponder(resp)
16816	if err != nil {
16817		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure responding to request")
16818		return
16819	}
16820	if result.bic.hasNextLink() && result.bic.IsEmpty() {
16821		err = result.NextWithContext(ctx)
16822		return
16823	}
16824
16825	return
16826}
16827
16828// ListBackupsPreparer prepares the ListBackups request.
16829func (client AppsClient) ListBackupsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
16830	pathParameters := map[string]interface{}{
16831		"name":              autorest.Encode("path", name),
16832		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16833		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16834	}
16835
16836	const APIVersion = "2018-02-01"
16837	queryParameters := map[string]interface{}{
16838		"api-version": APIVersion,
16839	}
16840
16841	preparer := autorest.CreatePreparer(
16842		autorest.AsGet(),
16843		autorest.WithBaseURL(client.BaseURI),
16844		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups", pathParameters),
16845		autorest.WithQueryParameters(queryParameters))
16846	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16847}
16848
16849// ListBackupsSender sends the ListBackups request. The method will close the
16850// http.Response Body if it receives an error.
16851func (client AppsClient) ListBackupsSender(req *http.Request) (*http.Response, error) {
16852	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16853}
16854
16855// ListBackupsResponder handles the response to the ListBackups request. The method always
16856// closes the http.Response Body.
16857func (client AppsClient) ListBackupsResponder(resp *http.Response) (result BackupItemCollection, err error) {
16858	err = autorest.Respond(
16859		resp,
16860		azure.WithErrorUnlessStatusCode(http.StatusOK),
16861		autorest.ByUnmarshallingJSON(&result),
16862		autorest.ByClosing())
16863	result.Response = autorest.Response{Response: resp}
16864	return
16865}
16866
16867// listBackupsNextResults retrieves the next set of results, if any.
16868func (client AppsClient) listBackupsNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) {
16869	req, err := lastResults.backupItemCollectionPreparer(ctx)
16870	if err != nil {
16871		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", nil, "Failure preparing next results request")
16872	}
16873	if req == nil {
16874		return
16875	}
16876	resp, err := client.ListBackupsSender(req)
16877	if err != nil {
16878		result.Response = autorest.Response{Response: resp}
16879		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure sending next results request")
16880	}
16881	result, err = client.ListBackupsResponder(resp)
16882	if err != nil {
16883		err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure responding to next results request")
16884	}
16885	return
16886}
16887
16888// ListBackupsComplete enumerates all values, automatically crossing page boundaries as required.
16889func (client AppsClient) ListBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionIterator, err error) {
16890	if tracing.IsEnabled() {
16891		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups")
16892		defer func() {
16893			sc := -1
16894			if result.Response().Response.Response != nil {
16895				sc = result.page.Response().Response.Response.StatusCode
16896			}
16897			tracing.EndSpan(ctx, sc, err)
16898		}()
16899	}
16900	result.page, err = client.ListBackups(ctx, resourceGroupName, name)
16901	return
16902}
16903
16904// ListBackupsSlot gets existing backups of an app.
16905// Parameters:
16906// resourceGroupName - name of the resource group to which the resource belongs.
16907// name - name of the app.
16908// slot - name of the deployment slot. If a slot is not specified, the API will get backups of the production
16909// slot.
16910func (client AppsClient) ListBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionPage, err error) {
16911	if tracing.IsEnabled() {
16912		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot")
16913		defer func() {
16914			sc := -1
16915			if result.bic.Response.Response != nil {
16916				sc = result.bic.Response.Response.StatusCode
16917			}
16918			tracing.EndSpan(ctx, sc, err)
16919		}()
16920	}
16921	if err := validation.Validate([]validation.Validation{
16922		{TargetValue: resourceGroupName,
16923			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16924				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16925				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16926		return result, validation.NewError("web.AppsClient", "ListBackupsSlot", err.Error())
16927	}
16928
16929	result.fn = client.listBackupsSlotNextResults
16930	req, err := client.ListBackupsSlotPreparer(ctx, resourceGroupName, name, slot)
16931	if err != nil {
16932		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", nil, "Failure preparing request")
16933		return
16934	}
16935
16936	resp, err := client.ListBackupsSlotSender(req)
16937	if err != nil {
16938		result.bic.Response = autorest.Response{Response: resp}
16939		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure sending request")
16940		return
16941	}
16942
16943	result.bic, err = client.ListBackupsSlotResponder(resp)
16944	if err != nil {
16945		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure responding to request")
16946		return
16947	}
16948	if result.bic.hasNextLink() && result.bic.IsEmpty() {
16949		err = result.NextWithContext(ctx)
16950		return
16951	}
16952
16953	return
16954}
16955
16956// ListBackupsSlotPreparer prepares the ListBackupsSlot request.
16957func (client AppsClient) ListBackupsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
16958	pathParameters := map[string]interface{}{
16959		"name":              autorest.Encode("path", name),
16960		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16961		"slot":              autorest.Encode("path", slot),
16962		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16963	}
16964
16965	const APIVersion = "2018-02-01"
16966	queryParameters := map[string]interface{}{
16967		"api-version": APIVersion,
16968	}
16969
16970	preparer := autorest.CreatePreparer(
16971		autorest.AsGet(),
16972		autorest.WithBaseURL(client.BaseURI),
16973		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups", pathParameters),
16974		autorest.WithQueryParameters(queryParameters))
16975	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16976}
16977
16978// ListBackupsSlotSender sends the ListBackupsSlot request. The method will close the
16979// http.Response Body if it receives an error.
16980func (client AppsClient) ListBackupsSlotSender(req *http.Request) (*http.Response, error) {
16981	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16982}
16983
16984// ListBackupsSlotResponder handles the response to the ListBackupsSlot request. The method always
16985// closes the http.Response Body.
16986func (client AppsClient) ListBackupsSlotResponder(resp *http.Response) (result BackupItemCollection, err error) {
16987	err = autorest.Respond(
16988		resp,
16989		azure.WithErrorUnlessStatusCode(http.StatusOK),
16990		autorest.ByUnmarshallingJSON(&result),
16991		autorest.ByClosing())
16992	result.Response = autorest.Response{Response: resp}
16993	return
16994}
16995
16996// listBackupsSlotNextResults retrieves the next set of results, if any.
16997func (client AppsClient) listBackupsSlotNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) {
16998	req, err := lastResults.backupItemCollectionPreparer(ctx)
16999	if err != nil {
17000		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", nil, "Failure preparing next results request")
17001	}
17002	if req == nil {
17003		return
17004	}
17005	resp, err := client.ListBackupsSlotSender(req)
17006	if err != nil {
17007		result.Response = autorest.Response{Response: resp}
17008		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure sending next results request")
17009	}
17010	result, err = client.ListBackupsSlotResponder(resp)
17011	if err != nil {
17012		err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure responding to next results request")
17013	}
17014	return
17015}
17016
17017// ListBackupsSlotComplete enumerates all values, automatically crossing page boundaries as required.
17018func (client AppsClient) ListBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionIterator, err error) {
17019	if tracing.IsEnabled() {
17020		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot")
17021		defer func() {
17022			sc := -1
17023			if result.Response().Response.Response != nil {
17024				sc = result.page.Response().Response.Response.StatusCode
17025			}
17026			tracing.EndSpan(ctx, sc, err)
17027		}()
17028	}
17029	result.page, err = client.ListBackupsSlot(ctx, resourceGroupName, name, slot)
17030	return
17031}
17032
17033// ListBackupStatusSecrets gets status of a web app backup that may be in progress, including secrets associated with
17034// the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is
17035// passed in the request body.
17036// Parameters:
17037// resourceGroupName - name of the resource group to which the resource belongs.
17038// name - name of web app.
17039// backupID - ID of backup.
17040// request - information on backup request.
17041func (client AppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (result BackupItem, err error) {
17042	if tracing.IsEnabled() {
17043		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecrets")
17044		defer func() {
17045			sc := -1
17046			if result.Response.Response != nil {
17047				sc = result.Response.Response.StatusCode
17048			}
17049			tracing.EndSpan(ctx, sc, err)
17050		}()
17051	}
17052	if err := validation.Validate([]validation.Validation{
17053		{TargetValue: resourceGroupName,
17054			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17055				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17056				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
17057		{TargetValue: request,
17058			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
17059				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
17060					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
17061						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
17062							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
17063							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
17064						}},
17065				}}}}}); err != nil {
17066		return result, validation.NewError("web.AppsClient", "ListBackupStatusSecrets", err.Error())
17067	}
17068
17069	req, err := client.ListBackupStatusSecretsPreparer(ctx, resourceGroupName, name, backupID, request)
17070	if err != nil {
17071		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", nil, "Failure preparing request")
17072		return
17073	}
17074
17075	resp, err := client.ListBackupStatusSecretsSender(req)
17076	if err != nil {
17077		result.Response = autorest.Response{Response: resp}
17078		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure sending request")
17079		return
17080	}
17081
17082	result, err = client.ListBackupStatusSecretsResponder(resp)
17083	if err != nil {
17084		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure responding to request")
17085		return
17086	}
17087
17088	return
17089}
17090
17091// ListBackupStatusSecretsPreparer prepares the ListBackupStatusSecrets request.
17092func (client AppsClient) ListBackupStatusSecretsPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (*http.Request, error) {
17093	pathParameters := map[string]interface{}{
17094		"backupId":          autorest.Encode("path", backupID),
17095		"name":              autorest.Encode("path", name),
17096		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17097		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17098	}
17099
17100	const APIVersion = "2018-02-01"
17101	queryParameters := map[string]interface{}{
17102		"api-version": APIVersion,
17103	}
17104
17105	preparer := autorest.CreatePreparer(
17106		autorest.AsContentType("application/json; charset=utf-8"),
17107		autorest.AsPost(),
17108		autorest.WithBaseURL(client.BaseURI),
17109		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list", pathParameters),
17110		autorest.WithJSON(request),
17111		autorest.WithQueryParameters(queryParameters))
17112	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17113}
17114
17115// ListBackupStatusSecretsSender sends the ListBackupStatusSecrets request. The method will close the
17116// http.Response Body if it receives an error.
17117func (client AppsClient) ListBackupStatusSecretsSender(req *http.Request) (*http.Response, error) {
17118	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17119}
17120
17121// ListBackupStatusSecretsResponder handles the response to the ListBackupStatusSecrets request. The method always
17122// closes the http.Response Body.
17123func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) (result BackupItem, err error) {
17124	err = autorest.Respond(
17125		resp,
17126		azure.WithErrorUnlessStatusCode(http.StatusOK),
17127		autorest.ByUnmarshallingJSON(&result),
17128		autorest.ByClosing())
17129	result.Response = autorest.Response{Response: resp}
17130	return
17131}
17132
17133// ListBackupStatusSecretsSlot gets status of a web app backup that may be in progress, including secrets associated
17134// with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new
17135// URL is passed in the request body.
17136// Parameters:
17137// resourceGroupName - name of the resource group to which the resource belongs.
17138// name - name of web app.
17139// backupID - ID of backup.
17140// request - information on backup request.
17141// slot - name of web app slot. If not specified then will default to production slot.
17142func (client AppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (result BackupItem, err error) {
17143	if tracing.IsEnabled() {
17144		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecretsSlot")
17145		defer func() {
17146			sc := -1
17147			if result.Response.Response != nil {
17148				sc = result.Response.Response.StatusCode
17149			}
17150			tracing.EndSpan(ctx, sc, err)
17151		}()
17152	}
17153	if err := validation.Validate([]validation.Validation{
17154		{TargetValue: resourceGroupName,
17155			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17156				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17157				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
17158		{TargetValue: request,
17159			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
17160				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
17161					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
17162						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
17163							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
17164							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
17165						}},
17166				}}}}}); err != nil {
17167		return result, validation.NewError("web.AppsClient", "ListBackupStatusSecretsSlot", err.Error())
17168	}
17169
17170	req, err := client.ListBackupStatusSecretsSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot)
17171	if err != nil {
17172		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", nil, "Failure preparing request")
17173		return
17174	}
17175
17176	resp, err := client.ListBackupStatusSecretsSlotSender(req)
17177	if err != nil {
17178		result.Response = autorest.Response{Response: resp}
17179		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure sending request")
17180		return
17181	}
17182
17183	result, err = client.ListBackupStatusSecretsSlotResponder(resp)
17184	if err != nil {
17185		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure responding to request")
17186		return
17187	}
17188
17189	return
17190}
17191
17192// ListBackupStatusSecretsSlotPreparer prepares the ListBackupStatusSecretsSlot request.
17193func (client AppsClient) ListBackupStatusSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (*http.Request, error) {
17194	pathParameters := map[string]interface{}{
17195		"backupId":          autorest.Encode("path", backupID),
17196		"name":              autorest.Encode("path", name),
17197		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17198		"slot":              autorest.Encode("path", slot),
17199		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17200	}
17201
17202	const APIVersion = "2018-02-01"
17203	queryParameters := map[string]interface{}{
17204		"api-version": APIVersion,
17205	}
17206
17207	preparer := autorest.CreatePreparer(
17208		autorest.AsContentType("application/json; charset=utf-8"),
17209		autorest.AsPost(),
17210		autorest.WithBaseURL(client.BaseURI),
17211		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list", pathParameters),
17212		autorest.WithJSON(request),
17213		autorest.WithQueryParameters(queryParameters))
17214	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17215}
17216
17217// ListBackupStatusSecretsSlotSender sends the ListBackupStatusSecretsSlot request. The method will close the
17218// http.Response Body if it receives an error.
17219func (client AppsClient) ListBackupStatusSecretsSlotSender(req *http.Request) (*http.Response, error) {
17220	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17221}
17222
17223// ListBackupStatusSecretsSlotResponder handles the response to the ListBackupStatusSecretsSlot request. The method always
17224// closes the http.Response Body.
17225func (client AppsClient) ListBackupStatusSecretsSlotResponder(resp *http.Response) (result BackupItem, err error) {
17226	err = autorest.Respond(
17227		resp,
17228		azure.WithErrorUnlessStatusCode(http.StatusOK),
17229		autorest.ByUnmarshallingJSON(&result),
17230		autorest.ByClosing())
17231	result.Response = autorest.Response{Response: resp}
17232	return
17233}
17234
17235// ListByResourceGroup gets all web, mobile, and API apps in the specified resource group.
17236// Parameters:
17237// resourceGroupName - name of the resource group to which the resource belongs.
17238// includeSlots - specify <strong>true</strong> to include deployment slots in results. The default is false,
17239// which only gives you the production slot of all apps.
17240func (client AppsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionPage, err error) {
17241	if tracing.IsEnabled() {
17242		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup")
17243		defer func() {
17244			sc := -1
17245			if result.ac.Response.Response != nil {
17246				sc = result.ac.Response.Response.StatusCode
17247			}
17248			tracing.EndSpan(ctx, sc, err)
17249		}()
17250	}
17251	if err := validation.Validate([]validation.Validation{
17252		{TargetValue: resourceGroupName,
17253			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17254				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17255				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17256		return result, validation.NewError("web.AppsClient", "ListByResourceGroup", err.Error())
17257	}
17258
17259	result.fn = client.listByResourceGroupNextResults
17260	req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, includeSlots)
17261	if err != nil {
17262		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", nil, "Failure preparing request")
17263		return
17264	}
17265
17266	resp, err := client.ListByResourceGroupSender(req)
17267	if err != nil {
17268		result.ac.Response = autorest.Response{Response: resp}
17269		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure sending request")
17270		return
17271	}
17272
17273	result.ac, err = client.ListByResourceGroupResponder(resp)
17274	if err != nil {
17275		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure responding to request")
17276		return
17277	}
17278	if result.ac.hasNextLink() && result.ac.IsEmpty() {
17279		err = result.NextWithContext(ctx)
17280		return
17281	}
17282
17283	return
17284}
17285
17286// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
17287func (client AppsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, includeSlots *bool) (*http.Request, error) {
17288	pathParameters := map[string]interface{}{
17289		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17290		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17291	}
17292
17293	const APIVersion = "2018-02-01"
17294	queryParameters := map[string]interface{}{
17295		"api-version": APIVersion,
17296	}
17297	if includeSlots != nil {
17298		queryParameters["includeSlots"] = autorest.Encode("query", *includeSlots)
17299	}
17300
17301	preparer := autorest.CreatePreparer(
17302		autorest.AsGet(),
17303		autorest.WithBaseURL(client.BaseURI),
17304		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites", pathParameters),
17305		autorest.WithQueryParameters(queryParameters))
17306	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17307}
17308
17309// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
17310// http.Response Body if it receives an error.
17311func (client AppsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
17312	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17313}
17314
17315// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
17316// closes the http.Response Body.
17317func (client AppsClient) ListByResourceGroupResponder(resp *http.Response) (result AppCollection, err error) {
17318	err = autorest.Respond(
17319		resp,
17320		azure.WithErrorUnlessStatusCode(http.StatusOK),
17321		autorest.ByUnmarshallingJSON(&result),
17322		autorest.ByClosing())
17323	result.Response = autorest.Response{Response: resp}
17324	return
17325}
17326
17327// listByResourceGroupNextResults retrieves the next set of results, if any.
17328func (client AppsClient) listByResourceGroupNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) {
17329	req, err := lastResults.appCollectionPreparer(ctx)
17330	if err != nil {
17331		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
17332	}
17333	if req == nil {
17334		return
17335	}
17336	resp, err := client.ListByResourceGroupSender(req)
17337	if err != nil {
17338		result.Response = autorest.Response{Response: resp}
17339		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
17340	}
17341	result, err = client.ListByResourceGroupResponder(resp)
17342	if err != nil {
17343		err = autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
17344	}
17345	return
17346}
17347
17348// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
17349func (client AppsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionIterator, err error) {
17350	if tracing.IsEnabled() {
17351		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup")
17352		defer func() {
17353			sc := -1
17354			if result.Response().Response.Response != nil {
17355				sc = result.page.Response().Response.Response.StatusCode
17356			}
17357			tracing.EndSpan(ctx, sc, err)
17358		}()
17359	}
17360	result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, includeSlots)
17361	return
17362}
17363
17364// ListConfigurations list the configurations of an app
17365// Parameters:
17366// resourceGroupName - name of the resource group to which the resource belongs.
17367// name - name of the app.
17368func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionPage, err error) {
17369	if tracing.IsEnabled() {
17370		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations")
17371		defer func() {
17372			sc := -1
17373			if result.scrc.Response.Response != nil {
17374				sc = result.scrc.Response.Response.StatusCode
17375			}
17376			tracing.EndSpan(ctx, sc, err)
17377		}()
17378	}
17379	if err := validation.Validate([]validation.Validation{
17380		{TargetValue: resourceGroupName,
17381			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17382				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17383				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17384		return result, validation.NewError("web.AppsClient", "ListConfigurations", err.Error())
17385	}
17386
17387	result.fn = client.listConfigurationsNextResults
17388	req, err := client.ListConfigurationsPreparer(ctx, resourceGroupName, name)
17389	if err != nil {
17390		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", nil, "Failure preparing request")
17391		return
17392	}
17393
17394	resp, err := client.ListConfigurationsSender(req)
17395	if err != nil {
17396		result.scrc.Response = autorest.Response{Response: resp}
17397		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure sending request")
17398		return
17399	}
17400
17401	result.scrc, err = client.ListConfigurationsResponder(resp)
17402	if err != nil {
17403		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure responding to request")
17404		return
17405	}
17406	if result.scrc.hasNextLink() && result.scrc.IsEmpty() {
17407		err = result.NextWithContext(ctx)
17408		return
17409	}
17410
17411	return
17412}
17413
17414// ListConfigurationsPreparer prepares the ListConfigurations request.
17415func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
17416	pathParameters := map[string]interface{}{
17417		"name":              autorest.Encode("path", name),
17418		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17419		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17420	}
17421
17422	const APIVersion = "2018-02-01"
17423	queryParameters := map[string]interface{}{
17424		"api-version": APIVersion,
17425	}
17426
17427	preparer := autorest.CreatePreparer(
17428		autorest.AsGet(),
17429		autorest.WithBaseURL(client.BaseURI),
17430		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config", pathParameters),
17431		autorest.WithQueryParameters(queryParameters))
17432	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17433}
17434
17435// ListConfigurationsSender sends the ListConfigurations request. The method will close the
17436// http.Response Body if it receives an error.
17437func (client AppsClient) ListConfigurationsSender(req *http.Request) (*http.Response, error) {
17438	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17439}
17440
17441// ListConfigurationsResponder handles the response to the ListConfigurations request. The method always
17442// closes the http.Response Body.
17443func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) {
17444	err = autorest.Respond(
17445		resp,
17446		azure.WithErrorUnlessStatusCode(http.StatusOK),
17447		autorest.ByUnmarshallingJSON(&result),
17448		autorest.ByClosing())
17449	result.Response = autorest.Response{Response: resp}
17450	return
17451}
17452
17453// listConfigurationsNextResults retrieves the next set of results, if any.
17454func (client AppsClient) listConfigurationsNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) {
17455	req, err := lastResults.siteConfigResourceCollectionPreparer(ctx)
17456	if err != nil {
17457		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", nil, "Failure preparing next results request")
17458	}
17459	if req == nil {
17460		return
17461	}
17462	resp, err := client.ListConfigurationsSender(req)
17463	if err != nil {
17464		result.Response = autorest.Response{Response: resp}
17465		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure sending next results request")
17466	}
17467	result, err = client.ListConfigurationsResponder(resp)
17468	if err != nil {
17469		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure responding to next results request")
17470	}
17471	return
17472}
17473
17474// ListConfigurationsComplete enumerates all values, automatically crossing page boundaries as required.
17475func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionIterator, err error) {
17476	if tracing.IsEnabled() {
17477		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations")
17478		defer func() {
17479			sc := -1
17480			if result.Response().Response.Response != nil {
17481				sc = result.page.Response().Response.Response.StatusCode
17482			}
17483			tracing.EndSpan(ctx, sc, err)
17484		}()
17485	}
17486	result.page, err = client.ListConfigurations(ctx, resourceGroupName, name)
17487	return
17488}
17489
17490// ListConfigurationSnapshotInfo gets a list of web app configuration snapshots identifiers. Each element of the list
17491// contains a timestamp and the ID of the snapshot.
17492// Parameters:
17493// resourceGroupName - name of the resource group to which the resource belongs.
17494// name - name of the app.
17495func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) {
17496	if tracing.IsEnabled() {
17497		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo")
17498		defer func() {
17499			sc := -1
17500			if result.scsic.Response.Response != nil {
17501				sc = result.scsic.Response.Response.StatusCode
17502			}
17503			tracing.EndSpan(ctx, sc, err)
17504		}()
17505	}
17506	if err := validation.Validate([]validation.Validation{
17507		{TargetValue: resourceGroupName,
17508			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17509				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17510				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17511		return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfo", err.Error())
17512	}
17513
17514	result.fn = client.listConfigurationSnapshotInfoNextResults
17515	req, err := client.ListConfigurationSnapshotInfoPreparer(ctx, resourceGroupName, name)
17516	if err != nil {
17517		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", nil, "Failure preparing request")
17518		return
17519	}
17520
17521	resp, err := client.ListConfigurationSnapshotInfoSender(req)
17522	if err != nil {
17523		result.scsic.Response = autorest.Response{Response: resp}
17524		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure sending request")
17525		return
17526	}
17527
17528	result.scsic, err = client.ListConfigurationSnapshotInfoResponder(resp)
17529	if err != nil {
17530		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure responding to request")
17531		return
17532	}
17533	if result.scsic.hasNextLink() && result.scsic.IsEmpty() {
17534		err = result.NextWithContext(ctx)
17535		return
17536	}
17537
17538	return
17539}
17540
17541// ListConfigurationSnapshotInfoPreparer prepares the ListConfigurationSnapshotInfo request.
17542func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
17543	pathParameters := map[string]interface{}{
17544		"name":              autorest.Encode("path", name),
17545		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17546		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17547	}
17548
17549	const APIVersion = "2018-02-01"
17550	queryParameters := map[string]interface{}{
17551		"api-version": APIVersion,
17552	}
17553
17554	preparer := autorest.CreatePreparer(
17555		autorest.AsGet(),
17556		autorest.WithBaseURL(client.BaseURI),
17557		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots", pathParameters),
17558		autorest.WithQueryParameters(queryParameters))
17559	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17560}
17561
17562// ListConfigurationSnapshotInfoSender sends the ListConfigurationSnapshotInfo request. The method will close the
17563// http.Response Body if it receives an error.
17564func (client AppsClient) ListConfigurationSnapshotInfoSender(req *http.Request) (*http.Response, error) {
17565	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17566}
17567
17568// ListConfigurationSnapshotInfoResponder handles the response to the ListConfigurationSnapshotInfo request. The method always
17569// closes the http.Response Body.
17570func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) {
17571	err = autorest.Respond(
17572		resp,
17573		azure.WithErrorUnlessStatusCode(http.StatusOK),
17574		autorest.ByUnmarshallingJSON(&result),
17575		autorest.ByClosing())
17576	result.Response = autorest.Response{Response: resp}
17577	return
17578}
17579
17580// listConfigurationSnapshotInfoNextResults retrieves the next set of results, if any.
17581func (client AppsClient) listConfigurationSnapshotInfoNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) {
17582	req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx)
17583	if err != nil {
17584		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", nil, "Failure preparing next results request")
17585	}
17586	if req == nil {
17587		return
17588	}
17589	resp, err := client.ListConfigurationSnapshotInfoSender(req)
17590	if err != nil {
17591		result.Response = autorest.Response{Response: resp}
17592		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure sending next results request")
17593	}
17594	result, err = client.ListConfigurationSnapshotInfoResponder(resp)
17595	if err != nil {
17596		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure responding to next results request")
17597	}
17598	return
17599}
17600
17601// ListConfigurationSnapshotInfoComplete enumerates all values, automatically crossing page boundaries as required.
17602func (client AppsClient) ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) {
17603	if tracing.IsEnabled() {
17604		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo")
17605		defer func() {
17606			sc := -1
17607			if result.Response().Response.Response != nil {
17608				sc = result.page.Response().Response.Response.StatusCode
17609			}
17610			tracing.EndSpan(ctx, sc, err)
17611		}()
17612	}
17613	result.page, err = client.ListConfigurationSnapshotInfo(ctx, resourceGroupName, name)
17614	return
17615}
17616
17617// ListConfigurationSnapshotInfoSlot gets a list of web app configuration snapshots identifiers. Each element of the
17618// list contains a timestamp and the ID of the snapshot.
17619// Parameters:
17620// resourceGroupName - name of the resource group to which the resource belongs.
17621// name - name of the app.
17622// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
17623// production slot.
17624func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) {
17625	if tracing.IsEnabled() {
17626		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot")
17627		defer func() {
17628			sc := -1
17629			if result.scsic.Response.Response != nil {
17630				sc = result.scsic.Response.Response.StatusCode
17631			}
17632			tracing.EndSpan(ctx, sc, err)
17633		}()
17634	}
17635	if err := validation.Validate([]validation.Validation{
17636		{TargetValue: resourceGroupName,
17637			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17638				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17639				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17640		return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfoSlot", err.Error())
17641	}
17642
17643	result.fn = client.listConfigurationSnapshotInfoSlotNextResults
17644	req, err := client.ListConfigurationSnapshotInfoSlotPreparer(ctx, resourceGroupName, name, slot)
17645	if err != nil {
17646		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", nil, "Failure preparing request")
17647		return
17648	}
17649
17650	resp, err := client.ListConfigurationSnapshotInfoSlotSender(req)
17651	if err != nil {
17652		result.scsic.Response = autorest.Response{Response: resp}
17653		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure sending request")
17654		return
17655	}
17656
17657	result.scsic, err = client.ListConfigurationSnapshotInfoSlotResponder(resp)
17658	if err != nil {
17659		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure responding to request")
17660		return
17661	}
17662	if result.scsic.hasNextLink() && result.scsic.IsEmpty() {
17663		err = result.NextWithContext(ctx)
17664		return
17665	}
17666
17667	return
17668}
17669
17670// ListConfigurationSnapshotInfoSlotPreparer prepares the ListConfigurationSnapshotInfoSlot request.
17671func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
17672	pathParameters := map[string]interface{}{
17673		"name":              autorest.Encode("path", name),
17674		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17675		"slot":              autorest.Encode("path", slot),
17676		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17677	}
17678
17679	const APIVersion = "2018-02-01"
17680	queryParameters := map[string]interface{}{
17681		"api-version": APIVersion,
17682	}
17683
17684	preparer := autorest.CreatePreparer(
17685		autorest.AsGet(),
17686		autorest.WithBaseURL(client.BaseURI),
17687		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots", pathParameters),
17688		autorest.WithQueryParameters(queryParameters))
17689	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17690}
17691
17692// ListConfigurationSnapshotInfoSlotSender sends the ListConfigurationSnapshotInfoSlot request. The method will close the
17693// http.Response Body if it receives an error.
17694func (client AppsClient) ListConfigurationSnapshotInfoSlotSender(req *http.Request) (*http.Response, error) {
17695	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17696}
17697
17698// ListConfigurationSnapshotInfoSlotResponder handles the response to the ListConfigurationSnapshotInfoSlot request. The method always
17699// closes the http.Response Body.
17700func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) {
17701	err = autorest.Respond(
17702		resp,
17703		azure.WithErrorUnlessStatusCode(http.StatusOK),
17704		autorest.ByUnmarshallingJSON(&result),
17705		autorest.ByClosing())
17706	result.Response = autorest.Response{Response: resp}
17707	return
17708}
17709
17710// listConfigurationSnapshotInfoSlotNextResults retrieves the next set of results, if any.
17711func (client AppsClient) listConfigurationSnapshotInfoSlotNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) {
17712	req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx)
17713	if err != nil {
17714		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", nil, "Failure preparing next results request")
17715	}
17716	if req == nil {
17717		return
17718	}
17719	resp, err := client.ListConfigurationSnapshotInfoSlotSender(req)
17720	if err != nil {
17721		result.Response = autorest.Response{Response: resp}
17722		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure sending next results request")
17723	}
17724	result, err = client.ListConfigurationSnapshotInfoSlotResponder(resp)
17725	if err != nil {
17726		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure responding to next results request")
17727	}
17728	return
17729}
17730
17731// ListConfigurationSnapshotInfoSlotComplete enumerates all values, automatically crossing page boundaries as required.
17732func (client AppsClient) ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) {
17733	if tracing.IsEnabled() {
17734		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot")
17735		defer func() {
17736			sc := -1
17737			if result.Response().Response.Response != nil {
17738				sc = result.page.Response().Response.Response.StatusCode
17739			}
17740			tracing.EndSpan(ctx, sc, err)
17741		}()
17742	}
17743	result.page, err = client.ListConfigurationSnapshotInfoSlot(ctx, resourceGroupName, name, slot)
17744	return
17745}
17746
17747// ListConfigurationsSlot list the configurations of an app
17748// Parameters:
17749// resourceGroupName - name of the resource group to which the resource belongs.
17750// name - name of the app.
17751// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
17752// production slot.
17753func (client AppsClient) ListConfigurationsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionPage, err error) {
17754	if tracing.IsEnabled() {
17755		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot")
17756		defer func() {
17757			sc := -1
17758			if result.scrc.Response.Response != nil {
17759				sc = result.scrc.Response.Response.StatusCode
17760			}
17761			tracing.EndSpan(ctx, sc, err)
17762		}()
17763	}
17764	if err := validation.Validate([]validation.Validation{
17765		{TargetValue: resourceGroupName,
17766			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17767				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17768				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17769		return result, validation.NewError("web.AppsClient", "ListConfigurationsSlot", err.Error())
17770	}
17771
17772	result.fn = client.listConfigurationsSlotNextResults
17773	req, err := client.ListConfigurationsSlotPreparer(ctx, resourceGroupName, name, slot)
17774	if err != nil {
17775		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", nil, "Failure preparing request")
17776		return
17777	}
17778
17779	resp, err := client.ListConfigurationsSlotSender(req)
17780	if err != nil {
17781		result.scrc.Response = autorest.Response{Response: resp}
17782		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure sending request")
17783		return
17784	}
17785
17786	result.scrc, err = client.ListConfigurationsSlotResponder(resp)
17787	if err != nil {
17788		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure responding to request")
17789		return
17790	}
17791	if result.scrc.hasNextLink() && result.scrc.IsEmpty() {
17792		err = result.NextWithContext(ctx)
17793		return
17794	}
17795
17796	return
17797}
17798
17799// ListConfigurationsSlotPreparer prepares the ListConfigurationsSlot request.
17800func (client AppsClient) ListConfigurationsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
17801	pathParameters := map[string]interface{}{
17802		"name":              autorest.Encode("path", name),
17803		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17804		"slot":              autorest.Encode("path", slot),
17805		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17806	}
17807
17808	const APIVersion = "2018-02-01"
17809	queryParameters := map[string]interface{}{
17810		"api-version": APIVersion,
17811	}
17812
17813	preparer := autorest.CreatePreparer(
17814		autorest.AsGet(),
17815		autorest.WithBaseURL(client.BaseURI),
17816		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config", pathParameters),
17817		autorest.WithQueryParameters(queryParameters))
17818	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17819}
17820
17821// ListConfigurationsSlotSender sends the ListConfigurationsSlot request. The method will close the
17822// http.Response Body if it receives an error.
17823func (client AppsClient) ListConfigurationsSlotSender(req *http.Request) (*http.Response, error) {
17824	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17825}
17826
17827// ListConfigurationsSlotResponder handles the response to the ListConfigurationsSlot request. The method always
17828// closes the http.Response Body.
17829func (client AppsClient) ListConfigurationsSlotResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) {
17830	err = autorest.Respond(
17831		resp,
17832		azure.WithErrorUnlessStatusCode(http.StatusOK),
17833		autorest.ByUnmarshallingJSON(&result),
17834		autorest.ByClosing())
17835	result.Response = autorest.Response{Response: resp}
17836	return
17837}
17838
17839// listConfigurationsSlotNextResults retrieves the next set of results, if any.
17840func (client AppsClient) listConfigurationsSlotNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) {
17841	req, err := lastResults.siteConfigResourceCollectionPreparer(ctx)
17842	if err != nil {
17843		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", nil, "Failure preparing next results request")
17844	}
17845	if req == nil {
17846		return
17847	}
17848	resp, err := client.ListConfigurationsSlotSender(req)
17849	if err != nil {
17850		result.Response = autorest.Response{Response: resp}
17851		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure sending next results request")
17852	}
17853	result, err = client.ListConfigurationsSlotResponder(resp)
17854	if err != nil {
17855		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure responding to next results request")
17856	}
17857	return
17858}
17859
17860// ListConfigurationsSlotComplete enumerates all values, automatically crossing page boundaries as required.
17861func (client AppsClient) ListConfigurationsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionIterator, err error) {
17862	if tracing.IsEnabled() {
17863		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot")
17864		defer func() {
17865			sc := -1
17866			if result.Response().Response.Response != nil {
17867				sc = result.page.Response().Response.Response.StatusCode
17868			}
17869			tracing.EndSpan(ctx, sc, err)
17870		}()
17871	}
17872	result.page, err = client.ListConfigurationsSlot(ctx, resourceGroupName, name, slot)
17873	return
17874}
17875
17876// ListConnectionStrings gets the connection strings of an app.
17877// Parameters:
17878// resourceGroupName - name of the resource group to which the resource belongs.
17879// name - name of the app.
17880func (client AppsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string) (result ConnectionStringDictionary, err error) {
17881	if tracing.IsEnabled() {
17882		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStrings")
17883		defer func() {
17884			sc := -1
17885			if result.Response.Response != nil {
17886				sc = result.Response.Response.StatusCode
17887			}
17888			tracing.EndSpan(ctx, sc, err)
17889		}()
17890	}
17891	if err := validation.Validate([]validation.Validation{
17892		{TargetValue: resourceGroupName,
17893			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17894				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17895				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17896		return result, validation.NewError("web.AppsClient", "ListConnectionStrings", err.Error())
17897	}
17898
17899	req, err := client.ListConnectionStringsPreparer(ctx, resourceGroupName, name)
17900	if err != nil {
17901		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", nil, "Failure preparing request")
17902		return
17903	}
17904
17905	resp, err := client.ListConnectionStringsSender(req)
17906	if err != nil {
17907		result.Response = autorest.Response{Response: resp}
17908		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure sending request")
17909		return
17910	}
17911
17912	result, err = client.ListConnectionStringsResponder(resp)
17913	if err != nil {
17914		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure responding to request")
17915		return
17916	}
17917
17918	return
17919}
17920
17921// ListConnectionStringsPreparer prepares the ListConnectionStrings request.
17922func (client AppsClient) ListConnectionStringsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
17923	pathParameters := map[string]interface{}{
17924		"name":              autorest.Encode("path", name),
17925		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17926		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17927	}
17928
17929	const APIVersion = "2018-02-01"
17930	queryParameters := map[string]interface{}{
17931		"api-version": APIVersion,
17932	}
17933
17934	preparer := autorest.CreatePreparer(
17935		autorest.AsPost(),
17936		autorest.WithBaseURL(client.BaseURI),
17937		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list", pathParameters),
17938		autorest.WithQueryParameters(queryParameters))
17939	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17940}
17941
17942// ListConnectionStringsSender sends the ListConnectionStrings request. The method will close the
17943// http.Response Body if it receives an error.
17944func (client AppsClient) ListConnectionStringsSender(req *http.Request) (*http.Response, error) {
17945	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17946}
17947
17948// ListConnectionStringsResponder handles the response to the ListConnectionStrings request. The method always
17949// closes the http.Response Body.
17950func (client AppsClient) ListConnectionStringsResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
17951	err = autorest.Respond(
17952		resp,
17953		azure.WithErrorUnlessStatusCode(http.StatusOK),
17954		autorest.ByUnmarshallingJSON(&result),
17955		autorest.ByClosing())
17956	result.Response = autorest.Response{Response: resp}
17957	return
17958}
17959
17960// ListConnectionStringsSlot gets the connection strings of an app.
17961// Parameters:
17962// resourceGroupName - name of the resource group to which the resource belongs.
17963// name - name of the app.
17964// slot - name of the deployment slot. If a slot is not specified, the API will get the connection settings for
17965// the production slot.
17966func (client AppsClient) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ConnectionStringDictionary, err error) {
17967	if tracing.IsEnabled() {
17968		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStringsSlot")
17969		defer func() {
17970			sc := -1
17971			if result.Response.Response != nil {
17972				sc = result.Response.Response.StatusCode
17973			}
17974			tracing.EndSpan(ctx, sc, err)
17975		}()
17976	}
17977	if err := validation.Validate([]validation.Validation{
17978		{TargetValue: resourceGroupName,
17979			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17980				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17981				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17982		return result, validation.NewError("web.AppsClient", "ListConnectionStringsSlot", err.Error())
17983	}
17984
17985	req, err := client.ListConnectionStringsSlotPreparer(ctx, resourceGroupName, name, slot)
17986	if err != nil {
17987		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", nil, "Failure preparing request")
17988		return
17989	}
17990
17991	resp, err := client.ListConnectionStringsSlotSender(req)
17992	if err != nil {
17993		result.Response = autorest.Response{Response: resp}
17994		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure sending request")
17995		return
17996	}
17997
17998	result, err = client.ListConnectionStringsSlotResponder(resp)
17999	if err != nil {
18000		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure responding to request")
18001		return
18002	}
18003
18004	return
18005}
18006
18007// ListConnectionStringsSlotPreparer prepares the ListConnectionStringsSlot request.
18008func (client AppsClient) ListConnectionStringsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
18009	pathParameters := map[string]interface{}{
18010		"name":              autorest.Encode("path", name),
18011		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18012		"slot":              autorest.Encode("path", slot),
18013		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18014	}
18015
18016	const APIVersion = "2018-02-01"
18017	queryParameters := map[string]interface{}{
18018		"api-version": APIVersion,
18019	}
18020
18021	preparer := autorest.CreatePreparer(
18022		autorest.AsPost(),
18023		autorest.WithBaseURL(client.BaseURI),
18024		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list", pathParameters),
18025		autorest.WithQueryParameters(queryParameters))
18026	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18027}
18028
18029// ListConnectionStringsSlotSender sends the ListConnectionStringsSlot request. The method will close the
18030// http.Response Body if it receives an error.
18031func (client AppsClient) ListConnectionStringsSlotSender(req *http.Request) (*http.Response, error) {
18032	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18033}
18034
18035// ListConnectionStringsSlotResponder handles the response to the ListConnectionStringsSlot request. The method always
18036// closes the http.Response Body.
18037func (client AppsClient) ListConnectionStringsSlotResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
18038	err = autorest.Respond(
18039		resp,
18040		azure.WithErrorUnlessStatusCode(http.StatusOK),
18041		autorest.ByUnmarshallingJSON(&result),
18042		autorest.ByClosing())
18043	result.Response = autorest.Response{Response: resp}
18044	return
18045}
18046
18047// ListContinuousWebJobs list continuous web jobs for an app, or a deployment slot.
18048// Parameters:
18049// resourceGroupName - name of the resource group to which the resource belongs.
18050// name - site name.
18051func (client AppsClient) ListContinuousWebJobs(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionPage, err error) {
18052	if tracing.IsEnabled() {
18053		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs")
18054		defer func() {
18055			sc := -1
18056			if result.cwjc.Response.Response != nil {
18057				sc = result.cwjc.Response.Response.StatusCode
18058			}
18059			tracing.EndSpan(ctx, sc, err)
18060		}()
18061	}
18062	if err := validation.Validate([]validation.Validation{
18063		{TargetValue: resourceGroupName,
18064			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18065				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18066				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18067		return result, validation.NewError("web.AppsClient", "ListContinuousWebJobs", err.Error())
18068	}
18069
18070	result.fn = client.listContinuousWebJobsNextResults
18071	req, err := client.ListContinuousWebJobsPreparer(ctx, resourceGroupName, name)
18072	if err != nil {
18073		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", nil, "Failure preparing request")
18074		return
18075	}
18076
18077	resp, err := client.ListContinuousWebJobsSender(req)
18078	if err != nil {
18079		result.cwjc.Response = autorest.Response{Response: resp}
18080		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure sending request")
18081		return
18082	}
18083
18084	result.cwjc, err = client.ListContinuousWebJobsResponder(resp)
18085	if err != nil {
18086		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure responding to request")
18087		return
18088	}
18089	if result.cwjc.hasNextLink() && result.cwjc.IsEmpty() {
18090		err = result.NextWithContext(ctx)
18091		return
18092	}
18093
18094	return
18095}
18096
18097// ListContinuousWebJobsPreparer prepares the ListContinuousWebJobs request.
18098func (client AppsClient) ListContinuousWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
18099	pathParameters := map[string]interface{}{
18100		"name":              autorest.Encode("path", name),
18101		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18102		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18103	}
18104
18105	const APIVersion = "2018-02-01"
18106	queryParameters := map[string]interface{}{
18107		"api-version": APIVersion,
18108	}
18109
18110	preparer := autorest.CreatePreparer(
18111		autorest.AsGet(),
18112		autorest.WithBaseURL(client.BaseURI),
18113		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs", pathParameters),
18114		autorest.WithQueryParameters(queryParameters))
18115	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18116}
18117
18118// ListContinuousWebJobsSender sends the ListContinuousWebJobs request. The method will close the
18119// http.Response Body if it receives an error.
18120func (client AppsClient) ListContinuousWebJobsSender(req *http.Request) (*http.Response, error) {
18121	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18122}
18123
18124// ListContinuousWebJobsResponder handles the response to the ListContinuousWebJobs request. The method always
18125// closes the http.Response Body.
18126func (client AppsClient) ListContinuousWebJobsResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) {
18127	err = autorest.Respond(
18128		resp,
18129		azure.WithErrorUnlessStatusCode(http.StatusOK),
18130		autorest.ByUnmarshallingJSON(&result),
18131		autorest.ByClosing())
18132	result.Response = autorest.Response{Response: resp}
18133	return
18134}
18135
18136// listContinuousWebJobsNextResults retrieves the next set of results, if any.
18137func (client AppsClient) listContinuousWebJobsNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) {
18138	req, err := lastResults.continuousWebJobCollectionPreparer(ctx)
18139	if err != nil {
18140		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", nil, "Failure preparing next results request")
18141	}
18142	if req == nil {
18143		return
18144	}
18145	resp, err := client.ListContinuousWebJobsSender(req)
18146	if err != nil {
18147		result.Response = autorest.Response{Response: resp}
18148		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure sending next results request")
18149	}
18150	result, err = client.ListContinuousWebJobsResponder(resp)
18151	if err != nil {
18152		err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure responding to next results request")
18153	}
18154	return
18155}
18156
18157// ListContinuousWebJobsComplete enumerates all values, automatically crossing page boundaries as required.
18158func (client AppsClient) ListContinuousWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionIterator, err error) {
18159	if tracing.IsEnabled() {
18160		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs")
18161		defer func() {
18162			sc := -1
18163			if result.Response().Response.Response != nil {
18164				sc = result.page.Response().Response.Response.StatusCode
18165			}
18166			tracing.EndSpan(ctx, sc, err)
18167		}()
18168	}
18169	result.page, err = client.ListContinuousWebJobs(ctx, resourceGroupName, name)
18170	return
18171}
18172
18173// ListContinuousWebJobsSlot list continuous web jobs for an app, or a deployment slot.
18174// Parameters:
18175// resourceGroupName - name of the resource group to which the resource belongs.
18176// name - site name.
18177// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
18178// production slot.
18179func (client AppsClient) ListContinuousWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionPage, err error) {
18180	if tracing.IsEnabled() {
18181		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot")
18182		defer func() {
18183			sc := -1
18184			if result.cwjc.Response.Response != nil {
18185				sc = result.cwjc.Response.Response.StatusCode
18186			}
18187			tracing.EndSpan(ctx, sc, err)
18188		}()
18189	}
18190	if err := validation.Validate([]validation.Validation{
18191		{TargetValue: resourceGroupName,
18192			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18193				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18194				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18195		return result, validation.NewError("web.AppsClient", "ListContinuousWebJobsSlot", err.Error())
18196	}
18197
18198	result.fn = client.listContinuousWebJobsSlotNextResults
18199	req, err := client.ListContinuousWebJobsSlotPreparer(ctx, resourceGroupName, name, slot)
18200	if err != nil {
18201		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", nil, "Failure preparing request")
18202		return
18203	}
18204
18205	resp, err := client.ListContinuousWebJobsSlotSender(req)
18206	if err != nil {
18207		result.cwjc.Response = autorest.Response{Response: resp}
18208		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure sending request")
18209		return
18210	}
18211
18212	result.cwjc, err = client.ListContinuousWebJobsSlotResponder(resp)
18213	if err != nil {
18214		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure responding to request")
18215		return
18216	}
18217	if result.cwjc.hasNextLink() && result.cwjc.IsEmpty() {
18218		err = result.NextWithContext(ctx)
18219		return
18220	}
18221
18222	return
18223}
18224
18225// ListContinuousWebJobsSlotPreparer prepares the ListContinuousWebJobsSlot request.
18226func (client AppsClient) ListContinuousWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
18227	pathParameters := map[string]interface{}{
18228		"name":              autorest.Encode("path", name),
18229		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18230		"slot":              autorest.Encode("path", slot),
18231		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18232	}
18233
18234	const APIVersion = "2018-02-01"
18235	queryParameters := map[string]interface{}{
18236		"api-version": APIVersion,
18237	}
18238
18239	preparer := autorest.CreatePreparer(
18240		autorest.AsGet(),
18241		autorest.WithBaseURL(client.BaseURI),
18242		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs", pathParameters),
18243		autorest.WithQueryParameters(queryParameters))
18244	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18245}
18246
18247// ListContinuousWebJobsSlotSender sends the ListContinuousWebJobsSlot request. The method will close the
18248// http.Response Body if it receives an error.
18249func (client AppsClient) ListContinuousWebJobsSlotSender(req *http.Request) (*http.Response, error) {
18250	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18251}
18252
18253// ListContinuousWebJobsSlotResponder handles the response to the ListContinuousWebJobsSlot request. The method always
18254// closes the http.Response Body.
18255func (client AppsClient) ListContinuousWebJobsSlotResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) {
18256	err = autorest.Respond(
18257		resp,
18258		azure.WithErrorUnlessStatusCode(http.StatusOK),
18259		autorest.ByUnmarshallingJSON(&result),
18260		autorest.ByClosing())
18261	result.Response = autorest.Response{Response: resp}
18262	return
18263}
18264
18265// listContinuousWebJobsSlotNextResults retrieves the next set of results, if any.
18266func (client AppsClient) listContinuousWebJobsSlotNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) {
18267	req, err := lastResults.continuousWebJobCollectionPreparer(ctx)
18268	if err != nil {
18269		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", nil, "Failure preparing next results request")
18270	}
18271	if req == nil {
18272		return
18273	}
18274	resp, err := client.ListContinuousWebJobsSlotSender(req)
18275	if err != nil {
18276		result.Response = autorest.Response{Response: resp}
18277		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure sending next results request")
18278	}
18279	result, err = client.ListContinuousWebJobsSlotResponder(resp)
18280	if err != nil {
18281		err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure responding to next results request")
18282	}
18283	return
18284}
18285
18286// ListContinuousWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required.
18287func (client AppsClient) ListContinuousWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionIterator, err error) {
18288	if tracing.IsEnabled() {
18289		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot")
18290		defer func() {
18291			sc := -1
18292			if result.Response().Response.Response != nil {
18293				sc = result.page.Response().Response.Response.StatusCode
18294			}
18295			tracing.EndSpan(ctx, sc, err)
18296		}()
18297	}
18298	result.page, err = client.ListContinuousWebJobsSlot(ctx, resourceGroupName, name, slot)
18299	return
18300}
18301
18302// ListDeploymentLog list deployment log for specific deployment for an app, or a deployment slot.
18303// Parameters:
18304// resourceGroupName - name of the resource group to which the resource belongs.
18305// name - name of the app.
18306// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET
18307// /api/sites/{siteName}/deployments".
18308func (client AppsClient) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) {
18309	if tracing.IsEnabled() {
18310		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLog")
18311		defer func() {
18312			sc := -1
18313			if result.Response.Response != nil {
18314				sc = result.Response.Response.StatusCode
18315			}
18316			tracing.EndSpan(ctx, sc, err)
18317		}()
18318	}
18319	if err := validation.Validate([]validation.Validation{
18320		{TargetValue: resourceGroupName,
18321			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18322				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18323				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18324		return result, validation.NewError("web.AppsClient", "ListDeploymentLog", err.Error())
18325	}
18326
18327	req, err := client.ListDeploymentLogPreparer(ctx, resourceGroupName, name, ID)
18328	if err != nil {
18329		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", nil, "Failure preparing request")
18330		return
18331	}
18332
18333	resp, err := client.ListDeploymentLogSender(req)
18334	if err != nil {
18335		result.Response = autorest.Response{Response: resp}
18336		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure sending request")
18337		return
18338	}
18339
18340	result, err = client.ListDeploymentLogResponder(resp)
18341	if err != nil {
18342		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure responding to request")
18343		return
18344	}
18345
18346	return
18347}
18348
18349// ListDeploymentLogPreparer prepares the ListDeploymentLog request.
18350func (client AppsClient) ListDeploymentLogPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) {
18351	pathParameters := map[string]interface{}{
18352		"id":                autorest.Encode("path", ID),
18353		"name":              autorest.Encode("path", name),
18354		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18355		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18356	}
18357
18358	const APIVersion = "2018-02-01"
18359	queryParameters := map[string]interface{}{
18360		"api-version": APIVersion,
18361	}
18362
18363	preparer := autorest.CreatePreparer(
18364		autorest.AsGet(),
18365		autorest.WithBaseURL(client.BaseURI),
18366		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log", pathParameters),
18367		autorest.WithQueryParameters(queryParameters))
18368	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18369}
18370
18371// ListDeploymentLogSender sends the ListDeploymentLog request. The method will close the
18372// http.Response Body if it receives an error.
18373func (client AppsClient) ListDeploymentLogSender(req *http.Request) (*http.Response, error) {
18374	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18375}
18376
18377// ListDeploymentLogResponder handles the response to the ListDeploymentLog request. The method always
18378// closes the http.Response Body.
18379func (client AppsClient) ListDeploymentLogResponder(resp *http.Response) (result Deployment, err error) {
18380	err = autorest.Respond(
18381		resp,
18382		azure.WithErrorUnlessStatusCode(http.StatusOK),
18383		autorest.ByUnmarshallingJSON(&result),
18384		autorest.ByClosing())
18385	result.Response = autorest.Response{Response: resp}
18386	return
18387}
18388
18389// ListDeploymentLogSlot list deployment log for specific deployment for an app, or a deployment slot.
18390// Parameters:
18391// resourceGroupName - name of the resource group to which the resource belongs.
18392// name - name of the app.
18393// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET
18394// /api/sites/{siteName}/deployments".
18395// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
18396// production slot.
18397func (client AppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) {
18398	if tracing.IsEnabled() {
18399		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLogSlot")
18400		defer func() {
18401			sc := -1
18402			if result.Response.Response != nil {
18403				sc = result.Response.Response.StatusCode
18404			}
18405			tracing.EndSpan(ctx, sc, err)
18406		}()
18407	}
18408	if err := validation.Validate([]validation.Validation{
18409		{TargetValue: resourceGroupName,
18410			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18411				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18412				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18413		return result, validation.NewError("web.AppsClient", "ListDeploymentLogSlot", err.Error())
18414	}
18415
18416	req, err := client.ListDeploymentLogSlotPreparer(ctx, resourceGroupName, name, ID, slot)
18417	if err != nil {
18418		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", nil, "Failure preparing request")
18419		return
18420	}
18421
18422	resp, err := client.ListDeploymentLogSlotSender(req)
18423	if err != nil {
18424		result.Response = autorest.Response{Response: resp}
18425		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure sending request")
18426		return
18427	}
18428
18429	result, err = client.ListDeploymentLogSlotResponder(resp)
18430	if err != nil {
18431		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure responding to request")
18432		return
18433	}
18434
18435	return
18436}
18437
18438// ListDeploymentLogSlotPreparer prepares the ListDeploymentLogSlot request.
18439func (client AppsClient) ListDeploymentLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) {
18440	pathParameters := map[string]interface{}{
18441		"id":                autorest.Encode("path", ID),
18442		"name":              autorest.Encode("path", name),
18443		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18444		"slot":              autorest.Encode("path", slot),
18445		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18446	}
18447
18448	const APIVersion = "2018-02-01"
18449	queryParameters := map[string]interface{}{
18450		"api-version": APIVersion,
18451	}
18452
18453	preparer := autorest.CreatePreparer(
18454		autorest.AsGet(),
18455		autorest.WithBaseURL(client.BaseURI),
18456		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log", pathParameters),
18457		autorest.WithQueryParameters(queryParameters))
18458	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18459}
18460
18461// ListDeploymentLogSlotSender sends the ListDeploymentLogSlot request. The method will close the
18462// http.Response Body if it receives an error.
18463func (client AppsClient) ListDeploymentLogSlotSender(req *http.Request) (*http.Response, error) {
18464	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18465}
18466
18467// ListDeploymentLogSlotResponder handles the response to the ListDeploymentLogSlot request. The method always
18468// closes the http.Response Body.
18469func (client AppsClient) ListDeploymentLogSlotResponder(resp *http.Response) (result Deployment, err error) {
18470	err = autorest.Respond(
18471		resp,
18472		azure.WithErrorUnlessStatusCode(http.StatusOK),
18473		autorest.ByUnmarshallingJSON(&result),
18474		autorest.ByClosing())
18475	result.Response = autorest.Response{Response: resp}
18476	return
18477}
18478
18479// ListDeployments list deployments for an app, or a deployment slot.
18480// Parameters:
18481// resourceGroupName - name of the resource group to which the resource belongs.
18482// name - name of the app.
18483func (client AppsClient) ListDeployments(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionPage, err error) {
18484	if tracing.IsEnabled() {
18485		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments")
18486		defer func() {
18487			sc := -1
18488			if result.dc.Response.Response != nil {
18489				sc = result.dc.Response.Response.StatusCode
18490			}
18491			tracing.EndSpan(ctx, sc, err)
18492		}()
18493	}
18494	if err := validation.Validate([]validation.Validation{
18495		{TargetValue: resourceGroupName,
18496			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18497				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18498				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18499		return result, validation.NewError("web.AppsClient", "ListDeployments", err.Error())
18500	}
18501
18502	result.fn = client.listDeploymentsNextResults
18503	req, err := client.ListDeploymentsPreparer(ctx, resourceGroupName, name)
18504	if err != nil {
18505		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", nil, "Failure preparing request")
18506		return
18507	}
18508
18509	resp, err := client.ListDeploymentsSender(req)
18510	if err != nil {
18511		result.dc.Response = autorest.Response{Response: resp}
18512		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure sending request")
18513		return
18514	}
18515
18516	result.dc, err = client.ListDeploymentsResponder(resp)
18517	if err != nil {
18518		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure responding to request")
18519		return
18520	}
18521	if result.dc.hasNextLink() && result.dc.IsEmpty() {
18522		err = result.NextWithContext(ctx)
18523		return
18524	}
18525
18526	return
18527}
18528
18529// ListDeploymentsPreparer prepares the ListDeployments request.
18530func (client AppsClient) ListDeploymentsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
18531	pathParameters := map[string]interface{}{
18532		"name":              autorest.Encode("path", name),
18533		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18534		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18535	}
18536
18537	const APIVersion = "2018-02-01"
18538	queryParameters := map[string]interface{}{
18539		"api-version": APIVersion,
18540	}
18541
18542	preparer := autorest.CreatePreparer(
18543		autorest.AsGet(),
18544		autorest.WithBaseURL(client.BaseURI),
18545		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments", pathParameters),
18546		autorest.WithQueryParameters(queryParameters))
18547	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18548}
18549
18550// ListDeploymentsSender sends the ListDeployments request. The method will close the
18551// http.Response Body if it receives an error.
18552func (client AppsClient) ListDeploymentsSender(req *http.Request) (*http.Response, error) {
18553	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18554}
18555
18556// ListDeploymentsResponder handles the response to the ListDeployments request. The method always
18557// closes the http.Response Body.
18558func (client AppsClient) ListDeploymentsResponder(resp *http.Response) (result DeploymentCollection, err error) {
18559	err = autorest.Respond(
18560		resp,
18561		azure.WithErrorUnlessStatusCode(http.StatusOK),
18562		autorest.ByUnmarshallingJSON(&result),
18563		autorest.ByClosing())
18564	result.Response = autorest.Response{Response: resp}
18565	return
18566}
18567
18568// listDeploymentsNextResults retrieves the next set of results, if any.
18569func (client AppsClient) listDeploymentsNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) {
18570	req, err := lastResults.deploymentCollectionPreparer(ctx)
18571	if err != nil {
18572		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", nil, "Failure preparing next results request")
18573	}
18574	if req == nil {
18575		return
18576	}
18577	resp, err := client.ListDeploymentsSender(req)
18578	if err != nil {
18579		result.Response = autorest.Response{Response: resp}
18580		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure sending next results request")
18581	}
18582	result, err = client.ListDeploymentsResponder(resp)
18583	if err != nil {
18584		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure responding to next results request")
18585	}
18586	return
18587}
18588
18589// ListDeploymentsComplete enumerates all values, automatically crossing page boundaries as required.
18590func (client AppsClient) ListDeploymentsComplete(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionIterator, err error) {
18591	if tracing.IsEnabled() {
18592		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments")
18593		defer func() {
18594			sc := -1
18595			if result.Response().Response.Response != nil {
18596				sc = result.page.Response().Response.Response.StatusCode
18597			}
18598			tracing.EndSpan(ctx, sc, err)
18599		}()
18600	}
18601	result.page, err = client.ListDeployments(ctx, resourceGroupName, name)
18602	return
18603}
18604
18605// ListDeploymentsSlot list deployments for an app, or a deployment slot.
18606// Parameters:
18607// resourceGroupName - name of the resource group to which the resource belongs.
18608// name - name of the app.
18609// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
18610// production slot.
18611func (client AppsClient) ListDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionPage, err error) {
18612	if tracing.IsEnabled() {
18613		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot")
18614		defer func() {
18615			sc := -1
18616			if result.dc.Response.Response != nil {
18617				sc = result.dc.Response.Response.StatusCode
18618			}
18619			tracing.EndSpan(ctx, sc, err)
18620		}()
18621	}
18622	if err := validation.Validate([]validation.Validation{
18623		{TargetValue: resourceGroupName,
18624			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18625				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18626				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18627		return result, validation.NewError("web.AppsClient", "ListDeploymentsSlot", err.Error())
18628	}
18629
18630	result.fn = client.listDeploymentsSlotNextResults
18631	req, err := client.ListDeploymentsSlotPreparer(ctx, resourceGroupName, name, slot)
18632	if err != nil {
18633		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", nil, "Failure preparing request")
18634		return
18635	}
18636
18637	resp, err := client.ListDeploymentsSlotSender(req)
18638	if err != nil {
18639		result.dc.Response = autorest.Response{Response: resp}
18640		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure sending request")
18641		return
18642	}
18643
18644	result.dc, err = client.ListDeploymentsSlotResponder(resp)
18645	if err != nil {
18646		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure responding to request")
18647		return
18648	}
18649	if result.dc.hasNextLink() && result.dc.IsEmpty() {
18650		err = result.NextWithContext(ctx)
18651		return
18652	}
18653
18654	return
18655}
18656
18657// ListDeploymentsSlotPreparer prepares the ListDeploymentsSlot request.
18658func (client AppsClient) ListDeploymentsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
18659	pathParameters := map[string]interface{}{
18660		"name":              autorest.Encode("path", name),
18661		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18662		"slot":              autorest.Encode("path", slot),
18663		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18664	}
18665
18666	const APIVersion = "2018-02-01"
18667	queryParameters := map[string]interface{}{
18668		"api-version": APIVersion,
18669	}
18670
18671	preparer := autorest.CreatePreparer(
18672		autorest.AsGet(),
18673		autorest.WithBaseURL(client.BaseURI),
18674		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments", pathParameters),
18675		autorest.WithQueryParameters(queryParameters))
18676	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18677}
18678
18679// ListDeploymentsSlotSender sends the ListDeploymentsSlot request. The method will close the
18680// http.Response Body if it receives an error.
18681func (client AppsClient) ListDeploymentsSlotSender(req *http.Request) (*http.Response, error) {
18682	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18683}
18684
18685// ListDeploymentsSlotResponder handles the response to the ListDeploymentsSlot request. The method always
18686// closes the http.Response Body.
18687func (client AppsClient) ListDeploymentsSlotResponder(resp *http.Response) (result DeploymentCollection, err error) {
18688	err = autorest.Respond(
18689		resp,
18690		azure.WithErrorUnlessStatusCode(http.StatusOK),
18691		autorest.ByUnmarshallingJSON(&result),
18692		autorest.ByClosing())
18693	result.Response = autorest.Response{Response: resp}
18694	return
18695}
18696
18697// listDeploymentsSlotNextResults retrieves the next set of results, if any.
18698func (client AppsClient) listDeploymentsSlotNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) {
18699	req, err := lastResults.deploymentCollectionPreparer(ctx)
18700	if err != nil {
18701		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", nil, "Failure preparing next results request")
18702	}
18703	if req == nil {
18704		return
18705	}
18706	resp, err := client.ListDeploymentsSlotSender(req)
18707	if err != nil {
18708		result.Response = autorest.Response{Response: resp}
18709		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure sending next results request")
18710	}
18711	result, err = client.ListDeploymentsSlotResponder(resp)
18712	if err != nil {
18713		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure responding to next results request")
18714	}
18715	return
18716}
18717
18718// ListDeploymentsSlotComplete enumerates all values, automatically crossing page boundaries as required.
18719func (client AppsClient) ListDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionIterator, err error) {
18720	if tracing.IsEnabled() {
18721		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot")
18722		defer func() {
18723			sc := -1
18724			if result.Response().Response.Response != nil {
18725				sc = result.page.Response().Response.Response.StatusCode
18726			}
18727			tracing.EndSpan(ctx, sc, err)
18728		}()
18729	}
18730	result.page, err = client.ListDeploymentsSlot(ctx, resourceGroupName, name, slot)
18731	return
18732}
18733
18734// ListDomainOwnershipIdentifiers lists ownership identifiers for domain associated with web app.
18735// Parameters:
18736// resourceGroupName - name of the resource group to which the resource belongs.
18737// name - name of the app.
18738func (client AppsClient) ListDomainOwnershipIdentifiers(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionPage, err error) {
18739	if tracing.IsEnabled() {
18740		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers")
18741		defer func() {
18742			sc := -1
18743			if result.ic.Response.Response != nil {
18744				sc = result.ic.Response.Response.StatusCode
18745			}
18746			tracing.EndSpan(ctx, sc, err)
18747		}()
18748	}
18749	if err := validation.Validate([]validation.Validation{
18750		{TargetValue: resourceGroupName,
18751			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18752				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18753				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18754		return result, validation.NewError("web.AppsClient", "ListDomainOwnershipIdentifiers", err.Error())
18755	}
18756
18757	result.fn = client.listDomainOwnershipIdentifiersNextResults
18758	req, err := client.ListDomainOwnershipIdentifiersPreparer(ctx, resourceGroupName, name)
18759	if err != nil {
18760		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", nil, "Failure preparing request")
18761		return
18762	}
18763
18764	resp, err := client.ListDomainOwnershipIdentifiersSender(req)
18765	if err != nil {
18766		result.ic.Response = autorest.Response{Response: resp}
18767		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure sending request")
18768		return
18769	}
18770
18771	result.ic, err = client.ListDomainOwnershipIdentifiersResponder(resp)
18772	if err != nil {
18773		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure responding to request")
18774		return
18775	}
18776	if result.ic.hasNextLink() && result.ic.IsEmpty() {
18777		err = result.NextWithContext(ctx)
18778		return
18779	}
18780
18781	return
18782}
18783
18784// ListDomainOwnershipIdentifiersPreparer prepares the ListDomainOwnershipIdentifiers request.
18785func (client AppsClient) ListDomainOwnershipIdentifiersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
18786	pathParameters := map[string]interface{}{
18787		"name":              autorest.Encode("path", name),
18788		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18789		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18790	}
18791
18792	const APIVersion = "2018-02-01"
18793	queryParameters := map[string]interface{}{
18794		"api-version": APIVersion,
18795	}
18796
18797	preparer := autorest.CreatePreparer(
18798		autorest.AsGet(),
18799		autorest.WithBaseURL(client.BaseURI),
18800		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers", pathParameters),
18801		autorest.WithQueryParameters(queryParameters))
18802	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18803}
18804
18805// ListDomainOwnershipIdentifiersSender sends the ListDomainOwnershipIdentifiers request. The method will close the
18806// http.Response Body if it receives an error.
18807func (client AppsClient) ListDomainOwnershipIdentifiersSender(req *http.Request) (*http.Response, error) {
18808	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18809}
18810
18811// ListDomainOwnershipIdentifiersResponder handles the response to the ListDomainOwnershipIdentifiers request. The method always
18812// closes the http.Response Body.
18813func (client AppsClient) ListDomainOwnershipIdentifiersResponder(resp *http.Response) (result IdentifierCollection, err error) {
18814	err = autorest.Respond(
18815		resp,
18816		azure.WithErrorUnlessStatusCode(http.StatusOK),
18817		autorest.ByUnmarshallingJSON(&result),
18818		autorest.ByClosing())
18819	result.Response = autorest.Response{Response: resp}
18820	return
18821}
18822
18823// listDomainOwnershipIdentifiersNextResults retrieves the next set of results, if any.
18824func (client AppsClient) listDomainOwnershipIdentifiersNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) {
18825	req, err := lastResults.identifierCollectionPreparer(ctx)
18826	if err != nil {
18827		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", nil, "Failure preparing next results request")
18828	}
18829	if req == nil {
18830		return
18831	}
18832	resp, err := client.ListDomainOwnershipIdentifiersSender(req)
18833	if err != nil {
18834		result.Response = autorest.Response{Response: resp}
18835		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure sending next results request")
18836	}
18837	result, err = client.ListDomainOwnershipIdentifiersResponder(resp)
18838	if err != nil {
18839		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure responding to next results request")
18840	}
18841	return
18842}
18843
18844// ListDomainOwnershipIdentifiersComplete enumerates all values, automatically crossing page boundaries as required.
18845func (client AppsClient) ListDomainOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionIterator, err error) {
18846	if tracing.IsEnabled() {
18847		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers")
18848		defer func() {
18849			sc := -1
18850			if result.Response().Response.Response != nil {
18851				sc = result.page.Response().Response.Response.StatusCode
18852			}
18853			tracing.EndSpan(ctx, sc, err)
18854		}()
18855	}
18856	result.page, err = client.ListDomainOwnershipIdentifiers(ctx, resourceGroupName, name)
18857	return
18858}
18859
18860// ListDomainOwnershipIdentifiersSlot lists ownership identifiers for domain associated with web app.
18861// Parameters:
18862// resourceGroupName - name of the resource group to which the resource belongs.
18863// name - name of the app.
18864// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
18865// production slot.
18866func (client AppsClient) ListDomainOwnershipIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionPage, err error) {
18867	if tracing.IsEnabled() {
18868		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot")
18869		defer func() {
18870			sc := -1
18871			if result.ic.Response.Response != nil {
18872				sc = result.ic.Response.Response.StatusCode
18873			}
18874			tracing.EndSpan(ctx, sc, err)
18875		}()
18876	}
18877	if err := validation.Validate([]validation.Validation{
18878		{TargetValue: resourceGroupName,
18879			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18880				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18881				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18882		return result, validation.NewError("web.AppsClient", "ListDomainOwnershipIdentifiersSlot", err.Error())
18883	}
18884
18885	result.fn = client.listDomainOwnershipIdentifiersSlotNextResults
18886	req, err := client.ListDomainOwnershipIdentifiersSlotPreparer(ctx, resourceGroupName, name, slot)
18887	if err != nil {
18888		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", nil, "Failure preparing request")
18889		return
18890	}
18891
18892	resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req)
18893	if err != nil {
18894		result.ic.Response = autorest.Response{Response: resp}
18895		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure sending request")
18896		return
18897	}
18898
18899	result.ic, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp)
18900	if err != nil {
18901		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure responding to request")
18902		return
18903	}
18904	if result.ic.hasNextLink() && result.ic.IsEmpty() {
18905		err = result.NextWithContext(ctx)
18906		return
18907	}
18908
18909	return
18910}
18911
18912// ListDomainOwnershipIdentifiersSlotPreparer prepares the ListDomainOwnershipIdentifiersSlot request.
18913func (client AppsClient) ListDomainOwnershipIdentifiersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
18914	pathParameters := map[string]interface{}{
18915		"name":              autorest.Encode("path", name),
18916		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18917		"slot":              autorest.Encode("path", slot),
18918		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18919	}
18920
18921	const APIVersion = "2018-02-01"
18922	queryParameters := map[string]interface{}{
18923		"api-version": APIVersion,
18924	}
18925
18926	preparer := autorest.CreatePreparer(
18927		autorest.AsGet(),
18928		autorest.WithBaseURL(client.BaseURI),
18929		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers", pathParameters),
18930		autorest.WithQueryParameters(queryParameters))
18931	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18932}
18933
18934// ListDomainOwnershipIdentifiersSlotSender sends the ListDomainOwnershipIdentifiersSlot request. The method will close the
18935// http.Response Body if it receives an error.
18936func (client AppsClient) ListDomainOwnershipIdentifiersSlotSender(req *http.Request) (*http.Response, error) {
18937	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18938}
18939
18940// ListDomainOwnershipIdentifiersSlotResponder handles the response to the ListDomainOwnershipIdentifiersSlot request. The method always
18941// closes the http.Response Body.
18942func (client AppsClient) ListDomainOwnershipIdentifiersSlotResponder(resp *http.Response) (result IdentifierCollection, err error) {
18943	err = autorest.Respond(
18944		resp,
18945		azure.WithErrorUnlessStatusCode(http.StatusOK),
18946		autorest.ByUnmarshallingJSON(&result),
18947		autorest.ByClosing())
18948	result.Response = autorest.Response{Response: resp}
18949	return
18950}
18951
18952// listDomainOwnershipIdentifiersSlotNextResults retrieves the next set of results, if any.
18953func (client AppsClient) listDomainOwnershipIdentifiersSlotNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) {
18954	req, err := lastResults.identifierCollectionPreparer(ctx)
18955	if err != nil {
18956		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", nil, "Failure preparing next results request")
18957	}
18958	if req == nil {
18959		return
18960	}
18961	resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req)
18962	if err != nil {
18963		result.Response = autorest.Response{Response: resp}
18964		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure sending next results request")
18965	}
18966	result, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp)
18967	if err != nil {
18968		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure responding to next results request")
18969	}
18970	return
18971}
18972
18973// ListDomainOwnershipIdentifiersSlotComplete enumerates all values, automatically crossing page boundaries as required.
18974func (client AppsClient) ListDomainOwnershipIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionIterator, err error) {
18975	if tracing.IsEnabled() {
18976		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot")
18977		defer func() {
18978			sc := -1
18979			if result.Response().Response.Response != nil {
18980				sc = result.page.Response().Response.Response.StatusCode
18981			}
18982			tracing.EndSpan(ctx, sc, err)
18983		}()
18984	}
18985	result.page, err = client.ListDomainOwnershipIdentifiersSlot(ctx, resourceGroupName, name, slot)
18986	return
18987}
18988
18989// ListFunctionKeys get function keys for a function in a web site, or a deployment slot.
18990// Parameters:
18991// resourceGroupName - name of the resource group to which the resource belongs.
18992// name - site name.
18993// functionName - function name.
18994func (client AppsClient) ListFunctionKeys(ctx context.Context, resourceGroupName string, name string, functionName string) (result StringDictionary, err error) {
18995	if tracing.IsEnabled() {
18996		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionKeys")
18997		defer func() {
18998			sc := -1
18999			if result.Response.Response != nil {
19000				sc = result.Response.Response.StatusCode
19001			}
19002			tracing.EndSpan(ctx, sc, err)
19003		}()
19004	}
19005	if err := validation.Validate([]validation.Validation{
19006		{TargetValue: resourceGroupName,
19007			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19008				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19009				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19010		return result, validation.NewError("web.AppsClient", "ListFunctionKeys", err.Error())
19011	}
19012
19013	req, err := client.ListFunctionKeysPreparer(ctx, resourceGroupName, name, functionName)
19014	if err != nil {
19015		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", nil, "Failure preparing request")
19016		return
19017	}
19018
19019	resp, err := client.ListFunctionKeysSender(req)
19020	if err != nil {
19021		result.Response = autorest.Response{Response: resp}
19022		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", resp, "Failure sending request")
19023		return
19024	}
19025
19026	result, err = client.ListFunctionKeysResponder(resp)
19027	if err != nil {
19028		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", resp, "Failure responding to request")
19029		return
19030	}
19031
19032	return
19033}
19034
19035// ListFunctionKeysPreparer prepares the ListFunctionKeys request.
19036func (client AppsClient) ListFunctionKeysPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
19037	pathParameters := map[string]interface{}{
19038		"functionName":      autorest.Encode("path", functionName),
19039		"name":              autorest.Encode("path", name),
19040		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19041		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19042	}
19043
19044	const APIVersion = "2018-02-01"
19045	queryParameters := map[string]interface{}{
19046		"api-version": APIVersion,
19047	}
19048
19049	preparer := autorest.CreatePreparer(
19050		autorest.AsPost(),
19051		autorest.WithBaseURL(client.BaseURI),
19052		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys", pathParameters),
19053		autorest.WithQueryParameters(queryParameters))
19054	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19055}
19056
19057// ListFunctionKeysSender sends the ListFunctionKeys request. The method will close the
19058// http.Response Body if it receives an error.
19059func (client AppsClient) ListFunctionKeysSender(req *http.Request) (*http.Response, error) {
19060	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19061}
19062
19063// ListFunctionKeysResponder handles the response to the ListFunctionKeys request. The method always
19064// closes the http.Response Body.
19065func (client AppsClient) ListFunctionKeysResponder(resp *http.Response) (result StringDictionary, err error) {
19066	err = autorest.Respond(
19067		resp,
19068		azure.WithErrorUnlessStatusCode(http.StatusOK),
19069		autorest.ByUnmarshallingJSON(&result),
19070		autorest.ByClosing())
19071	result.Response = autorest.Response{Response: resp}
19072	return
19073}
19074
19075// ListFunctionKeysSlot get function keys for a function in a web site, or a deployment slot.
19076// Parameters:
19077// resourceGroupName - name of the resource group to which the resource belongs.
19078// name - site name.
19079// functionName - function name.
19080// slot - name of the deployment slot.
19081func (client AppsClient) ListFunctionKeysSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result StringDictionary, err error) {
19082	if tracing.IsEnabled() {
19083		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionKeysSlot")
19084		defer func() {
19085			sc := -1
19086			if result.Response.Response != nil {
19087				sc = result.Response.Response.StatusCode
19088			}
19089			tracing.EndSpan(ctx, sc, err)
19090		}()
19091	}
19092	if err := validation.Validate([]validation.Validation{
19093		{TargetValue: resourceGroupName,
19094			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19095				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19096				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19097		return result, validation.NewError("web.AppsClient", "ListFunctionKeysSlot", err.Error())
19098	}
19099
19100	req, err := client.ListFunctionKeysSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
19101	if err != nil {
19102		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", nil, "Failure preparing request")
19103		return
19104	}
19105
19106	resp, err := client.ListFunctionKeysSlotSender(req)
19107	if err != nil {
19108		result.Response = autorest.Response{Response: resp}
19109		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", resp, "Failure sending request")
19110		return
19111	}
19112
19113	result, err = client.ListFunctionKeysSlotResponder(resp)
19114	if err != nil {
19115		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", resp, "Failure responding to request")
19116		return
19117	}
19118
19119	return
19120}
19121
19122// ListFunctionKeysSlotPreparer prepares the ListFunctionKeysSlot request.
19123func (client AppsClient) ListFunctionKeysSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
19124	pathParameters := map[string]interface{}{
19125		"functionName":      autorest.Encode("path", functionName),
19126		"name":              autorest.Encode("path", name),
19127		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19128		"slot":              autorest.Encode("path", slot),
19129		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19130	}
19131
19132	const APIVersion = "2018-02-01"
19133	queryParameters := map[string]interface{}{
19134		"api-version": APIVersion,
19135	}
19136
19137	preparer := autorest.CreatePreparer(
19138		autorest.AsPost(),
19139		autorest.WithBaseURL(client.BaseURI),
19140		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys", pathParameters),
19141		autorest.WithQueryParameters(queryParameters))
19142	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19143}
19144
19145// ListFunctionKeysSlotSender sends the ListFunctionKeysSlot request. The method will close the
19146// http.Response Body if it receives an error.
19147func (client AppsClient) ListFunctionKeysSlotSender(req *http.Request) (*http.Response, error) {
19148	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19149}
19150
19151// ListFunctionKeysSlotResponder handles the response to the ListFunctionKeysSlot request. The method always
19152// closes the http.Response Body.
19153func (client AppsClient) ListFunctionKeysSlotResponder(resp *http.Response) (result StringDictionary, err error) {
19154	err = autorest.Respond(
19155		resp,
19156		azure.WithErrorUnlessStatusCode(http.StatusOK),
19157		autorest.ByUnmarshallingJSON(&result),
19158		autorest.ByClosing())
19159	result.Response = autorest.Response{Response: resp}
19160	return
19161}
19162
19163// ListFunctions list the functions for a web site, or a deployment slot.
19164// Parameters:
19165// resourceGroupName - name of the resource group to which the resource belongs.
19166// name - site name.
19167func (client AppsClient) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionPage, err error) {
19168	if tracing.IsEnabled() {
19169		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions")
19170		defer func() {
19171			sc := -1
19172			if result.fec.Response.Response != nil {
19173				sc = result.fec.Response.Response.StatusCode
19174			}
19175			tracing.EndSpan(ctx, sc, err)
19176		}()
19177	}
19178	if err := validation.Validate([]validation.Validation{
19179		{TargetValue: resourceGroupName,
19180			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19181				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19182				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19183		return result, validation.NewError("web.AppsClient", "ListFunctions", err.Error())
19184	}
19185
19186	result.fn = client.listFunctionsNextResults
19187	req, err := client.ListFunctionsPreparer(ctx, resourceGroupName, name)
19188	if err != nil {
19189		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", nil, "Failure preparing request")
19190		return
19191	}
19192
19193	resp, err := client.ListFunctionsSender(req)
19194	if err != nil {
19195		result.fec.Response = autorest.Response{Response: resp}
19196		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure sending request")
19197		return
19198	}
19199
19200	result.fec, err = client.ListFunctionsResponder(resp)
19201	if err != nil {
19202		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure responding to request")
19203		return
19204	}
19205	if result.fec.hasNextLink() && result.fec.IsEmpty() {
19206		err = result.NextWithContext(ctx)
19207		return
19208	}
19209
19210	return
19211}
19212
19213// ListFunctionsPreparer prepares the ListFunctions request.
19214func (client AppsClient) ListFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
19215	pathParameters := map[string]interface{}{
19216		"name":              autorest.Encode("path", name),
19217		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19218		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19219	}
19220
19221	const APIVersion = "2018-02-01"
19222	queryParameters := map[string]interface{}{
19223		"api-version": APIVersion,
19224	}
19225
19226	preparer := autorest.CreatePreparer(
19227		autorest.AsGet(),
19228		autorest.WithBaseURL(client.BaseURI),
19229		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions", pathParameters),
19230		autorest.WithQueryParameters(queryParameters))
19231	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19232}
19233
19234// ListFunctionsSender sends the ListFunctions request. The method will close the
19235// http.Response Body if it receives an error.
19236func (client AppsClient) ListFunctionsSender(req *http.Request) (*http.Response, error) {
19237	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19238}
19239
19240// ListFunctionsResponder handles the response to the ListFunctions request. The method always
19241// closes the http.Response Body.
19242func (client AppsClient) ListFunctionsResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) {
19243	err = autorest.Respond(
19244		resp,
19245		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
19246		autorest.ByUnmarshallingJSON(&result),
19247		autorest.ByClosing())
19248	result.Response = autorest.Response{Response: resp}
19249	return
19250}
19251
19252// listFunctionsNextResults retrieves the next set of results, if any.
19253func (client AppsClient) listFunctionsNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) {
19254	req, err := lastResults.functionEnvelopeCollectionPreparer(ctx)
19255	if err != nil {
19256		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", nil, "Failure preparing next results request")
19257	}
19258	if req == nil {
19259		return
19260	}
19261	resp, err := client.ListFunctionsSender(req)
19262	if err != nil {
19263		result.Response = autorest.Response{Response: resp}
19264		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure sending next results request")
19265	}
19266	result, err = client.ListFunctionsResponder(resp)
19267	if err != nil {
19268		err = autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure responding to next results request")
19269	}
19270	return
19271}
19272
19273// ListFunctionsComplete enumerates all values, automatically crossing page boundaries as required.
19274func (client AppsClient) ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionIterator, err error) {
19275	if tracing.IsEnabled() {
19276		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions")
19277		defer func() {
19278			sc := -1
19279			if result.Response().Response.Response != nil {
19280				sc = result.page.Response().Response.Response.StatusCode
19281			}
19282			tracing.EndSpan(ctx, sc, err)
19283		}()
19284	}
19285	result.page, err = client.ListFunctions(ctx, resourceGroupName, name)
19286	return
19287}
19288
19289// ListFunctionSecrets get function secrets for a function in a web site, or a deployment slot.
19290// Parameters:
19291// resourceGroupName - name of the resource group to which the resource belongs.
19292// name - site name.
19293// functionName - function name.
19294func (client AppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionSecrets, err error) {
19295	if tracing.IsEnabled() {
19296		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecrets")
19297		defer func() {
19298			sc := -1
19299			if result.Response.Response != nil {
19300				sc = result.Response.Response.StatusCode
19301			}
19302			tracing.EndSpan(ctx, sc, err)
19303		}()
19304	}
19305	if err := validation.Validate([]validation.Validation{
19306		{TargetValue: resourceGroupName,
19307			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19308				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19309				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19310		return result, validation.NewError("web.AppsClient", "ListFunctionSecrets", err.Error())
19311	}
19312
19313	req, err := client.ListFunctionSecretsPreparer(ctx, resourceGroupName, name, functionName)
19314	if err != nil {
19315		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", nil, "Failure preparing request")
19316		return
19317	}
19318
19319	resp, err := client.ListFunctionSecretsSender(req)
19320	if err != nil {
19321		result.Response = autorest.Response{Response: resp}
19322		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure sending request")
19323		return
19324	}
19325
19326	result, err = client.ListFunctionSecretsResponder(resp)
19327	if err != nil {
19328		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure responding to request")
19329		return
19330	}
19331
19332	return
19333}
19334
19335// ListFunctionSecretsPreparer prepares the ListFunctionSecrets request.
19336func (client AppsClient) ListFunctionSecretsPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
19337	pathParameters := map[string]interface{}{
19338		"functionName":      autorest.Encode("path", functionName),
19339		"name":              autorest.Encode("path", name),
19340		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19341		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19342	}
19343
19344	const APIVersion = "2018-02-01"
19345	queryParameters := map[string]interface{}{
19346		"api-version": APIVersion,
19347	}
19348
19349	preparer := autorest.CreatePreparer(
19350		autorest.AsPost(),
19351		autorest.WithBaseURL(client.BaseURI),
19352		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets", pathParameters),
19353		autorest.WithQueryParameters(queryParameters))
19354	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19355}
19356
19357// ListFunctionSecretsSender sends the ListFunctionSecrets request. The method will close the
19358// http.Response Body if it receives an error.
19359func (client AppsClient) ListFunctionSecretsSender(req *http.Request) (*http.Response, error) {
19360	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19361}
19362
19363// ListFunctionSecretsResponder handles the response to the ListFunctionSecrets request. The method always
19364// closes the http.Response Body.
19365func (client AppsClient) ListFunctionSecretsResponder(resp *http.Response) (result FunctionSecrets, err error) {
19366	err = autorest.Respond(
19367		resp,
19368		azure.WithErrorUnlessStatusCode(http.StatusOK),
19369		autorest.ByUnmarshallingJSON(&result),
19370		autorest.ByClosing())
19371	result.Response = autorest.Response{Response: resp}
19372	return
19373}
19374
19375// ListFunctionSecretsSlot get function secrets for a function in a web site, or a deployment slot.
19376// Parameters:
19377// resourceGroupName - name of the resource group to which the resource belongs.
19378// name - site name.
19379// functionName - function name.
19380// slot - name of the deployment slot.
19381func (client AppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionSecrets, err error) {
19382	if tracing.IsEnabled() {
19383		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecretsSlot")
19384		defer func() {
19385			sc := -1
19386			if result.Response.Response != nil {
19387				sc = result.Response.Response.StatusCode
19388			}
19389			tracing.EndSpan(ctx, sc, err)
19390		}()
19391	}
19392	if err := validation.Validate([]validation.Validation{
19393		{TargetValue: resourceGroupName,
19394			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19395				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19396				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19397		return result, validation.NewError("web.AppsClient", "ListFunctionSecretsSlot", err.Error())
19398	}
19399
19400	req, err := client.ListFunctionSecretsSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
19401	if err != nil {
19402		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", nil, "Failure preparing request")
19403		return
19404	}
19405
19406	resp, err := client.ListFunctionSecretsSlotSender(req)
19407	if err != nil {
19408		result.Response = autorest.Response{Response: resp}
19409		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure sending request")
19410		return
19411	}
19412
19413	result, err = client.ListFunctionSecretsSlotResponder(resp)
19414	if err != nil {
19415		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure responding to request")
19416		return
19417	}
19418
19419	return
19420}
19421
19422// ListFunctionSecretsSlotPreparer prepares the ListFunctionSecretsSlot request.
19423func (client AppsClient) ListFunctionSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
19424	pathParameters := map[string]interface{}{
19425		"functionName":      autorest.Encode("path", functionName),
19426		"name":              autorest.Encode("path", name),
19427		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19428		"slot":              autorest.Encode("path", slot),
19429		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19430	}
19431
19432	const APIVersion = "2018-02-01"
19433	queryParameters := map[string]interface{}{
19434		"api-version": APIVersion,
19435	}
19436
19437	preparer := autorest.CreatePreparer(
19438		autorest.AsPost(),
19439		autorest.WithBaseURL(client.BaseURI),
19440		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets", pathParameters),
19441		autorest.WithQueryParameters(queryParameters))
19442	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19443}
19444
19445// ListFunctionSecretsSlotSender sends the ListFunctionSecretsSlot request. The method will close the
19446// http.Response Body if it receives an error.
19447func (client AppsClient) ListFunctionSecretsSlotSender(req *http.Request) (*http.Response, error) {
19448	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19449}
19450
19451// ListFunctionSecretsSlotResponder handles the response to the ListFunctionSecretsSlot request. The method always
19452// closes the http.Response Body.
19453func (client AppsClient) ListFunctionSecretsSlotResponder(resp *http.Response) (result FunctionSecrets, err error) {
19454	err = autorest.Respond(
19455		resp,
19456		azure.WithErrorUnlessStatusCode(http.StatusOK),
19457		autorest.ByUnmarshallingJSON(&result),
19458		autorest.ByClosing())
19459	result.Response = autorest.Response{Response: resp}
19460	return
19461}
19462
19463// ListHostKeys get host secrets for a function app.
19464// Parameters:
19465// resourceGroupName - name of the resource group to which the resource belongs.
19466// name - site name.
19467func (client AppsClient) ListHostKeys(ctx context.Context, resourceGroupName string, name string) (result HostKeys, err error) {
19468	if tracing.IsEnabled() {
19469		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostKeys")
19470		defer func() {
19471			sc := -1
19472			if result.Response.Response != nil {
19473				sc = result.Response.Response.StatusCode
19474			}
19475			tracing.EndSpan(ctx, sc, err)
19476		}()
19477	}
19478	if err := validation.Validate([]validation.Validation{
19479		{TargetValue: resourceGroupName,
19480			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19481				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19482				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19483		return result, validation.NewError("web.AppsClient", "ListHostKeys", err.Error())
19484	}
19485
19486	req, err := client.ListHostKeysPreparer(ctx, resourceGroupName, name)
19487	if err != nil {
19488		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", nil, "Failure preparing request")
19489		return
19490	}
19491
19492	resp, err := client.ListHostKeysSender(req)
19493	if err != nil {
19494		result.Response = autorest.Response{Response: resp}
19495		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", resp, "Failure sending request")
19496		return
19497	}
19498
19499	result, err = client.ListHostKeysResponder(resp)
19500	if err != nil {
19501		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", resp, "Failure responding to request")
19502		return
19503	}
19504
19505	return
19506}
19507
19508// ListHostKeysPreparer prepares the ListHostKeys request.
19509func (client AppsClient) ListHostKeysPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
19510	pathParameters := map[string]interface{}{
19511		"name":              autorest.Encode("path", name),
19512		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19513		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19514	}
19515
19516	const APIVersion = "2018-02-01"
19517	queryParameters := map[string]interface{}{
19518		"api-version": APIVersion,
19519	}
19520
19521	preparer := autorest.CreatePreparer(
19522		autorest.AsPost(),
19523		autorest.WithBaseURL(client.BaseURI),
19524		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys", pathParameters),
19525		autorest.WithQueryParameters(queryParameters))
19526	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19527}
19528
19529// ListHostKeysSender sends the ListHostKeys request. The method will close the
19530// http.Response Body if it receives an error.
19531func (client AppsClient) ListHostKeysSender(req *http.Request) (*http.Response, error) {
19532	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19533}
19534
19535// ListHostKeysResponder handles the response to the ListHostKeys request. The method always
19536// closes the http.Response Body.
19537func (client AppsClient) ListHostKeysResponder(resp *http.Response) (result HostKeys, err error) {
19538	err = autorest.Respond(
19539		resp,
19540		azure.WithErrorUnlessStatusCode(http.StatusOK),
19541		autorest.ByUnmarshallingJSON(&result),
19542		autorest.ByClosing())
19543	result.Response = autorest.Response{Response: resp}
19544	return
19545}
19546
19547// ListHostKeysSlot get host secrets for a function app.
19548// Parameters:
19549// resourceGroupName - name of the resource group to which the resource belongs.
19550// name - site name.
19551// slot - name of the deployment slot.
19552func (client AppsClient) ListHostKeysSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result HostKeys, err error) {
19553	if tracing.IsEnabled() {
19554		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostKeysSlot")
19555		defer func() {
19556			sc := -1
19557			if result.Response.Response != nil {
19558				sc = result.Response.Response.StatusCode
19559			}
19560			tracing.EndSpan(ctx, sc, err)
19561		}()
19562	}
19563	if err := validation.Validate([]validation.Validation{
19564		{TargetValue: resourceGroupName,
19565			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19566				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19567				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19568		return result, validation.NewError("web.AppsClient", "ListHostKeysSlot", err.Error())
19569	}
19570
19571	req, err := client.ListHostKeysSlotPreparer(ctx, resourceGroupName, name, slot)
19572	if err != nil {
19573		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", nil, "Failure preparing request")
19574		return
19575	}
19576
19577	resp, err := client.ListHostKeysSlotSender(req)
19578	if err != nil {
19579		result.Response = autorest.Response{Response: resp}
19580		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", resp, "Failure sending request")
19581		return
19582	}
19583
19584	result, err = client.ListHostKeysSlotResponder(resp)
19585	if err != nil {
19586		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", resp, "Failure responding to request")
19587		return
19588	}
19589
19590	return
19591}
19592
19593// ListHostKeysSlotPreparer prepares the ListHostKeysSlot request.
19594func (client AppsClient) ListHostKeysSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
19595	pathParameters := map[string]interface{}{
19596		"name":              autorest.Encode("path", name),
19597		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19598		"slot":              autorest.Encode("path", slot),
19599		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19600	}
19601
19602	const APIVersion = "2018-02-01"
19603	queryParameters := map[string]interface{}{
19604		"api-version": APIVersion,
19605	}
19606
19607	preparer := autorest.CreatePreparer(
19608		autorest.AsPost(),
19609		autorest.WithBaseURL(client.BaseURI),
19610		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys", pathParameters),
19611		autorest.WithQueryParameters(queryParameters))
19612	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19613}
19614
19615// ListHostKeysSlotSender sends the ListHostKeysSlot request. The method will close the
19616// http.Response Body if it receives an error.
19617func (client AppsClient) ListHostKeysSlotSender(req *http.Request) (*http.Response, error) {
19618	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19619}
19620
19621// ListHostKeysSlotResponder handles the response to the ListHostKeysSlot request. The method always
19622// closes the http.Response Body.
19623func (client AppsClient) ListHostKeysSlotResponder(resp *http.Response) (result HostKeys, err error) {
19624	err = autorest.Respond(
19625		resp,
19626		azure.WithErrorUnlessStatusCode(http.StatusOK),
19627		autorest.ByUnmarshallingJSON(&result),
19628		autorest.ByClosing())
19629	result.Response = autorest.Response{Response: resp}
19630	return
19631}
19632
19633// ListHostNameBindings get hostname bindings for an app or a deployment slot.
19634// Parameters:
19635// resourceGroupName - name of the resource group to which the resource belongs.
19636// name - name of the app.
19637func (client AppsClient) ListHostNameBindings(ctx context.Context, resourceGroupName string, name string) (result HostNameBindingCollectionPage, err error) {
19638	if tracing.IsEnabled() {
19639		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindings")
19640		defer func() {
19641			sc := -1
19642			if result.hnbc.Response.Response != nil {
19643				sc = result.hnbc.Response.Response.StatusCode
19644			}
19645			tracing.EndSpan(ctx, sc, err)
19646		}()
19647	}
19648	if err := validation.Validate([]validation.Validation{
19649		{TargetValue: resourceGroupName,
19650			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19651				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19652				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19653		return result, validation.NewError("web.AppsClient", "ListHostNameBindings", err.Error())
19654	}
19655
19656	result.fn = client.listHostNameBindingsNextResults
19657	req, err := client.ListHostNameBindingsPreparer(ctx, resourceGroupName, name)
19658	if err != nil {
19659		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindings", nil, "Failure preparing request")
19660		return
19661	}
19662
19663	resp, err := client.ListHostNameBindingsSender(req)
19664	if err != nil {
19665		result.hnbc.Response = autorest.Response{Response: resp}
19666		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindings", resp, "Failure sending request")
19667		return
19668	}
19669
19670	result.hnbc, err = client.ListHostNameBindingsResponder(resp)
19671	if err != nil {
19672		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindings", resp, "Failure responding to request")
19673		return
19674	}
19675	if result.hnbc.hasNextLink() && result.hnbc.IsEmpty() {
19676		err = result.NextWithContext(ctx)
19677		return
19678	}
19679
19680	return
19681}
19682
19683// ListHostNameBindingsPreparer prepares the ListHostNameBindings request.
19684func (client AppsClient) ListHostNameBindingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
19685	pathParameters := map[string]interface{}{
19686		"name":              autorest.Encode("path", name),
19687		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19688		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19689	}
19690
19691	const APIVersion = "2018-02-01"
19692	queryParameters := map[string]interface{}{
19693		"api-version": APIVersion,
19694	}
19695
19696	preparer := autorest.CreatePreparer(
19697		autorest.AsGet(),
19698		autorest.WithBaseURL(client.BaseURI),
19699		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings", pathParameters),
19700		autorest.WithQueryParameters(queryParameters))
19701	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19702}
19703
19704// ListHostNameBindingsSender sends the ListHostNameBindings request. The method will close the
19705// http.Response Body if it receives an error.
19706func (client AppsClient) ListHostNameBindingsSender(req *http.Request) (*http.Response, error) {
19707	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19708}
19709
19710// ListHostNameBindingsResponder handles the response to the ListHostNameBindings request. The method always
19711// closes the http.Response Body.
19712func (client AppsClient) ListHostNameBindingsResponder(resp *http.Response) (result HostNameBindingCollection, err error) {
19713	err = autorest.Respond(
19714		resp,
19715		azure.WithErrorUnlessStatusCode(http.StatusOK),
19716		autorest.ByUnmarshallingJSON(&result),
19717		autorest.ByClosing())
19718	result.Response = autorest.Response{Response: resp}
19719	return
19720}
19721
19722// listHostNameBindingsNextResults retrieves the next set of results, if any.
19723func (client AppsClient) listHostNameBindingsNextResults(ctx context.Context, lastResults HostNameBindingCollection) (result HostNameBindingCollection, err error) {
19724	req, err := lastResults.hostNameBindingCollectionPreparer(ctx)
19725	if err != nil {
19726		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsNextResults", nil, "Failure preparing next results request")
19727	}
19728	if req == nil {
19729		return
19730	}
19731	resp, err := client.ListHostNameBindingsSender(req)
19732	if err != nil {
19733		result.Response = autorest.Response{Response: resp}
19734		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsNextResults", resp, "Failure sending next results request")
19735	}
19736	result, err = client.ListHostNameBindingsResponder(resp)
19737	if err != nil {
19738		err = autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsNextResults", resp, "Failure responding to next results request")
19739	}
19740	return
19741}
19742
19743// ListHostNameBindingsComplete enumerates all values, automatically crossing page boundaries as required.
19744func (client AppsClient) ListHostNameBindingsComplete(ctx context.Context, resourceGroupName string, name string) (result HostNameBindingCollectionIterator, err error) {
19745	if tracing.IsEnabled() {
19746		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindings")
19747		defer func() {
19748			sc := -1
19749			if result.Response().Response.Response != nil {
19750				sc = result.page.Response().Response.Response.StatusCode
19751			}
19752			tracing.EndSpan(ctx, sc, err)
19753		}()
19754	}
19755	result.page, err = client.ListHostNameBindings(ctx, resourceGroupName, name)
19756	return
19757}
19758
19759// ListHostNameBindingsSlot get hostname bindings for an app or a deployment slot.
19760// Parameters:
19761// resourceGroupName - name of the resource group to which the resource belongs.
19762// name - name of the app.
19763// slot - name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the
19764// production slot.
19765func (client AppsClient) ListHostNameBindingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result HostNameBindingCollectionPage, err error) {
19766	if tracing.IsEnabled() {
19767		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindingsSlot")
19768		defer func() {
19769			sc := -1
19770			if result.hnbc.Response.Response != nil {
19771				sc = result.hnbc.Response.Response.StatusCode
19772			}
19773			tracing.EndSpan(ctx, sc, err)
19774		}()
19775	}
19776	if err := validation.Validate([]validation.Validation{
19777		{TargetValue: resourceGroupName,
19778			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19779				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19780				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19781		return result, validation.NewError("web.AppsClient", "ListHostNameBindingsSlot", err.Error())
19782	}
19783
19784	result.fn = client.listHostNameBindingsSlotNextResults
19785	req, err := client.ListHostNameBindingsSlotPreparer(ctx, resourceGroupName, name, slot)
19786	if err != nil {
19787		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindingsSlot", nil, "Failure preparing request")
19788		return
19789	}
19790
19791	resp, err := client.ListHostNameBindingsSlotSender(req)
19792	if err != nil {
19793		result.hnbc.Response = autorest.Response{Response: resp}
19794		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindingsSlot", resp, "Failure sending request")
19795		return
19796	}
19797
19798	result.hnbc, err = client.ListHostNameBindingsSlotResponder(resp)
19799	if err != nil {
19800		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindingsSlot", resp, "Failure responding to request")
19801		return
19802	}
19803	if result.hnbc.hasNextLink() && result.hnbc.IsEmpty() {
19804		err = result.NextWithContext(ctx)
19805		return
19806	}
19807
19808	return
19809}
19810
19811// ListHostNameBindingsSlotPreparer prepares the ListHostNameBindingsSlot request.
19812func (client AppsClient) ListHostNameBindingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
19813	pathParameters := map[string]interface{}{
19814		"name":              autorest.Encode("path", name),
19815		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19816		"slot":              autorest.Encode("path", slot),
19817		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19818	}
19819
19820	const APIVersion = "2018-02-01"
19821	queryParameters := map[string]interface{}{
19822		"api-version": APIVersion,
19823	}
19824
19825	preparer := autorest.CreatePreparer(
19826		autorest.AsGet(),
19827		autorest.WithBaseURL(client.BaseURI),
19828		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings", pathParameters),
19829		autorest.WithQueryParameters(queryParameters))
19830	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19831}
19832
19833// ListHostNameBindingsSlotSender sends the ListHostNameBindingsSlot request. The method will close the
19834// http.Response Body if it receives an error.
19835func (client AppsClient) ListHostNameBindingsSlotSender(req *http.Request) (*http.Response, error) {
19836	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19837}
19838
19839// ListHostNameBindingsSlotResponder handles the response to the ListHostNameBindingsSlot request. The method always
19840// closes the http.Response Body.
19841func (client AppsClient) ListHostNameBindingsSlotResponder(resp *http.Response) (result HostNameBindingCollection, err error) {
19842	err = autorest.Respond(
19843		resp,
19844		azure.WithErrorUnlessStatusCode(http.StatusOK),
19845		autorest.ByUnmarshallingJSON(&result),
19846		autorest.ByClosing())
19847	result.Response = autorest.Response{Response: resp}
19848	return
19849}
19850
19851// listHostNameBindingsSlotNextResults retrieves the next set of results, if any.
19852func (client AppsClient) listHostNameBindingsSlotNextResults(ctx context.Context, lastResults HostNameBindingCollection) (result HostNameBindingCollection, err error) {
19853	req, err := lastResults.hostNameBindingCollectionPreparer(ctx)
19854	if err != nil {
19855		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsSlotNextResults", nil, "Failure preparing next results request")
19856	}
19857	if req == nil {
19858		return
19859	}
19860	resp, err := client.ListHostNameBindingsSlotSender(req)
19861	if err != nil {
19862		result.Response = autorest.Response{Response: resp}
19863		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsSlotNextResults", resp, "Failure sending next results request")
19864	}
19865	result, err = client.ListHostNameBindingsSlotResponder(resp)
19866	if err != nil {
19867		err = autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsSlotNextResults", resp, "Failure responding to next results request")
19868	}
19869	return
19870}
19871
19872// ListHostNameBindingsSlotComplete enumerates all values, automatically crossing page boundaries as required.
19873func (client AppsClient) ListHostNameBindingsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result HostNameBindingCollectionIterator, err error) {
19874	if tracing.IsEnabled() {
19875		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindingsSlot")
19876		defer func() {
19877			sc := -1
19878			if result.Response().Response.Response != nil {
19879				sc = result.page.Response().Response.Response.StatusCode
19880			}
19881			tracing.EndSpan(ctx, sc, err)
19882		}()
19883	}
19884	result.page, err = client.ListHostNameBindingsSlot(ctx, resourceGroupName, name, slot)
19885	return
19886}
19887
19888// ListHybridConnectionKeys gets the send key name and value for a Hybrid Connection.
19889// Parameters:
19890// resourceGroupName - name of the resource group to which the resource belongs.
19891// name - the name of the web app.
19892// namespaceName - the namespace for this hybrid connection.
19893// relayName - the relay name for this hybrid connection.
19894func (client AppsClient) ListHybridConnectionKeys(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnectionKey, err error) {
19895	if tracing.IsEnabled() {
19896		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHybridConnectionKeys")
19897		defer func() {
19898			sc := -1
19899			if result.Response.Response != nil {
19900				sc = result.Response.Response.StatusCode
19901			}
19902			tracing.EndSpan(ctx, sc, err)
19903		}()
19904	}
19905	if err := validation.Validate([]validation.Validation{
19906		{TargetValue: resourceGroupName,
19907			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19908				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19909				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19910		return result, validation.NewError("web.AppsClient", "ListHybridConnectionKeys", err.Error())
19911	}
19912
19913	req, err := client.ListHybridConnectionKeysPreparer(ctx, resourceGroupName, name, namespaceName, relayName)
19914	if err != nil {
19915		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionKeys", nil, "Failure preparing request")
19916		return
19917	}
19918
19919	resp, err := client.ListHybridConnectionKeysSender(req)
19920	if err != nil {
19921		result.Response = autorest.Response{Response: resp}
19922		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionKeys", resp, "Failure sending request")
19923		return
19924	}
19925
19926	result, err = client.ListHybridConnectionKeysResponder(resp)
19927	if err != nil {
19928		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionKeys", resp, "Failure responding to request")
19929		return
19930	}
19931
19932	return
19933}
19934
19935// ListHybridConnectionKeysPreparer prepares the ListHybridConnectionKeys request.
19936func (client AppsClient) ListHybridConnectionKeysPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) {
19937	pathParameters := map[string]interface{}{
19938		"name":              autorest.Encode("path", name),
19939		"namespaceName":     autorest.Encode("path", namespaceName),
19940		"relayName":         autorest.Encode("path", relayName),
19941		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19942		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19943	}
19944
19945	const APIVersion = "2018-02-01"
19946	queryParameters := map[string]interface{}{
19947		"api-version": APIVersion,
19948	}
19949
19950	preparer := autorest.CreatePreparer(
19951		autorest.AsPost(),
19952		autorest.WithBaseURL(client.BaseURI),
19953		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys", pathParameters),
19954		autorest.WithQueryParameters(queryParameters))
19955	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19956}
19957
19958// ListHybridConnectionKeysSender sends the ListHybridConnectionKeys request. The method will close the
19959// http.Response Body if it receives an error.
19960func (client AppsClient) ListHybridConnectionKeysSender(req *http.Request) (*http.Response, error) {
19961	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19962}
19963
19964// ListHybridConnectionKeysResponder handles the response to the ListHybridConnectionKeys request. The method always
19965// closes the http.Response Body.
19966func (client AppsClient) ListHybridConnectionKeysResponder(resp *http.Response) (result HybridConnectionKey, err error) {
19967	err = autorest.Respond(
19968		resp,
19969		azure.WithErrorUnlessStatusCode(http.StatusOK),
19970		autorest.ByUnmarshallingJSON(&result),
19971		autorest.ByClosing())
19972	result.Response = autorest.Response{Response: resp}
19973	return
19974}
19975
19976// ListHybridConnectionKeysSlot gets the send key name and value for a Hybrid Connection.
19977// Parameters:
19978// resourceGroupName - name of the resource group to which the resource belongs.
19979// name - the name of the web app.
19980// namespaceName - the namespace for this hybrid connection.
19981// relayName - the relay name for this hybrid connection.
19982// slot - the name of the slot for the web app.
19983func (client AppsClient) ListHybridConnectionKeysSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result HybridConnectionKey, err error) {
19984	if tracing.IsEnabled() {
19985		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHybridConnectionKeysSlot")
19986		defer func() {
19987			sc := -1
19988			if result.Response.Response != nil {
19989				sc = result.Response.Response.StatusCode
19990			}
19991			tracing.EndSpan(ctx, sc, err)
19992		}()
19993	}
19994	if err := validation.Validate([]validation.Validation{
19995		{TargetValue: resourceGroupName,
19996			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19997				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19998				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19999		return result, validation.NewError("web.AppsClient", "ListHybridConnectionKeysSlot", err.Error())
20000	}
20001
20002	req, err := client.ListHybridConnectionKeysSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot)
20003	if err != nil {
20004		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionKeysSlot", nil, "Failure preparing request")
20005		return
20006	}
20007
20008	resp, err := client.ListHybridConnectionKeysSlotSender(req)
20009	if err != nil {
20010		result.Response = autorest.Response{Response: resp}
20011		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionKeysSlot", resp, "Failure sending request")
20012		return
20013	}
20014
20015	result, err = client.ListHybridConnectionKeysSlotResponder(resp)
20016	if err != nil {
20017		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionKeysSlot", resp, "Failure responding to request")
20018		return
20019	}
20020
20021	return
20022}
20023
20024// ListHybridConnectionKeysSlotPreparer prepares the ListHybridConnectionKeysSlot request.
20025func (client AppsClient) ListHybridConnectionKeysSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) {
20026	pathParameters := map[string]interface{}{
20027		"name":              autorest.Encode("path", name),
20028		"namespaceName":     autorest.Encode("path", namespaceName),
20029		"relayName":         autorest.Encode("path", relayName),
20030		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20031		"slot":              autorest.Encode("path", slot),
20032		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20033	}
20034
20035	const APIVersion = "2018-02-01"
20036	queryParameters := map[string]interface{}{
20037		"api-version": APIVersion,
20038	}
20039
20040	preparer := autorest.CreatePreparer(
20041		autorest.AsPost(),
20042		autorest.WithBaseURL(client.BaseURI),
20043		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys", pathParameters),
20044		autorest.WithQueryParameters(queryParameters))
20045	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20046}
20047
20048// ListHybridConnectionKeysSlotSender sends the ListHybridConnectionKeysSlot request. The method will close the
20049// http.Response Body if it receives an error.
20050func (client AppsClient) ListHybridConnectionKeysSlotSender(req *http.Request) (*http.Response, error) {
20051	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20052}
20053
20054// ListHybridConnectionKeysSlotResponder handles the response to the ListHybridConnectionKeysSlot request. The method always
20055// closes the http.Response Body.
20056func (client AppsClient) ListHybridConnectionKeysSlotResponder(resp *http.Response) (result HybridConnectionKey, err error) {
20057	err = autorest.Respond(
20058		resp,
20059		azure.WithErrorUnlessStatusCode(http.StatusOK),
20060		autorest.ByUnmarshallingJSON(&result),
20061		autorest.ByClosing())
20062	result.Response = autorest.Response{Response: resp}
20063	return
20064}
20065
20066// ListHybridConnections retrieves all Service Bus Hybrid Connections used by this Web App.
20067// Parameters:
20068// resourceGroupName - name of the resource group to which the resource belongs.
20069// name - the name of the web app.
20070func (client AppsClient) ListHybridConnections(ctx context.Context, resourceGroupName string, name string) (result HybridConnection, err error) {
20071	if tracing.IsEnabled() {
20072		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHybridConnections")
20073		defer func() {
20074			sc := -1
20075			if result.Response.Response != nil {
20076				sc = result.Response.Response.StatusCode
20077			}
20078			tracing.EndSpan(ctx, sc, err)
20079		}()
20080	}
20081	if err := validation.Validate([]validation.Validation{
20082		{TargetValue: resourceGroupName,
20083			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20084				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20085				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20086		return result, validation.NewError("web.AppsClient", "ListHybridConnections", err.Error())
20087	}
20088
20089	req, err := client.ListHybridConnectionsPreparer(ctx, resourceGroupName, name)
20090	if err != nil {
20091		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnections", nil, "Failure preparing request")
20092		return
20093	}
20094
20095	resp, err := client.ListHybridConnectionsSender(req)
20096	if err != nil {
20097		result.Response = autorest.Response{Response: resp}
20098		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnections", resp, "Failure sending request")
20099		return
20100	}
20101
20102	result, err = client.ListHybridConnectionsResponder(resp)
20103	if err != nil {
20104		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnections", resp, "Failure responding to request")
20105		return
20106	}
20107
20108	return
20109}
20110
20111// ListHybridConnectionsPreparer prepares the ListHybridConnections request.
20112func (client AppsClient) ListHybridConnectionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
20113	pathParameters := map[string]interface{}{
20114		"name":              autorest.Encode("path", name),
20115		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20116		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20117	}
20118
20119	const APIVersion = "2018-02-01"
20120	queryParameters := map[string]interface{}{
20121		"api-version": APIVersion,
20122	}
20123
20124	preparer := autorest.CreatePreparer(
20125		autorest.AsGet(),
20126		autorest.WithBaseURL(client.BaseURI),
20127		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays", pathParameters),
20128		autorest.WithQueryParameters(queryParameters))
20129	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20130}
20131
20132// ListHybridConnectionsSender sends the ListHybridConnections request. The method will close the
20133// http.Response Body if it receives an error.
20134func (client AppsClient) ListHybridConnectionsSender(req *http.Request) (*http.Response, error) {
20135	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20136}
20137
20138// ListHybridConnectionsResponder handles the response to the ListHybridConnections request. The method always
20139// closes the http.Response Body.
20140func (client AppsClient) ListHybridConnectionsResponder(resp *http.Response) (result HybridConnection, err error) {
20141	err = autorest.Respond(
20142		resp,
20143		azure.WithErrorUnlessStatusCode(http.StatusOK),
20144		autorest.ByUnmarshallingJSON(&result),
20145		autorest.ByClosing())
20146	result.Response = autorest.Response{Response: resp}
20147	return
20148}
20149
20150// ListHybridConnectionsSlot retrieves all Service Bus Hybrid Connections used by this Web App.
20151// Parameters:
20152// resourceGroupName - name of the resource group to which the resource belongs.
20153// name - the name of the web app.
20154// slot - the name of the slot for the web app.
20155func (client AppsClient) ListHybridConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result HybridConnection, err error) {
20156	if tracing.IsEnabled() {
20157		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHybridConnectionsSlot")
20158		defer func() {
20159			sc := -1
20160			if result.Response.Response != nil {
20161				sc = result.Response.Response.StatusCode
20162			}
20163			tracing.EndSpan(ctx, sc, err)
20164		}()
20165	}
20166	if err := validation.Validate([]validation.Validation{
20167		{TargetValue: resourceGroupName,
20168			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20169				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20170				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20171		return result, validation.NewError("web.AppsClient", "ListHybridConnectionsSlot", err.Error())
20172	}
20173
20174	req, err := client.ListHybridConnectionsSlotPreparer(ctx, resourceGroupName, name, slot)
20175	if err != nil {
20176		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionsSlot", nil, "Failure preparing request")
20177		return
20178	}
20179
20180	resp, err := client.ListHybridConnectionsSlotSender(req)
20181	if err != nil {
20182		result.Response = autorest.Response{Response: resp}
20183		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionsSlot", resp, "Failure sending request")
20184		return
20185	}
20186
20187	result, err = client.ListHybridConnectionsSlotResponder(resp)
20188	if err != nil {
20189		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionsSlot", resp, "Failure responding to request")
20190		return
20191	}
20192
20193	return
20194}
20195
20196// ListHybridConnectionsSlotPreparer prepares the ListHybridConnectionsSlot request.
20197func (client AppsClient) ListHybridConnectionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
20198	pathParameters := map[string]interface{}{
20199		"name":              autorest.Encode("path", name),
20200		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20201		"slot":              autorest.Encode("path", slot),
20202		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20203	}
20204
20205	const APIVersion = "2018-02-01"
20206	queryParameters := map[string]interface{}{
20207		"api-version": APIVersion,
20208	}
20209
20210	preparer := autorest.CreatePreparer(
20211		autorest.AsGet(),
20212		autorest.WithBaseURL(client.BaseURI),
20213		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays", pathParameters),
20214		autorest.WithQueryParameters(queryParameters))
20215	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20216}
20217
20218// ListHybridConnectionsSlotSender sends the ListHybridConnectionsSlot request. The method will close the
20219// http.Response Body if it receives an error.
20220func (client AppsClient) ListHybridConnectionsSlotSender(req *http.Request) (*http.Response, error) {
20221	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20222}
20223
20224// ListHybridConnectionsSlotResponder handles the response to the ListHybridConnectionsSlot request. The method always
20225// closes the http.Response Body.
20226func (client AppsClient) ListHybridConnectionsSlotResponder(resp *http.Response) (result HybridConnection, err error) {
20227	err = autorest.Respond(
20228		resp,
20229		azure.WithErrorUnlessStatusCode(http.StatusOK),
20230		autorest.ByUnmarshallingJSON(&result),
20231		autorest.ByClosing())
20232	result.Response = autorest.Response{Response: resp}
20233	return
20234}
20235
20236// ListInstanceFunctionsSlot list the functions for a web site, or a deployment slot.
20237// Parameters:
20238// resourceGroupName - name of the resource group to which the resource belongs.
20239// name - site name.
20240// slot - name of the deployment slot.
20241func (client AppsClient) ListInstanceFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionEnvelopeCollectionPage, err error) {
20242	if tracing.IsEnabled() {
20243		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceFunctionsSlot")
20244		defer func() {
20245			sc := -1
20246			if result.fec.Response.Response != nil {
20247				sc = result.fec.Response.Response.StatusCode
20248			}
20249			tracing.EndSpan(ctx, sc, err)
20250		}()
20251	}
20252	if err := validation.Validate([]validation.Validation{
20253		{TargetValue: resourceGroupName,
20254			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20255				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20256				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20257		return result, validation.NewError("web.AppsClient", "ListInstanceFunctionsSlot", err.Error())
20258	}
20259
20260	result.fn = client.listInstanceFunctionsSlotNextResults
20261	req, err := client.ListInstanceFunctionsSlotPreparer(ctx, resourceGroupName, name, slot)
20262	if err != nil {
20263		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", nil, "Failure preparing request")
20264		return
20265	}
20266
20267	resp, err := client.ListInstanceFunctionsSlotSender(req)
20268	if err != nil {
20269		result.fec.Response = autorest.Response{Response: resp}
20270		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", resp, "Failure sending request")
20271		return
20272	}
20273
20274	result.fec, err = client.ListInstanceFunctionsSlotResponder(resp)
20275	if err != nil {
20276		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", resp, "Failure responding to request")
20277		return
20278	}
20279	if result.fec.hasNextLink() && result.fec.IsEmpty() {
20280		err = result.NextWithContext(ctx)
20281		return
20282	}
20283
20284	return
20285}
20286
20287// ListInstanceFunctionsSlotPreparer prepares the ListInstanceFunctionsSlot request.
20288func (client AppsClient) ListInstanceFunctionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
20289	pathParameters := map[string]interface{}{
20290		"name":              autorest.Encode("path", name),
20291		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20292		"slot":              autorest.Encode("path", slot),
20293		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20294	}
20295
20296	const APIVersion = "2018-02-01"
20297	queryParameters := map[string]interface{}{
20298		"api-version": APIVersion,
20299	}
20300
20301	preparer := autorest.CreatePreparer(
20302		autorest.AsGet(),
20303		autorest.WithBaseURL(client.BaseURI),
20304		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions", pathParameters),
20305		autorest.WithQueryParameters(queryParameters))
20306	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20307}
20308
20309// ListInstanceFunctionsSlotSender sends the ListInstanceFunctionsSlot request. The method will close the
20310// http.Response Body if it receives an error.
20311func (client AppsClient) ListInstanceFunctionsSlotSender(req *http.Request) (*http.Response, error) {
20312	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20313}
20314
20315// ListInstanceFunctionsSlotResponder handles the response to the ListInstanceFunctionsSlot request. The method always
20316// closes the http.Response Body.
20317func (client AppsClient) ListInstanceFunctionsSlotResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) {
20318	err = autorest.Respond(
20319		resp,
20320		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
20321		autorest.ByUnmarshallingJSON(&result),
20322		autorest.ByClosing())
20323	result.Response = autorest.Response{Response: resp}
20324	return
20325}
20326
20327// listInstanceFunctionsSlotNextResults retrieves the next set of results, if any.
20328func (client AppsClient) listInstanceFunctionsSlotNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) {
20329	req, err := lastResults.functionEnvelopeCollectionPreparer(ctx)
20330	if err != nil {
20331		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceFunctionsSlotNextResults", nil, "Failure preparing next results request")
20332	}
20333	if req == nil {
20334		return
20335	}
20336	resp, err := client.ListInstanceFunctionsSlotSender(req)
20337	if err != nil {
20338		result.Response = autorest.Response{Response: resp}
20339		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceFunctionsSlotNextResults", resp, "Failure sending next results request")
20340	}
20341	result, err = client.ListInstanceFunctionsSlotResponder(resp)
20342	if err != nil {
20343		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceFunctionsSlotNextResults", resp, "Failure responding to next results request")
20344	}
20345	return
20346}
20347
20348// ListInstanceFunctionsSlotComplete enumerates all values, automatically crossing page boundaries as required.
20349func (client AppsClient) ListInstanceFunctionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionEnvelopeCollectionIterator, err error) {
20350	if tracing.IsEnabled() {
20351		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceFunctionsSlot")
20352		defer func() {
20353			sc := -1
20354			if result.Response().Response.Response != nil {
20355				sc = result.page.Response().Response.Response.StatusCode
20356			}
20357			tracing.EndSpan(ctx, sc, err)
20358		}()
20359	}
20360	result.page, err = client.ListInstanceFunctionsSlot(ctx, resourceGroupName, name, slot)
20361	return
20362}
20363
20364// ListInstanceIdentifiers gets all scale-out instances of an app.
20365// Parameters:
20366// resourceGroupName - name of the resource group to which the resource belongs.
20367// name - name of the app.
20368func (client AppsClient) ListInstanceIdentifiers(ctx context.Context, resourceGroupName string, name string) (result AppInstanceCollectionPage, err error) {
20369	if tracing.IsEnabled() {
20370		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiers")
20371		defer func() {
20372			sc := -1
20373			if result.aic.Response.Response != nil {
20374				sc = result.aic.Response.Response.StatusCode
20375			}
20376			tracing.EndSpan(ctx, sc, err)
20377		}()
20378	}
20379	if err := validation.Validate([]validation.Validation{
20380		{TargetValue: resourceGroupName,
20381			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20382				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20383				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20384		return result, validation.NewError("web.AppsClient", "ListInstanceIdentifiers", err.Error())
20385	}
20386
20387	result.fn = client.listInstanceIdentifiersNextResults
20388	req, err := client.ListInstanceIdentifiersPreparer(ctx, resourceGroupName, name)
20389	if err != nil {
20390		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiers", nil, "Failure preparing request")
20391		return
20392	}
20393
20394	resp, err := client.ListInstanceIdentifiersSender(req)
20395	if err != nil {
20396		result.aic.Response = autorest.Response{Response: resp}
20397		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiers", resp, "Failure sending request")
20398		return
20399	}
20400
20401	result.aic, err = client.ListInstanceIdentifiersResponder(resp)
20402	if err != nil {
20403		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiers", resp, "Failure responding to request")
20404		return
20405	}
20406	if result.aic.hasNextLink() && result.aic.IsEmpty() {
20407		err = result.NextWithContext(ctx)
20408		return
20409	}
20410
20411	return
20412}
20413
20414// ListInstanceIdentifiersPreparer prepares the ListInstanceIdentifiers request.
20415func (client AppsClient) ListInstanceIdentifiersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
20416	pathParameters := map[string]interface{}{
20417		"name":              autorest.Encode("path", name),
20418		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20419		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20420	}
20421
20422	const APIVersion = "2018-02-01"
20423	queryParameters := map[string]interface{}{
20424		"api-version": APIVersion,
20425	}
20426
20427	preparer := autorest.CreatePreparer(
20428		autorest.AsGet(),
20429		autorest.WithBaseURL(client.BaseURI),
20430		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances", pathParameters),
20431		autorest.WithQueryParameters(queryParameters))
20432	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20433}
20434
20435// ListInstanceIdentifiersSender sends the ListInstanceIdentifiers request. The method will close the
20436// http.Response Body if it receives an error.
20437func (client AppsClient) ListInstanceIdentifiersSender(req *http.Request) (*http.Response, error) {
20438	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20439}
20440
20441// ListInstanceIdentifiersResponder handles the response to the ListInstanceIdentifiers request. The method always
20442// closes the http.Response Body.
20443func (client AppsClient) ListInstanceIdentifiersResponder(resp *http.Response) (result AppInstanceCollection, err error) {
20444	err = autorest.Respond(
20445		resp,
20446		azure.WithErrorUnlessStatusCode(http.StatusOK),
20447		autorest.ByUnmarshallingJSON(&result),
20448		autorest.ByClosing())
20449	result.Response = autorest.Response{Response: resp}
20450	return
20451}
20452
20453// listInstanceIdentifiersNextResults retrieves the next set of results, if any.
20454func (client AppsClient) listInstanceIdentifiersNextResults(ctx context.Context, lastResults AppInstanceCollection) (result AppInstanceCollection, err error) {
20455	req, err := lastResults.appInstanceCollectionPreparer(ctx)
20456	if err != nil {
20457		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersNextResults", nil, "Failure preparing next results request")
20458	}
20459	if req == nil {
20460		return
20461	}
20462	resp, err := client.ListInstanceIdentifiersSender(req)
20463	if err != nil {
20464		result.Response = autorest.Response{Response: resp}
20465		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersNextResults", resp, "Failure sending next results request")
20466	}
20467	result, err = client.ListInstanceIdentifiersResponder(resp)
20468	if err != nil {
20469		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersNextResults", resp, "Failure responding to next results request")
20470	}
20471	return
20472}
20473
20474// ListInstanceIdentifiersComplete enumerates all values, automatically crossing page boundaries as required.
20475func (client AppsClient) ListInstanceIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result AppInstanceCollectionIterator, err error) {
20476	if tracing.IsEnabled() {
20477		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiers")
20478		defer func() {
20479			sc := -1
20480			if result.Response().Response.Response != nil {
20481				sc = result.page.Response().Response.Response.StatusCode
20482			}
20483			tracing.EndSpan(ctx, sc, err)
20484		}()
20485	}
20486	result.page, err = client.ListInstanceIdentifiers(ctx, resourceGroupName, name)
20487	return
20488}
20489
20490// ListInstanceIdentifiersSlot gets all scale-out instances of an app.
20491// Parameters:
20492// resourceGroupName - name of the resource group to which the resource belongs.
20493// name - name of the app.
20494// slot - name of the deployment slot. If a slot is not specified, the API gets the production slot instances.
20495func (client AppsClient) ListInstanceIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AppInstanceCollectionPage, err error) {
20496	if tracing.IsEnabled() {
20497		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiersSlot")
20498		defer func() {
20499			sc := -1
20500			if result.aic.Response.Response != nil {
20501				sc = result.aic.Response.Response.StatusCode
20502			}
20503			tracing.EndSpan(ctx, sc, err)
20504		}()
20505	}
20506	if err := validation.Validate([]validation.Validation{
20507		{TargetValue: resourceGroupName,
20508			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20509				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20510				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20511		return result, validation.NewError("web.AppsClient", "ListInstanceIdentifiersSlot", err.Error())
20512	}
20513
20514	result.fn = client.listInstanceIdentifiersSlotNextResults
20515	req, err := client.ListInstanceIdentifiersSlotPreparer(ctx, resourceGroupName, name, slot)
20516	if err != nil {
20517		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiersSlot", nil, "Failure preparing request")
20518		return
20519	}
20520
20521	resp, err := client.ListInstanceIdentifiersSlotSender(req)
20522	if err != nil {
20523		result.aic.Response = autorest.Response{Response: resp}
20524		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiersSlot", resp, "Failure sending request")
20525		return
20526	}
20527
20528	result.aic, err = client.ListInstanceIdentifiersSlotResponder(resp)
20529	if err != nil {
20530		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiersSlot", resp, "Failure responding to request")
20531		return
20532	}
20533	if result.aic.hasNextLink() && result.aic.IsEmpty() {
20534		err = result.NextWithContext(ctx)
20535		return
20536	}
20537
20538	return
20539}
20540
20541// ListInstanceIdentifiersSlotPreparer prepares the ListInstanceIdentifiersSlot request.
20542func (client AppsClient) ListInstanceIdentifiersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
20543	pathParameters := map[string]interface{}{
20544		"name":              autorest.Encode("path", name),
20545		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20546		"slot":              autorest.Encode("path", slot),
20547		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20548	}
20549
20550	const APIVersion = "2018-02-01"
20551	queryParameters := map[string]interface{}{
20552		"api-version": APIVersion,
20553	}
20554
20555	preparer := autorest.CreatePreparer(
20556		autorest.AsGet(),
20557		autorest.WithBaseURL(client.BaseURI),
20558		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances", pathParameters),
20559		autorest.WithQueryParameters(queryParameters))
20560	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20561}
20562
20563// ListInstanceIdentifiersSlotSender sends the ListInstanceIdentifiersSlot request. The method will close the
20564// http.Response Body if it receives an error.
20565func (client AppsClient) ListInstanceIdentifiersSlotSender(req *http.Request) (*http.Response, error) {
20566	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20567}
20568
20569// ListInstanceIdentifiersSlotResponder handles the response to the ListInstanceIdentifiersSlot request. The method always
20570// closes the http.Response Body.
20571func (client AppsClient) ListInstanceIdentifiersSlotResponder(resp *http.Response) (result AppInstanceCollection, err error) {
20572	err = autorest.Respond(
20573		resp,
20574		azure.WithErrorUnlessStatusCode(http.StatusOK),
20575		autorest.ByUnmarshallingJSON(&result),
20576		autorest.ByClosing())
20577	result.Response = autorest.Response{Response: resp}
20578	return
20579}
20580
20581// listInstanceIdentifiersSlotNextResults retrieves the next set of results, if any.
20582func (client AppsClient) listInstanceIdentifiersSlotNextResults(ctx context.Context, lastResults AppInstanceCollection) (result AppInstanceCollection, err error) {
20583	req, err := lastResults.appInstanceCollectionPreparer(ctx)
20584	if err != nil {
20585		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersSlotNextResults", nil, "Failure preparing next results request")
20586	}
20587	if req == nil {
20588		return
20589	}
20590	resp, err := client.ListInstanceIdentifiersSlotSender(req)
20591	if err != nil {
20592		result.Response = autorest.Response{Response: resp}
20593		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersSlotNextResults", resp, "Failure sending next results request")
20594	}
20595	result, err = client.ListInstanceIdentifiersSlotResponder(resp)
20596	if err != nil {
20597		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersSlotNextResults", resp, "Failure responding to next results request")
20598	}
20599	return
20600}
20601
20602// ListInstanceIdentifiersSlotComplete enumerates all values, automatically crossing page boundaries as required.
20603func (client AppsClient) ListInstanceIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result AppInstanceCollectionIterator, err error) {
20604	if tracing.IsEnabled() {
20605		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiersSlot")
20606		defer func() {
20607			sc := -1
20608			if result.Response().Response.Response != nil {
20609				sc = result.page.Response().Response.Response.StatusCode
20610			}
20611			tracing.EndSpan(ctx, sc, err)
20612		}()
20613	}
20614	result.page, err = client.ListInstanceIdentifiersSlot(ctx, resourceGroupName, name, slot)
20615	return
20616}
20617
20618// ListInstanceProcesses get list of processes for a web site, or a deployment slot, or for a specific scaled-out
20619// instance in a web site.
20620// Parameters:
20621// resourceGroupName - name of the resource group to which the resource belongs.
20622// name - site name.
20623// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
20624// response from "GET api/sites/{siteName}/instances".
20625func (client AppsClient) ListInstanceProcesses(ctx context.Context, resourceGroupName string, name string, instanceID string) (result ProcessInfoCollectionPage, err error) {
20626	if tracing.IsEnabled() {
20627		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcesses")
20628		defer func() {
20629			sc := -1
20630			if result.pic.Response.Response != nil {
20631				sc = result.pic.Response.Response.StatusCode
20632			}
20633			tracing.EndSpan(ctx, sc, err)
20634		}()
20635	}
20636	if err := validation.Validate([]validation.Validation{
20637		{TargetValue: resourceGroupName,
20638			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20639				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20640				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20641		return result, validation.NewError("web.AppsClient", "ListInstanceProcesses", err.Error())
20642	}
20643
20644	result.fn = client.listInstanceProcessesNextResults
20645	req, err := client.ListInstanceProcessesPreparer(ctx, resourceGroupName, name, instanceID)
20646	if err != nil {
20647		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", nil, "Failure preparing request")
20648		return
20649	}
20650
20651	resp, err := client.ListInstanceProcessesSender(req)
20652	if err != nil {
20653		result.pic.Response = autorest.Response{Response: resp}
20654		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure sending request")
20655		return
20656	}
20657
20658	result.pic, err = client.ListInstanceProcessesResponder(resp)
20659	if err != nil {
20660		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure responding to request")
20661		return
20662	}
20663	if result.pic.hasNextLink() && result.pic.IsEmpty() {
20664		err = result.NextWithContext(ctx)
20665		return
20666	}
20667
20668	return
20669}
20670
20671// ListInstanceProcessesPreparer prepares the ListInstanceProcesses request.
20672func (client AppsClient) ListInstanceProcessesPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) {
20673	pathParameters := map[string]interface{}{
20674		"instanceId":        autorest.Encode("path", instanceID),
20675		"name":              autorest.Encode("path", name),
20676		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20677		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20678	}
20679
20680	const APIVersion = "2018-02-01"
20681	queryParameters := map[string]interface{}{
20682		"api-version": APIVersion,
20683	}
20684
20685	preparer := autorest.CreatePreparer(
20686		autorest.AsGet(),
20687		autorest.WithBaseURL(client.BaseURI),
20688		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes", pathParameters),
20689		autorest.WithQueryParameters(queryParameters))
20690	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20691}
20692
20693// ListInstanceProcessesSender sends the ListInstanceProcesses request. The method will close the
20694// http.Response Body if it receives an error.
20695func (client AppsClient) ListInstanceProcessesSender(req *http.Request) (*http.Response, error) {
20696	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20697}
20698
20699// ListInstanceProcessesResponder handles the response to the ListInstanceProcesses request. The method always
20700// closes the http.Response Body.
20701func (client AppsClient) ListInstanceProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
20702	err = autorest.Respond(
20703		resp,
20704		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
20705		autorest.ByUnmarshallingJSON(&result),
20706		autorest.ByClosing())
20707	result.Response = autorest.Response{Response: resp}
20708	return
20709}
20710
20711// listInstanceProcessesNextResults retrieves the next set of results, if any.
20712func (client AppsClient) listInstanceProcessesNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
20713	req, err := lastResults.processInfoCollectionPreparer(ctx)
20714	if err != nil {
20715		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", nil, "Failure preparing next results request")
20716	}
20717	if req == nil {
20718		return
20719	}
20720	resp, err := client.ListInstanceProcessesSender(req)
20721	if err != nil {
20722		result.Response = autorest.Response{Response: resp}
20723		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", resp, "Failure sending next results request")
20724	}
20725	result, err = client.ListInstanceProcessesResponder(resp)
20726	if err != nil {
20727		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", resp, "Failure responding to next results request")
20728	}
20729	return
20730}
20731
20732// ListInstanceProcessesComplete enumerates all values, automatically crossing page boundaries as required.
20733func (client AppsClient) ListInstanceProcessesComplete(ctx context.Context, resourceGroupName string, name string, instanceID string) (result ProcessInfoCollectionIterator, err error) {
20734	if tracing.IsEnabled() {
20735		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcesses")
20736		defer func() {
20737			sc := -1
20738			if result.Response().Response.Response != nil {
20739				sc = result.page.Response().Response.Response.StatusCode
20740			}
20741			tracing.EndSpan(ctx, sc, err)
20742		}()
20743	}
20744	result.page, err = client.ListInstanceProcesses(ctx, resourceGroupName, name, instanceID)
20745	return
20746}
20747
20748// ListInstanceProcessesSlot get list of processes for a web site, or a deployment slot, or for a specific scaled-out
20749// instance in a web site.
20750// Parameters:
20751// resourceGroupName - name of the resource group to which the resource belongs.
20752// name - site name.
20753// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
20754// production slot.
20755// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
20756// response from "GET api/sites/{siteName}/instances".
20757func (client AppsClient) ListInstanceProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result ProcessInfoCollectionPage, err error) {
20758	if tracing.IsEnabled() {
20759		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessesSlot")
20760		defer func() {
20761			sc := -1
20762			if result.pic.Response.Response != nil {
20763				sc = result.pic.Response.Response.StatusCode
20764			}
20765			tracing.EndSpan(ctx, sc, err)
20766		}()
20767	}
20768	if err := validation.Validate([]validation.Validation{
20769		{TargetValue: resourceGroupName,
20770			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20771				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20772				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20773		return result, validation.NewError("web.AppsClient", "ListInstanceProcessesSlot", err.Error())
20774	}
20775
20776	result.fn = client.listInstanceProcessesSlotNextResults
20777	req, err := client.ListInstanceProcessesSlotPreparer(ctx, resourceGroupName, name, slot, instanceID)
20778	if err != nil {
20779		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", nil, "Failure preparing request")
20780		return
20781	}
20782
20783	resp, err := client.ListInstanceProcessesSlotSender(req)
20784	if err != nil {
20785		result.pic.Response = autorest.Response{Response: resp}
20786		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure sending request")
20787		return
20788	}
20789
20790	result.pic, err = client.ListInstanceProcessesSlotResponder(resp)
20791	if err != nil {
20792		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure responding to request")
20793		return
20794	}
20795	if result.pic.hasNextLink() && result.pic.IsEmpty() {
20796		err = result.NextWithContext(ctx)
20797		return
20798	}
20799
20800	return
20801}
20802
20803// ListInstanceProcessesSlotPreparer prepares the ListInstanceProcessesSlot request.
20804func (client AppsClient) ListInstanceProcessesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) {
20805	pathParameters := map[string]interface{}{
20806		"instanceId":        autorest.Encode("path", instanceID),
20807		"name":              autorest.Encode("path", name),
20808		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20809		"slot":              autorest.Encode("path", slot),
20810		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20811	}
20812
20813	const APIVersion = "2018-02-01"
20814	queryParameters := map[string]interface{}{
20815		"api-version": APIVersion,
20816	}
20817
20818	preparer := autorest.CreatePreparer(
20819		autorest.AsGet(),
20820		autorest.WithBaseURL(client.BaseURI),
20821		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes", pathParameters),
20822		autorest.WithQueryParameters(queryParameters))
20823	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20824}
20825
20826// ListInstanceProcessesSlotSender sends the ListInstanceProcessesSlot request. The method will close the
20827// http.Response Body if it receives an error.
20828func (client AppsClient) ListInstanceProcessesSlotSender(req *http.Request) (*http.Response, error) {
20829	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20830}
20831
20832// ListInstanceProcessesSlotResponder handles the response to the ListInstanceProcessesSlot request. The method always
20833// closes the http.Response Body.
20834func (client AppsClient) ListInstanceProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
20835	err = autorest.Respond(
20836		resp,
20837		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
20838		autorest.ByUnmarshallingJSON(&result),
20839		autorest.ByClosing())
20840	result.Response = autorest.Response{Response: resp}
20841	return
20842}
20843
20844// listInstanceProcessesSlotNextResults retrieves the next set of results, if any.
20845func (client AppsClient) listInstanceProcessesSlotNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
20846	req, err := lastResults.processInfoCollectionPreparer(ctx)
20847	if err != nil {
20848		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", nil, "Failure preparing next results request")
20849	}
20850	if req == nil {
20851		return
20852	}
20853	resp, err := client.ListInstanceProcessesSlotSender(req)
20854	if err != nil {
20855		result.Response = autorest.Response{Response: resp}
20856		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", resp, "Failure sending next results request")
20857	}
20858	result, err = client.ListInstanceProcessesSlotResponder(resp)
20859	if err != nil {
20860		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", resp, "Failure responding to next results request")
20861	}
20862	return
20863}
20864
20865// ListInstanceProcessesSlotComplete enumerates all values, automatically crossing page boundaries as required.
20866func (client AppsClient) ListInstanceProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result ProcessInfoCollectionIterator, err error) {
20867	if tracing.IsEnabled() {
20868		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessesSlot")
20869		defer func() {
20870			sc := -1
20871			if result.Response().Response.Response != nil {
20872				sc = result.page.Response().Response.Response.StatusCode
20873			}
20874			tracing.EndSpan(ctx, sc, err)
20875		}()
20876	}
20877	result.page, err = client.ListInstanceProcessesSlot(ctx, resourceGroupName, name, slot, instanceID)
20878	return
20879}
20880
20881// ListInstanceProcessModules list module information for a process by its ID for a specific scaled-out instance in a
20882// web site.
20883// Parameters:
20884// resourceGroupName - name of the resource group to which the resource belongs.
20885// name - site name.
20886// processID - pID.
20887// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
20888// response from "GET api/sites/{siteName}/instances".
20889func (client AppsClient) ListInstanceProcessModules(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessModuleInfoCollectionPage, err error) {
20890	if tracing.IsEnabled() {
20891		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModules")
20892		defer func() {
20893			sc := -1
20894			if result.pmic.Response.Response != nil {
20895				sc = result.pmic.Response.Response.StatusCode
20896			}
20897			tracing.EndSpan(ctx, sc, err)
20898		}()
20899	}
20900	if err := validation.Validate([]validation.Validation{
20901		{TargetValue: resourceGroupName,
20902			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20903				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20904				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20905		return result, validation.NewError("web.AppsClient", "ListInstanceProcessModules", err.Error())
20906	}
20907
20908	result.fn = client.listInstanceProcessModulesNextResults
20909	req, err := client.ListInstanceProcessModulesPreparer(ctx, resourceGroupName, name, processID, instanceID)
20910	if err != nil {
20911		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", nil, "Failure preparing request")
20912		return
20913	}
20914
20915	resp, err := client.ListInstanceProcessModulesSender(req)
20916	if err != nil {
20917		result.pmic.Response = autorest.Response{Response: resp}
20918		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", resp, "Failure sending request")
20919		return
20920	}
20921
20922	result.pmic, err = client.ListInstanceProcessModulesResponder(resp)
20923	if err != nil {
20924		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", resp, "Failure responding to request")
20925		return
20926	}
20927	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
20928		err = result.NextWithContext(ctx)
20929		return
20930	}
20931
20932	return
20933}
20934
20935// ListInstanceProcessModulesPreparer prepares the ListInstanceProcessModules request.
20936func (client AppsClient) ListInstanceProcessModulesPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
20937	pathParameters := map[string]interface{}{
20938		"instanceId":        autorest.Encode("path", instanceID),
20939		"name":              autorest.Encode("path", name),
20940		"processId":         autorest.Encode("path", processID),
20941		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20942		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20943	}
20944
20945	const APIVersion = "2018-02-01"
20946	queryParameters := map[string]interface{}{
20947		"api-version": APIVersion,
20948	}
20949
20950	preparer := autorest.CreatePreparer(
20951		autorest.AsGet(),
20952		autorest.WithBaseURL(client.BaseURI),
20953		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules", pathParameters),
20954		autorest.WithQueryParameters(queryParameters))
20955	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20956}
20957
20958// ListInstanceProcessModulesSender sends the ListInstanceProcessModules request. The method will close the
20959// http.Response Body if it receives an error.
20960func (client AppsClient) ListInstanceProcessModulesSender(req *http.Request) (*http.Response, error) {
20961	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20962}
20963
20964// ListInstanceProcessModulesResponder handles the response to the ListInstanceProcessModules request. The method always
20965// closes the http.Response Body.
20966func (client AppsClient) ListInstanceProcessModulesResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
20967	err = autorest.Respond(
20968		resp,
20969		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
20970		autorest.ByUnmarshallingJSON(&result),
20971		autorest.ByClosing())
20972	result.Response = autorest.Response{Response: resp}
20973	return
20974}
20975
20976// listInstanceProcessModulesNextResults retrieves the next set of results, if any.
20977func (client AppsClient) listInstanceProcessModulesNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
20978	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
20979	if err != nil {
20980		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesNextResults", nil, "Failure preparing next results request")
20981	}
20982	if req == nil {
20983		return
20984	}
20985	resp, err := client.ListInstanceProcessModulesSender(req)
20986	if err != nil {
20987		result.Response = autorest.Response{Response: resp}
20988		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesNextResults", resp, "Failure sending next results request")
20989	}
20990	result, err = client.ListInstanceProcessModulesResponder(resp)
20991	if err != nil {
20992		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesNextResults", resp, "Failure responding to next results request")
20993	}
20994	return
20995}
20996
20997// ListInstanceProcessModulesComplete enumerates all values, automatically crossing page boundaries as required.
20998func (client AppsClient) ListInstanceProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessModuleInfoCollectionIterator, err error) {
20999	if tracing.IsEnabled() {
21000		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModules")
21001		defer func() {
21002			sc := -1
21003			if result.Response().Response.Response != nil {
21004				sc = result.page.Response().Response.Response.StatusCode
21005			}
21006			tracing.EndSpan(ctx, sc, err)
21007		}()
21008	}
21009	result.page, err = client.ListInstanceProcessModules(ctx, resourceGroupName, name, processID, instanceID)
21010	return
21011}
21012
21013// ListInstanceProcessModulesSlot list module information for a process by its ID for a specific scaled-out instance in
21014// a web site.
21015// Parameters:
21016// resourceGroupName - name of the resource group to which the resource belongs.
21017// name - site name.
21018// processID - pID.
21019// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
21020// production slot.
21021// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
21022// response from "GET api/sites/{siteName}/instances".
21023func (client AppsClient) ListInstanceProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessModuleInfoCollectionPage, err error) {
21024	if tracing.IsEnabled() {
21025		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModulesSlot")
21026		defer func() {
21027			sc := -1
21028			if result.pmic.Response.Response != nil {
21029				sc = result.pmic.Response.Response.StatusCode
21030			}
21031			tracing.EndSpan(ctx, sc, err)
21032		}()
21033	}
21034	if err := validation.Validate([]validation.Validation{
21035		{TargetValue: resourceGroupName,
21036			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21037				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21038				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21039		return result, validation.NewError("web.AppsClient", "ListInstanceProcessModulesSlot", err.Error())
21040	}
21041
21042	result.fn = client.listInstanceProcessModulesSlotNextResults
21043	req, err := client.ListInstanceProcessModulesSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
21044	if err != nil {
21045		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", nil, "Failure preparing request")
21046		return
21047	}
21048
21049	resp, err := client.ListInstanceProcessModulesSlotSender(req)
21050	if err != nil {
21051		result.pmic.Response = autorest.Response{Response: resp}
21052		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", resp, "Failure sending request")
21053		return
21054	}
21055
21056	result.pmic, err = client.ListInstanceProcessModulesSlotResponder(resp)
21057	if err != nil {
21058		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", resp, "Failure responding to request")
21059		return
21060	}
21061	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
21062		err = result.NextWithContext(ctx)
21063		return
21064	}
21065
21066	return
21067}
21068
21069// ListInstanceProcessModulesSlotPreparer prepares the ListInstanceProcessModulesSlot request.
21070func (client AppsClient) ListInstanceProcessModulesSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
21071	pathParameters := map[string]interface{}{
21072		"instanceId":        autorest.Encode("path", instanceID),
21073		"name":              autorest.Encode("path", name),
21074		"processId":         autorest.Encode("path", processID),
21075		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21076		"slot":              autorest.Encode("path", slot),
21077		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21078	}
21079
21080	const APIVersion = "2018-02-01"
21081	queryParameters := map[string]interface{}{
21082		"api-version": APIVersion,
21083	}
21084
21085	preparer := autorest.CreatePreparer(
21086		autorest.AsGet(),
21087		autorest.WithBaseURL(client.BaseURI),
21088		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules", pathParameters),
21089		autorest.WithQueryParameters(queryParameters))
21090	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21091}
21092
21093// ListInstanceProcessModulesSlotSender sends the ListInstanceProcessModulesSlot request. The method will close the
21094// http.Response Body if it receives an error.
21095func (client AppsClient) ListInstanceProcessModulesSlotSender(req *http.Request) (*http.Response, error) {
21096	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21097}
21098
21099// ListInstanceProcessModulesSlotResponder handles the response to the ListInstanceProcessModulesSlot request. The method always
21100// closes the http.Response Body.
21101func (client AppsClient) ListInstanceProcessModulesSlotResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
21102	err = autorest.Respond(
21103		resp,
21104		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
21105		autorest.ByUnmarshallingJSON(&result),
21106		autorest.ByClosing())
21107	result.Response = autorest.Response{Response: resp}
21108	return
21109}
21110
21111// listInstanceProcessModulesSlotNextResults retrieves the next set of results, if any.
21112func (client AppsClient) listInstanceProcessModulesSlotNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
21113	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
21114	if err != nil {
21115		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesSlotNextResults", nil, "Failure preparing next results request")
21116	}
21117	if req == nil {
21118		return
21119	}
21120	resp, err := client.ListInstanceProcessModulesSlotSender(req)
21121	if err != nil {
21122		result.Response = autorest.Response{Response: resp}
21123		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesSlotNextResults", resp, "Failure sending next results request")
21124	}
21125	result, err = client.ListInstanceProcessModulesSlotResponder(resp)
21126	if err != nil {
21127		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesSlotNextResults", resp, "Failure responding to next results request")
21128	}
21129	return
21130}
21131
21132// ListInstanceProcessModulesSlotComplete enumerates all values, automatically crossing page boundaries as required.
21133func (client AppsClient) ListInstanceProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessModuleInfoCollectionIterator, err error) {
21134	if tracing.IsEnabled() {
21135		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModulesSlot")
21136		defer func() {
21137			sc := -1
21138			if result.Response().Response.Response != nil {
21139				sc = result.page.Response().Response.Response.StatusCode
21140			}
21141			tracing.EndSpan(ctx, sc, err)
21142		}()
21143	}
21144	result.page, err = client.ListInstanceProcessModulesSlot(ctx, resourceGroupName, name, processID, slot, instanceID)
21145	return
21146}
21147
21148// ListInstanceProcessThreads list the threads in a process by its ID for a specific scaled-out instance in a web site.
21149// Parameters:
21150// resourceGroupName - name of the resource group to which the resource belongs.
21151// name - site name.
21152// processID - pID.
21153// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
21154// response from "GET api/sites/{siteName}/instances".
21155func (client AppsClient) ListInstanceProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessThreadInfoCollectionPage, err error) {
21156	if tracing.IsEnabled() {
21157		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreads")
21158		defer func() {
21159			sc := -1
21160			if result.ptic.Response.Response != nil {
21161				sc = result.ptic.Response.Response.StatusCode
21162			}
21163			tracing.EndSpan(ctx, sc, err)
21164		}()
21165	}
21166	if err := validation.Validate([]validation.Validation{
21167		{TargetValue: resourceGroupName,
21168			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21169				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21170				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21171		return result, validation.NewError("web.AppsClient", "ListInstanceProcessThreads", err.Error())
21172	}
21173
21174	result.fn = client.listInstanceProcessThreadsNextResults
21175	req, err := client.ListInstanceProcessThreadsPreparer(ctx, resourceGroupName, name, processID, instanceID)
21176	if err != nil {
21177		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", nil, "Failure preparing request")
21178		return
21179	}
21180
21181	resp, err := client.ListInstanceProcessThreadsSender(req)
21182	if err != nil {
21183		result.ptic.Response = autorest.Response{Response: resp}
21184		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", resp, "Failure sending request")
21185		return
21186	}
21187
21188	result.ptic, err = client.ListInstanceProcessThreadsResponder(resp)
21189	if err != nil {
21190		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", resp, "Failure responding to request")
21191		return
21192	}
21193	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
21194		err = result.NextWithContext(ctx)
21195		return
21196	}
21197
21198	return
21199}
21200
21201// ListInstanceProcessThreadsPreparer prepares the ListInstanceProcessThreads request.
21202func (client AppsClient) ListInstanceProcessThreadsPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
21203	pathParameters := map[string]interface{}{
21204		"instanceId":        autorest.Encode("path", instanceID),
21205		"name":              autorest.Encode("path", name),
21206		"processId":         autorest.Encode("path", processID),
21207		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21208		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21209	}
21210
21211	const APIVersion = "2018-02-01"
21212	queryParameters := map[string]interface{}{
21213		"api-version": APIVersion,
21214	}
21215
21216	preparer := autorest.CreatePreparer(
21217		autorest.AsGet(),
21218		autorest.WithBaseURL(client.BaseURI),
21219		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads", pathParameters),
21220		autorest.WithQueryParameters(queryParameters))
21221	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21222}
21223
21224// ListInstanceProcessThreadsSender sends the ListInstanceProcessThreads request. The method will close the
21225// http.Response Body if it receives an error.
21226func (client AppsClient) ListInstanceProcessThreadsSender(req *http.Request) (*http.Response, error) {
21227	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21228}
21229
21230// ListInstanceProcessThreadsResponder handles the response to the ListInstanceProcessThreads request. The method always
21231// closes the http.Response Body.
21232func (client AppsClient) ListInstanceProcessThreadsResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
21233	err = autorest.Respond(
21234		resp,
21235		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
21236		autorest.ByUnmarshallingJSON(&result),
21237		autorest.ByClosing())
21238	result.Response = autorest.Response{Response: resp}
21239	return
21240}
21241
21242// listInstanceProcessThreadsNextResults retrieves the next set of results, if any.
21243func (client AppsClient) listInstanceProcessThreadsNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
21244	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
21245	if err != nil {
21246		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsNextResults", nil, "Failure preparing next results request")
21247	}
21248	if req == nil {
21249		return
21250	}
21251	resp, err := client.ListInstanceProcessThreadsSender(req)
21252	if err != nil {
21253		result.Response = autorest.Response{Response: resp}
21254		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsNextResults", resp, "Failure sending next results request")
21255	}
21256	result, err = client.ListInstanceProcessThreadsResponder(resp)
21257	if err != nil {
21258		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsNextResults", resp, "Failure responding to next results request")
21259	}
21260	return
21261}
21262
21263// ListInstanceProcessThreadsComplete enumerates all values, automatically crossing page boundaries as required.
21264func (client AppsClient) ListInstanceProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessThreadInfoCollectionIterator, err error) {
21265	if tracing.IsEnabled() {
21266		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreads")
21267		defer func() {
21268			sc := -1
21269			if result.Response().Response.Response != nil {
21270				sc = result.page.Response().Response.Response.StatusCode
21271			}
21272			tracing.EndSpan(ctx, sc, err)
21273		}()
21274	}
21275	result.page, err = client.ListInstanceProcessThreads(ctx, resourceGroupName, name, processID, instanceID)
21276	return
21277}
21278
21279// ListInstanceProcessThreadsSlot list the threads in a process by its ID for a specific scaled-out instance in a web
21280// site.
21281// Parameters:
21282// resourceGroupName - name of the resource group to which the resource belongs.
21283// name - site name.
21284// processID - pID.
21285// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
21286// production slot.
21287// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
21288// response from "GET api/sites/{siteName}/instances".
21289func (client AppsClient) ListInstanceProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessThreadInfoCollectionPage, err error) {
21290	if tracing.IsEnabled() {
21291		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreadsSlot")
21292		defer func() {
21293			sc := -1
21294			if result.ptic.Response.Response != nil {
21295				sc = result.ptic.Response.Response.StatusCode
21296			}
21297			tracing.EndSpan(ctx, sc, err)
21298		}()
21299	}
21300	if err := validation.Validate([]validation.Validation{
21301		{TargetValue: resourceGroupName,
21302			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21303				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21304				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21305		return result, validation.NewError("web.AppsClient", "ListInstanceProcessThreadsSlot", err.Error())
21306	}
21307
21308	result.fn = client.listInstanceProcessThreadsSlotNextResults
21309	req, err := client.ListInstanceProcessThreadsSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
21310	if err != nil {
21311		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", nil, "Failure preparing request")
21312		return
21313	}
21314
21315	resp, err := client.ListInstanceProcessThreadsSlotSender(req)
21316	if err != nil {
21317		result.ptic.Response = autorest.Response{Response: resp}
21318		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", resp, "Failure sending request")
21319		return
21320	}
21321
21322	result.ptic, err = client.ListInstanceProcessThreadsSlotResponder(resp)
21323	if err != nil {
21324		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", resp, "Failure responding to request")
21325		return
21326	}
21327	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
21328		err = result.NextWithContext(ctx)
21329		return
21330	}
21331
21332	return
21333}
21334
21335// ListInstanceProcessThreadsSlotPreparer prepares the ListInstanceProcessThreadsSlot request.
21336func (client AppsClient) ListInstanceProcessThreadsSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
21337	pathParameters := map[string]interface{}{
21338		"instanceId":        autorest.Encode("path", instanceID),
21339		"name":              autorest.Encode("path", name),
21340		"processId":         autorest.Encode("path", processID),
21341		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21342		"slot":              autorest.Encode("path", slot),
21343		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21344	}
21345
21346	const APIVersion = "2018-02-01"
21347	queryParameters := map[string]interface{}{
21348		"api-version": APIVersion,
21349	}
21350
21351	preparer := autorest.CreatePreparer(
21352		autorest.AsGet(),
21353		autorest.WithBaseURL(client.BaseURI),
21354		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads", pathParameters),
21355		autorest.WithQueryParameters(queryParameters))
21356	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21357}
21358
21359// ListInstanceProcessThreadsSlotSender sends the ListInstanceProcessThreadsSlot request. The method will close the
21360// http.Response Body if it receives an error.
21361func (client AppsClient) ListInstanceProcessThreadsSlotSender(req *http.Request) (*http.Response, error) {
21362	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21363}
21364
21365// ListInstanceProcessThreadsSlotResponder handles the response to the ListInstanceProcessThreadsSlot request. The method always
21366// closes the http.Response Body.
21367func (client AppsClient) ListInstanceProcessThreadsSlotResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
21368	err = autorest.Respond(
21369		resp,
21370		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
21371		autorest.ByUnmarshallingJSON(&result),
21372		autorest.ByClosing())
21373	result.Response = autorest.Response{Response: resp}
21374	return
21375}
21376
21377// listInstanceProcessThreadsSlotNextResults retrieves the next set of results, if any.
21378func (client AppsClient) listInstanceProcessThreadsSlotNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
21379	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
21380	if err != nil {
21381		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsSlotNextResults", nil, "Failure preparing next results request")
21382	}
21383	if req == nil {
21384		return
21385	}
21386	resp, err := client.ListInstanceProcessThreadsSlotSender(req)
21387	if err != nil {
21388		result.Response = autorest.Response{Response: resp}
21389		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsSlotNextResults", resp, "Failure sending next results request")
21390	}
21391	result, err = client.ListInstanceProcessThreadsSlotResponder(resp)
21392	if err != nil {
21393		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsSlotNextResults", resp, "Failure responding to next results request")
21394	}
21395	return
21396}
21397
21398// ListInstanceProcessThreadsSlotComplete enumerates all values, automatically crossing page boundaries as required.
21399func (client AppsClient) ListInstanceProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessThreadInfoCollectionIterator, err error) {
21400	if tracing.IsEnabled() {
21401		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreadsSlot")
21402		defer func() {
21403			sc := -1
21404			if result.Response().Response.Response != nil {
21405				sc = result.page.Response().Response.Response.StatusCode
21406			}
21407			tracing.EndSpan(ctx, sc, err)
21408		}()
21409	}
21410	result.page, err = client.ListInstanceProcessThreadsSlot(ctx, resourceGroupName, name, processID, slot, instanceID)
21411	return
21412}
21413
21414// ListMetadata gets the metadata of an app.
21415// Parameters:
21416// resourceGroupName - name of the resource group to which the resource belongs.
21417// name - name of the app.
21418func (client AppsClient) ListMetadata(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) {
21419	if tracing.IsEnabled() {
21420		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetadata")
21421		defer func() {
21422			sc := -1
21423			if result.Response.Response != nil {
21424				sc = result.Response.Response.StatusCode
21425			}
21426			tracing.EndSpan(ctx, sc, err)
21427		}()
21428	}
21429	if err := validation.Validate([]validation.Validation{
21430		{TargetValue: resourceGroupName,
21431			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21432				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21433				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21434		return result, validation.NewError("web.AppsClient", "ListMetadata", err.Error())
21435	}
21436
21437	req, err := client.ListMetadataPreparer(ctx, resourceGroupName, name)
21438	if err != nil {
21439		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadata", nil, "Failure preparing request")
21440		return
21441	}
21442
21443	resp, err := client.ListMetadataSender(req)
21444	if err != nil {
21445		result.Response = autorest.Response{Response: resp}
21446		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadata", resp, "Failure sending request")
21447		return
21448	}
21449
21450	result, err = client.ListMetadataResponder(resp)
21451	if err != nil {
21452		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadata", resp, "Failure responding to request")
21453		return
21454	}
21455
21456	return
21457}
21458
21459// ListMetadataPreparer prepares the ListMetadata request.
21460func (client AppsClient) ListMetadataPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
21461	pathParameters := map[string]interface{}{
21462		"name":              autorest.Encode("path", name),
21463		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21464		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21465	}
21466
21467	const APIVersion = "2018-02-01"
21468	queryParameters := map[string]interface{}{
21469		"api-version": APIVersion,
21470	}
21471
21472	preparer := autorest.CreatePreparer(
21473		autorest.AsPost(),
21474		autorest.WithBaseURL(client.BaseURI),
21475		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list", pathParameters),
21476		autorest.WithQueryParameters(queryParameters))
21477	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21478}
21479
21480// ListMetadataSender sends the ListMetadata request. The method will close the
21481// http.Response Body if it receives an error.
21482func (client AppsClient) ListMetadataSender(req *http.Request) (*http.Response, error) {
21483	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21484}
21485
21486// ListMetadataResponder handles the response to the ListMetadata request. The method always
21487// closes the http.Response Body.
21488func (client AppsClient) ListMetadataResponder(resp *http.Response) (result StringDictionary, err error) {
21489	err = autorest.Respond(
21490		resp,
21491		azure.WithErrorUnlessStatusCode(http.StatusOK),
21492		autorest.ByUnmarshallingJSON(&result),
21493		autorest.ByClosing())
21494	result.Response = autorest.Response{Response: resp}
21495	return
21496}
21497
21498// ListMetadataSlot gets the metadata of an app.
21499// Parameters:
21500// resourceGroupName - name of the resource group to which the resource belongs.
21501// name - name of the app.
21502// slot - name of the deployment slot. If a slot is not specified, the API will get the metadata for the
21503// production slot.
21504func (client AppsClient) ListMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result StringDictionary, err error) {
21505	if tracing.IsEnabled() {
21506		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetadataSlot")
21507		defer func() {
21508			sc := -1
21509			if result.Response.Response != nil {
21510				sc = result.Response.Response.StatusCode
21511			}
21512			tracing.EndSpan(ctx, sc, err)
21513		}()
21514	}
21515	if err := validation.Validate([]validation.Validation{
21516		{TargetValue: resourceGroupName,
21517			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21518				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21519				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21520		return result, validation.NewError("web.AppsClient", "ListMetadataSlot", err.Error())
21521	}
21522
21523	req, err := client.ListMetadataSlotPreparer(ctx, resourceGroupName, name, slot)
21524	if err != nil {
21525		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadataSlot", nil, "Failure preparing request")
21526		return
21527	}
21528
21529	resp, err := client.ListMetadataSlotSender(req)
21530	if err != nil {
21531		result.Response = autorest.Response{Response: resp}
21532		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadataSlot", resp, "Failure sending request")
21533		return
21534	}
21535
21536	result, err = client.ListMetadataSlotResponder(resp)
21537	if err != nil {
21538		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadataSlot", resp, "Failure responding to request")
21539		return
21540	}
21541
21542	return
21543}
21544
21545// ListMetadataSlotPreparer prepares the ListMetadataSlot request.
21546func (client AppsClient) ListMetadataSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
21547	pathParameters := map[string]interface{}{
21548		"name":              autorest.Encode("path", name),
21549		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21550		"slot":              autorest.Encode("path", slot),
21551		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21552	}
21553
21554	const APIVersion = "2018-02-01"
21555	queryParameters := map[string]interface{}{
21556		"api-version": APIVersion,
21557	}
21558
21559	preparer := autorest.CreatePreparer(
21560		autorest.AsPost(),
21561		autorest.WithBaseURL(client.BaseURI),
21562		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list", pathParameters),
21563		autorest.WithQueryParameters(queryParameters))
21564	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21565}
21566
21567// ListMetadataSlotSender sends the ListMetadataSlot request. The method will close the
21568// http.Response Body if it receives an error.
21569func (client AppsClient) ListMetadataSlotSender(req *http.Request) (*http.Response, error) {
21570	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21571}
21572
21573// ListMetadataSlotResponder handles the response to the ListMetadataSlot request. The method always
21574// closes the http.Response Body.
21575func (client AppsClient) ListMetadataSlotResponder(resp *http.Response) (result StringDictionary, err error) {
21576	err = autorest.Respond(
21577		resp,
21578		azure.WithErrorUnlessStatusCode(http.StatusOK),
21579		autorest.ByUnmarshallingJSON(&result),
21580		autorest.ByClosing())
21581	result.Response = autorest.Response{Response: resp}
21582	return
21583}
21584
21585// ListMetricDefinitions gets all metric definitions of an app (or deployment slot, if specified).
21586// Parameters:
21587// resourceGroupName - name of the resource group to which the resource belongs.
21588// name - name of the app.
21589func (client AppsClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, name string) (result ResourceMetricDefinitionCollectionPage, err error) {
21590	if tracing.IsEnabled() {
21591		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetricDefinitions")
21592		defer func() {
21593			sc := -1
21594			if result.rmdc.Response.Response != nil {
21595				sc = result.rmdc.Response.Response.StatusCode
21596			}
21597			tracing.EndSpan(ctx, sc, err)
21598		}()
21599	}
21600	if err := validation.Validate([]validation.Validation{
21601		{TargetValue: resourceGroupName,
21602			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21603				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21604				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21605		return result, validation.NewError("web.AppsClient", "ListMetricDefinitions", err.Error())
21606	}
21607
21608	result.fn = client.listMetricDefinitionsNextResults
21609	req, err := client.ListMetricDefinitionsPreparer(ctx, resourceGroupName, name)
21610	if err != nil {
21611		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetricDefinitions", nil, "Failure preparing request")
21612		return
21613	}
21614
21615	resp, err := client.ListMetricDefinitionsSender(req)
21616	if err != nil {
21617		result.rmdc.Response = autorest.Response{Response: resp}
21618		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetricDefinitions", resp, "Failure sending request")
21619		return
21620	}
21621
21622	result.rmdc, err = client.ListMetricDefinitionsResponder(resp)
21623	if err != nil {
21624		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetricDefinitions", resp, "Failure responding to request")
21625		return
21626	}
21627	if result.rmdc.hasNextLink() && result.rmdc.IsEmpty() {
21628		err = result.NextWithContext(ctx)
21629		return
21630	}
21631
21632	return
21633}
21634
21635// ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request.
21636func (client AppsClient) ListMetricDefinitionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
21637	pathParameters := map[string]interface{}{
21638		"name":              autorest.Encode("path", name),
21639		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21640		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21641	}
21642
21643	const APIVersion = "2018-02-01"
21644	queryParameters := map[string]interface{}{
21645		"api-version": APIVersion,
21646	}
21647
21648	preparer := autorest.CreatePreparer(
21649		autorest.AsGet(),
21650		autorest.WithBaseURL(client.BaseURI),
21651		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions", pathParameters),
21652		autorest.WithQueryParameters(queryParameters))
21653	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21654}
21655
21656// ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the
21657// http.Response Body if it receives an error.
21658func (client AppsClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error) {
21659	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21660}
21661
21662// ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always
21663// closes the http.Response Body.
21664func (client AppsClient) ListMetricDefinitionsResponder(resp *http.Response) (result ResourceMetricDefinitionCollection, err error) {
21665	err = autorest.Respond(
21666		resp,
21667		azure.WithErrorUnlessStatusCode(http.StatusOK),
21668		autorest.ByUnmarshallingJSON(&result),
21669		autorest.ByClosing())
21670	result.Response = autorest.Response{Response: resp}
21671	return
21672}
21673
21674// listMetricDefinitionsNextResults retrieves the next set of results, if any.
21675func (client AppsClient) listMetricDefinitionsNextResults(ctx context.Context, lastResults ResourceMetricDefinitionCollection) (result ResourceMetricDefinitionCollection, err error) {
21676	req, err := lastResults.resourceMetricDefinitionCollectionPreparer(ctx)
21677	if err != nil {
21678		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listMetricDefinitionsNextResults", nil, "Failure preparing next results request")
21679	}
21680	if req == nil {
21681		return
21682	}
21683	resp, err := client.ListMetricDefinitionsSender(req)
21684	if err != nil {
21685		result.Response = autorest.Response{Response: resp}
21686		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listMetricDefinitionsNextResults", resp, "Failure sending next results request")
21687	}
21688	result, err = client.ListMetricDefinitionsResponder(resp)
21689	if err != nil {
21690		err = autorest.NewErrorWithError(err, "web.AppsClient", "listMetricDefinitionsNextResults", resp, "Failure responding to next results request")
21691	}
21692	return
21693}
21694
21695// ListMetricDefinitionsComplete enumerates all values, automatically crossing page boundaries as required.
21696func (client AppsClient) ListMetricDefinitionsComplete(ctx context.Context, resourceGroupName string, name string) (result ResourceMetricDefinitionCollectionIterator, err error) {
21697	if tracing.IsEnabled() {
21698		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetricDefinitions")
21699		defer func() {
21700			sc := -1
21701			if result.Response().Response.Response != nil {
21702				sc = result.page.Response().Response.Response.StatusCode
21703			}
21704			tracing.EndSpan(ctx, sc, err)
21705		}()
21706	}
21707	result.page, err = client.ListMetricDefinitions(ctx, resourceGroupName, name)
21708	return
21709}
21710
21711// ListMetricDefinitionsSlot gets all metric definitions of an app (or deployment slot, if specified).
21712// Parameters:
21713// resourceGroupName - name of the resource group to which the resource belongs.
21714// name - name of the app.
21715// slot - name of the deployment slot. If a slot is not specified, the API will get metric definitions of the
21716// production slot.
21717func (client AppsClient) ListMetricDefinitionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ResourceMetricDefinitionCollectionPage, err error) {
21718	if tracing.IsEnabled() {
21719		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetricDefinitionsSlot")
21720		defer func() {
21721			sc := -1
21722			if result.rmdc.Response.Response != nil {
21723				sc = result.rmdc.Response.Response.StatusCode
21724			}
21725			tracing.EndSpan(ctx, sc, err)
21726		}()
21727	}
21728	if err := validation.Validate([]validation.Validation{
21729		{TargetValue: resourceGroupName,
21730			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21731				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21732				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21733		return result, validation.NewError("web.AppsClient", "ListMetricDefinitionsSlot", err.Error())
21734	}
21735
21736	result.fn = client.listMetricDefinitionsSlotNextResults
21737	req, err := client.ListMetricDefinitionsSlotPreparer(ctx, resourceGroupName, name, slot)
21738	if err != nil {
21739		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetricDefinitionsSlot", nil, "Failure preparing request")
21740		return
21741	}
21742
21743	resp, err := client.ListMetricDefinitionsSlotSender(req)
21744	if err != nil {
21745		result.rmdc.Response = autorest.Response{Response: resp}
21746		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetricDefinitionsSlot", resp, "Failure sending request")
21747		return
21748	}
21749
21750	result.rmdc, err = client.ListMetricDefinitionsSlotResponder(resp)
21751	if err != nil {
21752		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetricDefinitionsSlot", resp, "Failure responding to request")
21753		return
21754	}
21755	if result.rmdc.hasNextLink() && result.rmdc.IsEmpty() {
21756		err = result.NextWithContext(ctx)
21757		return
21758	}
21759
21760	return
21761}
21762
21763// ListMetricDefinitionsSlotPreparer prepares the ListMetricDefinitionsSlot request.
21764func (client AppsClient) ListMetricDefinitionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
21765	pathParameters := map[string]interface{}{
21766		"name":              autorest.Encode("path", name),
21767		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21768		"slot":              autorest.Encode("path", slot),
21769		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21770	}
21771
21772	const APIVersion = "2018-02-01"
21773	queryParameters := map[string]interface{}{
21774		"api-version": APIVersion,
21775	}
21776
21777	preparer := autorest.CreatePreparer(
21778		autorest.AsGet(),
21779		autorest.WithBaseURL(client.BaseURI),
21780		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions", pathParameters),
21781		autorest.WithQueryParameters(queryParameters))
21782	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21783}
21784
21785// ListMetricDefinitionsSlotSender sends the ListMetricDefinitionsSlot request. The method will close the
21786// http.Response Body if it receives an error.
21787func (client AppsClient) ListMetricDefinitionsSlotSender(req *http.Request) (*http.Response, error) {
21788	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21789}
21790
21791// ListMetricDefinitionsSlotResponder handles the response to the ListMetricDefinitionsSlot request. The method always
21792// closes the http.Response Body.
21793func (client AppsClient) ListMetricDefinitionsSlotResponder(resp *http.Response) (result ResourceMetricDefinitionCollection, err error) {
21794	err = autorest.Respond(
21795		resp,
21796		azure.WithErrorUnlessStatusCode(http.StatusOK),
21797		autorest.ByUnmarshallingJSON(&result),
21798		autorest.ByClosing())
21799	result.Response = autorest.Response{Response: resp}
21800	return
21801}
21802
21803// listMetricDefinitionsSlotNextResults retrieves the next set of results, if any.
21804func (client AppsClient) listMetricDefinitionsSlotNextResults(ctx context.Context, lastResults ResourceMetricDefinitionCollection) (result ResourceMetricDefinitionCollection, err error) {
21805	req, err := lastResults.resourceMetricDefinitionCollectionPreparer(ctx)
21806	if err != nil {
21807		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listMetricDefinitionsSlotNextResults", nil, "Failure preparing next results request")
21808	}
21809	if req == nil {
21810		return
21811	}
21812	resp, err := client.ListMetricDefinitionsSlotSender(req)
21813	if err != nil {
21814		result.Response = autorest.Response{Response: resp}
21815		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listMetricDefinitionsSlotNextResults", resp, "Failure sending next results request")
21816	}
21817	result, err = client.ListMetricDefinitionsSlotResponder(resp)
21818	if err != nil {
21819		err = autorest.NewErrorWithError(err, "web.AppsClient", "listMetricDefinitionsSlotNextResults", resp, "Failure responding to next results request")
21820	}
21821	return
21822}
21823
21824// ListMetricDefinitionsSlotComplete enumerates all values, automatically crossing page boundaries as required.
21825func (client AppsClient) ListMetricDefinitionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ResourceMetricDefinitionCollectionIterator, err error) {
21826	if tracing.IsEnabled() {
21827		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetricDefinitionsSlot")
21828		defer func() {
21829			sc := -1
21830			if result.Response().Response.Response != nil {
21831				sc = result.page.Response().Response.Response.StatusCode
21832			}
21833			tracing.EndSpan(ctx, sc, err)
21834		}()
21835	}
21836	result.page, err = client.ListMetricDefinitionsSlot(ctx, resourceGroupName, name, slot)
21837	return
21838}
21839
21840// ListMetrics gets performance metrics of an app (or deployment slot, if specified).
21841// Parameters:
21842// resourceGroupName - name of the resource group to which the resource belongs.
21843// name - name of the app.
21844// details - specify "true" to include metric details in the response. It is "false" by default.
21845// filter - return only metrics specified in the filter (using OData syntax). For example: $filter=(name.value
21846// eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
21847// 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
21848func (client AppsClient) ListMetrics(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result ResourceMetricCollectionPage, err error) {
21849	if tracing.IsEnabled() {
21850		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetrics")
21851		defer func() {
21852			sc := -1
21853			if result.rmc.Response.Response != nil {
21854				sc = result.rmc.Response.Response.StatusCode
21855			}
21856			tracing.EndSpan(ctx, sc, err)
21857		}()
21858	}
21859	if err := validation.Validate([]validation.Validation{
21860		{TargetValue: resourceGroupName,
21861			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21862				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21863				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21864		return result, validation.NewError("web.AppsClient", "ListMetrics", err.Error())
21865	}
21866
21867	result.fn = client.listMetricsNextResults
21868	req, err := client.ListMetricsPreparer(ctx, resourceGroupName, name, details, filter)
21869	if err != nil {
21870		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetrics", nil, "Failure preparing request")
21871		return
21872	}
21873
21874	resp, err := client.ListMetricsSender(req)
21875	if err != nil {
21876		result.rmc.Response = autorest.Response{Response: resp}
21877		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetrics", resp, "Failure sending request")
21878		return
21879	}
21880
21881	result.rmc, err = client.ListMetricsResponder(resp)
21882	if err != nil {
21883		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetrics", resp, "Failure responding to request")
21884		return
21885	}
21886	if result.rmc.hasNextLink() && result.rmc.IsEmpty() {
21887		err = result.NextWithContext(ctx)
21888		return
21889	}
21890
21891	return
21892}
21893
21894// ListMetricsPreparer prepares the ListMetrics request.
21895func (client AppsClient) ListMetricsPreparer(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (*http.Request, error) {
21896	pathParameters := map[string]interface{}{
21897		"name":              autorest.Encode("path", name),
21898		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21899		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21900	}
21901
21902	const APIVersion = "2018-02-01"
21903	queryParameters := map[string]interface{}{
21904		"api-version": APIVersion,
21905	}
21906	if details != nil {
21907		queryParameters["details"] = autorest.Encode("query", *details)
21908	}
21909	if len(filter) > 0 {
21910		queryParameters["$filter"] = filter
21911	}
21912
21913	preparer := autorest.CreatePreparer(
21914		autorest.AsGet(),
21915		autorest.WithBaseURL(client.BaseURI),
21916		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics", pathParameters),
21917		autorest.WithQueryParameters(queryParameters))
21918	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21919}
21920
21921// ListMetricsSender sends the ListMetrics request. The method will close the
21922// http.Response Body if it receives an error.
21923func (client AppsClient) ListMetricsSender(req *http.Request) (*http.Response, error) {
21924	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21925}
21926
21927// ListMetricsResponder handles the response to the ListMetrics request. The method always
21928// closes the http.Response Body.
21929func (client AppsClient) ListMetricsResponder(resp *http.Response) (result ResourceMetricCollection, err error) {
21930	err = autorest.Respond(
21931		resp,
21932		azure.WithErrorUnlessStatusCode(http.StatusOK),
21933		autorest.ByUnmarshallingJSON(&result),
21934		autorest.ByClosing())
21935	result.Response = autorest.Response{Response: resp}
21936	return
21937}
21938
21939// listMetricsNextResults retrieves the next set of results, if any.
21940func (client AppsClient) listMetricsNextResults(ctx context.Context, lastResults ResourceMetricCollection) (result ResourceMetricCollection, err error) {
21941	req, err := lastResults.resourceMetricCollectionPreparer(ctx)
21942	if err != nil {
21943		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listMetricsNextResults", nil, "Failure preparing next results request")
21944	}
21945	if req == nil {
21946		return
21947	}
21948	resp, err := client.ListMetricsSender(req)
21949	if err != nil {
21950		result.Response = autorest.Response{Response: resp}
21951		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listMetricsNextResults", resp, "Failure sending next results request")
21952	}
21953	result, err = client.ListMetricsResponder(resp)
21954	if err != nil {
21955		err = autorest.NewErrorWithError(err, "web.AppsClient", "listMetricsNextResults", resp, "Failure responding to next results request")
21956	}
21957	return
21958}
21959
21960// ListMetricsComplete enumerates all values, automatically crossing page boundaries as required.
21961func (client AppsClient) ListMetricsComplete(ctx context.Context, resourceGroupName string, name string, details *bool, filter string) (result ResourceMetricCollectionIterator, err error) {
21962	if tracing.IsEnabled() {
21963		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetrics")
21964		defer func() {
21965			sc := -1
21966			if result.Response().Response.Response != nil {
21967				sc = result.page.Response().Response.Response.StatusCode
21968			}
21969			tracing.EndSpan(ctx, sc, err)
21970		}()
21971	}
21972	result.page, err = client.ListMetrics(ctx, resourceGroupName, name, details, filter)
21973	return
21974}
21975
21976// ListMetricsSlot gets performance metrics of an app (or deployment slot, if specified).
21977// Parameters:
21978// resourceGroupName - name of the resource group to which the resource belongs.
21979// name - name of the app.
21980// slot - name of the deployment slot. If a slot is not specified, the API will get metrics of the production
21981// slot.
21982// details - specify "true" to include metric details in the response. It is "false" by default.
21983// filter - return only metrics specified in the filter (using OData syntax). For example: $filter=(name.value
21984// eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq
21985// 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
21986func (client AppsClient) ListMetricsSlot(ctx context.Context, resourceGroupName string, name string, slot string, details *bool, filter string) (result ResourceMetricCollectionPage, err error) {
21987	if tracing.IsEnabled() {
21988		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetricsSlot")
21989		defer func() {
21990			sc := -1
21991			if result.rmc.Response.Response != nil {
21992				sc = result.rmc.Response.Response.StatusCode
21993			}
21994			tracing.EndSpan(ctx, sc, err)
21995		}()
21996	}
21997	if err := validation.Validate([]validation.Validation{
21998		{TargetValue: resourceGroupName,
21999			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22000				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22001				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22002		return result, validation.NewError("web.AppsClient", "ListMetricsSlot", err.Error())
22003	}
22004
22005	result.fn = client.listMetricsSlotNextResults
22006	req, err := client.ListMetricsSlotPreparer(ctx, resourceGroupName, name, slot, details, filter)
22007	if err != nil {
22008		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetricsSlot", nil, "Failure preparing request")
22009		return
22010	}
22011
22012	resp, err := client.ListMetricsSlotSender(req)
22013	if err != nil {
22014		result.rmc.Response = autorest.Response{Response: resp}
22015		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetricsSlot", resp, "Failure sending request")
22016		return
22017	}
22018
22019	result.rmc, err = client.ListMetricsSlotResponder(resp)
22020	if err != nil {
22021		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetricsSlot", resp, "Failure responding to request")
22022		return
22023	}
22024	if result.rmc.hasNextLink() && result.rmc.IsEmpty() {
22025		err = result.NextWithContext(ctx)
22026		return
22027	}
22028
22029	return
22030}
22031
22032// ListMetricsSlotPreparer prepares the ListMetricsSlot request.
22033func (client AppsClient) ListMetricsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, details *bool, filter string) (*http.Request, error) {
22034	pathParameters := map[string]interface{}{
22035		"name":              autorest.Encode("path", name),
22036		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22037		"slot":              autorest.Encode("path", slot),
22038		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22039	}
22040
22041	const APIVersion = "2018-02-01"
22042	queryParameters := map[string]interface{}{
22043		"api-version": APIVersion,
22044	}
22045	if details != nil {
22046		queryParameters["details"] = autorest.Encode("query", *details)
22047	}
22048	if len(filter) > 0 {
22049		queryParameters["$filter"] = filter
22050	}
22051
22052	preparer := autorest.CreatePreparer(
22053		autorest.AsGet(),
22054		autorest.WithBaseURL(client.BaseURI),
22055		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics", pathParameters),
22056		autorest.WithQueryParameters(queryParameters))
22057	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22058}
22059
22060// ListMetricsSlotSender sends the ListMetricsSlot request. The method will close the
22061// http.Response Body if it receives an error.
22062func (client AppsClient) ListMetricsSlotSender(req *http.Request) (*http.Response, error) {
22063	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22064}
22065
22066// ListMetricsSlotResponder handles the response to the ListMetricsSlot request. The method always
22067// closes the http.Response Body.
22068func (client AppsClient) ListMetricsSlotResponder(resp *http.Response) (result ResourceMetricCollection, err error) {
22069	err = autorest.Respond(
22070		resp,
22071		azure.WithErrorUnlessStatusCode(http.StatusOK),
22072		autorest.ByUnmarshallingJSON(&result),
22073		autorest.ByClosing())
22074	result.Response = autorest.Response{Response: resp}
22075	return
22076}
22077
22078// listMetricsSlotNextResults retrieves the next set of results, if any.
22079func (client AppsClient) listMetricsSlotNextResults(ctx context.Context, lastResults ResourceMetricCollection) (result ResourceMetricCollection, err error) {
22080	req, err := lastResults.resourceMetricCollectionPreparer(ctx)
22081	if err != nil {
22082		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listMetricsSlotNextResults", nil, "Failure preparing next results request")
22083	}
22084	if req == nil {
22085		return
22086	}
22087	resp, err := client.ListMetricsSlotSender(req)
22088	if err != nil {
22089		result.Response = autorest.Response{Response: resp}
22090		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listMetricsSlotNextResults", resp, "Failure sending next results request")
22091	}
22092	result, err = client.ListMetricsSlotResponder(resp)
22093	if err != nil {
22094		err = autorest.NewErrorWithError(err, "web.AppsClient", "listMetricsSlotNextResults", resp, "Failure responding to next results request")
22095	}
22096	return
22097}
22098
22099// ListMetricsSlotComplete enumerates all values, automatically crossing page boundaries as required.
22100func (client AppsClient) ListMetricsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, details *bool, filter string) (result ResourceMetricCollectionIterator, err error) {
22101	if tracing.IsEnabled() {
22102		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetricsSlot")
22103		defer func() {
22104			sc := -1
22105			if result.Response().Response.Response != nil {
22106				sc = result.page.Response().Response.Response.StatusCode
22107			}
22108			tracing.EndSpan(ctx, sc, err)
22109		}()
22110	}
22111	result.page, err = client.ListMetricsSlot(ctx, resourceGroupName, name, slot, details, filter)
22112	return
22113}
22114
22115// ListNetworkFeatures gets all network features used by the app (or deployment slot, if specified).
22116// Parameters:
22117// resourceGroupName - name of the resource group to which the resource belongs.
22118// name - name of the app.
22119// view - the type of view. This can either be "summary" or "detailed".
22120func (client AppsClient) ListNetworkFeatures(ctx context.Context, resourceGroupName string, name string, view string) (result NetworkFeatures, err error) {
22121	if tracing.IsEnabled() {
22122		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListNetworkFeatures")
22123		defer func() {
22124			sc := -1
22125			if result.Response.Response != nil {
22126				sc = result.Response.Response.StatusCode
22127			}
22128			tracing.EndSpan(ctx, sc, err)
22129		}()
22130	}
22131	if err := validation.Validate([]validation.Validation{
22132		{TargetValue: resourceGroupName,
22133			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22134				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22135				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22136		return result, validation.NewError("web.AppsClient", "ListNetworkFeatures", err.Error())
22137	}
22138
22139	req, err := client.ListNetworkFeaturesPreparer(ctx, resourceGroupName, name, view)
22140	if err != nil {
22141		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeatures", nil, "Failure preparing request")
22142		return
22143	}
22144
22145	resp, err := client.ListNetworkFeaturesSender(req)
22146	if err != nil {
22147		result.Response = autorest.Response{Response: resp}
22148		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeatures", resp, "Failure sending request")
22149		return
22150	}
22151
22152	result, err = client.ListNetworkFeaturesResponder(resp)
22153	if err != nil {
22154		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeatures", resp, "Failure responding to request")
22155		return
22156	}
22157
22158	return
22159}
22160
22161// ListNetworkFeaturesPreparer prepares the ListNetworkFeatures request.
22162func (client AppsClient) ListNetworkFeaturesPreparer(ctx context.Context, resourceGroupName string, name string, view string) (*http.Request, error) {
22163	pathParameters := map[string]interface{}{
22164		"name":              autorest.Encode("path", name),
22165		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22166		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22167		"view":              autorest.Encode("path", view),
22168	}
22169
22170	const APIVersion = "2018-02-01"
22171	queryParameters := map[string]interface{}{
22172		"api-version": APIVersion,
22173	}
22174
22175	preparer := autorest.CreatePreparer(
22176		autorest.AsGet(),
22177		autorest.WithBaseURL(client.BaseURI),
22178		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}", pathParameters),
22179		autorest.WithQueryParameters(queryParameters))
22180	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22181}
22182
22183// ListNetworkFeaturesSender sends the ListNetworkFeatures request. The method will close the
22184// http.Response Body if it receives an error.
22185func (client AppsClient) ListNetworkFeaturesSender(req *http.Request) (*http.Response, error) {
22186	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22187}
22188
22189// ListNetworkFeaturesResponder handles the response to the ListNetworkFeatures request. The method always
22190// closes the http.Response Body.
22191func (client AppsClient) ListNetworkFeaturesResponder(resp *http.Response) (result NetworkFeatures, err error) {
22192	err = autorest.Respond(
22193		resp,
22194		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
22195		autorest.ByUnmarshallingJSON(&result),
22196		autorest.ByClosing())
22197	result.Response = autorest.Response{Response: resp}
22198	return
22199}
22200
22201// ListNetworkFeaturesSlot gets all network features used by the app (or deployment slot, if specified).
22202// Parameters:
22203// resourceGroupName - name of the resource group to which the resource belongs.
22204// name - name of the app.
22205// view - the type of view. This can either be "summary" or "detailed".
22206// slot - name of the deployment slot. If a slot is not specified, the API will get network features for the
22207// production slot.
22208func (client AppsClient) ListNetworkFeaturesSlot(ctx context.Context, resourceGroupName string, name string, view string, slot string) (result NetworkFeatures, err error) {
22209	if tracing.IsEnabled() {
22210		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListNetworkFeaturesSlot")
22211		defer func() {
22212			sc := -1
22213			if result.Response.Response != nil {
22214				sc = result.Response.Response.StatusCode
22215			}
22216			tracing.EndSpan(ctx, sc, err)
22217		}()
22218	}
22219	if err := validation.Validate([]validation.Validation{
22220		{TargetValue: resourceGroupName,
22221			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22222				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22223				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22224		return result, validation.NewError("web.AppsClient", "ListNetworkFeaturesSlot", err.Error())
22225	}
22226
22227	req, err := client.ListNetworkFeaturesSlotPreparer(ctx, resourceGroupName, name, view, slot)
22228	if err != nil {
22229		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeaturesSlot", nil, "Failure preparing request")
22230		return
22231	}
22232
22233	resp, err := client.ListNetworkFeaturesSlotSender(req)
22234	if err != nil {
22235		result.Response = autorest.Response{Response: resp}
22236		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeaturesSlot", resp, "Failure sending request")
22237		return
22238	}
22239
22240	result, err = client.ListNetworkFeaturesSlotResponder(resp)
22241	if err != nil {
22242		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeaturesSlot", resp, "Failure responding to request")
22243		return
22244	}
22245
22246	return
22247}
22248
22249// ListNetworkFeaturesSlotPreparer prepares the ListNetworkFeaturesSlot request.
22250func (client AppsClient) ListNetworkFeaturesSlotPreparer(ctx context.Context, resourceGroupName string, name string, view string, slot string) (*http.Request, error) {
22251	pathParameters := map[string]interface{}{
22252		"name":              autorest.Encode("path", name),
22253		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22254		"slot":              autorest.Encode("path", slot),
22255		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22256		"view":              autorest.Encode("path", view),
22257	}
22258
22259	const APIVersion = "2018-02-01"
22260	queryParameters := map[string]interface{}{
22261		"api-version": APIVersion,
22262	}
22263
22264	preparer := autorest.CreatePreparer(
22265		autorest.AsGet(),
22266		autorest.WithBaseURL(client.BaseURI),
22267		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}", pathParameters),
22268		autorest.WithQueryParameters(queryParameters))
22269	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22270}
22271
22272// ListNetworkFeaturesSlotSender sends the ListNetworkFeaturesSlot request. The method will close the
22273// http.Response Body if it receives an error.
22274func (client AppsClient) ListNetworkFeaturesSlotSender(req *http.Request) (*http.Response, error) {
22275	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22276}
22277
22278// ListNetworkFeaturesSlotResponder handles the response to the ListNetworkFeaturesSlot request. The method always
22279// closes the http.Response Body.
22280func (client AppsClient) ListNetworkFeaturesSlotResponder(resp *http.Response) (result NetworkFeatures, err error) {
22281	err = autorest.Respond(
22282		resp,
22283		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
22284		autorest.ByUnmarshallingJSON(&result),
22285		autorest.ByClosing())
22286	result.Response = autorest.Response{Response: resp}
22287	return
22288}
22289
22290// ListPerfMonCounters gets perfmon counters for web app.
22291// Parameters:
22292// resourceGroupName - name of the resource group to which the resource belongs.
22293// name - name of web app.
22294// filter - return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example:
22295// $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
22296// duration'[Hour|Minute|Day]'.
22297func (client AppsClient) ListPerfMonCounters(ctx context.Context, resourceGroupName string, name string, filter string) (result PerfMonCounterCollectionPage, err error) {
22298	if tracing.IsEnabled() {
22299		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCounters")
22300		defer func() {
22301			sc := -1
22302			if result.pmcc.Response.Response != nil {
22303				sc = result.pmcc.Response.Response.StatusCode
22304			}
22305			tracing.EndSpan(ctx, sc, err)
22306		}()
22307	}
22308	if err := validation.Validate([]validation.Validation{
22309		{TargetValue: resourceGroupName,
22310			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22311				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22312				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22313		return result, validation.NewError("web.AppsClient", "ListPerfMonCounters", err.Error())
22314	}
22315
22316	result.fn = client.listPerfMonCountersNextResults
22317	req, err := client.ListPerfMonCountersPreparer(ctx, resourceGroupName, name, filter)
22318	if err != nil {
22319		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCounters", nil, "Failure preparing request")
22320		return
22321	}
22322
22323	resp, err := client.ListPerfMonCountersSender(req)
22324	if err != nil {
22325		result.pmcc.Response = autorest.Response{Response: resp}
22326		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCounters", resp, "Failure sending request")
22327		return
22328	}
22329
22330	result.pmcc, err = client.ListPerfMonCountersResponder(resp)
22331	if err != nil {
22332		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCounters", resp, "Failure responding to request")
22333		return
22334	}
22335	if result.pmcc.hasNextLink() && result.pmcc.IsEmpty() {
22336		err = result.NextWithContext(ctx)
22337		return
22338	}
22339
22340	return
22341}
22342
22343// ListPerfMonCountersPreparer prepares the ListPerfMonCounters request.
22344func (client AppsClient) ListPerfMonCountersPreparer(ctx context.Context, resourceGroupName string, name string, filter string) (*http.Request, error) {
22345	pathParameters := map[string]interface{}{
22346		"name":              autorest.Encode("path", name),
22347		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22348		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22349	}
22350
22351	const APIVersion = "2018-02-01"
22352	queryParameters := map[string]interface{}{
22353		"api-version": APIVersion,
22354	}
22355	if len(filter) > 0 {
22356		queryParameters["$filter"] = filter
22357	}
22358
22359	preparer := autorest.CreatePreparer(
22360		autorest.AsGet(),
22361		autorest.WithBaseURL(client.BaseURI),
22362		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters", pathParameters),
22363		autorest.WithQueryParameters(queryParameters))
22364	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22365}
22366
22367// ListPerfMonCountersSender sends the ListPerfMonCounters request. The method will close the
22368// http.Response Body if it receives an error.
22369func (client AppsClient) ListPerfMonCountersSender(req *http.Request) (*http.Response, error) {
22370	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22371}
22372
22373// ListPerfMonCountersResponder handles the response to the ListPerfMonCounters request. The method always
22374// closes the http.Response Body.
22375func (client AppsClient) ListPerfMonCountersResponder(resp *http.Response) (result PerfMonCounterCollection, err error) {
22376	err = autorest.Respond(
22377		resp,
22378		azure.WithErrorUnlessStatusCode(http.StatusOK),
22379		autorest.ByUnmarshallingJSON(&result),
22380		autorest.ByClosing())
22381	result.Response = autorest.Response{Response: resp}
22382	return
22383}
22384
22385// listPerfMonCountersNextResults retrieves the next set of results, if any.
22386func (client AppsClient) listPerfMonCountersNextResults(ctx context.Context, lastResults PerfMonCounterCollection) (result PerfMonCounterCollection, err error) {
22387	req, err := lastResults.perfMonCounterCollectionPreparer(ctx)
22388	if err != nil {
22389		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersNextResults", nil, "Failure preparing next results request")
22390	}
22391	if req == nil {
22392		return
22393	}
22394	resp, err := client.ListPerfMonCountersSender(req)
22395	if err != nil {
22396		result.Response = autorest.Response{Response: resp}
22397		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersNextResults", resp, "Failure sending next results request")
22398	}
22399	result, err = client.ListPerfMonCountersResponder(resp)
22400	if err != nil {
22401		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersNextResults", resp, "Failure responding to next results request")
22402	}
22403	return
22404}
22405
22406// ListPerfMonCountersComplete enumerates all values, automatically crossing page boundaries as required.
22407func (client AppsClient) ListPerfMonCountersComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result PerfMonCounterCollectionIterator, err error) {
22408	if tracing.IsEnabled() {
22409		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCounters")
22410		defer func() {
22411			sc := -1
22412			if result.Response().Response.Response != nil {
22413				sc = result.page.Response().Response.Response.StatusCode
22414			}
22415			tracing.EndSpan(ctx, sc, err)
22416		}()
22417	}
22418	result.page, err = client.ListPerfMonCounters(ctx, resourceGroupName, name, filter)
22419	return
22420}
22421
22422// ListPerfMonCountersSlot gets perfmon counters for web app.
22423// Parameters:
22424// resourceGroupName - name of the resource group to which the resource belongs.
22425// name - name of web app.
22426// slot - name of web app slot. If not specified then will default to production slot.
22427// filter - return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example:
22428// $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
22429// duration'[Hour|Minute|Day]'.
22430func (client AppsClient) ListPerfMonCountersSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result PerfMonCounterCollectionPage, err error) {
22431	if tracing.IsEnabled() {
22432		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCountersSlot")
22433		defer func() {
22434			sc := -1
22435			if result.pmcc.Response.Response != nil {
22436				sc = result.pmcc.Response.Response.StatusCode
22437			}
22438			tracing.EndSpan(ctx, sc, err)
22439		}()
22440	}
22441	if err := validation.Validate([]validation.Validation{
22442		{TargetValue: resourceGroupName,
22443			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22444				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22445				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22446		return result, validation.NewError("web.AppsClient", "ListPerfMonCountersSlot", err.Error())
22447	}
22448
22449	result.fn = client.listPerfMonCountersSlotNextResults
22450	req, err := client.ListPerfMonCountersSlotPreparer(ctx, resourceGroupName, name, slot, filter)
22451	if err != nil {
22452		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCountersSlot", nil, "Failure preparing request")
22453		return
22454	}
22455
22456	resp, err := client.ListPerfMonCountersSlotSender(req)
22457	if err != nil {
22458		result.pmcc.Response = autorest.Response{Response: resp}
22459		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCountersSlot", resp, "Failure sending request")
22460		return
22461	}
22462
22463	result.pmcc, err = client.ListPerfMonCountersSlotResponder(resp)
22464	if err != nil {
22465		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCountersSlot", resp, "Failure responding to request")
22466		return
22467	}
22468	if result.pmcc.hasNextLink() && result.pmcc.IsEmpty() {
22469		err = result.NextWithContext(ctx)
22470		return
22471	}
22472
22473	return
22474}
22475
22476// ListPerfMonCountersSlotPreparer prepares the ListPerfMonCountersSlot request.
22477func (client AppsClient) ListPerfMonCountersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (*http.Request, error) {
22478	pathParameters := map[string]interface{}{
22479		"name":              autorest.Encode("path", name),
22480		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22481		"slot":              autorest.Encode("path", slot),
22482		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22483	}
22484
22485	const APIVersion = "2018-02-01"
22486	queryParameters := map[string]interface{}{
22487		"api-version": APIVersion,
22488	}
22489	if len(filter) > 0 {
22490		queryParameters["$filter"] = filter
22491	}
22492
22493	preparer := autorest.CreatePreparer(
22494		autorest.AsGet(),
22495		autorest.WithBaseURL(client.BaseURI),
22496		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters", pathParameters),
22497		autorest.WithQueryParameters(queryParameters))
22498	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22499}
22500
22501// ListPerfMonCountersSlotSender sends the ListPerfMonCountersSlot request. The method will close the
22502// http.Response Body if it receives an error.
22503func (client AppsClient) ListPerfMonCountersSlotSender(req *http.Request) (*http.Response, error) {
22504	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22505}
22506
22507// ListPerfMonCountersSlotResponder handles the response to the ListPerfMonCountersSlot request. The method always
22508// closes the http.Response Body.
22509func (client AppsClient) ListPerfMonCountersSlotResponder(resp *http.Response) (result PerfMonCounterCollection, err error) {
22510	err = autorest.Respond(
22511		resp,
22512		azure.WithErrorUnlessStatusCode(http.StatusOK),
22513		autorest.ByUnmarshallingJSON(&result),
22514		autorest.ByClosing())
22515	result.Response = autorest.Response{Response: resp}
22516	return
22517}
22518
22519// listPerfMonCountersSlotNextResults retrieves the next set of results, if any.
22520func (client AppsClient) listPerfMonCountersSlotNextResults(ctx context.Context, lastResults PerfMonCounterCollection) (result PerfMonCounterCollection, err error) {
22521	req, err := lastResults.perfMonCounterCollectionPreparer(ctx)
22522	if err != nil {
22523		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersSlotNextResults", nil, "Failure preparing next results request")
22524	}
22525	if req == nil {
22526		return
22527	}
22528	resp, err := client.ListPerfMonCountersSlotSender(req)
22529	if err != nil {
22530		result.Response = autorest.Response{Response: resp}
22531		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersSlotNextResults", resp, "Failure sending next results request")
22532	}
22533	result, err = client.ListPerfMonCountersSlotResponder(resp)
22534	if err != nil {
22535		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersSlotNextResults", resp, "Failure responding to next results request")
22536	}
22537	return
22538}
22539
22540// ListPerfMonCountersSlotComplete enumerates all values, automatically crossing page boundaries as required.
22541func (client AppsClient) ListPerfMonCountersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result PerfMonCounterCollectionIterator, err error) {
22542	if tracing.IsEnabled() {
22543		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCountersSlot")
22544		defer func() {
22545			sc := -1
22546			if result.Response().Response.Response != nil {
22547				sc = result.page.Response().Response.Response.StatusCode
22548			}
22549			tracing.EndSpan(ctx, sc, err)
22550		}()
22551	}
22552	result.page, err = client.ListPerfMonCountersSlot(ctx, resourceGroupName, name, slot, filter)
22553	return
22554}
22555
22556// ListPremierAddOns gets the premier add-ons of an app.
22557// Parameters:
22558// resourceGroupName - name of the resource group to which the resource belongs.
22559// name - name of the app.
22560func (client AppsClient) ListPremierAddOns(ctx context.Context, resourceGroupName string, name string) (result PremierAddOn, err error) {
22561	if tracing.IsEnabled() {
22562		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPremierAddOns")
22563		defer func() {
22564			sc := -1
22565			if result.Response.Response != nil {
22566				sc = result.Response.Response.StatusCode
22567			}
22568			tracing.EndSpan(ctx, sc, err)
22569		}()
22570	}
22571	if err := validation.Validate([]validation.Validation{
22572		{TargetValue: resourceGroupName,
22573			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22574				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22575				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22576		return result, validation.NewError("web.AppsClient", "ListPremierAddOns", err.Error())
22577	}
22578
22579	req, err := client.ListPremierAddOnsPreparer(ctx, resourceGroupName, name)
22580	if err != nil {
22581		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOns", nil, "Failure preparing request")
22582		return
22583	}
22584
22585	resp, err := client.ListPremierAddOnsSender(req)
22586	if err != nil {
22587		result.Response = autorest.Response{Response: resp}
22588		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOns", resp, "Failure sending request")
22589		return
22590	}
22591
22592	result, err = client.ListPremierAddOnsResponder(resp)
22593	if err != nil {
22594		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOns", resp, "Failure responding to request")
22595		return
22596	}
22597
22598	return
22599}
22600
22601// ListPremierAddOnsPreparer prepares the ListPremierAddOns request.
22602func (client AppsClient) ListPremierAddOnsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
22603	pathParameters := map[string]interface{}{
22604		"name":              autorest.Encode("path", name),
22605		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22606		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22607	}
22608
22609	const APIVersion = "2018-02-01"
22610	queryParameters := map[string]interface{}{
22611		"api-version": APIVersion,
22612	}
22613
22614	preparer := autorest.CreatePreparer(
22615		autorest.AsGet(),
22616		autorest.WithBaseURL(client.BaseURI),
22617		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons", pathParameters),
22618		autorest.WithQueryParameters(queryParameters))
22619	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22620}
22621
22622// ListPremierAddOnsSender sends the ListPremierAddOns request. The method will close the
22623// http.Response Body if it receives an error.
22624func (client AppsClient) ListPremierAddOnsSender(req *http.Request) (*http.Response, error) {
22625	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22626}
22627
22628// ListPremierAddOnsResponder handles the response to the ListPremierAddOns request. The method always
22629// closes the http.Response Body.
22630func (client AppsClient) ListPremierAddOnsResponder(resp *http.Response) (result PremierAddOn, err error) {
22631	err = autorest.Respond(
22632		resp,
22633		azure.WithErrorUnlessStatusCode(http.StatusOK),
22634		autorest.ByUnmarshallingJSON(&result),
22635		autorest.ByClosing())
22636	result.Response = autorest.Response{Response: resp}
22637	return
22638}
22639
22640// ListPremierAddOnsSlot gets the premier add-ons of an app.
22641// Parameters:
22642// resourceGroupName - name of the resource group to which the resource belongs.
22643// name - name of the app.
22644// slot - name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the
22645// production slot.
22646func (client AppsClient) ListPremierAddOnsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PremierAddOn, err error) {
22647	if tracing.IsEnabled() {
22648		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPremierAddOnsSlot")
22649		defer func() {
22650			sc := -1
22651			if result.Response.Response != nil {
22652				sc = result.Response.Response.StatusCode
22653			}
22654			tracing.EndSpan(ctx, sc, err)
22655		}()
22656	}
22657	if err := validation.Validate([]validation.Validation{
22658		{TargetValue: resourceGroupName,
22659			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22660				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22661				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22662		return result, validation.NewError("web.AppsClient", "ListPremierAddOnsSlot", err.Error())
22663	}
22664
22665	req, err := client.ListPremierAddOnsSlotPreparer(ctx, resourceGroupName, name, slot)
22666	if err != nil {
22667		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOnsSlot", nil, "Failure preparing request")
22668		return
22669	}
22670
22671	resp, err := client.ListPremierAddOnsSlotSender(req)
22672	if err != nil {
22673		result.Response = autorest.Response{Response: resp}
22674		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOnsSlot", resp, "Failure sending request")
22675		return
22676	}
22677
22678	result, err = client.ListPremierAddOnsSlotResponder(resp)
22679	if err != nil {
22680		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOnsSlot", resp, "Failure responding to request")
22681		return
22682	}
22683
22684	return
22685}
22686
22687// ListPremierAddOnsSlotPreparer prepares the ListPremierAddOnsSlot request.
22688func (client AppsClient) ListPremierAddOnsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
22689	pathParameters := map[string]interface{}{
22690		"name":              autorest.Encode("path", name),
22691		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22692		"slot":              autorest.Encode("path", slot),
22693		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22694	}
22695
22696	const APIVersion = "2018-02-01"
22697	queryParameters := map[string]interface{}{
22698		"api-version": APIVersion,
22699	}
22700
22701	preparer := autorest.CreatePreparer(
22702		autorest.AsGet(),
22703		autorest.WithBaseURL(client.BaseURI),
22704		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons", pathParameters),
22705		autorest.WithQueryParameters(queryParameters))
22706	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22707}
22708
22709// ListPremierAddOnsSlotSender sends the ListPremierAddOnsSlot request. The method will close the
22710// http.Response Body if it receives an error.
22711func (client AppsClient) ListPremierAddOnsSlotSender(req *http.Request) (*http.Response, error) {
22712	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22713}
22714
22715// ListPremierAddOnsSlotResponder handles the response to the ListPremierAddOnsSlot request. The method always
22716// closes the http.Response Body.
22717func (client AppsClient) ListPremierAddOnsSlotResponder(resp *http.Response) (result PremierAddOn, err error) {
22718	err = autorest.Respond(
22719		resp,
22720		azure.WithErrorUnlessStatusCode(http.StatusOK),
22721		autorest.ByUnmarshallingJSON(&result),
22722		autorest.ByClosing())
22723	result.Response = autorest.Response{Response: resp}
22724	return
22725}
22726
22727// ListProcesses get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a
22728// web site.
22729// Parameters:
22730// resourceGroupName - name of the resource group to which the resource belongs.
22731// name - site name.
22732func (client AppsClient) ListProcesses(ctx context.Context, resourceGroupName string, name string) (result ProcessInfoCollectionPage, err error) {
22733	if tracing.IsEnabled() {
22734		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcesses")
22735		defer func() {
22736			sc := -1
22737			if result.pic.Response.Response != nil {
22738				sc = result.pic.Response.Response.StatusCode
22739			}
22740			tracing.EndSpan(ctx, sc, err)
22741		}()
22742	}
22743	if err := validation.Validate([]validation.Validation{
22744		{TargetValue: resourceGroupName,
22745			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22746				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22747				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22748		return result, validation.NewError("web.AppsClient", "ListProcesses", err.Error())
22749	}
22750
22751	result.fn = client.listProcessesNextResults
22752	req, err := client.ListProcessesPreparer(ctx, resourceGroupName, name)
22753	if err != nil {
22754		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", nil, "Failure preparing request")
22755		return
22756	}
22757
22758	resp, err := client.ListProcessesSender(req)
22759	if err != nil {
22760		result.pic.Response = autorest.Response{Response: resp}
22761		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure sending request")
22762		return
22763	}
22764
22765	result.pic, err = client.ListProcessesResponder(resp)
22766	if err != nil {
22767		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure responding to request")
22768		return
22769	}
22770	if result.pic.hasNextLink() && result.pic.IsEmpty() {
22771		err = result.NextWithContext(ctx)
22772		return
22773	}
22774
22775	return
22776}
22777
22778// ListProcessesPreparer prepares the ListProcesses request.
22779func (client AppsClient) ListProcessesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
22780	pathParameters := map[string]interface{}{
22781		"name":              autorest.Encode("path", name),
22782		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22783		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22784	}
22785
22786	const APIVersion = "2018-02-01"
22787	queryParameters := map[string]interface{}{
22788		"api-version": APIVersion,
22789	}
22790
22791	preparer := autorest.CreatePreparer(
22792		autorest.AsGet(),
22793		autorest.WithBaseURL(client.BaseURI),
22794		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes", pathParameters),
22795		autorest.WithQueryParameters(queryParameters))
22796	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22797}
22798
22799// ListProcessesSender sends the ListProcesses request. The method will close the
22800// http.Response Body if it receives an error.
22801func (client AppsClient) ListProcessesSender(req *http.Request) (*http.Response, error) {
22802	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22803}
22804
22805// ListProcessesResponder handles the response to the ListProcesses request. The method always
22806// closes the http.Response Body.
22807func (client AppsClient) ListProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
22808	err = autorest.Respond(
22809		resp,
22810		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
22811		autorest.ByUnmarshallingJSON(&result),
22812		autorest.ByClosing())
22813	result.Response = autorest.Response{Response: resp}
22814	return
22815}
22816
22817// listProcessesNextResults retrieves the next set of results, if any.
22818func (client AppsClient) listProcessesNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
22819	req, err := lastResults.processInfoCollectionPreparer(ctx)
22820	if err != nil {
22821		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", nil, "Failure preparing next results request")
22822	}
22823	if req == nil {
22824		return
22825	}
22826	resp, err := client.ListProcessesSender(req)
22827	if err != nil {
22828		result.Response = autorest.Response{Response: resp}
22829		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", resp, "Failure sending next results request")
22830	}
22831	result, err = client.ListProcessesResponder(resp)
22832	if err != nil {
22833		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", resp, "Failure responding to next results request")
22834	}
22835	return
22836}
22837
22838// ListProcessesComplete enumerates all values, automatically crossing page boundaries as required.
22839func (client AppsClient) ListProcessesComplete(ctx context.Context, resourceGroupName string, name string) (result ProcessInfoCollectionIterator, err error) {
22840	if tracing.IsEnabled() {
22841		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcesses")
22842		defer func() {
22843			sc := -1
22844			if result.Response().Response.Response != nil {
22845				sc = result.page.Response().Response.Response.StatusCode
22846			}
22847			tracing.EndSpan(ctx, sc, err)
22848		}()
22849	}
22850	result.page, err = client.ListProcesses(ctx, resourceGroupName, name)
22851	return
22852}
22853
22854// ListProcessesSlot get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance
22855// in a web site.
22856// Parameters:
22857// resourceGroupName - name of the resource group to which the resource belongs.
22858// name - site name.
22859// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
22860// production slot.
22861func (client AppsClient) ListProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ProcessInfoCollectionPage, err error) {
22862	if tracing.IsEnabled() {
22863		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessesSlot")
22864		defer func() {
22865			sc := -1
22866			if result.pic.Response.Response != nil {
22867				sc = result.pic.Response.Response.StatusCode
22868			}
22869			tracing.EndSpan(ctx, sc, err)
22870		}()
22871	}
22872	if err := validation.Validate([]validation.Validation{
22873		{TargetValue: resourceGroupName,
22874			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22875				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22876				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22877		return result, validation.NewError("web.AppsClient", "ListProcessesSlot", err.Error())
22878	}
22879
22880	result.fn = client.listProcessesSlotNextResults
22881	req, err := client.ListProcessesSlotPreparer(ctx, resourceGroupName, name, slot)
22882	if err != nil {
22883		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", nil, "Failure preparing request")
22884		return
22885	}
22886
22887	resp, err := client.ListProcessesSlotSender(req)
22888	if err != nil {
22889		result.pic.Response = autorest.Response{Response: resp}
22890		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure sending request")
22891		return
22892	}
22893
22894	result.pic, err = client.ListProcessesSlotResponder(resp)
22895	if err != nil {
22896		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure responding to request")
22897		return
22898	}
22899	if result.pic.hasNextLink() && result.pic.IsEmpty() {
22900		err = result.NextWithContext(ctx)
22901		return
22902	}
22903
22904	return
22905}
22906
22907// ListProcessesSlotPreparer prepares the ListProcessesSlot request.
22908func (client AppsClient) ListProcessesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
22909	pathParameters := map[string]interface{}{
22910		"name":              autorest.Encode("path", name),
22911		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22912		"slot":              autorest.Encode("path", slot),
22913		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22914	}
22915
22916	const APIVersion = "2018-02-01"
22917	queryParameters := map[string]interface{}{
22918		"api-version": APIVersion,
22919	}
22920
22921	preparer := autorest.CreatePreparer(
22922		autorest.AsGet(),
22923		autorest.WithBaseURL(client.BaseURI),
22924		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes", pathParameters),
22925		autorest.WithQueryParameters(queryParameters))
22926	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22927}
22928
22929// ListProcessesSlotSender sends the ListProcessesSlot request. The method will close the
22930// http.Response Body if it receives an error.
22931func (client AppsClient) ListProcessesSlotSender(req *http.Request) (*http.Response, error) {
22932	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22933}
22934
22935// ListProcessesSlotResponder handles the response to the ListProcessesSlot request. The method always
22936// closes the http.Response Body.
22937func (client AppsClient) ListProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
22938	err = autorest.Respond(
22939		resp,
22940		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
22941		autorest.ByUnmarshallingJSON(&result),
22942		autorest.ByClosing())
22943	result.Response = autorest.Response{Response: resp}
22944	return
22945}
22946
22947// listProcessesSlotNextResults retrieves the next set of results, if any.
22948func (client AppsClient) listProcessesSlotNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
22949	req, err := lastResults.processInfoCollectionPreparer(ctx)
22950	if err != nil {
22951		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", nil, "Failure preparing next results request")
22952	}
22953	if req == nil {
22954		return
22955	}
22956	resp, err := client.ListProcessesSlotSender(req)
22957	if err != nil {
22958		result.Response = autorest.Response{Response: resp}
22959		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", resp, "Failure sending next results request")
22960	}
22961	result, err = client.ListProcessesSlotResponder(resp)
22962	if err != nil {
22963		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", resp, "Failure responding to next results request")
22964	}
22965	return
22966}
22967
22968// ListProcessesSlotComplete enumerates all values, automatically crossing page boundaries as required.
22969func (client AppsClient) ListProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ProcessInfoCollectionIterator, err error) {
22970	if tracing.IsEnabled() {
22971		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessesSlot")
22972		defer func() {
22973			sc := -1
22974			if result.Response().Response.Response != nil {
22975				sc = result.page.Response().Response.Response.StatusCode
22976			}
22977			tracing.EndSpan(ctx, sc, err)
22978		}()
22979	}
22980	result.page, err = client.ListProcessesSlot(ctx, resourceGroupName, name, slot)
22981	return
22982}
22983
22984// ListProcessModules list module information for a process by its ID for a specific scaled-out instance in a web site.
22985// Parameters:
22986// resourceGroupName - name of the resource group to which the resource belongs.
22987// name - site name.
22988// processID - pID.
22989func (client AppsClient) ListProcessModules(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessModuleInfoCollectionPage, err error) {
22990	if tracing.IsEnabled() {
22991		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModules")
22992		defer func() {
22993			sc := -1
22994			if result.pmic.Response.Response != nil {
22995				sc = result.pmic.Response.Response.StatusCode
22996			}
22997			tracing.EndSpan(ctx, sc, err)
22998		}()
22999	}
23000	if err := validation.Validate([]validation.Validation{
23001		{TargetValue: resourceGroupName,
23002			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23003				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23004				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23005		return result, validation.NewError("web.AppsClient", "ListProcessModules", err.Error())
23006	}
23007
23008	result.fn = client.listProcessModulesNextResults
23009	req, err := client.ListProcessModulesPreparer(ctx, resourceGroupName, name, processID)
23010	if err != nil {
23011		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", nil, "Failure preparing request")
23012		return
23013	}
23014
23015	resp, err := client.ListProcessModulesSender(req)
23016	if err != nil {
23017		result.pmic.Response = autorest.Response{Response: resp}
23018		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure sending request")
23019		return
23020	}
23021
23022	result.pmic, err = client.ListProcessModulesResponder(resp)
23023	if err != nil {
23024		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure responding to request")
23025		return
23026	}
23027	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
23028		err = result.NextWithContext(ctx)
23029		return
23030	}
23031
23032	return
23033}
23034
23035// ListProcessModulesPreparer prepares the ListProcessModules request.
23036func (client AppsClient) ListProcessModulesPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
23037	pathParameters := map[string]interface{}{
23038		"name":              autorest.Encode("path", name),
23039		"processId":         autorest.Encode("path", processID),
23040		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23041		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23042	}
23043
23044	const APIVersion = "2018-02-01"
23045	queryParameters := map[string]interface{}{
23046		"api-version": APIVersion,
23047	}
23048
23049	preparer := autorest.CreatePreparer(
23050		autorest.AsGet(),
23051		autorest.WithBaseURL(client.BaseURI),
23052		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules", pathParameters),
23053		autorest.WithQueryParameters(queryParameters))
23054	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23055}
23056
23057// ListProcessModulesSender sends the ListProcessModules request. The method will close the
23058// http.Response Body if it receives an error.
23059func (client AppsClient) ListProcessModulesSender(req *http.Request) (*http.Response, error) {
23060	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23061}
23062
23063// ListProcessModulesResponder handles the response to the ListProcessModules request. The method always
23064// closes the http.Response Body.
23065func (client AppsClient) ListProcessModulesResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
23066	err = autorest.Respond(
23067		resp,
23068		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
23069		autorest.ByUnmarshallingJSON(&result),
23070		autorest.ByClosing())
23071	result.Response = autorest.Response{Response: resp}
23072	return
23073}
23074
23075// listProcessModulesNextResults retrieves the next set of results, if any.
23076func (client AppsClient) listProcessModulesNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
23077	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
23078	if err != nil {
23079		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", nil, "Failure preparing next results request")
23080	}
23081	if req == nil {
23082		return
23083	}
23084	resp, err := client.ListProcessModulesSender(req)
23085	if err != nil {
23086		result.Response = autorest.Response{Response: resp}
23087		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", resp, "Failure sending next results request")
23088	}
23089	result, err = client.ListProcessModulesResponder(resp)
23090	if err != nil {
23091		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", resp, "Failure responding to next results request")
23092	}
23093	return
23094}
23095
23096// ListProcessModulesComplete enumerates all values, automatically crossing page boundaries as required.
23097func (client AppsClient) ListProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessModuleInfoCollectionIterator, err error) {
23098	if tracing.IsEnabled() {
23099		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModules")
23100		defer func() {
23101			sc := -1
23102			if result.Response().Response.Response != nil {
23103				sc = result.page.Response().Response.Response.StatusCode
23104			}
23105			tracing.EndSpan(ctx, sc, err)
23106		}()
23107	}
23108	result.page, err = client.ListProcessModules(ctx, resourceGroupName, name, processID)
23109	return
23110}
23111
23112// ListProcessModulesSlot list module information for a process by its ID for a specific scaled-out instance in a web
23113// site.
23114// Parameters:
23115// resourceGroupName - name of the resource group to which the resource belongs.
23116// name - site name.
23117// processID - pID.
23118// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
23119// production slot.
23120func (client AppsClient) ListProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessModuleInfoCollectionPage, err error) {
23121	if tracing.IsEnabled() {
23122		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModulesSlot")
23123		defer func() {
23124			sc := -1
23125			if result.pmic.Response.Response != nil {
23126				sc = result.pmic.Response.Response.StatusCode
23127			}
23128			tracing.EndSpan(ctx, sc, err)
23129		}()
23130	}
23131	if err := validation.Validate([]validation.Validation{
23132		{TargetValue: resourceGroupName,
23133			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23134				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23135				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23136		return result, validation.NewError("web.AppsClient", "ListProcessModulesSlot", err.Error())
23137	}
23138
23139	result.fn = client.listProcessModulesSlotNextResults
23140	req, err := client.ListProcessModulesSlotPreparer(ctx, resourceGroupName, name, processID, slot)
23141	if err != nil {
23142		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", nil, "Failure preparing request")
23143		return
23144	}
23145
23146	resp, err := client.ListProcessModulesSlotSender(req)
23147	if err != nil {
23148		result.pmic.Response = autorest.Response{Response: resp}
23149		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure sending request")
23150		return
23151	}
23152
23153	result.pmic, err = client.ListProcessModulesSlotResponder(resp)
23154	if err != nil {
23155		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure responding to request")
23156		return
23157	}
23158	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
23159		err = result.NextWithContext(ctx)
23160		return
23161	}
23162
23163	return
23164}
23165
23166// ListProcessModulesSlotPreparer prepares the ListProcessModulesSlot request.
23167func (client AppsClient) ListProcessModulesSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
23168	pathParameters := map[string]interface{}{
23169		"name":              autorest.Encode("path", name),
23170		"processId":         autorest.Encode("path", processID),
23171		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23172		"slot":              autorest.Encode("path", slot),
23173		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23174	}
23175
23176	const APIVersion = "2018-02-01"
23177	queryParameters := map[string]interface{}{
23178		"api-version": APIVersion,
23179	}
23180
23181	preparer := autorest.CreatePreparer(
23182		autorest.AsGet(),
23183		autorest.WithBaseURL(client.BaseURI),
23184		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules", pathParameters),
23185		autorest.WithQueryParameters(queryParameters))
23186	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23187}
23188
23189// ListProcessModulesSlotSender sends the ListProcessModulesSlot request. The method will close the
23190// http.Response Body if it receives an error.
23191func (client AppsClient) ListProcessModulesSlotSender(req *http.Request) (*http.Response, error) {
23192	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23193}
23194
23195// ListProcessModulesSlotResponder handles the response to the ListProcessModulesSlot request. The method always
23196// closes the http.Response Body.
23197func (client AppsClient) ListProcessModulesSlotResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
23198	err = autorest.Respond(
23199		resp,
23200		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
23201		autorest.ByUnmarshallingJSON(&result),
23202		autorest.ByClosing())
23203	result.Response = autorest.Response{Response: resp}
23204	return
23205}
23206
23207// listProcessModulesSlotNextResults retrieves the next set of results, if any.
23208func (client AppsClient) listProcessModulesSlotNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
23209	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
23210	if err != nil {
23211		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", nil, "Failure preparing next results request")
23212	}
23213	if req == nil {
23214		return
23215	}
23216	resp, err := client.ListProcessModulesSlotSender(req)
23217	if err != nil {
23218		result.Response = autorest.Response{Response: resp}
23219		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", resp, "Failure sending next results request")
23220	}
23221	result, err = client.ListProcessModulesSlotResponder(resp)
23222	if err != nil {
23223		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", resp, "Failure responding to next results request")
23224	}
23225	return
23226}
23227
23228// ListProcessModulesSlotComplete enumerates all values, automatically crossing page boundaries as required.
23229func (client AppsClient) ListProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessModuleInfoCollectionIterator, err error) {
23230	if tracing.IsEnabled() {
23231		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModulesSlot")
23232		defer func() {
23233			sc := -1
23234			if result.Response().Response.Response != nil {
23235				sc = result.page.Response().Response.Response.StatusCode
23236			}
23237			tracing.EndSpan(ctx, sc, err)
23238		}()
23239	}
23240	result.page, err = client.ListProcessModulesSlot(ctx, resourceGroupName, name, processID, slot)
23241	return
23242}
23243
23244// ListProcessThreads list the threads in a process by its ID for a specific scaled-out instance in a web site.
23245// Parameters:
23246// resourceGroupName - name of the resource group to which the resource belongs.
23247// name - site name.
23248// processID - pID.
23249func (client AppsClient) ListProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessThreadInfoCollectionPage, err error) {
23250	if tracing.IsEnabled() {
23251		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreads")
23252		defer func() {
23253			sc := -1
23254			if result.ptic.Response.Response != nil {
23255				sc = result.ptic.Response.Response.StatusCode
23256			}
23257			tracing.EndSpan(ctx, sc, err)
23258		}()
23259	}
23260	if err := validation.Validate([]validation.Validation{
23261		{TargetValue: resourceGroupName,
23262			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23263				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23264				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23265		return result, validation.NewError("web.AppsClient", "ListProcessThreads", err.Error())
23266	}
23267
23268	result.fn = client.listProcessThreadsNextResults
23269	req, err := client.ListProcessThreadsPreparer(ctx, resourceGroupName, name, processID)
23270	if err != nil {
23271		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", nil, "Failure preparing request")
23272		return
23273	}
23274
23275	resp, err := client.ListProcessThreadsSender(req)
23276	if err != nil {
23277		result.ptic.Response = autorest.Response{Response: resp}
23278		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure sending request")
23279		return
23280	}
23281
23282	result.ptic, err = client.ListProcessThreadsResponder(resp)
23283	if err != nil {
23284		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure responding to request")
23285		return
23286	}
23287	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
23288		err = result.NextWithContext(ctx)
23289		return
23290	}
23291
23292	return
23293}
23294
23295// ListProcessThreadsPreparer prepares the ListProcessThreads request.
23296func (client AppsClient) ListProcessThreadsPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
23297	pathParameters := map[string]interface{}{
23298		"name":              autorest.Encode("path", name),
23299		"processId":         autorest.Encode("path", processID),
23300		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23301		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23302	}
23303
23304	const APIVersion = "2018-02-01"
23305	queryParameters := map[string]interface{}{
23306		"api-version": APIVersion,
23307	}
23308
23309	preparer := autorest.CreatePreparer(
23310		autorest.AsGet(),
23311		autorest.WithBaseURL(client.BaseURI),
23312		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads", pathParameters),
23313		autorest.WithQueryParameters(queryParameters))
23314	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23315}
23316
23317// ListProcessThreadsSender sends the ListProcessThreads request. The method will close the
23318// http.Response Body if it receives an error.
23319func (client AppsClient) ListProcessThreadsSender(req *http.Request) (*http.Response, error) {
23320	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23321}
23322
23323// ListProcessThreadsResponder handles the response to the ListProcessThreads request. The method always
23324// closes the http.Response Body.
23325func (client AppsClient) ListProcessThreadsResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
23326	err = autorest.Respond(
23327		resp,
23328		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
23329		autorest.ByUnmarshallingJSON(&result),
23330		autorest.ByClosing())
23331	result.Response = autorest.Response{Response: resp}
23332	return
23333}
23334
23335// listProcessThreadsNextResults retrieves the next set of results, if any.
23336func (client AppsClient) listProcessThreadsNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
23337	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
23338	if err != nil {
23339		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", nil, "Failure preparing next results request")
23340	}
23341	if req == nil {
23342		return
23343	}
23344	resp, err := client.ListProcessThreadsSender(req)
23345	if err != nil {
23346		result.Response = autorest.Response{Response: resp}
23347		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", resp, "Failure sending next results request")
23348	}
23349	result, err = client.ListProcessThreadsResponder(resp)
23350	if err != nil {
23351		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", resp, "Failure responding to next results request")
23352	}
23353	return
23354}
23355
23356// ListProcessThreadsComplete enumerates all values, automatically crossing page boundaries as required.
23357func (client AppsClient) ListProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessThreadInfoCollectionIterator, err error) {
23358	if tracing.IsEnabled() {
23359		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreads")
23360		defer func() {
23361			sc := -1
23362			if result.Response().Response.Response != nil {
23363				sc = result.page.Response().Response.Response.StatusCode
23364			}
23365			tracing.EndSpan(ctx, sc, err)
23366		}()
23367	}
23368	result.page, err = client.ListProcessThreads(ctx, resourceGroupName, name, processID)
23369	return
23370}
23371
23372// ListProcessThreadsSlot list the threads in a process by its ID for a specific scaled-out instance in a web site.
23373// Parameters:
23374// resourceGroupName - name of the resource group to which the resource belongs.
23375// name - site name.
23376// processID - pID.
23377// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
23378// production slot.
23379func (client AppsClient) ListProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessThreadInfoCollectionPage, err error) {
23380	if tracing.IsEnabled() {
23381		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreadsSlot")
23382		defer func() {
23383			sc := -1
23384			if result.ptic.Response.Response != nil {
23385				sc = result.ptic.Response.Response.StatusCode
23386			}
23387			tracing.EndSpan(ctx, sc, err)
23388		}()
23389	}
23390	if err := validation.Validate([]validation.Validation{
23391		{TargetValue: resourceGroupName,
23392			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23393				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23394				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23395		return result, validation.NewError("web.AppsClient", "ListProcessThreadsSlot", err.Error())
23396	}
23397
23398	result.fn = client.listProcessThreadsSlotNextResults
23399	req, err := client.ListProcessThreadsSlotPreparer(ctx, resourceGroupName, name, processID, slot)
23400	if err != nil {
23401		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", nil, "Failure preparing request")
23402		return
23403	}
23404
23405	resp, err := client.ListProcessThreadsSlotSender(req)
23406	if err != nil {
23407		result.ptic.Response = autorest.Response{Response: resp}
23408		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure sending request")
23409		return
23410	}
23411
23412	result.ptic, err = client.ListProcessThreadsSlotResponder(resp)
23413	if err != nil {
23414		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure responding to request")
23415		return
23416	}
23417	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
23418		err = result.NextWithContext(ctx)
23419		return
23420	}
23421
23422	return
23423}
23424
23425// ListProcessThreadsSlotPreparer prepares the ListProcessThreadsSlot request.
23426func (client AppsClient) ListProcessThreadsSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
23427	pathParameters := map[string]interface{}{
23428		"name":              autorest.Encode("path", name),
23429		"processId":         autorest.Encode("path", processID),
23430		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23431		"slot":              autorest.Encode("path", slot),
23432		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23433	}
23434
23435	const APIVersion = "2018-02-01"
23436	queryParameters := map[string]interface{}{
23437		"api-version": APIVersion,
23438	}
23439
23440	preparer := autorest.CreatePreparer(
23441		autorest.AsGet(),
23442		autorest.WithBaseURL(client.BaseURI),
23443		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads", pathParameters),
23444		autorest.WithQueryParameters(queryParameters))
23445	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23446}
23447
23448// ListProcessThreadsSlotSender sends the ListProcessThreadsSlot request. The method will close the
23449// http.Response Body if it receives an error.
23450func (client AppsClient) ListProcessThreadsSlotSender(req *http.Request) (*http.Response, error) {
23451	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23452}
23453
23454// ListProcessThreadsSlotResponder handles the response to the ListProcessThreadsSlot request. The method always
23455// closes the http.Response Body.
23456func (client AppsClient) ListProcessThreadsSlotResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
23457	err = autorest.Respond(
23458		resp,
23459		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
23460		autorest.ByUnmarshallingJSON(&result),
23461		autorest.ByClosing())
23462	result.Response = autorest.Response{Response: resp}
23463	return
23464}
23465
23466// listProcessThreadsSlotNextResults retrieves the next set of results, if any.
23467func (client AppsClient) listProcessThreadsSlotNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
23468	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
23469	if err != nil {
23470		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", nil, "Failure preparing next results request")
23471	}
23472	if req == nil {
23473		return
23474	}
23475	resp, err := client.ListProcessThreadsSlotSender(req)
23476	if err != nil {
23477		result.Response = autorest.Response{Response: resp}
23478		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", resp, "Failure sending next results request")
23479	}
23480	result, err = client.ListProcessThreadsSlotResponder(resp)
23481	if err != nil {
23482		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", resp, "Failure responding to next results request")
23483	}
23484	return
23485}
23486
23487// ListProcessThreadsSlotComplete enumerates all values, automatically crossing page boundaries as required.
23488func (client AppsClient) ListProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessThreadInfoCollectionIterator, err error) {
23489	if tracing.IsEnabled() {
23490		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreadsSlot")
23491		defer func() {
23492			sc := -1
23493			if result.Response().Response.Response != nil {
23494				sc = result.page.Response().Response.Response.StatusCode
23495			}
23496			tracing.EndSpan(ctx, sc, err)
23497		}()
23498	}
23499	result.page, err = client.ListProcessThreadsSlot(ctx, resourceGroupName, name, processID, slot)
23500	return
23501}
23502
23503// ListPublicCertificates get public certificates for an app or a deployment slot.
23504// Parameters:
23505// resourceGroupName - name of the resource group to which the resource belongs.
23506// name - name of the app.
23507func (client AppsClient) ListPublicCertificates(ctx context.Context, resourceGroupName string, name string) (result PublicCertificateCollectionPage, err error) {
23508	if tracing.IsEnabled() {
23509		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificates")
23510		defer func() {
23511			sc := -1
23512			if result.pcc.Response.Response != nil {
23513				sc = result.pcc.Response.Response.StatusCode
23514			}
23515			tracing.EndSpan(ctx, sc, err)
23516		}()
23517	}
23518	if err := validation.Validate([]validation.Validation{
23519		{TargetValue: resourceGroupName,
23520			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23521				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23522				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23523		return result, validation.NewError("web.AppsClient", "ListPublicCertificates", err.Error())
23524	}
23525
23526	result.fn = client.listPublicCertificatesNextResults
23527	req, err := client.ListPublicCertificatesPreparer(ctx, resourceGroupName, name)
23528	if err != nil {
23529		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", nil, "Failure preparing request")
23530		return
23531	}
23532
23533	resp, err := client.ListPublicCertificatesSender(req)
23534	if err != nil {
23535		result.pcc.Response = autorest.Response{Response: resp}
23536		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", resp, "Failure sending request")
23537		return
23538	}
23539
23540	result.pcc, err = client.ListPublicCertificatesResponder(resp)
23541	if err != nil {
23542		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", resp, "Failure responding to request")
23543		return
23544	}
23545	if result.pcc.hasNextLink() && result.pcc.IsEmpty() {
23546		err = result.NextWithContext(ctx)
23547		return
23548	}
23549
23550	return
23551}
23552
23553// ListPublicCertificatesPreparer prepares the ListPublicCertificates request.
23554func (client AppsClient) ListPublicCertificatesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
23555	pathParameters := map[string]interface{}{
23556		"name":              autorest.Encode("path", name),
23557		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23558		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23559	}
23560
23561	const APIVersion = "2018-02-01"
23562	queryParameters := map[string]interface{}{
23563		"api-version": APIVersion,
23564	}
23565
23566	preparer := autorest.CreatePreparer(
23567		autorest.AsGet(),
23568		autorest.WithBaseURL(client.BaseURI),
23569		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates", pathParameters),
23570		autorest.WithQueryParameters(queryParameters))
23571	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23572}
23573
23574// ListPublicCertificatesSender sends the ListPublicCertificates request. The method will close the
23575// http.Response Body if it receives an error.
23576func (client AppsClient) ListPublicCertificatesSender(req *http.Request) (*http.Response, error) {
23577	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23578}
23579
23580// ListPublicCertificatesResponder handles the response to the ListPublicCertificates request. The method always
23581// closes the http.Response Body.
23582func (client AppsClient) ListPublicCertificatesResponder(resp *http.Response) (result PublicCertificateCollection, err error) {
23583	err = autorest.Respond(
23584		resp,
23585		azure.WithErrorUnlessStatusCode(http.StatusOK),
23586		autorest.ByUnmarshallingJSON(&result),
23587		autorest.ByClosing())
23588	result.Response = autorest.Response{Response: resp}
23589	return
23590}
23591
23592// listPublicCertificatesNextResults retrieves the next set of results, if any.
23593func (client AppsClient) listPublicCertificatesNextResults(ctx context.Context, lastResults PublicCertificateCollection) (result PublicCertificateCollection, err error) {
23594	req, err := lastResults.publicCertificateCollectionPreparer(ctx)
23595	if err != nil {
23596		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesNextResults", nil, "Failure preparing next results request")
23597	}
23598	if req == nil {
23599		return
23600	}
23601	resp, err := client.ListPublicCertificatesSender(req)
23602	if err != nil {
23603		result.Response = autorest.Response{Response: resp}
23604		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesNextResults", resp, "Failure sending next results request")
23605	}
23606	result, err = client.ListPublicCertificatesResponder(resp)
23607	if err != nil {
23608		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesNextResults", resp, "Failure responding to next results request")
23609	}
23610	return
23611}
23612
23613// ListPublicCertificatesComplete enumerates all values, automatically crossing page boundaries as required.
23614func (client AppsClient) ListPublicCertificatesComplete(ctx context.Context, resourceGroupName string, name string) (result PublicCertificateCollectionIterator, err error) {
23615	if tracing.IsEnabled() {
23616		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificates")
23617		defer func() {
23618			sc := -1
23619			if result.Response().Response.Response != nil {
23620				sc = result.page.Response().Response.Response.StatusCode
23621			}
23622			tracing.EndSpan(ctx, sc, err)
23623		}()
23624	}
23625	result.page, err = client.ListPublicCertificates(ctx, resourceGroupName, name)
23626	return
23627}
23628
23629// ListPublicCertificatesSlot get public certificates for an app or a deployment slot.
23630// Parameters:
23631// resourceGroupName - name of the resource group to which the resource belongs.
23632// name - name of the app.
23633// slot - name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the
23634// production slot.
23635func (client AppsClient) ListPublicCertificatesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PublicCertificateCollectionPage, err error) {
23636	if tracing.IsEnabled() {
23637		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificatesSlot")
23638		defer func() {
23639			sc := -1
23640			if result.pcc.Response.Response != nil {
23641				sc = result.pcc.Response.Response.StatusCode
23642			}
23643			tracing.EndSpan(ctx, sc, err)
23644		}()
23645	}
23646	if err := validation.Validate([]validation.Validation{
23647		{TargetValue: resourceGroupName,
23648			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23649				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23650				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23651		return result, validation.NewError("web.AppsClient", "ListPublicCertificatesSlot", err.Error())
23652	}
23653
23654	result.fn = client.listPublicCertificatesSlotNextResults
23655	req, err := client.ListPublicCertificatesSlotPreparer(ctx, resourceGroupName, name, slot)
23656	if err != nil {
23657		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", nil, "Failure preparing request")
23658		return
23659	}
23660
23661	resp, err := client.ListPublicCertificatesSlotSender(req)
23662	if err != nil {
23663		result.pcc.Response = autorest.Response{Response: resp}
23664		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", resp, "Failure sending request")
23665		return
23666	}
23667
23668	result.pcc, err = client.ListPublicCertificatesSlotResponder(resp)
23669	if err != nil {
23670		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", resp, "Failure responding to request")
23671		return
23672	}
23673	if result.pcc.hasNextLink() && result.pcc.IsEmpty() {
23674		err = result.NextWithContext(ctx)
23675		return
23676	}
23677
23678	return
23679}
23680
23681// ListPublicCertificatesSlotPreparer prepares the ListPublicCertificatesSlot request.
23682func (client AppsClient) ListPublicCertificatesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
23683	pathParameters := map[string]interface{}{
23684		"name":              autorest.Encode("path", name),
23685		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23686		"slot":              autorest.Encode("path", slot),
23687		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23688	}
23689
23690	const APIVersion = "2018-02-01"
23691	queryParameters := map[string]interface{}{
23692		"api-version": APIVersion,
23693	}
23694
23695	preparer := autorest.CreatePreparer(
23696		autorest.AsGet(),
23697		autorest.WithBaseURL(client.BaseURI),
23698		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates", pathParameters),
23699		autorest.WithQueryParameters(queryParameters))
23700	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23701}
23702
23703// ListPublicCertificatesSlotSender sends the ListPublicCertificatesSlot request. The method will close the
23704// http.Response Body if it receives an error.
23705func (client AppsClient) ListPublicCertificatesSlotSender(req *http.Request) (*http.Response, error) {
23706	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23707}
23708
23709// ListPublicCertificatesSlotResponder handles the response to the ListPublicCertificatesSlot request. The method always
23710// closes the http.Response Body.
23711func (client AppsClient) ListPublicCertificatesSlotResponder(resp *http.Response) (result PublicCertificateCollection, err error) {
23712	err = autorest.Respond(
23713		resp,
23714		azure.WithErrorUnlessStatusCode(http.StatusOK),
23715		autorest.ByUnmarshallingJSON(&result),
23716		autorest.ByClosing())
23717	result.Response = autorest.Response{Response: resp}
23718	return
23719}
23720
23721// listPublicCertificatesSlotNextResults retrieves the next set of results, if any.
23722func (client AppsClient) listPublicCertificatesSlotNextResults(ctx context.Context, lastResults PublicCertificateCollection) (result PublicCertificateCollection, err error) {
23723	req, err := lastResults.publicCertificateCollectionPreparer(ctx)
23724	if err != nil {
23725		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesSlotNextResults", nil, "Failure preparing next results request")
23726	}
23727	if req == nil {
23728		return
23729	}
23730	resp, err := client.ListPublicCertificatesSlotSender(req)
23731	if err != nil {
23732		result.Response = autorest.Response{Response: resp}
23733		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesSlotNextResults", resp, "Failure sending next results request")
23734	}
23735	result, err = client.ListPublicCertificatesSlotResponder(resp)
23736	if err != nil {
23737		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesSlotNextResults", resp, "Failure responding to next results request")
23738	}
23739	return
23740}
23741
23742// ListPublicCertificatesSlotComplete enumerates all values, automatically crossing page boundaries as required.
23743func (client AppsClient) ListPublicCertificatesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result PublicCertificateCollectionIterator, err error) {
23744	if tracing.IsEnabled() {
23745		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificatesSlot")
23746		defer func() {
23747			sc := -1
23748			if result.Response().Response.Response != nil {
23749				sc = result.page.Response().Response.Response.StatusCode
23750			}
23751			tracing.EndSpan(ctx, sc, err)
23752		}()
23753	}
23754	result.page, err = client.ListPublicCertificatesSlot(ctx, resourceGroupName, name, slot)
23755	return
23756}
23757
23758// ListPublishingCredentials gets the Git/FTP publishing credentials of an app.
23759// Parameters:
23760// resourceGroupName - name of the resource group to which the resource belongs.
23761// name - name of the app.
23762func (client AppsClient) ListPublishingCredentials(ctx context.Context, resourceGroupName string, name string) (result AppsListPublishingCredentialsFuture, err error) {
23763	if tracing.IsEnabled() {
23764		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingCredentials")
23765		defer func() {
23766			sc := -1
23767			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
23768				sc = result.FutureAPI.Response().StatusCode
23769			}
23770			tracing.EndSpan(ctx, sc, err)
23771		}()
23772	}
23773	if err := validation.Validate([]validation.Validation{
23774		{TargetValue: resourceGroupName,
23775			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23776				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23777				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23778		return result, validation.NewError("web.AppsClient", "ListPublishingCredentials", err.Error())
23779	}
23780
23781	req, err := client.ListPublishingCredentialsPreparer(ctx, resourceGroupName, name)
23782	if err != nil {
23783		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentials", nil, "Failure preparing request")
23784		return
23785	}
23786
23787	result, err = client.ListPublishingCredentialsSender(req)
23788	if err != nil {
23789		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentials", nil, "Failure sending request")
23790		return
23791	}
23792
23793	return
23794}
23795
23796// ListPublishingCredentialsPreparer prepares the ListPublishingCredentials request.
23797func (client AppsClient) ListPublishingCredentialsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
23798	pathParameters := map[string]interface{}{
23799		"name":              autorest.Encode("path", name),
23800		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23801		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23802	}
23803
23804	const APIVersion = "2018-02-01"
23805	queryParameters := map[string]interface{}{
23806		"api-version": APIVersion,
23807	}
23808
23809	preparer := autorest.CreatePreparer(
23810		autorest.AsPost(),
23811		autorest.WithBaseURL(client.BaseURI),
23812		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list", pathParameters),
23813		autorest.WithQueryParameters(queryParameters))
23814	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23815}
23816
23817// ListPublishingCredentialsSender sends the ListPublishingCredentials request. The method will close the
23818// http.Response Body if it receives an error.
23819func (client AppsClient) ListPublishingCredentialsSender(req *http.Request) (future AppsListPublishingCredentialsFuture, err error) {
23820	var resp *http.Response
23821	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
23822	if err != nil {
23823		return
23824	}
23825	var azf azure.Future
23826	azf, err = azure.NewFutureFromResponse(resp)
23827	future.FutureAPI = &azf
23828	future.Result = future.result
23829	return
23830}
23831
23832// ListPublishingCredentialsResponder handles the response to the ListPublishingCredentials request. The method always
23833// closes the http.Response Body.
23834func (client AppsClient) ListPublishingCredentialsResponder(resp *http.Response) (result User, err error) {
23835	err = autorest.Respond(
23836		resp,
23837		azure.WithErrorUnlessStatusCode(http.StatusOK),
23838		autorest.ByUnmarshallingJSON(&result),
23839		autorest.ByClosing())
23840	result.Response = autorest.Response{Response: resp}
23841	return
23842}
23843
23844// ListPublishingCredentialsSlot gets the Git/FTP publishing credentials of an app.
23845// Parameters:
23846// resourceGroupName - name of the resource group to which the resource belongs.
23847// name - name of the app.
23848// slot - name of the deployment slot. If a slot is not specified, the API will get the publishing credentials
23849// for the production slot.
23850func (client AppsClient) ListPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AppsListPublishingCredentialsSlotFuture, err error) {
23851	if tracing.IsEnabled() {
23852		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingCredentialsSlot")
23853		defer func() {
23854			sc := -1
23855			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
23856				sc = result.FutureAPI.Response().StatusCode
23857			}
23858			tracing.EndSpan(ctx, sc, err)
23859		}()
23860	}
23861	if err := validation.Validate([]validation.Validation{
23862		{TargetValue: resourceGroupName,
23863			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23864				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23865				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23866		return result, validation.NewError("web.AppsClient", "ListPublishingCredentialsSlot", err.Error())
23867	}
23868
23869	req, err := client.ListPublishingCredentialsSlotPreparer(ctx, resourceGroupName, name, slot)
23870	if err != nil {
23871		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentialsSlot", nil, "Failure preparing request")
23872		return
23873	}
23874
23875	result, err = client.ListPublishingCredentialsSlotSender(req)
23876	if err != nil {
23877		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentialsSlot", nil, "Failure sending request")
23878		return
23879	}
23880
23881	return
23882}
23883
23884// ListPublishingCredentialsSlotPreparer prepares the ListPublishingCredentialsSlot request.
23885func (client AppsClient) ListPublishingCredentialsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
23886	pathParameters := map[string]interface{}{
23887		"name":              autorest.Encode("path", name),
23888		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23889		"slot":              autorest.Encode("path", slot),
23890		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23891	}
23892
23893	const APIVersion = "2018-02-01"
23894	queryParameters := map[string]interface{}{
23895		"api-version": APIVersion,
23896	}
23897
23898	preparer := autorest.CreatePreparer(
23899		autorest.AsPost(),
23900		autorest.WithBaseURL(client.BaseURI),
23901		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list", pathParameters),
23902		autorest.WithQueryParameters(queryParameters))
23903	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23904}
23905
23906// ListPublishingCredentialsSlotSender sends the ListPublishingCredentialsSlot request. The method will close the
23907// http.Response Body if it receives an error.
23908func (client AppsClient) ListPublishingCredentialsSlotSender(req *http.Request) (future AppsListPublishingCredentialsSlotFuture, err error) {
23909	var resp *http.Response
23910	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
23911	if err != nil {
23912		return
23913	}
23914	var azf azure.Future
23915	azf, err = azure.NewFutureFromResponse(resp)
23916	future.FutureAPI = &azf
23917	future.Result = future.result
23918	return
23919}
23920
23921// ListPublishingCredentialsSlotResponder handles the response to the ListPublishingCredentialsSlot request. The method always
23922// closes the http.Response Body.
23923func (client AppsClient) ListPublishingCredentialsSlotResponder(resp *http.Response) (result User, err error) {
23924	err = autorest.Respond(
23925		resp,
23926		azure.WithErrorUnlessStatusCode(http.StatusOK),
23927		autorest.ByUnmarshallingJSON(&result),
23928		autorest.ByClosing())
23929	result.Response = autorest.Response{Response: resp}
23930	return
23931}
23932
23933// ListPublishingProfileXMLWithSecrets gets the publishing profile for an app (or deployment slot, if specified).
23934// Parameters:
23935// resourceGroupName - name of the resource group to which the resource belongs.
23936// name - name of the app.
23937// publishingProfileOptions - specifies publishingProfileOptions for publishing profile. For example, use
23938// {"format": "FileZilla3"} to get a FileZilla publishing profile.
23939func (client AppsClient) ListPublishingProfileXMLWithSecrets(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions) (result ReadCloser, err error) {
23940	if tracing.IsEnabled() {
23941		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingProfileXMLWithSecrets")
23942		defer func() {
23943			sc := -1
23944			if result.Response.Response != nil {
23945				sc = result.Response.Response.StatusCode
23946			}
23947			tracing.EndSpan(ctx, sc, err)
23948		}()
23949	}
23950	if err := validation.Validate([]validation.Validation{
23951		{TargetValue: resourceGroupName,
23952			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23953				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23954				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23955		return result, validation.NewError("web.AppsClient", "ListPublishingProfileXMLWithSecrets", err.Error())
23956	}
23957
23958	req, err := client.ListPublishingProfileXMLWithSecretsPreparer(ctx, resourceGroupName, name, publishingProfileOptions)
23959	if err != nil {
23960		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecrets", nil, "Failure preparing request")
23961		return
23962	}
23963
23964	resp, err := client.ListPublishingProfileXMLWithSecretsSender(req)
23965	if err != nil {
23966		result.Response = autorest.Response{Response: resp}
23967		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecrets", resp, "Failure sending request")
23968		return
23969	}
23970
23971	result, err = client.ListPublishingProfileXMLWithSecretsResponder(resp)
23972	if err != nil {
23973		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecrets", resp, "Failure responding to request")
23974		return
23975	}
23976
23977	return
23978}
23979
23980// ListPublishingProfileXMLWithSecretsPreparer prepares the ListPublishingProfileXMLWithSecrets request.
23981func (client AppsClient) ListPublishingProfileXMLWithSecretsPreparer(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions) (*http.Request, error) {
23982	pathParameters := map[string]interface{}{
23983		"name":              autorest.Encode("path", name),
23984		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23985		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23986	}
23987
23988	const APIVersion = "2018-02-01"
23989	queryParameters := map[string]interface{}{
23990		"api-version": APIVersion,
23991	}
23992
23993	preparer := autorest.CreatePreparer(
23994		autorest.AsContentType("application/json; charset=utf-8"),
23995		autorest.AsPost(),
23996		autorest.WithBaseURL(client.BaseURI),
23997		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml", pathParameters),
23998		autorest.WithJSON(publishingProfileOptions),
23999		autorest.WithQueryParameters(queryParameters))
24000	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24001}
24002
24003// ListPublishingProfileXMLWithSecretsSender sends the ListPublishingProfileXMLWithSecrets request. The method will close the
24004// http.Response Body if it receives an error.
24005func (client AppsClient) ListPublishingProfileXMLWithSecretsSender(req *http.Request) (*http.Response, error) {
24006	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24007}
24008
24009// ListPublishingProfileXMLWithSecretsResponder handles the response to the ListPublishingProfileXMLWithSecrets request. The method always
24010// closes the http.Response Body.
24011func (client AppsClient) ListPublishingProfileXMLWithSecretsResponder(resp *http.Response) (result ReadCloser, err error) {
24012	result.Value = &resp.Body
24013	err = autorest.Respond(
24014		resp,
24015		azure.WithErrorUnlessStatusCode(http.StatusOK))
24016	result.Response = autorest.Response{Response: resp}
24017	return
24018}
24019
24020// ListPublishingProfileXMLWithSecretsSlot gets the publishing profile for an app (or deployment slot, if specified).
24021// Parameters:
24022// resourceGroupName - name of the resource group to which the resource belongs.
24023// name - name of the app.
24024// publishingProfileOptions - specifies publishingProfileOptions for publishing profile. For example, use
24025// {"format": "FileZilla3"} to get a FileZilla publishing profile.
24026// slot - name of the deployment slot. If a slot is not specified, the API will get the publishing profile for
24027// the production slot.
24028func (client AppsClient) ListPublishingProfileXMLWithSecretsSlot(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, slot string) (result ReadCloser, err error) {
24029	if tracing.IsEnabled() {
24030		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingProfileXMLWithSecretsSlot")
24031		defer func() {
24032			sc := -1
24033			if result.Response.Response != nil {
24034				sc = result.Response.Response.StatusCode
24035			}
24036			tracing.EndSpan(ctx, sc, err)
24037		}()
24038	}
24039	if err := validation.Validate([]validation.Validation{
24040		{TargetValue: resourceGroupName,
24041			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24042				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24043				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24044		return result, validation.NewError("web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", err.Error())
24045	}
24046
24047	req, err := client.ListPublishingProfileXMLWithSecretsSlotPreparer(ctx, resourceGroupName, name, publishingProfileOptions, slot)
24048	if err != nil {
24049		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", nil, "Failure preparing request")
24050		return
24051	}
24052
24053	resp, err := client.ListPublishingProfileXMLWithSecretsSlotSender(req)
24054	if err != nil {
24055		result.Response = autorest.Response{Response: resp}
24056		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", resp, "Failure sending request")
24057		return
24058	}
24059
24060	result, err = client.ListPublishingProfileXMLWithSecretsSlotResponder(resp)
24061	if err != nil {
24062		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", resp, "Failure responding to request")
24063		return
24064	}
24065
24066	return
24067}
24068
24069// ListPublishingProfileXMLWithSecretsSlotPreparer prepares the ListPublishingProfileXMLWithSecretsSlot request.
24070func (client AppsClient) ListPublishingProfileXMLWithSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, slot string) (*http.Request, error) {
24071	pathParameters := map[string]interface{}{
24072		"name":              autorest.Encode("path", name),
24073		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24074		"slot":              autorest.Encode("path", slot),
24075		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24076	}
24077
24078	const APIVersion = "2018-02-01"
24079	queryParameters := map[string]interface{}{
24080		"api-version": APIVersion,
24081	}
24082
24083	preparer := autorest.CreatePreparer(
24084		autorest.AsContentType("application/json; charset=utf-8"),
24085		autorest.AsPost(),
24086		autorest.WithBaseURL(client.BaseURI),
24087		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml", pathParameters),
24088		autorest.WithJSON(publishingProfileOptions),
24089		autorest.WithQueryParameters(queryParameters))
24090	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24091}
24092
24093// ListPublishingProfileXMLWithSecretsSlotSender sends the ListPublishingProfileXMLWithSecretsSlot request. The method will close the
24094// http.Response Body if it receives an error.
24095func (client AppsClient) ListPublishingProfileXMLWithSecretsSlotSender(req *http.Request) (*http.Response, error) {
24096	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24097}
24098
24099// ListPublishingProfileXMLWithSecretsSlotResponder handles the response to the ListPublishingProfileXMLWithSecretsSlot request. The method always
24100// closes the http.Response Body.
24101func (client AppsClient) ListPublishingProfileXMLWithSecretsSlotResponder(resp *http.Response) (result ReadCloser, err error) {
24102	result.Value = &resp.Body
24103	err = autorest.Respond(
24104		resp,
24105		azure.WithErrorUnlessStatusCode(http.StatusOK))
24106	result.Response = autorest.Response{Response: resp}
24107	return
24108}
24109
24110// ListRelayServiceConnections gets hybrid connections configured for an app (or deployment slot, if specified).
24111// Parameters:
24112// resourceGroupName - name of the resource group to which the resource belongs.
24113// name - name of the app.
24114func (client AppsClient) ListRelayServiceConnections(ctx context.Context, resourceGroupName string, name string) (result RelayServiceConnectionEntity, err error) {
24115	if tracing.IsEnabled() {
24116		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListRelayServiceConnections")
24117		defer func() {
24118			sc := -1
24119			if result.Response.Response != nil {
24120				sc = result.Response.Response.StatusCode
24121			}
24122			tracing.EndSpan(ctx, sc, err)
24123		}()
24124	}
24125	if err := validation.Validate([]validation.Validation{
24126		{TargetValue: resourceGroupName,
24127			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24128				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24129				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24130		return result, validation.NewError("web.AppsClient", "ListRelayServiceConnections", err.Error())
24131	}
24132
24133	req, err := client.ListRelayServiceConnectionsPreparer(ctx, resourceGroupName, name)
24134	if err != nil {
24135		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnections", nil, "Failure preparing request")
24136		return
24137	}
24138
24139	resp, err := client.ListRelayServiceConnectionsSender(req)
24140	if err != nil {
24141		result.Response = autorest.Response{Response: resp}
24142		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnections", resp, "Failure sending request")
24143		return
24144	}
24145
24146	result, err = client.ListRelayServiceConnectionsResponder(resp)
24147	if err != nil {
24148		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnections", resp, "Failure responding to request")
24149		return
24150	}
24151
24152	return
24153}
24154
24155// ListRelayServiceConnectionsPreparer prepares the ListRelayServiceConnections request.
24156func (client AppsClient) ListRelayServiceConnectionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
24157	pathParameters := map[string]interface{}{
24158		"name":              autorest.Encode("path", name),
24159		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24160		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24161	}
24162
24163	const APIVersion = "2018-02-01"
24164	queryParameters := map[string]interface{}{
24165		"api-version": APIVersion,
24166	}
24167
24168	preparer := autorest.CreatePreparer(
24169		autorest.AsGet(),
24170		autorest.WithBaseURL(client.BaseURI),
24171		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection", pathParameters),
24172		autorest.WithQueryParameters(queryParameters))
24173	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24174}
24175
24176// ListRelayServiceConnectionsSender sends the ListRelayServiceConnections request. The method will close the
24177// http.Response Body if it receives an error.
24178func (client AppsClient) ListRelayServiceConnectionsSender(req *http.Request) (*http.Response, error) {
24179	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24180}
24181
24182// ListRelayServiceConnectionsResponder handles the response to the ListRelayServiceConnections request. The method always
24183// closes the http.Response Body.
24184func (client AppsClient) ListRelayServiceConnectionsResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
24185	err = autorest.Respond(
24186		resp,
24187		azure.WithErrorUnlessStatusCode(http.StatusOK),
24188		autorest.ByUnmarshallingJSON(&result),
24189		autorest.ByClosing())
24190	result.Response = autorest.Response{Response: resp}
24191	return
24192}
24193
24194// ListRelayServiceConnectionsSlot gets hybrid connections configured for an app (or deployment slot, if specified).
24195// Parameters:
24196// resourceGroupName - name of the resource group to which the resource belongs.
24197// name - name of the app.
24198// slot - name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the
24199// production slot.
24200func (client AppsClient) ListRelayServiceConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result RelayServiceConnectionEntity, err error) {
24201	if tracing.IsEnabled() {
24202		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListRelayServiceConnectionsSlot")
24203		defer func() {
24204			sc := -1
24205			if result.Response.Response != nil {
24206				sc = result.Response.Response.StatusCode
24207			}
24208			tracing.EndSpan(ctx, sc, err)
24209		}()
24210	}
24211	if err := validation.Validate([]validation.Validation{
24212		{TargetValue: resourceGroupName,
24213			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24214				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24215				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24216		return result, validation.NewError("web.AppsClient", "ListRelayServiceConnectionsSlot", err.Error())
24217	}
24218
24219	req, err := client.ListRelayServiceConnectionsSlotPreparer(ctx, resourceGroupName, name, slot)
24220	if err != nil {
24221		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnectionsSlot", nil, "Failure preparing request")
24222		return
24223	}
24224
24225	resp, err := client.ListRelayServiceConnectionsSlotSender(req)
24226	if err != nil {
24227		result.Response = autorest.Response{Response: resp}
24228		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnectionsSlot", resp, "Failure sending request")
24229		return
24230	}
24231
24232	result, err = client.ListRelayServiceConnectionsSlotResponder(resp)
24233	if err != nil {
24234		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnectionsSlot", resp, "Failure responding to request")
24235		return
24236	}
24237
24238	return
24239}
24240
24241// ListRelayServiceConnectionsSlotPreparer prepares the ListRelayServiceConnectionsSlot request.
24242func (client AppsClient) ListRelayServiceConnectionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
24243	pathParameters := map[string]interface{}{
24244		"name":              autorest.Encode("path", name),
24245		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24246		"slot":              autorest.Encode("path", slot),
24247		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24248	}
24249
24250	const APIVersion = "2018-02-01"
24251	queryParameters := map[string]interface{}{
24252		"api-version": APIVersion,
24253	}
24254
24255	preparer := autorest.CreatePreparer(
24256		autorest.AsGet(),
24257		autorest.WithBaseURL(client.BaseURI),
24258		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection", pathParameters),
24259		autorest.WithQueryParameters(queryParameters))
24260	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24261}
24262
24263// ListRelayServiceConnectionsSlotSender sends the ListRelayServiceConnectionsSlot request. The method will close the
24264// http.Response Body if it receives an error.
24265func (client AppsClient) ListRelayServiceConnectionsSlotSender(req *http.Request) (*http.Response, error) {
24266	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24267}
24268
24269// ListRelayServiceConnectionsSlotResponder handles the response to the ListRelayServiceConnectionsSlot request. The method always
24270// closes the http.Response Body.
24271func (client AppsClient) ListRelayServiceConnectionsSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
24272	err = autorest.Respond(
24273		resp,
24274		azure.WithErrorUnlessStatusCode(http.StatusOK),
24275		autorest.ByUnmarshallingJSON(&result),
24276		autorest.ByClosing())
24277	result.Response = autorest.Response{Response: resp}
24278	return
24279}
24280
24281// ListSiteExtensions get list of siteextensions for a web site, or a deployment slot.
24282// Parameters:
24283// resourceGroupName - name of the resource group to which the resource belongs.
24284// name - site name.
24285func (client AppsClient) ListSiteExtensions(ctx context.Context, resourceGroupName string, name string) (result SiteExtensionInfoCollectionPage, err error) {
24286	if tracing.IsEnabled() {
24287		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensions")
24288		defer func() {
24289			sc := -1
24290			if result.seic.Response.Response != nil {
24291				sc = result.seic.Response.Response.StatusCode
24292			}
24293			tracing.EndSpan(ctx, sc, err)
24294		}()
24295	}
24296	if err := validation.Validate([]validation.Validation{
24297		{TargetValue: resourceGroupName,
24298			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24299				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24300				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24301		return result, validation.NewError("web.AppsClient", "ListSiteExtensions", err.Error())
24302	}
24303
24304	result.fn = client.listSiteExtensionsNextResults
24305	req, err := client.ListSiteExtensionsPreparer(ctx, resourceGroupName, name)
24306	if err != nil {
24307		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", nil, "Failure preparing request")
24308		return
24309	}
24310
24311	resp, err := client.ListSiteExtensionsSender(req)
24312	if err != nil {
24313		result.seic.Response = autorest.Response{Response: resp}
24314		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", resp, "Failure sending request")
24315		return
24316	}
24317
24318	result.seic, err = client.ListSiteExtensionsResponder(resp)
24319	if err != nil {
24320		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", resp, "Failure responding to request")
24321		return
24322	}
24323	if result.seic.hasNextLink() && result.seic.IsEmpty() {
24324		err = result.NextWithContext(ctx)
24325		return
24326	}
24327
24328	return
24329}
24330
24331// ListSiteExtensionsPreparer prepares the ListSiteExtensions request.
24332func (client AppsClient) ListSiteExtensionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
24333	pathParameters := map[string]interface{}{
24334		"name":              autorest.Encode("path", name),
24335		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24336		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24337	}
24338
24339	const APIVersion = "2018-02-01"
24340	queryParameters := map[string]interface{}{
24341		"api-version": APIVersion,
24342	}
24343
24344	preparer := autorest.CreatePreparer(
24345		autorest.AsGet(),
24346		autorest.WithBaseURL(client.BaseURI),
24347		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions", pathParameters),
24348		autorest.WithQueryParameters(queryParameters))
24349	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24350}
24351
24352// ListSiteExtensionsSender sends the ListSiteExtensions request. The method will close the
24353// http.Response Body if it receives an error.
24354func (client AppsClient) ListSiteExtensionsSender(req *http.Request) (*http.Response, error) {
24355	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24356}
24357
24358// ListSiteExtensionsResponder handles the response to the ListSiteExtensions request. The method always
24359// closes the http.Response Body.
24360func (client AppsClient) ListSiteExtensionsResponder(resp *http.Response) (result SiteExtensionInfoCollection, err error) {
24361	err = autorest.Respond(
24362		resp,
24363		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
24364		autorest.ByUnmarshallingJSON(&result),
24365		autorest.ByClosing())
24366	result.Response = autorest.Response{Response: resp}
24367	return
24368}
24369
24370// listSiteExtensionsNextResults retrieves the next set of results, if any.
24371func (client AppsClient) listSiteExtensionsNextResults(ctx context.Context, lastResults SiteExtensionInfoCollection) (result SiteExtensionInfoCollection, err error) {
24372	req, err := lastResults.siteExtensionInfoCollectionPreparer(ctx)
24373	if err != nil {
24374		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsNextResults", nil, "Failure preparing next results request")
24375	}
24376	if req == nil {
24377		return
24378	}
24379	resp, err := client.ListSiteExtensionsSender(req)
24380	if err != nil {
24381		result.Response = autorest.Response{Response: resp}
24382		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsNextResults", resp, "Failure sending next results request")
24383	}
24384	result, err = client.ListSiteExtensionsResponder(resp)
24385	if err != nil {
24386		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsNextResults", resp, "Failure responding to next results request")
24387	}
24388	return
24389}
24390
24391// ListSiteExtensionsComplete enumerates all values, automatically crossing page boundaries as required.
24392func (client AppsClient) ListSiteExtensionsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteExtensionInfoCollectionIterator, err error) {
24393	if tracing.IsEnabled() {
24394		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensions")
24395		defer func() {
24396			sc := -1
24397			if result.Response().Response.Response != nil {
24398				sc = result.page.Response().Response.Response.StatusCode
24399			}
24400			tracing.EndSpan(ctx, sc, err)
24401		}()
24402	}
24403	result.page, err = client.ListSiteExtensions(ctx, resourceGroupName, name)
24404	return
24405}
24406
24407// ListSiteExtensionsSlot get list of siteextensions for a web site, or a deployment slot.
24408// Parameters:
24409// resourceGroupName - name of the resource group to which the resource belongs.
24410// name - site name.
24411// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
24412// production slot.
24413func (client AppsClient) ListSiteExtensionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteExtensionInfoCollectionPage, err error) {
24414	if tracing.IsEnabled() {
24415		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensionsSlot")
24416		defer func() {
24417			sc := -1
24418			if result.seic.Response.Response != nil {
24419				sc = result.seic.Response.Response.StatusCode
24420			}
24421			tracing.EndSpan(ctx, sc, err)
24422		}()
24423	}
24424	if err := validation.Validate([]validation.Validation{
24425		{TargetValue: resourceGroupName,
24426			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24427				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24428				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24429		return result, validation.NewError("web.AppsClient", "ListSiteExtensionsSlot", err.Error())
24430	}
24431
24432	result.fn = client.listSiteExtensionsSlotNextResults
24433	req, err := client.ListSiteExtensionsSlotPreparer(ctx, resourceGroupName, name, slot)
24434	if err != nil {
24435		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", nil, "Failure preparing request")
24436		return
24437	}
24438
24439	resp, err := client.ListSiteExtensionsSlotSender(req)
24440	if err != nil {
24441		result.seic.Response = autorest.Response{Response: resp}
24442		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", resp, "Failure sending request")
24443		return
24444	}
24445
24446	result.seic, err = client.ListSiteExtensionsSlotResponder(resp)
24447	if err != nil {
24448		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", resp, "Failure responding to request")
24449		return
24450	}
24451	if result.seic.hasNextLink() && result.seic.IsEmpty() {
24452		err = result.NextWithContext(ctx)
24453		return
24454	}
24455
24456	return
24457}
24458
24459// ListSiteExtensionsSlotPreparer prepares the ListSiteExtensionsSlot request.
24460func (client AppsClient) ListSiteExtensionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
24461	pathParameters := map[string]interface{}{
24462		"name":              autorest.Encode("path", name),
24463		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24464		"slot":              autorest.Encode("path", slot),
24465		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24466	}
24467
24468	const APIVersion = "2018-02-01"
24469	queryParameters := map[string]interface{}{
24470		"api-version": APIVersion,
24471	}
24472
24473	preparer := autorest.CreatePreparer(
24474		autorest.AsGet(),
24475		autorest.WithBaseURL(client.BaseURI),
24476		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions", pathParameters),
24477		autorest.WithQueryParameters(queryParameters))
24478	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24479}
24480
24481// ListSiteExtensionsSlotSender sends the ListSiteExtensionsSlot request. The method will close the
24482// http.Response Body if it receives an error.
24483func (client AppsClient) ListSiteExtensionsSlotSender(req *http.Request) (*http.Response, error) {
24484	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24485}
24486
24487// ListSiteExtensionsSlotResponder handles the response to the ListSiteExtensionsSlot request. The method always
24488// closes the http.Response Body.
24489func (client AppsClient) ListSiteExtensionsSlotResponder(resp *http.Response) (result SiteExtensionInfoCollection, err error) {
24490	err = autorest.Respond(
24491		resp,
24492		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
24493		autorest.ByUnmarshallingJSON(&result),
24494		autorest.ByClosing())
24495	result.Response = autorest.Response{Response: resp}
24496	return
24497}
24498
24499// listSiteExtensionsSlotNextResults retrieves the next set of results, if any.
24500func (client AppsClient) listSiteExtensionsSlotNextResults(ctx context.Context, lastResults SiteExtensionInfoCollection) (result SiteExtensionInfoCollection, err error) {
24501	req, err := lastResults.siteExtensionInfoCollectionPreparer(ctx)
24502	if err != nil {
24503		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsSlotNextResults", nil, "Failure preparing next results request")
24504	}
24505	if req == nil {
24506		return
24507	}
24508	resp, err := client.ListSiteExtensionsSlotSender(req)
24509	if err != nil {
24510		result.Response = autorest.Response{Response: resp}
24511		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsSlotNextResults", resp, "Failure sending next results request")
24512	}
24513	result, err = client.ListSiteExtensionsSlotResponder(resp)
24514	if err != nil {
24515		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsSlotNextResults", resp, "Failure responding to next results request")
24516	}
24517	return
24518}
24519
24520// ListSiteExtensionsSlotComplete enumerates all values, automatically crossing page boundaries as required.
24521func (client AppsClient) ListSiteExtensionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteExtensionInfoCollectionIterator, err error) {
24522	if tracing.IsEnabled() {
24523		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensionsSlot")
24524		defer func() {
24525			sc := -1
24526			if result.Response().Response.Response != nil {
24527				sc = result.page.Response().Response.Response.StatusCode
24528			}
24529			tracing.EndSpan(ctx, sc, err)
24530		}()
24531	}
24532	result.page, err = client.ListSiteExtensionsSlot(ctx, resourceGroupName, name, slot)
24533	return
24534}
24535
24536// ListSitePushSettings gets the Push settings associated with web app.
24537// Parameters:
24538// resourceGroupName - name of the resource group to which the resource belongs.
24539// name - name of web app.
24540func (client AppsClient) ListSitePushSettings(ctx context.Context, resourceGroupName string, name string) (result PushSettings, err error) {
24541	if tracing.IsEnabled() {
24542		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSitePushSettings")
24543		defer func() {
24544			sc := -1
24545			if result.Response.Response != nil {
24546				sc = result.Response.Response.StatusCode
24547			}
24548			tracing.EndSpan(ctx, sc, err)
24549		}()
24550	}
24551	if err := validation.Validate([]validation.Validation{
24552		{TargetValue: resourceGroupName,
24553			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24554				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24555				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24556		return result, validation.NewError("web.AppsClient", "ListSitePushSettings", err.Error())
24557	}
24558
24559	req, err := client.ListSitePushSettingsPreparer(ctx, resourceGroupName, name)
24560	if err != nil {
24561		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettings", nil, "Failure preparing request")
24562		return
24563	}
24564
24565	resp, err := client.ListSitePushSettingsSender(req)
24566	if err != nil {
24567		result.Response = autorest.Response{Response: resp}
24568		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettings", resp, "Failure sending request")
24569		return
24570	}
24571
24572	result, err = client.ListSitePushSettingsResponder(resp)
24573	if err != nil {
24574		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettings", resp, "Failure responding to request")
24575		return
24576	}
24577
24578	return
24579}
24580
24581// ListSitePushSettingsPreparer prepares the ListSitePushSettings request.
24582func (client AppsClient) ListSitePushSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
24583	pathParameters := map[string]interface{}{
24584		"name":              autorest.Encode("path", name),
24585		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24586		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24587	}
24588
24589	const APIVersion = "2018-02-01"
24590	queryParameters := map[string]interface{}{
24591		"api-version": APIVersion,
24592	}
24593
24594	preparer := autorest.CreatePreparer(
24595		autorest.AsPost(),
24596		autorest.WithBaseURL(client.BaseURI),
24597		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list", pathParameters),
24598		autorest.WithQueryParameters(queryParameters))
24599	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24600}
24601
24602// ListSitePushSettingsSender sends the ListSitePushSettings request. The method will close the
24603// http.Response Body if it receives an error.
24604func (client AppsClient) ListSitePushSettingsSender(req *http.Request) (*http.Response, error) {
24605	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24606}
24607
24608// ListSitePushSettingsResponder handles the response to the ListSitePushSettings request. The method always
24609// closes the http.Response Body.
24610func (client AppsClient) ListSitePushSettingsResponder(resp *http.Response) (result PushSettings, err error) {
24611	err = autorest.Respond(
24612		resp,
24613		azure.WithErrorUnlessStatusCode(http.StatusOK),
24614		autorest.ByUnmarshallingJSON(&result),
24615		autorest.ByClosing())
24616	result.Response = autorest.Response{Response: resp}
24617	return
24618}
24619
24620// ListSitePushSettingsSlot gets the Push settings associated with web app.
24621// Parameters:
24622// resourceGroupName - name of the resource group to which the resource belongs.
24623// name - name of web app.
24624// slot - name of web app slot. If not specified then will default to production slot.
24625func (client AppsClient) ListSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PushSettings, err error) {
24626	if tracing.IsEnabled() {
24627		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSitePushSettingsSlot")
24628		defer func() {
24629			sc := -1
24630			if result.Response.Response != nil {
24631				sc = result.Response.Response.StatusCode
24632			}
24633			tracing.EndSpan(ctx, sc, err)
24634		}()
24635	}
24636	if err := validation.Validate([]validation.Validation{
24637		{TargetValue: resourceGroupName,
24638			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24639				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24640				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24641		return result, validation.NewError("web.AppsClient", "ListSitePushSettingsSlot", err.Error())
24642	}
24643
24644	req, err := client.ListSitePushSettingsSlotPreparer(ctx, resourceGroupName, name, slot)
24645	if err != nil {
24646		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettingsSlot", nil, "Failure preparing request")
24647		return
24648	}
24649
24650	resp, err := client.ListSitePushSettingsSlotSender(req)
24651	if err != nil {
24652		result.Response = autorest.Response{Response: resp}
24653		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettingsSlot", resp, "Failure sending request")
24654		return
24655	}
24656
24657	result, err = client.ListSitePushSettingsSlotResponder(resp)
24658	if err != nil {
24659		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettingsSlot", resp, "Failure responding to request")
24660		return
24661	}
24662
24663	return
24664}
24665
24666// ListSitePushSettingsSlotPreparer prepares the ListSitePushSettingsSlot request.
24667func (client AppsClient) ListSitePushSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
24668	pathParameters := map[string]interface{}{
24669		"name":              autorest.Encode("path", name),
24670		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24671		"slot":              autorest.Encode("path", slot),
24672		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24673	}
24674
24675	const APIVersion = "2018-02-01"
24676	queryParameters := map[string]interface{}{
24677		"api-version": APIVersion,
24678	}
24679
24680	preparer := autorest.CreatePreparer(
24681		autorest.AsPost(),
24682		autorest.WithBaseURL(client.BaseURI),
24683		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list", pathParameters),
24684		autorest.WithQueryParameters(queryParameters))
24685	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24686}
24687
24688// ListSitePushSettingsSlotSender sends the ListSitePushSettingsSlot request. The method will close the
24689// http.Response Body if it receives an error.
24690func (client AppsClient) ListSitePushSettingsSlotSender(req *http.Request) (*http.Response, error) {
24691	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24692}
24693
24694// ListSitePushSettingsSlotResponder handles the response to the ListSitePushSettingsSlot request. The method always
24695// closes the http.Response Body.
24696func (client AppsClient) ListSitePushSettingsSlotResponder(resp *http.Response) (result PushSettings, err error) {
24697	err = autorest.Respond(
24698		resp,
24699		azure.WithErrorUnlessStatusCode(http.StatusOK),
24700		autorest.ByUnmarshallingJSON(&result),
24701		autorest.ByClosing())
24702	result.Response = autorest.Response{Response: resp}
24703	return
24704}
24705
24706// ListSlotConfigurationNames gets the names of app settings and connection strings that stick to the slot (not
24707// swapped).
24708// Parameters:
24709// resourceGroupName - name of the resource group to which the resource belongs.
24710// name - name of the app.
24711func (client AppsClient) ListSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string) (result SlotConfigNamesResource, err error) {
24712	if tracing.IsEnabled() {
24713		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotConfigurationNames")
24714		defer func() {
24715			sc := -1
24716			if result.Response.Response != nil {
24717				sc = result.Response.Response.StatusCode
24718			}
24719			tracing.EndSpan(ctx, sc, err)
24720		}()
24721	}
24722	if err := validation.Validate([]validation.Validation{
24723		{TargetValue: resourceGroupName,
24724			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24725				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24726				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24727		return result, validation.NewError("web.AppsClient", "ListSlotConfigurationNames", err.Error())
24728	}
24729
24730	req, err := client.ListSlotConfigurationNamesPreparer(ctx, resourceGroupName, name)
24731	if err != nil {
24732		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotConfigurationNames", nil, "Failure preparing request")
24733		return
24734	}
24735
24736	resp, err := client.ListSlotConfigurationNamesSender(req)
24737	if err != nil {
24738		result.Response = autorest.Response{Response: resp}
24739		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotConfigurationNames", resp, "Failure sending request")
24740		return
24741	}
24742
24743	result, err = client.ListSlotConfigurationNamesResponder(resp)
24744	if err != nil {
24745		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotConfigurationNames", resp, "Failure responding to request")
24746		return
24747	}
24748
24749	return
24750}
24751
24752// ListSlotConfigurationNamesPreparer prepares the ListSlotConfigurationNames request.
24753func (client AppsClient) ListSlotConfigurationNamesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
24754	pathParameters := map[string]interface{}{
24755		"name":              autorest.Encode("path", name),
24756		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24757		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24758	}
24759
24760	const APIVersion = "2018-02-01"
24761	queryParameters := map[string]interface{}{
24762		"api-version": APIVersion,
24763	}
24764
24765	preparer := autorest.CreatePreparer(
24766		autorest.AsGet(),
24767		autorest.WithBaseURL(client.BaseURI),
24768		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames", pathParameters),
24769		autorest.WithQueryParameters(queryParameters))
24770	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24771}
24772
24773// ListSlotConfigurationNamesSender sends the ListSlotConfigurationNames request. The method will close the
24774// http.Response Body if it receives an error.
24775func (client AppsClient) ListSlotConfigurationNamesSender(req *http.Request) (*http.Response, error) {
24776	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24777}
24778
24779// ListSlotConfigurationNamesResponder handles the response to the ListSlotConfigurationNames request. The method always
24780// closes the http.Response Body.
24781func (client AppsClient) ListSlotConfigurationNamesResponder(resp *http.Response) (result SlotConfigNamesResource, err error) {
24782	err = autorest.Respond(
24783		resp,
24784		azure.WithErrorUnlessStatusCode(http.StatusOK),
24785		autorest.ByUnmarshallingJSON(&result),
24786		autorest.ByClosing())
24787	result.Response = autorest.Response{Response: resp}
24788	return
24789}
24790
24791// ListSlotDifferencesFromProduction get the difference in configuration settings between two web app slots.
24792// Parameters:
24793// resourceGroupName - name of the resource group to which the resource belongs.
24794// name - name of the app.
24795// slotSwapEntity - JSON object that contains the target slot name. See example.
24796func (client AppsClient) ListSlotDifferencesFromProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result SlotDifferenceCollectionPage, err error) {
24797	if tracing.IsEnabled() {
24798		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesFromProduction")
24799		defer func() {
24800			sc := -1
24801			if result.sdc.Response.Response != nil {
24802				sc = result.sdc.Response.Response.StatusCode
24803			}
24804			tracing.EndSpan(ctx, sc, err)
24805		}()
24806	}
24807	if err := validation.Validate([]validation.Validation{
24808		{TargetValue: resourceGroupName,
24809			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24810				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24811				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
24812		{TargetValue: slotSwapEntity,
24813			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
24814				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
24815		return result, validation.NewError("web.AppsClient", "ListSlotDifferencesFromProduction", err.Error())
24816	}
24817
24818	result.fn = client.listSlotDifferencesFromProductionNextResults
24819	req, err := client.ListSlotDifferencesFromProductionPreparer(ctx, resourceGroupName, name, slotSwapEntity)
24820	if err != nil {
24821		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesFromProduction", nil, "Failure preparing request")
24822		return
24823	}
24824
24825	resp, err := client.ListSlotDifferencesFromProductionSender(req)
24826	if err != nil {
24827		result.sdc.Response = autorest.Response{Response: resp}
24828		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesFromProduction", resp, "Failure sending request")
24829		return
24830	}
24831
24832	result.sdc, err = client.ListSlotDifferencesFromProductionResponder(resp)
24833	if err != nil {
24834		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesFromProduction", resp, "Failure responding to request")
24835		return
24836	}
24837	if result.sdc.hasNextLink() && result.sdc.IsEmpty() {
24838		err = result.NextWithContext(ctx)
24839		return
24840	}
24841
24842	return
24843}
24844
24845// ListSlotDifferencesFromProductionPreparer prepares the ListSlotDifferencesFromProduction request.
24846func (client AppsClient) ListSlotDifferencesFromProductionPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (*http.Request, error) {
24847	pathParameters := map[string]interface{}{
24848		"name":              autorest.Encode("path", name),
24849		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24850		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24851	}
24852
24853	const APIVersion = "2018-02-01"
24854	queryParameters := map[string]interface{}{
24855		"api-version": APIVersion,
24856	}
24857
24858	preparer := autorest.CreatePreparer(
24859		autorest.AsContentType("application/json; charset=utf-8"),
24860		autorest.AsPost(),
24861		autorest.WithBaseURL(client.BaseURI),
24862		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs", pathParameters),
24863		autorest.WithJSON(slotSwapEntity),
24864		autorest.WithQueryParameters(queryParameters))
24865	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24866}
24867
24868// ListSlotDifferencesFromProductionSender sends the ListSlotDifferencesFromProduction request. The method will close the
24869// http.Response Body if it receives an error.
24870func (client AppsClient) ListSlotDifferencesFromProductionSender(req *http.Request) (*http.Response, error) {
24871	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24872}
24873
24874// ListSlotDifferencesFromProductionResponder handles the response to the ListSlotDifferencesFromProduction request. The method always
24875// closes the http.Response Body.
24876func (client AppsClient) ListSlotDifferencesFromProductionResponder(resp *http.Response) (result SlotDifferenceCollection, err error) {
24877	err = autorest.Respond(
24878		resp,
24879		azure.WithErrorUnlessStatusCode(http.StatusOK),
24880		autorest.ByUnmarshallingJSON(&result),
24881		autorest.ByClosing())
24882	result.Response = autorest.Response{Response: resp}
24883	return
24884}
24885
24886// listSlotDifferencesFromProductionNextResults retrieves the next set of results, if any.
24887func (client AppsClient) listSlotDifferencesFromProductionNextResults(ctx context.Context, lastResults SlotDifferenceCollection) (result SlotDifferenceCollection, err error) {
24888	req, err := lastResults.slotDifferenceCollectionPreparer(ctx)
24889	if err != nil {
24890		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesFromProductionNextResults", nil, "Failure preparing next results request")
24891	}
24892	if req == nil {
24893		return
24894	}
24895	resp, err := client.ListSlotDifferencesFromProductionSender(req)
24896	if err != nil {
24897		result.Response = autorest.Response{Response: resp}
24898		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesFromProductionNextResults", resp, "Failure sending next results request")
24899	}
24900	result, err = client.ListSlotDifferencesFromProductionResponder(resp)
24901	if err != nil {
24902		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesFromProductionNextResults", resp, "Failure responding to next results request")
24903	}
24904	return
24905}
24906
24907// ListSlotDifferencesFromProductionComplete enumerates all values, automatically crossing page boundaries as required.
24908func (client AppsClient) ListSlotDifferencesFromProductionComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result SlotDifferenceCollectionIterator, err error) {
24909	if tracing.IsEnabled() {
24910		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesFromProduction")
24911		defer func() {
24912			sc := -1
24913			if result.Response().Response.Response != nil {
24914				sc = result.page.Response().Response.Response.StatusCode
24915			}
24916			tracing.EndSpan(ctx, sc, err)
24917		}()
24918	}
24919	result.page, err = client.ListSlotDifferencesFromProduction(ctx, resourceGroupName, name, slotSwapEntity)
24920	return
24921}
24922
24923// ListSlotDifferencesSlot get the difference in configuration settings between two web app slots.
24924// Parameters:
24925// resourceGroupName - name of the resource group to which the resource belongs.
24926// name - name of the app.
24927// slotSwapEntity - JSON object that contains the target slot name. See example.
24928// slot - name of the source slot. If a slot is not specified, the production slot is used as the source slot.
24929func (client AppsClient) ListSlotDifferencesSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result SlotDifferenceCollectionPage, err error) {
24930	if tracing.IsEnabled() {
24931		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesSlot")
24932		defer func() {
24933			sc := -1
24934			if result.sdc.Response.Response != nil {
24935				sc = result.sdc.Response.Response.StatusCode
24936			}
24937			tracing.EndSpan(ctx, sc, err)
24938		}()
24939	}
24940	if err := validation.Validate([]validation.Validation{
24941		{TargetValue: resourceGroupName,
24942			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24943				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24944				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
24945		{TargetValue: slotSwapEntity,
24946			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
24947				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
24948		return result, validation.NewError("web.AppsClient", "ListSlotDifferencesSlot", err.Error())
24949	}
24950
24951	result.fn = client.listSlotDifferencesSlotNextResults
24952	req, err := client.ListSlotDifferencesSlotPreparer(ctx, resourceGroupName, name, slotSwapEntity, slot)
24953	if err != nil {
24954		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesSlot", nil, "Failure preparing request")
24955		return
24956	}
24957
24958	resp, err := client.ListSlotDifferencesSlotSender(req)
24959	if err != nil {
24960		result.sdc.Response = autorest.Response{Response: resp}
24961		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesSlot", resp, "Failure sending request")
24962		return
24963	}
24964
24965	result.sdc, err = client.ListSlotDifferencesSlotResponder(resp)
24966	if err != nil {
24967		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesSlot", resp, "Failure responding to request")
24968		return
24969	}
24970	if result.sdc.hasNextLink() && result.sdc.IsEmpty() {
24971		err = result.NextWithContext(ctx)
24972		return
24973	}
24974
24975	return
24976}
24977
24978// ListSlotDifferencesSlotPreparer prepares the ListSlotDifferencesSlot request.
24979func (client AppsClient) ListSlotDifferencesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (*http.Request, error) {
24980	pathParameters := map[string]interface{}{
24981		"name":              autorest.Encode("path", name),
24982		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24983		"slot":              autorest.Encode("path", slot),
24984		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24985	}
24986
24987	const APIVersion = "2018-02-01"
24988	queryParameters := map[string]interface{}{
24989		"api-version": APIVersion,
24990	}
24991
24992	preparer := autorest.CreatePreparer(
24993		autorest.AsContentType("application/json; charset=utf-8"),
24994		autorest.AsPost(),
24995		autorest.WithBaseURL(client.BaseURI),
24996		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs", pathParameters),
24997		autorest.WithJSON(slotSwapEntity),
24998		autorest.WithQueryParameters(queryParameters))
24999	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25000}
25001
25002// ListSlotDifferencesSlotSender sends the ListSlotDifferencesSlot request. The method will close the
25003// http.Response Body if it receives an error.
25004func (client AppsClient) ListSlotDifferencesSlotSender(req *http.Request) (*http.Response, error) {
25005	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25006}
25007
25008// ListSlotDifferencesSlotResponder handles the response to the ListSlotDifferencesSlot request. The method always
25009// closes the http.Response Body.
25010func (client AppsClient) ListSlotDifferencesSlotResponder(resp *http.Response) (result SlotDifferenceCollection, err error) {
25011	err = autorest.Respond(
25012		resp,
25013		azure.WithErrorUnlessStatusCode(http.StatusOK),
25014		autorest.ByUnmarshallingJSON(&result),
25015		autorest.ByClosing())
25016	result.Response = autorest.Response{Response: resp}
25017	return
25018}
25019
25020// listSlotDifferencesSlotNextResults retrieves the next set of results, if any.
25021func (client AppsClient) listSlotDifferencesSlotNextResults(ctx context.Context, lastResults SlotDifferenceCollection) (result SlotDifferenceCollection, err error) {
25022	req, err := lastResults.slotDifferenceCollectionPreparer(ctx)
25023	if err != nil {
25024		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesSlotNextResults", nil, "Failure preparing next results request")
25025	}
25026	if req == nil {
25027		return
25028	}
25029	resp, err := client.ListSlotDifferencesSlotSender(req)
25030	if err != nil {
25031		result.Response = autorest.Response{Response: resp}
25032		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesSlotNextResults", resp, "Failure sending next results request")
25033	}
25034	result, err = client.ListSlotDifferencesSlotResponder(resp)
25035	if err != nil {
25036		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesSlotNextResults", resp, "Failure responding to next results request")
25037	}
25038	return
25039}
25040
25041// ListSlotDifferencesSlotComplete enumerates all values, automatically crossing page boundaries as required.
25042func (client AppsClient) ListSlotDifferencesSlotComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result SlotDifferenceCollectionIterator, err error) {
25043	if tracing.IsEnabled() {
25044		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesSlot")
25045		defer func() {
25046			sc := -1
25047			if result.Response().Response.Response != nil {
25048				sc = result.page.Response().Response.Response.StatusCode
25049			}
25050			tracing.EndSpan(ctx, sc, err)
25051		}()
25052	}
25053	result.page, err = client.ListSlotDifferencesSlot(ctx, resourceGroupName, name, slotSwapEntity, slot)
25054	return
25055}
25056
25057// ListSlots gets an app's deployment slots.
25058// Parameters:
25059// resourceGroupName - name of the resource group to which the resource belongs.
25060// name - name of the app.
25061func (client AppsClient) ListSlots(ctx context.Context, resourceGroupName string, name string) (result AppCollectionPage, err error) {
25062	if tracing.IsEnabled() {
25063		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlots")
25064		defer func() {
25065			sc := -1
25066			if result.ac.Response.Response != nil {
25067				sc = result.ac.Response.Response.StatusCode
25068			}
25069			tracing.EndSpan(ctx, sc, err)
25070		}()
25071	}
25072	if err := validation.Validate([]validation.Validation{
25073		{TargetValue: resourceGroupName,
25074			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25075				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25076				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25077		return result, validation.NewError("web.AppsClient", "ListSlots", err.Error())
25078	}
25079
25080	result.fn = client.listSlotsNextResults
25081	req, err := client.ListSlotsPreparer(ctx, resourceGroupName, name)
25082	if err != nil {
25083		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlots", nil, "Failure preparing request")
25084		return
25085	}
25086
25087	resp, err := client.ListSlotsSender(req)
25088	if err != nil {
25089		result.ac.Response = autorest.Response{Response: resp}
25090		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlots", resp, "Failure sending request")
25091		return
25092	}
25093
25094	result.ac, err = client.ListSlotsResponder(resp)
25095	if err != nil {
25096		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlots", resp, "Failure responding to request")
25097		return
25098	}
25099	if result.ac.hasNextLink() && result.ac.IsEmpty() {
25100		err = result.NextWithContext(ctx)
25101		return
25102	}
25103
25104	return
25105}
25106
25107// ListSlotsPreparer prepares the ListSlots request.
25108func (client AppsClient) ListSlotsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25109	pathParameters := map[string]interface{}{
25110		"name":              autorest.Encode("path", name),
25111		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25112		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25113	}
25114
25115	const APIVersion = "2018-02-01"
25116	queryParameters := map[string]interface{}{
25117		"api-version": APIVersion,
25118	}
25119
25120	preparer := autorest.CreatePreparer(
25121		autorest.AsGet(),
25122		autorest.WithBaseURL(client.BaseURI),
25123		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots", pathParameters),
25124		autorest.WithQueryParameters(queryParameters))
25125	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25126}
25127
25128// ListSlotsSender sends the ListSlots request. The method will close the
25129// http.Response Body if it receives an error.
25130func (client AppsClient) ListSlotsSender(req *http.Request) (*http.Response, error) {
25131	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25132}
25133
25134// ListSlotsResponder handles the response to the ListSlots request. The method always
25135// closes the http.Response Body.
25136func (client AppsClient) ListSlotsResponder(resp *http.Response) (result AppCollection, err error) {
25137	err = autorest.Respond(
25138		resp,
25139		azure.WithErrorUnlessStatusCode(http.StatusOK),
25140		autorest.ByUnmarshallingJSON(&result),
25141		autorest.ByClosing())
25142	result.Response = autorest.Response{Response: resp}
25143	return
25144}
25145
25146// listSlotsNextResults retrieves the next set of results, if any.
25147func (client AppsClient) listSlotsNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) {
25148	req, err := lastResults.appCollectionPreparer(ctx)
25149	if err != nil {
25150		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotsNextResults", nil, "Failure preparing next results request")
25151	}
25152	if req == nil {
25153		return
25154	}
25155	resp, err := client.ListSlotsSender(req)
25156	if err != nil {
25157		result.Response = autorest.Response{Response: resp}
25158		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotsNextResults", resp, "Failure sending next results request")
25159	}
25160	result, err = client.ListSlotsResponder(resp)
25161	if err != nil {
25162		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSlotsNextResults", resp, "Failure responding to next results request")
25163	}
25164	return
25165}
25166
25167// ListSlotsComplete enumerates all values, automatically crossing page boundaries as required.
25168func (client AppsClient) ListSlotsComplete(ctx context.Context, resourceGroupName string, name string) (result AppCollectionIterator, err error) {
25169	if tracing.IsEnabled() {
25170		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlots")
25171		defer func() {
25172			sc := -1
25173			if result.Response().Response.Response != nil {
25174				sc = result.page.Response().Response.Response.StatusCode
25175			}
25176			tracing.EndSpan(ctx, sc, err)
25177		}()
25178	}
25179	result.page, err = client.ListSlots(ctx, resourceGroupName, name)
25180	return
25181}
25182
25183// ListSnapshots returns all Snapshots to the user.
25184// Parameters:
25185// resourceGroupName - name of the resource group to which the resource belongs.
25186// name - website Name.
25187func (client AppsClient) ListSnapshots(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionPage, err error) {
25188	if tracing.IsEnabled() {
25189		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshots")
25190		defer func() {
25191			sc := -1
25192			if result.sc.Response.Response != nil {
25193				sc = result.sc.Response.Response.StatusCode
25194			}
25195			tracing.EndSpan(ctx, sc, err)
25196		}()
25197	}
25198	if err := validation.Validate([]validation.Validation{
25199		{TargetValue: resourceGroupName,
25200			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25201				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25202				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25203		return result, validation.NewError("web.AppsClient", "ListSnapshots", err.Error())
25204	}
25205
25206	result.fn = client.listSnapshotsNextResults
25207	req, err := client.ListSnapshotsPreparer(ctx, resourceGroupName, name)
25208	if err != nil {
25209		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshots", nil, "Failure preparing request")
25210		return
25211	}
25212
25213	resp, err := client.ListSnapshotsSender(req)
25214	if err != nil {
25215		result.sc.Response = autorest.Response{Response: resp}
25216		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshots", resp, "Failure sending request")
25217		return
25218	}
25219
25220	result.sc, err = client.ListSnapshotsResponder(resp)
25221	if err != nil {
25222		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshots", resp, "Failure responding to request")
25223		return
25224	}
25225	if result.sc.hasNextLink() && result.sc.IsEmpty() {
25226		err = result.NextWithContext(ctx)
25227		return
25228	}
25229
25230	return
25231}
25232
25233// ListSnapshotsPreparer prepares the ListSnapshots request.
25234func (client AppsClient) ListSnapshotsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25235	pathParameters := map[string]interface{}{
25236		"name":              autorest.Encode("path", name),
25237		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25238		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25239	}
25240
25241	const APIVersion = "2018-02-01"
25242	queryParameters := map[string]interface{}{
25243		"api-version": APIVersion,
25244	}
25245
25246	preparer := autorest.CreatePreparer(
25247		autorest.AsGet(),
25248		autorest.WithBaseURL(client.BaseURI),
25249		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots", pathParameters),
25250		autorest.WithQueryParameters(queryParameters))
25251	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25252}
25253
25254// ListSnapshotsSender sends the ListSnapshots request. The method will close the
25255// http.Response Body if it receives an error.
25256func (client AppsClient) ListSnapshotsSender(req *http.Request) (*http.Response, error) {
25257	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25258}
25259
25260// ListSnapshotsResponder handles the response to the ListSnapshots request. The method always
25261// closes the http.Response Body.
25262func (client AppsClient) ListSnapshotsResponder(resp *http.Response) (result SnapshotCollection, err error) {
25263	err = autorest.Respond(
25264		resp,
25265		azure.WithErrorUnlessStatusCode(http.StatusOK),
25266		autorest.ByUnmarshallingJSON(&result),
25267		autorest.ByClosing())
25268	result.Response = autorest.Response{Response: resp}
25269	return
25270}
25271
25272// listSnapshotsNextResults retrieves the next set of results, if any.
25273func (client AppsClient) listSnapshotsNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
25274	req, err := lastResults.snapshotCollectionPreparer(ctx)
25275	if err != nil {
25276		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsNextResults", nil, "Failure preparing next results request")
25277	}
25278	if req == nil {
25279		return
25280	}
25281	resp, err := client.ListSnapshotsSender(req)
25282	if err != nil {
25283		result.Response = autorest.Response{Response: resp}
25284		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsNextResults", resp, "Failure sending next results request")
25285	}
25286	result, err = client.ListSnapshotsResponder(resp)
25287	if err != nil {
25288		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsNextResults", resp, "Failure responding to next results request")
25289	}
25290	return
25291}
25292
25293// ListSnapshotsComplete enumerates all values, automatically crossing page boundaries as required.
25294func (client AppsClient) ListSnapshotsComplete(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionIterator, err error) {
25295	if tracing.IsEnabled() {
25296		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshots")
25297		defer func() {
25298			sc := -1
25299			if result.Response().Response.Response != nil {
25300				sc = result.page.Response().Response.Response.StatusCode
25301			}
25302			tracing.EndSpan(ctx, sc, err)
25303		}()
25304	}
25305	result.page, err = client.ListSnapshots(ctx, resourceGroupName, name)
25306	return
25307}
25308
25309// ListSnapshotsFromDRSecondary returns all Snapshots to the user from DRSecondary endpoint.
25310// Parameters:
25311// resourceGroupName - name of the resource group to which the resource belongs.
25312// name - website Name.
25313func (client AppsClient) ListSnapshotsFromDRSecondary(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionPage, err error) {
25314	if tracing.IsEnabled() {
25315		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondary")
25316		defer func() {
25317			sc := -1
25318			if result.sc.Response.Response != nil {
25319				sc = result.sc.Response.Response.StatusCode
25320			}
25321			tracing.EndSpan(ctx, sc, err)
25322		}()
25323	}
25324	if err := validation.Validate([]validation.Validation{
25325		{TargetValue: resourceGroupName,
25326			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25327				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25328				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25329		return result, validation.NewError("web.AppsClient", "ListSnapshotsFromDRSecondary", err.Error())
25330	}
25331
25332	result.fn = client.listSnapshotsFromDRSecondaryNextResults
25333	req, err := client.ListSnapshotsFromDRSecondaryPreparer(ctx, resourceGroupName, name)
25334	if err != nil {
25335		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondary", nil, "Failure preparing request")
25336		return
25337	}
25338
25339	resp, err := client.ListSnapshotsFromDRSecondarySender(req)
25340	if err != nil {
25341		result.sc.Response = autorest.Response{Response: resp}
25342		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondary", resp, "Failure sending request")
25343		return
25344	}
25345
25346	result.sc, err = client.ListSnapshotsFromDRSecondaryResponder(resp)
25347	if err != nil {
25348		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondary", resp, "Failure responding to request")
25349		return
25350	}
25351	if result.sc.hasNextLink() && result.sc.IsEmpty() {
25352		err = result.NextWithContext(ctx)
25353		return
25354	}
25355
25356	return
25357}
25358
25359// ListSnapshotsFromDRSecondaryPreparer prepares the ListSnapshotsFromDRSecondary request.
25360func (client AppsClient) ListSnapshotsFromDRSecondaryPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25361	pathParameters := map[string]interface{}{
25362		"name":              autorest.Encode("path", name),
25363		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25364		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25365	}
25366
25367	const APIVersion = "2018-02-01"
25368	queryParameters := map[string]interface{}{
25369		"api-version": APIVersion,
25370	}
25371
25372	preparer := autorest.CreatePreparer(
25373		autorest.AsGet(),
25374		autorest.WithBaseURL(client.BaseURI),
25375		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr", pathParameters),
25376		autorest.WithQueryParameters(queryParameters))
25377	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25378}
25379
25380// ListSnapshotsFromDRSecondarySender sends the ListSnapshotsFromDRSecondary request. The method will close the
25381// http.Response Body if it receives an error.
25382func (client AppsClient) ListSnapshotsFromDRSecondarySender(req *http.Request) (*http.Response, error) {
25383	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25384}
25385
25386// ListSnapshotsFromDRSecondaryResponder handles the response to the ListSnapshotsFromDRSecondary request. The method always
25387// closes the http.Response Body.
25388func (client AppsClient) ListSnapshotsFromDRSecondaryResponder(resp *http.Response) (result SnapshotCollection, err error) {
25389	err = autorest.Respond(
25390		resp,
25391		azure.WithErrorUnlessStatusCode(http.StatusOK),
25392		autorest.ByUnmarshallingJSON(&result),
25393		autorest.ByClosing())
25394	result.Response = autorest.Response{Response: resp}
25395	return
25396}
25397
25398// listSnapshotsFromDRSecondaryNextResults retrieves the next set of results, if any.
25399func (client AppsClient) listSnapshotsFromDRSecondaryNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
25400	req, err := lastResults.snapshotCollectionPreparer(ctx)
25401	if err != nil {
25402		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondaryNextResults", nil, "Failure preparing next results request")
25403	}
25404	if req == nil {
25405		return
25406	}
25407	resp, err := client.ListSnapshotsFromDRSecondarySender(req)
25408	if err != nil {
25409		result.Response = autorest.Response{Response: resp}
25410		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondaryNextResults", resp, "Failure sending next results request")
25411	}
25412	result, err = client.ListSnapshotsFromDRSecondaryResponder(resp)
25413	if err != nil {
25414		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondaryNextResults", resp, "Failure responding to next results request")
25415	}
25416	return
25417}
25418
25419// ListSnapshotsFromDRSecondaryComplete enumerates all values, automatically crossing page boundaries as required.
25420func (client AppsClient) ListSnapshotsFromDRSecondaryComplete(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionIterator, err error) {
25421	if tracing.IsEnabled() {
25422		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondary")
25423		defer func() {
25424			sc := -1
25425			if result.Response().Response.Response != nil {
25426				sc = result.page.Response().Response.Response.StatusCode
25427			}
25428			tracing.EndSpan(ctx, sc, err)
25429		}()
25430	}
25431	result.page, err = client.ListSnapshotsFromDRSecondary(ctx, resourceGroupName, name)
25432	return
25433}
25434
25435// ListSnapshotsFromDRSecondarySlot returns all Snapshots to the user from DRSecondary endpoint.
25436// Parameters:
25437// resourceGroupName - name of the resource group to which the resource belongs.
25438// name - website Name.
25439// slot - website Slot.
25440func (client AppsClient) ListSnapshotsFromDRSecondarySlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionPage, err error) {
25441	if tracing.IsEnabled() {
25442		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondarySlot")
25443		defer func() {
25444			sc := -1
25445			if result.sc.Response.Response != nil {
25446				sc = result.sc.Response.Response.StatusCode
25447			}
25448			tracing.EndSpan(ctx, sc, err)
25449		}()
25450	}
25451	if err := validation.Validate([]validation.Validation{
25452		{TargetValue: resourceGroupName,
25453			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25454				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25455				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25456		return result, validation.NewError("web.AppsClient", "ListSnapshotsFromDRSecondarySlot", err.Error())
25457	}
25458
25459	result.fn = client.listSnapshotsFromDRSecondarySlotNextResults
25460	req, err := client.ListSnapshotsFromDRSecondarySlotPreparer(ctx, resourceGroupName, name, slot)
25461	if err != nil {
25462		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondarySlot", nil, "Failure preparing request")
25463		return
25464	}
25465
25466	resp, err := client.ListSnapshotsFromDRSecondarySlotSender(req)
25467	if err != nil {
25468		result.sc.Response = autorest.Response{Response: resp}
25469		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondarySlot", resp, "Failure sending request")
25470		return
25471	}
25472
25473	result.sc, err = client.ListSnapshotsFromDRSecondarySlotResponder(resp)
25474	if err != nil {
25475		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondarySlot", resp, "Failure responding to request")
25476		return
25477	}
25478	if result.sc.hasNextLink() && result.sc.IsEmpty() {
25479		err = result.NextWithContext(ctx)
25480		return
25481	}
25482
25483	return
25484}
25485
25486// ListSnapshotsFromDRSecondarySlotPreparer prepares the ListSnapshotsFromDRSecondarySlot request.
25487func (client AppsClient) ListSnapshotsFromDRSecondarySlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
25488	pathParameters := map[string]interface{}{
25489		"name":              autorest.Encode("path", name),
25490		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25491		"slot":              autorest.Encode("path", slot),
25492		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25493	}
25494
25495	const APIVersion = "2018-02-01"
25496	queryParameters := map[string]interface{}{
25497		"api-version": APIVersion,
25498	}
25499
25500	preparer := autorest.CreatePreparer(
25501		autorest.AsGet(),
25502		autorest.WithBaseURL(client.BaseURI),
25503		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr", pathParameters),
25504		autorest.WithQueryParameters(queryParameters))
25505	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25506}
25507
25508// ListSnapshotsFromDRSecondarySlotSender sends the ListSnapshotsFromDRSecondarySlot request. The method will close the
25509// http.Response Body if it receives an error.
25510func (client AppsClient) ListSnapshotsFromDRSecondarySlotSender(req *http.Request) (*http.Response, error) {
25511	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25512}
25513
25514// ListSnapshotsFromDRSecondarySlotResponder handles the response to the ListSnapshotsFromDRSecondarySlot request. The method always
25515// closes the http.Response Body.
25516func (client AppsClient) ListSnapshotsFromDRSecondarySlotResponder(resp *http.Response) (result SnapshotCollection, err error) {
25517	err = autorest.Respond(
25518		resp,
25519		azure.WithErrorUnlessStatusCode(http.StatusOK),
25520		autorest.ByUnmarshallingJSON(&result),
25521		autorest.ByClosing())
25522	result.Response = autorest.Response{Response: resp}
25523	return
25524}
25525
25526// listSnapshotsFromDRSecondarySlotNextResults retrieves the next set of results, if any.
25527func (client AppsClient) listSnapshotsFromDRSecondarySlotNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
25528	req, err := lastResults.snapshotCollectionPreparer(ctx)
25529	if err != nil {
25530		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondarySlotNextResults", nil, "Failure preparing next results request")
25531	}
25532	if req == nil {
25533		return
25534	}
25535	resp, err := client.ListSnapshotsFromDRSecondarySlotSender(req)
25536	if err != nil {
25537		result.Response = autorest.Response{Response: resp}
25538		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondarySlotNextResults", resp, "Failure sending next results request")
25539	}
25540	result, err = client.ListSnapshotsFromDRSecondarySlotResponder(resp)
25541	if err != nil {
25542		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondarySlotNextResults", resp, "Failure responding to next results request")
25543	}
25544	return
25545}
25546
25547// ListSnapshotsFromDRSecondarySlotComplete enumerates all values, automatically crossing page boundaries as required.
25548func (client AppsClient) ListSnapshotsFromDRSecondarySlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionIterator, err error) {
25549	if tracing.IsEnabled() {
25550		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondarySlot")
25551		defer func() {
25552			sc := -1
25553			if result.Response().Response.Response != nil {
25554				sc = result.page.Response().Response.Response.StatusCode
25555			}
25556			tracing.EndSpan(ctx, sc, err)
25557		}()
25558	}
25559	result.page, err = client.ListSnapshotsFromDRSecondarySlot(ctx, resourceGroupName, name, slot)
25560	return
25561}
25562
25563// ListSnapshotsSlot returns all Snapshots to the user.
25564// Parameters:
25565// resourceGroupName - name of the resource group to which the resource belongs.
25566// name - website Name.
25567// slot - website Slot.
25568func (client AppsClient) ListSnapshotsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionPage, err error) {
25569	if tracing.IsEnabled() {
25570		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsSlot")
25571		defer func() {
25572			sc := -1
25573			if result.sc.Response.Response != nil {
25574				sc = result.sc.Response.Response.StatusCode
25575			}
25576			tracing.EndSpan(ctx, sc, err)
25577		}()
25578	}
25579	if err := validation.Validate([]validation.Validation{
25580		{TargetValue: resourceGroupName,
25581			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25582				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25583				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25584		return result, validation.NewError("web.AppsClient", "ListSnapshotsSlot", err.Error())
25585	}
25586
25587	result.fn = client.listSnapshotsSlotNextResults
25588	req, err := client.ListSnapshotsSlotPreparer(ctx, resourceGroupName, name, slot)
25589	if err != nil {
25590		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", nil, "Failure preparing request")
25591		return
25592	}
25593
25594	resp, err := client.ListSnapshotsSlotSender(req)
25595	if err != nil {
25596		result.sc.Response = autorest.Response{Response: resp}
25597		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure sending request")
25598		return
25599	}
25600
25601	result.sc, err = client.ListSnapshotsSlotResponder(resp)
25602	if err != nil {
25603		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure responding to request")
25604		return
25605	}
25606	if result.sc.hasNextLink() && result.sc.IsEmpty() {
25607		err = result.NextWithContext(ctx)
25608		return
25609	}
25610
25611	return
25612}
25613
25614// ListSnapshotsSlotPreparer prepares the ListSnapshotsSlot request.
25615func (client AppsClient) ListSnapshotsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
25616	pathParameters := map[string]interface{}{
25617		"name":              autorest.Encode("path", name),
25618		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25619		"slot":              autorest.Encode("path", slot),
25620		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25621	}
25622
25623	const APIVersion = "2018-02-01"
25624	queryParameters := map[string]interface{}{
25625		"api-version": APIVersion,
25626	}
25627
25628	preparer := autorest.CreatePreparer(
25629		autorest.AsGet(),
25630		autorest.WithBaseURL(client.BaseURI),
25631		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots", pathParameters),
25632		autorest.WithQueryParameters(queryParameters))
25633	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25634}
25635
25636// ListSnapshotsSlotSender sends the ListSnapshotsSlot request. The method will close the
25637// http.Response Body if it receives an error.
25638func (client AppsClient) ListSnapshotsSlotSender(req *http.Request) (*http.Response, error) {
25639	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25640}
25641
25642// ListSnapshotsSlotResponder handles the response to the ListSnapshotsSlot request. The method always
25643// closes the http.Response Body.
25644func (client AppsClient) ListSnapshotsSlotResponder(resp *http.Response) (result SnapshotCollection, err error) {
25645	err = autorest.Respond(
25646		resp,
25647		azure.WithErrorUnlessStatusCode(http.StatusOK),
25648		autorest.ByUnmarshallingJSON(&result),
25649		autorest.ByClosing())
25650	result.Response = autorest.Response{Response: resp}
25651	return
25652}
25653
25654// listSnapshotsSlotNextResults retrieves the next set of results, if any.
25655func (client AppsClient) listSnapshotsSlotNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
25656	req, err := lastResults.snapshotCollectionPreparer(ctx)
25657	if err != nil {
25658		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", nil, "Failure preparing next results request")
25659	}
25660	if req == nil {
25661		return
25662	}
25663	resp, err := client.ListSnapshotsSlotSender(req)
25664	if err != nil {
25665		result.Response = autorest.Response{Response: resp}
25666		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure sending next results request")
25667	}
25668	result, err = client.ListSnapshotsSlotResponder(resp)
25669	if err != nil {
25670		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure responding to next results request")
25671	}
25672	return
25673}
25674
25675// ListSnapshotsSlotComplete enumerates all values, automatically crossing page boundaries as required.
25676func (client AppsClient) ListSnapshotsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionIterator, err error) {
25677	if tracing.IsEnabled() {
25678		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsSlot")
25679		defer func() {
25680			sc := -1
25681			if result.Response().Response.Response != nil {
25682				sc = result.page.Response().Response.Response.StatusCode
25683			}
25684			tracing.EndSpan(ctx, sc, err)
25685		}()
25686	}
25687	result.page, err = client.ListSnapshotsSlot(ctx, resourceGroupName, name, slot)
25688	return
25689}
25690
25691// ListSyncFunctionTriggers this is to allow calling via powershell and ARM template.
25692// Parameters:
25693// resourceGroupName - name of the resource group to which the resource belongs.
25694// name - name of the app.
25695func (client AppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result FunctionSecrets, err error) {
25696	if tracing.IsEnabled() {
25697		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggers")
25698		defer func() {
25699			sc := -1
25700			if result.Response.Response != nil {
25701				sc = result.Response.Response.StatusCode
25702			}
25703			tracing.EndSpan(ctx, sc, err)
25704		}()
25705	}
25706	if err := validation.Validate([]validation.Validation{
25707		{TargetValue: resourceGroupName,
25708			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25709				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25710				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25711		return result, validation.NewError("web.AppsClient", "ListSyncFunctionTriggers", err.Error())
25712	}
25713
25714	req, err := client.ListSyncFunctionTriggersPreparer(ctx, resourceGroupName, name)
25715	if err != nil {
25716		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", nil, "Failure preparing request")
25717		return
25718	}
25719
25720	resp, err := client.ListSyncFunctionTriggersSender(req)
25721	if err != nil {
25722		result.Response = autorest.Response{Response: resp}
25723		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure sending request")
25724		return
25725	}
25726
25727	result, err = client.ListSyncFunctionTriggersResponder(resp)
25728	if err != nil {
25729		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure responding to request")
25730		return
25731	}
25732
25733	return
25734}
25735
25736// ListSyncFunctionTriggersPreparer prepares the ListSyncFunctionTriggers request.
25737func (client AppsClient) ListSyncFunctionTriggersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25738	pathParameters := map[string]interface{}{
25739		"name":              autorest.Encode("path", name),
25740		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25741		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25742	}
25743
25744	const APIVersion = "2018-02-01"
25745	queryParameters := map[string]interface{}{
25746		"api-version": APIVersion,
25747	}
25748
25749	preparer := autorest.CreatePreparer(
25750		autorest.AsPost(),
25751		autorest.WithBaseURL(client.BaseURI),
25752		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus", pathParameters),
25753		autorest.WithQueryParameters(queryParameters))
25754	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25755}
25756
25757// ListSyncFunctionTriggersSender sends the ListSyncFunctionTriggers request. The method will close the
25758// http.Response Body if it receives an error.
25759func (client AppsClient) ListSyncFunctionTriggersSender(req *http.Request) (*http.Response, error) {
25760	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25761}
25762
25763// ListSyncFunctionTriggersResponder handles the response to the ListSyncFunctionTriggers request. The method always
25764// closes the http.Response Body.
25765func (client AppsClient) ListSyncFunctionTriggersResponder(resp *http.Response) (result FunctionSecrets, err error) {
25766	err = autorest.Respond(
25767		resp,
25768		azure.WithErrorUnlessStatusCode(http.StatusOK),
25769		autorest.ByUnmarshallingJSON(&result),
25770		autorest.ByClosing())
25771	result.Response = autorest.Response{Response: resp}
25772	return
25773}
25774
25775// ListSyncFunctionTriggersSlot this is to allow calling via powershell and ARM template.
25776// Parameters:
25777// resourceGroupName - name of the resource group to which the resource belongs.
25778// name - name of the app.
25779// slot - name of the deployment slot.
25780func (client AppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionSecrets, err error) {
25781	if tracing.IsEnabled() {
25782		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggersSlot")
25783		defer func() {
25784			sc := -1
25785			if result.Response.Response != nil {
25786				sc = result.Response.Response.StatusCode
25787			}
25788			tracing.EndSpan(ctx, sc, err)
25789		}()
25790	}
25791	if err := validation.Validate([]validation.Validation{
25792		{TargetValue: resourceGroupName,
25793			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25794				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25795				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25796		return result, validation.NewError("web.AppsClient", "ListSyncFunctionTriggersSlot", err.Error())
25797	}
25798
25799	req, err := client.ListSyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot)
25800	if err != nil {
25801		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", nil, "Failure preparing request")
25802		return
25803	}
25804
25805	resp, err := client.ListSyncFunctionTriggersSlotSender(req)
25806	if err != nil {
25807		result.Response = autorest.Response{Response: resp}
25808		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure sending request")
25809		return
25810	}
25811
25812	result, err = client.ListSyncFunctionTriggersSlotResponder(resp)
25813	if err != nil {
25814		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure responding to request")
25815		return
25816	}
25817
25818	return
25819}
25820
25821// ListSyncFunctionTriggersSlotPreparer prepares the ListSyncFunctionTriggersSlot request.
25822func (client AppsClient) ListSyncFunctionTriggersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
25823	pathParameters := map[string]interface{}{
25824		"name":              autorest.Encode("path", name),
25825		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25826		"slot":              autorest.Encode("path", slot),
25827		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25828	}
25829
25830	const APIVersion = "2018-02-01"
25831	queryParameters := map[string]interface{}{
25832		"api-version": APIVersion,
25833	}
25834
25835	preparer := autorest.CreatePreparer(
25836		autorest.AsPost(),
25837		autorest.WithBaseURL(client.BaseURI),
25838		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus", pathParameters),
25839		autorest.WithQueryParameters(queryParameters))
25840	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25841}
25842
25843// ListSyncFunctionTriggersSlotSender sends the ListSyncFunctionTriggersSlot request. The method will close the
25844// http.Response Body if it receives an error.
25845func (client AppsClient) ListSyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) {
25846	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25847}
25848
25849// ListSyncFunctionTriggersSlotResponder handles the response to the ListSyncFunctionTriggersSlot request. The method always
25850// closes the http.Response Body.
25851func (client AppsClient) ListSyncFunctionTriggersSlotResponder(resp *http.Response) (result FunctionSecrets, err error) {
25852	err = autorest.Respond(
25853		resp,
25854		azure.WithErrorUnlessStatusCode(http.StatusOK),
25855		autorest.ByUnmarshallingJSON(&result),
25856		autorest.ByClosing())
25857	result.Response = autorest.Response{Response: resp}
25858	return
25859}
25860
25861// ListSyncStatus this is to allow calling via powershell and ARM template.
25862// Parameters:
25863// resourceGroupName - name of the resource group to which the resource belongs.
25864// name - name of the app.
25865func (client AppsClient) ListSyncStatus(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
25866	if tracing.IsEnabled() {
25867		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncStatus")
25868		defer func() {
25869			sc := -1
25870			if result.Response != nil {
25871				sc = result.Response.StatusCode
25872			}
25873			tracing.EndSpan(ctx, sc, err)
25874		}()
25875	}
25876	if err := validation.Validate([]validation.Validation{
25877		{TargetValue: resourceGroupName,
25878			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25879				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25880				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25881		return result, validation.NewError("web.AppsClient", "ListSyncStatus", err.Error())
25882	}
25883
25884	req, err := client.ListSyncStatusPreparer(ctx, resourceGroupName, name)
25885	if err != nil {
25886		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", nil, "Failure preparing request")
25887		return
25888	}
25889
25890	resp, err := client.ListSyncStatusSender(req)
25891	if err != nil {
25892		result.Response = resp
25893		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", resp, "Failure sending request")
25894		return
25895	}
25896
25897	result, err = client.ListSyncStatusResponder(resp)
25898	if err != nil {
25899		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", resp, "Failure responding to request")
25900		return
25901	}
25902
25903	return
25904}
25905
25906// ListSyncStatusPreparer prepares the ListSyncStatus request.
25907func (client AppsClient) ListSyncStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25908	pathParameters := map[string]interface{}{
25909		"name":              autorest.Encode("path", name),
25910		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25911		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25912	}
25913
25914	const APIVersion = "2018-02-01"
25915	queryParameters := map[string]interface{}{
25916		"api-version": APIVersion,
25917	}
25918
25919	preparer := autorest.CreatePreparer(
25920		autorest.AsPost(),
25921		autorest.WithBaseURL(client.BaseURI),
25922		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus", pathParameters),
25923		autorest.WithQueryParameters(queryParameters))
25924	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25925}
25926
25927// ListSyncStatusSender sends the ListSyncStatus request. The method will close the
25928// http.Response Body if it receives an error.
25929func (client AppsClient) ListSyncStatusSender(req *http.Request) (*http.Response, error) {
25930	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25931}
25932
25933// ListSyncStatusResponder handles the response to the ListSyncStatus request. The method always
25934// closes the http.Response Body.
25935func (client AppsClient) ListSyncStatusResponder(resp *http.Response) (result autorest.Response, err error) {
25936	err = autorest.Respond(
25937		resp,
25938		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
25939		autorest.ByClosing())
25940	result.Response = resp
25941	return
25942}
25943
25944// ListSyncStatusSlot this is to allow calling via powershell and ARM template.
25945// Parameters:
25946// resourceGroupName - name of the resource group to which the resource belongs.
25947// name - name of the app.
25948// slot - name of the deployment slot.
25949func (client AppsClient) ListSyncStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
25950	if tracing.IsEnabled() {
25951		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncStatusSlot")
25952		defer func() {
25953			sc := -1
25954			if result.Response != nil {
25955				sc = result.Response.StatusCode
25956			}
25957			tracing.EndSpan(ctx, sc, err)
25958		}()
25959	}
25960	if err := validation.Validate([]validation.Validation{
25961		{TargetValue: resourceGroupName,
25962			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25963				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25964				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25965		return result, validation.NewError("web.AppsClient", "ListSyncStatusSlot", err.Error())
25966	}
25967
25968	req, err := client.ListSyncStatusSlotPreparer(ctx, resourceGroupName, name, slot)
25969	if err != nil {
25970		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", nil, "Failure preparing request")
25971		return
25972	}
25973
25974	resp, err := client.ListSyncStatusSlotSender(req)
25975	if err != nil {
25976		result.Response = resp
25977		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", resp, "Failure sending request")
25978		return
25979	}
25980
25981	result, err = client.ListSyncStatusSlotResponder(resp)
25982	if err != nil {
25983		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", resp, "Failure responding to request")
25984		return
25985	}
25986
25987	return
25988}
25989
25990// ListSyncStatusSlotPreparer prepares the ListSyncStatusSlot request.
25991func (client AppsClient) ListSyncStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
25992	pathParameters := map[string]interface{}{
25993		"name":              autorest.Encode("path", name),
25994		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25995		"slot":              autorest.Encode("path", slot),
25996		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25997	}
25998
25999	const APIVersion = "2018-02-01"
26000	queryParameters := map[string]interface{}{
26001		"api-version": APIVersion,
26002	}
26003
26004	preparer := autorest.CreatePreparer(
26005		autorest.AsPost(),
26006		autorest.WithBaseURL(client.BaseURI),
26007		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus", pathParameters),
26008		autorest.WithQueryParameters(queryParameters))
26009	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26010}
26011
26012// ListSyncStatusSlotSender sends the ListSyncStatusSlot request. The method will close the
26013// http.Response Body if it receives an error.
26014func (client AppsClient) ListSyncStatusSlotSender(req *http.Request) (*http.Response, error) {
26015	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26016}
26017
26018// ListSyncStatusSlotResponder handles the response to the ListSyncStatusSlot request. The method always
26019// closes the http.Response Body.
26020func (client AppsClient) ListSyncStatusSlotResponder(resp *http.Response) (result autorest.Response, err error) {
26021	err = autorest.Respond(
26022		resp,
26023		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
26024		autorest.ByClosing())
26025	result.Response = resp
26026	return
26027}
26028
26029// ListTriggeredWebJobHistory list a triggered web job's history for an app, or a deployment slot.
26030// Parameters:
26031// resourceGroupName - name of the resource group to which the resource belongs.
26032// name - site name.
26033// webJobName - name of Web Job.
26034func (client AppsClient) ListTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredJobHistoryCollectionPage, err error) {
26035	if tracing.IsEnabled() {
26036		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistory")
26037		defer func() {
26038			sc := -1
26039			if result.tjhc.Response.Response != nil {
26040				sc = result.tjhc.Response.Response.StatusCode
26041			}
26042			tracing.EndSpan(ctx, sc, err)
26043		}()
26044	}
26045	if err := validation.Validate([]validation.Validation{
26046		{TargetValue: resourceGroupName,
26047			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26048				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26049				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26050		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobHistory", err.Error())
26051	}
26052
26053	result.fn = client.listTriggeredWebJobHistoryNextResults
26054	req, err := client.ListTriggeredWebJobHistoryPreparer(ctx, resourceGroupName, name, webJobName)
26055	if err != nil {
26056		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", nil, "Failure preparing request")
26057		return
26058	}
26059
26060	resp, err := client.ListTriggeredWebJobHistorySender(req)
26061	if err != nil {
26062		result.tjhc.Response = autorest.Response{Response: resp}
26063		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", resp, "Failure sending request")
26064		return
26065	}
26066
26067	result.tjhc, err = client.ListTriggeredWebJobHistoryResponder(resp)
26068	if err != nil {
26069		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", resp, "Failure responding to request")
26070		return
26071	}
26072	if result.tjhc.hasNextLink() && result.tjhc.IsEmpty() {
26073		err = result.NextWithContext(ctx)
26074		return
26075	}
26076
26077	return
26078}
26079
26080// ListTriggeredWebJobHistoryPreparer prepares the ListTriggeredWebJobHistory request.
26081func (client AppsClient) ListTriggeredWebJobHistoryPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
26082	pathParameters := map[string]interface{}{
26083		"name":              autorest.Encode("path", name),
26084		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26085		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26086		"webJobName":        autorest.Encode("path", webJobName),
26087	}
26088
26089	const APIVersion = "2018-02-01"
26090	queryParameters := map[string]interface{}{
26091		"api-version": APIVersion,
26092	}
26093
26094	preparer := autorest.CreatePreparer(
26095		autorest.AsGet(),
26096		autorest.WithBaseURL(client.BaseURI),
26097		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history", pathParameters),
26098		autorest.WithQueryParameters(queryParameters))
26099	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26100}
26101
26102// ListTriggeredWebJobHistorySender sends the ListTriggeredWebJobHistory request. The method will close the
26103// http.Response Body if it receives an error.
26104func (client AppsClient) ListTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) {
26105	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26106}
26107
26108// ListTriggeredWebJobHistoryResponder handles the response to the ListTriggeredWebJobHistory request. The method always
26109// closes the http.Response Body.
26110func (client AppsClient) ListTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistoryCollection, err error) {
26111	err = autorest.Respond(
26112		resp,
26113		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
26114		autorest.ByUnmarshallingJSON(&result),
26115		autorest.ByClosing())
26116	result.Response = autorest.Response{Response: resp}
26117	return
26118}
26119
26120// listTriggeredWebJobHistoryNextResults retrieves the next set of results, if any.
26121func (client AppsClient) listTriggeredWebJobHistoryNextResults(ctx context.Context, lastResults TriggeredJobHistoryCollection) (result TriggeredJobHistoryCollection, err error) {
26122	req, err := lastResults.triggeredJobHistoryCollectionPreparer(ctx)
26123	if err != nil {
26124		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistoryNextResults", nil, "Failure preparing next results request")
26125	}
26126	if req == nil {
26127		return
26128	}
26129	resp, err := client.ListTriggeredWebJobHistorySender(req)
26130	if err != nil {
26131		result.Response = autorest.Response{Response: resp}
26132		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistoryNextResults", resp, "Failure sending next results request")
26133	}
26134	result, err = client.ListTriggeredWebJobHistoryResponder(resp)
26135	if err != nil {
26136		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistoryNextResults", resp, "Failure responding to next results request")
26137	}
26138	return
26139}
26140
26141// ListTriggeredWebJobHistoryComplete enumerates all values, automatically crossing page boundaries as required.
26142func (client AppsClient) ListTriggeredWebJobHistoryComplete(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredJobHistoryCollectionIterator, err error) {
26143	if tracing.IsEnabled() {
26144		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistory")
26145		defer func() {
26146			sc := -1
26147			if result.Response().Response.Response != nil {
26148				sc = result.page.Response().Response.Response.StatusCode
26149			}
26150			tracing.EndSpan(ctx, sc, err)
26151		}()
26152	}
26153	result.page, err = client.ListTriggeredWebJobHistory(ctx, resourceGroupName, name, webJobName)
26154	return
26155}
26156
26157// ListTriggeredWebJobHistorySlot list a triggered web job's history for an app, or a deployment slot.
26158// Parameters:
26159// resourceGroupName - name of the resource group to which the resource belongs.
26160// name - site name.
26161// webJobName - name of Web Job.
26162// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
26163// production slot.
26164func (client AppsClient) ListTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredJobHistoryCollectionPage, err error) {
26165	if tracing.IsEnabled() {
26166		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistorySlot")
26167		defer func() {
26168			sc := -1
26169			if result.tjhc.Response.Response != nil {
26170				sc = result.tjhc.Response.Response.StatusCode
26171			}
26172			tracing.EndSpan(ctx, sc, err)
26173		}()
26174	}
26175	if err := validation.Validate([]validation.Validation{
26176		{TargetValue: resourceGroupName,
26177			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26178				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26179				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26180		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobHistorySlot", err.Error())
26181	}
26182
26183	result.fn = client.listTriggeredWebJobHistorySlotNextResults
26184	req, err := client.ListTriggeredWebJobHistorySlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
26185	if err != nil {
26186		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", nil, "Failure preparing request")
26187		return
26188	}
26189
26190	resp, err := client.ListTriggeredWebJobHistorySlotSender(req)
26191	if err != nil {
26192		result.tjhc.Response = autorest.Response{Response: resp}
26193		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", resp, "Failure sending request")
26194		return
26195	}
26196
26197	result.tjhc, err = client.ListTriggeredWebJobHistorySlotResponder(resp)
26198	if err != nil {
26199		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", resp, "Failure responding to request")
26200		return
26201	}
26202	if result.tjhc.hasNextLink() && result.tjhc.IsEmpty() {
26203		err = result.NextWithContext(ctx)
26204		return
26205	}
26206
26207	return
26208}
26209
26210// ListTriggeredWebJobHistorySlotPreparer prepares the ListTriggeredWebJobHistorySlot request.
26211func (client AppsClient) ListTriggeredWebJobHistorySlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
26212	pathParameters := map[string]interface{}{
26213		"name":              autorest.Encode("path", name),
26214		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26215		"slot":              autorest.Encode("path", slot),
26216		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26217		"webJobName":        autorest.Encode("path", webJobName),
26218	}
26219
26220	const APIVersion = "2018-02-01"
26221	queryParameters := map[string]interface{}{
26222		"api-version": APIVersion,
26223	}
26224
26225	preparer := autorest.CreatePreparer(
26226		autorest.AsGet(),
26227		autorest.WithBaseURL(client.BaseURI),
26228		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history", pathParameters),
26229		autorest.WithQueryParameters(queryParameters))
26230	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26231}
26232
26233// ListTriggeredWebJobHistorySlotSender sends the ListTriggeredWebJobHistorySlot request. The method will close the
26234// http.Response Body if it receives an error.
26235func (client AppsClient) ListTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) {
26236	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26237}
26238
26239// ListTriggeredWebJobHistorySlotResponder handles the response to the ListTriggeredWebJobHistorySlot request. The method always
26240// closes the http.Response Body.
26241func (client AppsClient) ListTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistoryCollection, err error) {
26242	err = autorest.Respond(
26243		resp,
26244		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
26245		autorest.ByUnmarshallingJSON(&result),
26246		autorest.ByClosing())
26247	result.Response = autorest.Response{Response: resp}
26248	return
26249}
26250
26251// listTriggeredWebJobHistorySlotNextResults retrieves the next set of results, if any.
26252func (client AppsClient) listTriggeredWebJobHistorySlotNextResults(ctx context.Context, lastResults TriggeredJobHistoryCollection) (result TriggeredJobHistoryCollection, err error) {
26253	req, err := lastResults.triggeredJobHistoryCollectionPreparer(ctx)
26254	if err != nil {
26255		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistorySlotNextResults", nil, "Failure preparing next results request")
26256	}
26257	if req == nil {
26258		return
26259	}
26260	resp, err := client.ListTriggeredWebJobHistorySlotSender(req)
26261	if err != nil {
26262		result.Response = autorest.Response{Response: resp}
26263		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistorySlotNextResults", resp, "Failure sending next results request")
26264	}
26265	result, err = client.ListTriggeredWebJobHistorySlotResponder(resp)
26266	if err != nil {
26267		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistorySlotNextResults", resp, "Failure responding to next results request")
26268	}
26269	return
26270}
26271
26272// ListTriggeredWebJobHistorySlotComplete enumerates all values, automatically crossing page boundaries as required.
26273func (client AppsClient) ListTriggeredWebJobHistorySlotComplete(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredJobHistoryCollectionIterator, err error) {
26274	if tracing.IsEnabled() {
26275		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistorySlot")
26276		defer func() {
26277			sc := -1
26278			if result.Response().Response.Response != nil {
26279				sc = result.page.Response().Response.Response.StatusCode
26280			}
26281			tracing.EndSpan(ctx, sc, err)
26282		}()
26283	}
26284	result.page, err = client.ListTriggeredWebJobHistorySlot(ctx, resourceGroupName, name, webJobName, slot)
26285	return
26286}
26287
26288// ListTriggeredWebJobs list triggered web jobs for an app, or a deployment slot.
26289// Parameters:
26290// resourceGroupName - name of the resource group to which the resource belongs.
26291// name - site name.
26292func (client AppsClient) ListTriggeredWebJobs(ctx context.Context, resourceGroupName string, name string) (result TriggeredWebJobCollectionPage, err error) {
26293	if tracing.IsEnabled() {
26294		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobs")
26295		defer func() {
26296			sc := -1
26297			if result.twjc.Response.Response != nil {
26298				sc = result.twjc.Response.Response.StatusCode
26299			}
26300			tracing.EndSpan(ctx, sc, err)
26301		}()
26302	}
26303	if err := validation.Validate([]validation.Validation{
26304		{TargetValue: resourceGroupName,
26305			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26306				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26307				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26308		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobs", err.Error())
26309	}
26310
26311	result.fn = client.listTriggeredWebJobsNextResults
26312	req, err := client.ListTriggeredWebJobsPreparer(ctx, resourceGroupName, name)
26313	if err != nil {
26314		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", nil, "Failure preparing request")
26315		return
26316	}
26317
26318	resp, err := client.ListTriggeredWebJobsSender(req)
26319	if err != nil {
26320		result.twjc.Response = autorest.Response{Response: resp}
26321		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", resp, "Failure sending request")
26322		return
26323	}
26324
26325	result.twjc, err = client.ListTriggeredWebJobsResponder(resp)
26326	if err != nil {
26327		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", resp, "Failure responding to request")
26328		return
26329	}
26330	if result.twjc.hasNextLink() && result.twjc.IsEmpty() {
26331		err = result.NextWithContext(ctx)
26332		return
26333	}
26334
26335	return
26336}
26337
26338// ListTriggeredWebJobsPreparer prepares the ListTriggeredWebJobs request.
26339func (client AppsClient) ListTriggeredWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
26340	pathParameters := map[string]interface{}{
26341		"name":              autorest.Encode("path", name),
26342		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26343		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26344	}
26345
26346	const APIVersion = "2018-02-01"
26347	queryParameters := map[string]interface{}{
26348		"api-version": APIVersion,
26349	}
26350
26351	preparer := autorest.CreatePreparer(
26352		autorest.AsGet(),
26353		autorest.WithBaseURL(client.BaseURI),
26354		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs", pathParameters),
26355		autorest.WithQueryParameters(queryParameters))
26356	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26357}
26358
26359// ListTriggeredWebJobsSender sends the ListTriggeredWebJobs request. The method will close the
26360// http.Response Body if it receives an error.
26361func (client AppsClient) ListTriggeredWebJobsSender(req *http.Request) (*http.Response, error) {
26362	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26363}
26364
26365// ListTriggeredWebJobsResponder handles the response to the ListTriggeredWebJobs request. The method always
26366// closes the http.Response Body.
26367func (client AppsClient) ListTriggeredWebJobsResponder(resp *http.Response) (result TriggeredWebJobCollection, err error) {
26368	err = autorest.Respond(
26369		resp,
26370		azure.WithErrorUnlessStatusCode(http.StatusOK),
26371		autorest.ByUnmarshallingJSON(&result),
26372		autorest.ByClosing())
26373	result.Response = autorest.Response{Response: resp}
26374	return
26375}
26376
26377// listTriggeredWebJobsNextResults retrieves the next set of results, if any.
26378func (client AppsClient) listTriggeredWebJobsNextResults(ctx context.Context, lastResults TriggeredWebJobCollection) (result TriggeredWebJobCollection, err error) {
26379	req, err := lastResults.triggeredWebJobCollectionPreparer(ctx)
26380	if err != nil {
26381		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsNextResults", nil, "Failure preparing next results request")
26382	}
26383	if req == nil {
26384		return
26385	}
26386	resp, err := client.ListTriggeredWebJobsSender(req)
26387	if err != nil {
26388		result.Response = autorest.Response{Response: resp}
26389		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsNextResults", resp, "Failure sending next results request")
26390	}
26391	result, err = client.ListTriggeredWebJobsResponder(resp)
26392	if err != nil {
26393		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsNextResults", resp, "Failure responding to next results request")
26394	}
26395	return
26396}
26397
26398// ListTriggeredWebJobsComplete enumerates all values, automatically crossing page boundaries as required.
26399func (client AppsClient) ListTriggeredWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result TriggeredWebJobCollectionIterator, err error) {
26400	if tracing.IsEnabled() {
26401		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobs")
26402		defer func() {
26403			sc := -1
26404			if result.Response().Response.Response != nil {
26405				sc = result.page.Response().Response.Response.StatusCode
26406			}
26407			tracing.EndSpan(ctx, sc, err)
26408		}()
26409	}
26410	result.page, err = client.ListTriggeredWebJobs(ctx, resourceGroupName, name)
26411	return
26412}
26413
26414// ListTriggeredWebJobsSlot list triggered web jobs for an app, or a deployment slot.
26415// Parameters:
26416// resourceGroupName - name of the resource group to which the resource belongs.
26417// name - site name.
26418// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
26419// production slot.
26420func (client AppsClient) ListTriggeredWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result TriggeredWebJobCollectionPage, err error) {
26421	if tracing.IsEnabled() {
26422		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobsSlot")
26423		defer func() {
26424			sc := -1
26425			if result.twjc.Response.Response != nil {
26426				sc = result.twjc.Response.Response.StatusCode
26427			}
26428			tracing.EndSpan(ctx, sc, err)
26429		}()
26430	}
26431	if err := validation.Validate([]validation.Validation{
26432		{TargetValue: resourceGroupName,
26433			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26434				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26435				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26436		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobsSlot", err.Error())
26437	}
26438
26439	result.fn = client.listTriggeredWebJobsSlotNextResults
26440	req, err := client.ListTriggeredWebJobsSlotPreparer(ctx, resourceGroupName, name, slot)
26441	if err != nil {
26442		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", nil, "Failure preparing request")
26443		return
26444	}
26445
26446	resp, err := client.ListTriggeredWebJobsSlotSender(req)
26447	if err != nil {
26448		result.twjc.Response = autorest.Response{Response: resp}
26449		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", resp, "Failure sending request")
26450		return
26451	}
26452
26453	result.twjc, err = client.ListTriggeredWebJobsSlotResponder(resp)
26454	if err != nil {
26455		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", resp, "Failure responding to request")
26456		return
26457	}
26458	if result.twjc.hasNextLink() && result.twjc.IsEmpty() {
26459		err = result.NextWithContext(ctx)
26460		return
26461	}
26462
26463	return
26464}
26465
26466// ListTriggeredWebJobsSlotPreparer prepares the ListTriggeredWebJobsSlot request.
26467func (client AppsClient) ListTriggeredWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
26468	pathParameters := map[string]interface{}{
26469		"name":              autorest.Encode("path", name),
26470		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26471		"slot":              autorest.Encode("path", slot),
26472		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26473	}
26474
26475	const APIVersion = "2018-02-01"
26476	queryParameters := map[string]interface{}{
26477		"api-version": APIVersion,
26478	}
26479
26480	preparer := autorest.CreatePreparer(
26481		autorest.AsGet(),
26482		autorest.WithBaseURL(client.BaseURI),
26483		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs", pathParameters),
26484		autorest.WithQueryParameters(queryParameters))
26485	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26486}
26487
26488// ListTriggeredWebJobsSlotSender sends the ListTriggeredWebJobsSlot request. The method will close the
26489// http.Response Body if it receives an error.
26490func (client AppsClient) ListTriggeredWebJobsSlotSender(req *http.Request) (*http.Response, error) {
26491	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26492}
26493
26494// ListTriggeredWebJobsSlotResponder handles the response to the ListTriggeredWebJobsSlot request. The method always
26495// closes the http.Response Body.
26496func (client AppsClient) ListTriggeredWebJobsSlotResponder(resp *http.Response) (result TriggeredWebJobCollection, err error) {
26497	err = autorest.Respond(
26498		resp,
26499		azure.WithErrorUnlessStatusCode(http.StatusOK),
26500		autorest.ByUnmarshallingJSON(&result),
26501		autorest.ByClosing())
26502	result.Response = autorest.Response{Response: resp}
26503	return
26504}
26505
26506// listTriggeredWebJobsSlotNextResults retrieves the next set of results, if any.
26507func (client AppsClient) listTriggeredWebJobsSlotNextResults(ctx context.Context, lastResults TriggeredWebJobCollection) (result TriggeredWebJobCollection, err error) {
26508	req, err := lastResults.triggeredWebJobCollectionPreparer(ctx)
26509	if err != nil {
26510		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsSlotNextResults", nil, "Failure preparing next results request")
26511	}
26512	if req == nil {
26513		return
26514	}
26515	resp, err := client.ListTriggeredWebJobsSlotSender(req)
26516	if err != nil {
26517		result.Response = autorest.Response{Response: resp}
26518		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsSlotNextResults", resp, "Failure sending next results request")
26519	}
26520	result, err = client.ListTriggeredWebJobsSlotResponder(resp)
26521	if err != nil {
26522		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsSlotNextResults", resp, "Failure responding to next results request")
26523	}
26524	return
26525}
26526
26527// ListTriggeredWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required.
26528func (client AppsClient) ListTriggeredWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result TriggeredWebJobCollectionIterator, err error) {
26529	if tracing.IsEnabled() {
26530		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobsSlot")
26531		defer func() {
26532			sc := -1
26533			if result.Response().Response.Response != nil {
26534				sc = result.page.Response().Response.Response.StatusCode
26535			}
26536			tracing.EndSpan(ctx, sc, err)
26537		}()
26538	}
26539	result.page, err = client.ListTriggeredWebJobsSlot(ctx, resourceGroupName, name, slot)
26540	return
26541}
26542
26543// ListUsages gets the quota usage information of an app (or deployment slot, if specified).
26544// Parameters:
26545// resourceGroupName - name of the resource group to which the resource belongs.
26546// name - name of the app.
26547// filter - return only information specified in the filter (using OData syntax). For example:
26548// $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and
26549// endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
26550func (client AppsClient) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result CsmUsageQuotaCollectionPage, err error) {
26551	if tracing.IsEnabled() {
26552		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsages")
26553		defer func() {
26554			sc := -1
26555			if result.cuqc.Response.Response != nil {
26556				sc = result.cuqc.Response.Response.StatusCode
26557			}
26558			tracing.EndSpan(ctx, sc, err)
26559		}()
26560	}
26561	if err := validation.Validate([]validation.Validation{
26562		{TargetValue: resourceGroupName,
26563			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26564				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26565				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26566		return result, validation.NewError("web.AppsClient", "ListUsages", err.Error())
26567	}
26568
26569	result.fn = client.listUsagesNextResults
26570	req, err := client.ListUsagesPreparer(ctx, resourceGroupName, name, filter)
26571	if err != nil {
26572		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsages", nil, "Failure preparing request")
26573		return
26574	}
26575
26576	resp, err := client.ListUsagesSender(req)
26577	if err != nil {
26578		result.cuqc.Response = autorest.Response{Response: resp}
26579		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsages", resp, "Failure sending request")
26580		return
26581	}
26582
26583	result.cuqc, err = client.ListUsagesResponder(resp)
26584	if err != nil {
26585		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsages", resp, "Failure responding to request")
26586		return
26587	}
26588	if result.cuqc.hasNextLink() && result.cuqc.IsEmpty() {
26589		err = result.NextWithContext(ctx)
26590		return
26591	}
26592
26593	return
26594}
26595
26596// ListUsagesPreparer prepares the ListUsages request.
26597func (client AppsClient) ListUsagesPreparer(ctx context.Context, resourceGroupName string, name string, filter string) (*http.Request, error) {
26598	pathParameters := map[string]interface{}{
26599		"name":              autorest.Encode("path", name),
26600		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26601		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26602	}
26603
26604	const APIVersion = "2018-02-01"
26605	queryParameters := map[string]interface{}{
26606		"api-version": APIVersion,
26607	}
26608	if len(filter) > 0 {
26609		queryParameters["$filter"] = filter
26610	}
26611
26612	preparer := autorest.CreatePreparer(
26613		autorest.AsGet(),
26614		autorest.WithBaseURL(client.BaseURI),
26615		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages", pathParameters),
26616		autorest.WithQueryParameters(queryParameters))
26617	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26618}
26619
26620// ListUsagesSender sends the ListUsages request. The method will close the
26621// http.Response Body if it receives an error.
26622func (client AppsClient) ListUsagesSender(req *http.Request) (*http.Response, error) {
26623	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26624}
26625
26626// ListUsagesResponder handles the response to the ListUsages request. The method always
26627// closes the http.Response Body.
26628func (client AppsClient) ListUsagesResponder(resp *http.Response) (result CsmUsageQuotaCollection, err error) {
26629	err = autorest.Respond(
26630		resp,
26631		azure.WithErrorUnlessStatusCode(http.StatusOK),
26632		autorest.ByUnmarshallingJSON(&result),
26633		autorest.ByClosing())
26634	result.Response = autorest.Response{Response: resp}
26635	return
26636}
26637
26638// listUsagesNextResults retrieves the next set of results, if any.
26639func (client AppsClient) listUsagesNextResults(ctx context.Context, lastResults CsmUsageQuotaCollection) (result CsmUsageQuotaCollection, err error) {
26640	req, err := lastResults.csmUsageQuotaCollectionPreparer(ctx)
26641	if err != nil {
26642		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesNextResults", nil, "Failure preparing next results request")
26643	}
26644	if req == nil {
26645		return
26646	}
26647	resp, err := client.ListUsagesSender(req)
26648	if err != nil {
26649		result.Response = autorest.Response{Response: resp}
26650		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesNextResults", resp, "Failure sending next results request")
26651	}
26652	result, err = client.ListUsagesResponder(resp)
26653	if err != nil {
26654		err = autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesNextResults", resp, "Failure responding to next results request")
26655	}
26656	return
26657}
26658
26659// ListUsagesComplete enumerates all values, automatically crossing page boundaries as required.
26660func (client AppsClient) ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result CsmUsageQuotaCollectionIterator, err error) {
26661	if tracing.IsEnabled() {
26662		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsages")
26663		defer func() {
26664			sc := -1
26665			if result.Response().Response.Response != nil {
26666				sc = result.page.Response().Response.Response.StatusCode
26667			}
26668			tracing.EndSpan(ctx, sc, err)
26669		}()
26670	}
26671	result.page, err = client.ListUsages(ctx, resourceGroupName, name, filter)
26672	return
26673}
26674
26675// ListUsagesSlot gets the quota usage information of an app (or deployment slot, if specified).
26676// Parameters:
26677// resourceGroupName - name of the resource group to which the resource belongs.
26678// name - name of the app.
26679// slot - name of the deployment slot. If a slot is not specified, the API will get quota information of the
26680// production slot.
26681// filter - return only information specified in the filter (using OData syntax). For example:
26682// $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and
26683// endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
26684func (client AppsClient) ListUsagesSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result CsmUsageQuotaCollectionPage, err error) {
26685	if tracing.IsEnabled() {
26686		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsagesSlot")
26687		defer func() {
26688			sc := -1
26689			if result.cuqc.Response.Response != nil {
26690				sc = result.cuqc.Response.Response.StatusCode
26691			}
26692			tracing.EndSpan(ctx, sc, err)
26693		}()
26694	}
26695	if err := validation.Validate([]validation.Validation{
26696		{TargetValue: resourceGroupName,
26697			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26698				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26699				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26700		return result, validation.NewError("web.AppsClient", "ListUsagesSlot", err.Error())
26701	}
26702
26703	result.fn = client.listUsagesSlotNextResults
26704	req, err := client.ListUsagesSlotPreparer(ctx, resourceGroupName, name, slot, filter)
26705	if err != nil {
26706		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsagesSlot", nil, "Failure preparing request")
26707		return
26708	}
26709
26710	resp, err := client.ListUsagesSlotSender(req)
26711	if err != nil {
26712		result.cuqc.Response = autorest.Response{Response: resp}
26713		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsagesSlot", resp, "Failure sending request")
26714		return
26715	}
26716
26717	result.cuqc, err = client.ListUsagesSlotResponder(resp)
26718	if err != nil {
26719		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsagesSlot", resp, "Failure responding to request")
26720		return
26721	}
26722	if result.cuqc.hasNextLink() && result.cuqc.IsEmpty() {
26723		err = result.NextWithContext(ctx)
26724		return
26725	}
26726
26727	return
26728}
26729
26730// ListUsagesSlotPreparer prepares the ListUsagesSlot request.
26731func (client AppsClient) ListUsagesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (*http.Request, error) {
26732	pathParameters := map[string]interface{}{
26733		"name":              autorest.Encode("path", name),
26734		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26735		"slot":              autorest.Encode("path", slot),
26736		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26737	}
26738
26739	const APIVersion = "2018-02-01"
26740	queryParameters := map[string]interface{}{
26741		"api-version": APIVersion,
26742	}
26743	if len(filter) > 0 {
26744		queryParameters["$filter"] = filter
26745	}
26746
26747	preparer := autorest.CreatePreparer(
26748		autorest.AsGet(),
26749		autorest.WithBaseURL(client.BaseURI),
26750		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages", pathParameters),
26751		autorest.WithQueryParameters(queryParameters))
26752	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26753}
26754
26755// ListUsagesSlotSender sends the ListUsagesSlot request. The method will close the
26756// http.Response Body if it receives an error.
26757func (client AppsClient) ListUsagesSlotSender(req *http.Request) (*http.Response, error) {
26758	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26759}
26760
26761// ListUsagesSlotResponder handles the response to the ListUsagesSlot request. The method always
26762// closes the http.Response Body.
26763func (client AppsClient) ListUsagesSlotResponder(resp *http.Response) (result CsmUsageQuotaCollection, err error) {
26764	err = autorest.Respond(
26765		resp,
26766		azure.WithErrorUnlessStatusCode(http.StatusOK),
26767		autorest.ByUnmarshallingJSON(&result),
26768		autorest.ByClosing())
26769	result.Response = autorest.Response{Response: resp}
26770	return
26771}
26772
26773// listUsagesSlotNextResults retrieves the next set of results, if any.
26774func (client AppsClient) listUsagesSlotNextResults(ctx context.Context, lastResults CsmUsageQuotaCollection) (result CsmUsageQuotaCollection, err error) {
26775	req, err := lastResults.csmUsageQuotaCollectionPreparer(ctx)
26776	if err != nil {
26777		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesSlotNextResults", nil, "Failure preparing next results request")
26778	}
26779	if req == nil {
26780		return
26781	}
26782	resp, err := client.ListUsagesSlotSender(req)
26783	if err != nil {
26784		result.Response = autorest.Response{Response: resp}
26785		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesSlotNextResults", resp, "Failure sending next results request")
26786	}
26787	result, err = client.ListUsagesSlotResponder(resp)
26788	if err != nil {
26789		err = autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesSlotNextResults", resp, "Failure responding to next results request")
26790	}
26791	return
26792}
26793
26794// ListUsagesSlotComplete enumerates all values, automatically crossing page boundaries as required.
26795func (client AppsClient) ListUsagesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result CsmUsageQuotaCollectionIterator, err error) {
26796	if tracing.IsEnabled() {
26797		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsagesSlot")
26798		defer func() {
26799			sc := -1
26800			if result.Response().Response.Response != nil {
26801				sc = result.page.Response().Response.Response.StatusCode
26802			}
26803			tracing.EndSpan(ctx, sc, err)
26804		}()
26805	}
26806	result.page, err = client.ListUsagesSlot(ctx, resourceGroupName, name, slot, filter)
26807	return
26808}
26809
26810// ListVnetConnections gets the virtual networks the app (or deployment slot) is connected to.
26811// Parameters:
26812// resourceGroupName - name of the resource group to which the resource belongs.
26813// name - name of the app.
26814func (client AppsClient) ListVnetConnections(ctx context.Context, resourceGroupName string, name string) (result ListVnetInfo, err error) {
26815	if tracing.IsEnabled() {
26816		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListVnetConnections")
26817		defer func() {
26818			sc := -1
26819			if result.Response.Response != nil {
26820				sc = result.Response.Response.StatusCode
26821			}
26822			tracing.EndSpan(ctx, sc, err)
26823		}()
26824	}
26825	if err := validation.Validate([]validation.Validation{
26826		{TargetValue: resourceGroupName,
26827			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26828				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26829				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26830		return result, validation.NewError("web.AppsClient", "ListVnetConnections", err.Error())
26831	}
26832
26833	req, err := client.ListVnetConnectionsPreparer(ctx, resourceGroupName, name)
26834	if err != nil {
26835		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnections", nil, "Failure preparing request")
26836		return
26837	}
26838
26839	resp, err := client.ListVnetConnectionsSender(req)
26840	if err != nil {
26841		result.Response = autorest.Response{Response: resp}
26842		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnections", resp, "Failure sending request")
26843		return
26844	}
26845
26846	result, err = client.ListVnetConnectionsResponder(resp)
26847	if err != nil {
26848		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnections", resp, "Failure responding to request")
26849		return
26850	}
26851
26852	return
26853}
26854
26855// ListVnetConnectionsPreparer prepares the ListVnetConnections request.
26856func (client AppsClient) ListVnetConnectionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
26857	pathParameters := map[string]interface{}{
26858		"name":              autorest.Encode("path", name),
26859		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26860		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26861	}
26862
26863	const APIVersion = "2018-02-01"
26864	queryParameters := map[string]interface{}{
26865		"api-version": APIVersion,
26866	}
26867
26868	preparer := autorest.CreatePreparer(
26869		autorest.AsGet(),
26870		autorest.WithBaseURL(client.BaseURI),
26871		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections", pathParameters),
26872		autorest.WithQueryParameters(queryParameters))
26873	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26874}
26875
26876// ListVnetConnectionsSender sends the ListVnetConnections request. The method will close the
26877// http.Response Body if it receives an error.
26878func (client AppsClient) ListVnetConnectionsSender(req *http.Request) (*http.Response, error) {
26879	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26880}
26881
26882// ListVnetConnectionsResponder handles the response to the ListVnetConnections request. The method always
26883// closes the http.Response Body.
26884func (client AppsClient) ListVnetConnectionsResponder(resp *http.Response) (result ListVnetInfo, err error) {
26885	err = autorest.Respond(
26886		resp,
26887		azure.WithErrorUnlessStatusCode(http.StatusOK),
26888		autorest.ByUnmarshallingJSON(&result.Value),
26889		autorest.ByClosing())
26890	result.Response = autorest.Response{Response: resp}
26891	return
26892}
26893
26894// ListVnetConnectionsSlot gets the virtual networks the app (or deployment slot) is connected to.
26895// Parameters:
26896// resourceGroupName - name of the resource group to which the resource belongs.
26897// name - name of the app.
26898// slot - name of the deployment slot. If a slot is not specified, the API will get virtual network connections
26899// for the production slot.
26900func (client AppsClient) ListVnetConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ListVnetInfo, err error) {
26901	if tracing.IsEnabled() {
26902		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListVnetConnectionsSlot")
26903		defer func() {
26904			sc := -1
26905			if result.Response.Response != nil {
26906				sc = result.Response.Response.StatusCode
26907			}
26908			tracing.EndSpan(ctx, sc, err)
26909		}()
26910	}
26911	if err := validation.Validate([]validation.Validation{
26912		{TargetValue: resourceGroupName,
26913			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26914				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26915				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26916		return result, validation.NewError("web.AppsClient", "ListVnetConnectionsSlot", err.Error())
26917	}
26918
26919	req, err := client.ListVnetConnectionsSlotPreparer(ctx, resourceGroupName, name, slot)
26920	if err != nil {
26921		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnectionsSlot", nil, "Failure preparing request")
26922		return
26923	}
26924
26925	resp, err := client.ListVnetConnectionsSlotSender(req)
26926	if err != nil {
26927		result.Response = autorest.Response{Response: resp}
26928		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnectionsSlot", resp, "Failure sending request")
26929		return
26930	}
26931
26932	result, err = client.ListVnetConnectionsSlotResponder(resp)
26933	if err != nil {
26934		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnectionsSlot", resp, "Failure responding to request")
26935		return
26936	}
26937
26938	return
26939}
26940
26941// ListVnetConnectionsSlotPreparer prepares the ListVnetConnectionsSlot request.
26942func (client AppsClient) ListVnetConnectionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
26943	pathParameters := map[string]interface{}{
26944		"name":              autorest.Encode("path", name),
26945		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26946		"slot":              autorest.Encode("path", slot),
26947		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26948	}
26949
26950	const APIVersion = "2018-02-01"
26951	queryParameters := map[string]interface{}{
26952		"api-version": APIVersion,
26953	}
26954
26955	preparer := autorest.CreatePreparer(
26956		autorest.AsGet(),
26957		autorest.WithBaseURL(client.BaseURI),
26958		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections", pathParameters),
26959		autorest.WithQueryParameters(queryParameters))
26960	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26961}
26962
26963// ListVnetConnectionsSlotSender sends the ListVnetConnectionsSlot request. The method will close the
26964// http.Response Body if it receives an error.
26965func (client AppsClient) ListVnetConnectionsSlotSender(req *http.Request) (*http.Response, error) {
26966	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26967}
26968
26969// ListVnetConnectionsSlotResponder handles the response to the ListVnetConnectionsSlot request. The method always
26970// closes the http.Response Body.
26971func (client AppsClient) ListVnetConnectionsSlotResponder(resp *http.Response) (result ListVnetInfo, err error) {
26972	err = autorest.Respond(
26973		resp,
26974		azure.WithErrorUnlessStatusCode(http.StatusOK),
26975		autorest.ByUnmarshallingJSON(&result.Value),
26976		autorest.ByClosing())
26977	result.Response = autorest.Response{Response: resp}
26978	return
26979}
26980
26981// ListWebJobs list webjobs for an app, or a deployment slot.
26982// Parameters:
26983// resourceGroupName - name of the resource group to which the resource belongs.
26984// name - site name.
26985func (client AppsClient) ListWebJobs(ctx context.Context, resourceGroupName string, name string) (result JobCollectionPage, err error) {
26986	if tracing.IsEnabled() {
26987		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobs")
26988		defer func() {
26989			sc := -1
26990			if result.jc.Response.Response != nil {
26991				sc = result.jc.Response.Response.StatusCode
26992			}
26993			tracing.EndSpan(ctx, sc, err)
26994		}()
26995	}
26996	if err := validation.Validate([]validation.Validation{
26997		{TargetValue: resourceGroupName,
26998			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26999				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27000				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27001		return result, validation.NewError("web.AppsClient", "ListWebJobs", err.Error())
27002	}
27003
27004	result.fn = client.listWebJobsNextResults
27005	req, err := client.ListWebJobsPreparer(ctx, resourceGroupName, name)
27006	if err != nil {
27007		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", nil, "Failure preparing request")
27008		return
27009	}
27010
27011	resp, err := client.ListWebJobsSender(req)
27012	if err != nil {
27013		result.jc.Response = autorest.Response{Response: resp}
27014		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", resp, "Failure sending request")
27015		return
27016	}
27017
27018	result.jc, err = client.ListWebJobsResponder(resp)
27019	if err != nil {
27020		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", resp, "Failure responding to request")
27021		return
27022	}
27023	if result.jc.hasNextLink() && result.jc.IsEmpty() {
27024		err = result.NextWithContext(ctx)
27025		return
27026	}
27027
27028	return
27029}
27030
27031// ListWebJobsPreparer prepares the ListWebJobs request.
27032func (client AppsClient) ListWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
27033	pathParameters := map[string]interface{}{
27034		"name":              autorest.Encode("path", name),
27035		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27036		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27037	}
27038
27039	const APIVersion = "2018-02-01"
27040	queryParameters := map[string]interface{}{
27041		"api-version": APIVersion,
27042	}
27043
27044	preparer := autorest.CreatePreparer(
27045		autorest.AsGet(),
27046		autorest.WithBaseURL(client.BaseURI),
27047		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs", pathParameters),
27048		autorest.WithQueryParameters(queryParameters))
27049	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27050}
27051
27052// ListWebJobsSender sends the ListWebJobs request. The method will close the
27053// http.Response Body if it receives an error.
27054func (client AppsClient) ListWebJobsSender(req *http.Request) (*http.Response, error) {
27055	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27056}
27057
27058// ListWebJobsResponder handles the response to the ListWebJobs request. The method always
27059// closes the http.Response Body.
27060func (client AppsClient) ListWebJobsResponder(resp *http.Response) (result JobCollection, err error) {
27061	err = autorest.Respond(
27062		resp,
27063		azure.WithErrorUnlessStatusCode(http.StatusOK),
27064		autorest.ByUnmarshallingJSON(&result),
27065		autorest.ByClosing())
27066	result.Response = autorest.Response{Response: resp}
27067	return
27068}
27069
27070// listWebJobsNextResults retrieves the next set of results, if any.
27071func (client AppsClient) listWebJobsNextResults(ctx context.Context, lastResults JobCollection) (result JobCollection, err error) {
27072	req, err := lastResults.jobCollectionPreparer(ctx)
27073	if err != nil {
27074		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsNextResults", nil, "Failure preparing next results request")
27075	}
27076	if req == nil {
27077		return
27078	}
27079	resp, err := client.ListWebJobsSender(req)
27080	if err != nil {
27081		result.Response = autorest.Response{Response: resp}
27082		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsNextResults", resp, "Failure sending next results request")
27083	}
27084	result, err = client.ListWebJobsResponder(resp)
27085	if err != nil {
27086		err = autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsNextResults", resp, "Failure responding to next results request")
27087	}
27088	return
27089}
27090
27091// ListWebJobsComplete enumerates all values, automatically crossing page boundaries as required.
27092func (client AppsClient) ListWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result JobCollectionIterator, err error) {
27093	if tracing.IsEnabled() {
27094		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobs")
27095		defer func() {
27096			sc := -1
27097			if result.Response().Response.Response != nil {
27098				sc = result.page.Response().Response.Response.StatusCode
27099			}
27100			tracing.EndSpan(ctx, sc, err)
27101		}()
27102	}
27103	result.page, err = client.ListWebJobs(ctx, resourceGroupName, name)
27104	return
27105}
27106
27107// ListWebJobsSlot list webjobs for an app, or a deployment slot.
27108// Parameters:
27109// resourceGroupName - name of the resource group to which the resource belongs.
27110// name - site name.
27111// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
27112// production slot.
27113func (client AppsClient) ListWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result JobCollectionPage, err error) {
27114	if tracing.IsEnabled() {
27115		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobsSlot")
27116		defer func() {
27117			sc := -1
27118			if result.jc.Response.Response != nil {
27119				sc = result.jc.Response.Response.StatusCode
27120			}
27121			tracing.EndSpan(ctx, sc, err)
27122		}()
27123	}
27124	if err := validation.Validate([]validation.Validation{
27125		{TargetValue: resourceGroupName,
27126			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27127				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27128				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27129		return result, validation.NewError("web.AppsClient", "ListWebJobsSlot", err.Error())
27130	}
27131
27132	result.fn = client.listWebJobsSlotNextResults
27133	req, err := client.ListWebJobsSlotPreparer(ctx, resourceGroupName, name, slot)
27134	if err != nil {
27135		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", nil, "Failure preparing request")
27136		return
27137	}
27138
27139	resp, err := client.ListWebJobsSlotSender(req)
27140	if err != nil {
27141		result.jc.Response = autorest.Response{Response: resp}
27142		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", resp, "Failure sending request")
27143		return
27144	}
27145
27146	result.jc, err = client.ListWebJobsSlotResponder(resp)
27147	if err != nil {
27148		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", resp, "Failure responding to request")
27149		return
27150	}
27151	if result.jc.hasNextLink() && result.jc.IsEmpty() {
27152		err = result.NextWithContext(ctx)
27153		return
27154	}
27155
27156	return
27157}
27158
27159// ListWebJobsSlotPreparer prepares the ListWebJobsSlot request.
27160func (client AppsClient) ListWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
27161	pathParameters := map[string]interface{}{
27162		"name":              autorest.Encode("path", name),
27163		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27164		"slot":              autorest.Encode("path", slot),
27165		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27166	}
27167
27168	const APIVersion = "2018-02-01"
27169	queryParameters := map[string]interface{}{
27170		"api-version": APIVersion,
27171	}
27172
27173	preparer := autorest.CreatePreparer(
27174		autorest.AsGet(),
27175		autorest.WithBaseURL(client.BaseURI),
27176		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs", pathParameters),
27177		autorest.WithQueryParameters(queryParameters))
27178	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27179}
27180
27181// ListWebJobsSlotSender sends the ListWebJobsSlot request. The method will close the
27182// http.Response Body if it receives an error.
27183func (client AppsClient) ListWebJobsSlotSender(req *http.Request) (*http.Response, error) {
27184	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27185}
27186
27187// ListWebJobsSlotResponder handles the response to the ListWebJobsSlot request. The method always
27188// closes the http.Response Body.
27189func (client AppsClient) ListWebJobsSlotResponder(resp *http.Response) (result JobCollection, err error) {
27190	err = autorest.Respond(
27191		resp,
27192		azure.WithErrorUnlessStatusCode(http.StatusOK),
27193		autorest.ByUnmarshallingJSON(&result),
27194		autorest.ByClosing())
27195	result.Response = autorest.Response{Response: resp}
27196	return
27197}
27198
27199// listWebJobsSlotNextResults retrieves the next set of results, if any.
27200func (client AppsClient) listWebJobsSlotNextResults(ctx context.Context, lastResults JobCollection) (result JobCollection, err error) {
27201	req, err := lastResults.jobCollectionPreparer(ctx)
27202	if err != nil {
27203		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsSlotNextResults", nil, "Failure preparing next results request")
27204	}
27205	if req == nil {
27206		return
27207	}
27208	resp, err := client.ListWebJobsSlotSender(req)
27209	if err != nil {
27210		result.Response = autorest.Response{Response: resp}
27211		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsSlotNextResults", resp, "Failure sending next results request")
27212	}
27213	result, err = client.ListWebJobsSlotResponder(resp)
27214	if err != nil {
27215		err = autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsSlotNextResults", resp, "Failure responding to next results request")
27216	}
27217	return
27218}
27219
27220// ListWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required.
27221func (client AppsClient) ListWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result JobCollectionIterator, err error) {
27222	if tracing.IsEnabled() {
27223		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobsSlot")
27224		defer func() {
27225			sc := -1
27226			if result.Response().Response.Response != nil {
27227				sc = result.page.Response().Response.Response.StatusCode
27228			}
27229			tracing.EndSpan(ctx, sc, err)
27230		}()
27231	}
27232	result.page, err = client.ListWebJobsSlot(ctx, resourceGroupName, name, slot)
27233	return
27234}
27235
27236// MigrateMySQL migrates a local (in-app) MySql database to a remote MySql database.
27237// Parameters:
27238// resourceGroupName - name of the resource group to which the resource belongs.
27239// name - name of web app.
27240// migrationRequestEnvelope - mySql migration options.
27241func (client AppsClient) MigrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest) (result AppsMigrateMySQLFuture, err error) {
27242	if tracing.IsEnabled() {
27243		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.MigrateMySQL")
27244		defer func() {
27245			sc := -1
27246			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
27247				sc = result.FutureAPI.Response().StatusCode
27248			}
27249			tracing.EndSpan(ctx, sc, err)
27250		}()
27251	}
27252	if err := validation.Validate([]validation.Validation{
27253		{TargetValue: resourceGroupName,
27254			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27255				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27256				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
27257		{TargetValue: migrationRequestEnvelope,
27258			Constraints: []validation.Constraint{{Target: "migrationRequestEnvelope.MigrateMySQLRequestProperties", Name: validation.Null, Rule: false,
27259				Chain: []validation.Constraint{{Target: "migrationRequestEnvelope.MigrateMySQLRequestProperties.ConnectionString", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
27260		return result, validation.NewError("web.AppsClient", "MigrateMySQL", err.Error())
27261	}
27262
27263	req, err := client.MigrateMySQLPreparer(ctx, resourceGroupName, name, migrationRequestEnvelope)
27264	if err != nil {
27265		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateMySQL", nil, "Failure preparing request")
27266		return
27267	}
27268
27269	result, err = client.MigrateMySQLSender(req)
27270	if err != nil {
27271		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateMySQL", nil, "Failure sending request")
27272		return
27273	}
27274
27275	return
27276}
27277
27278// MigrateMySQLPreparer prepares the MigrateMySQL request.
27279func (client AppsClient) MigrateMySQLPreparer(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest) (*http.Request, error) {
27280	pathParameters := map[string]interface{}{
27281		"name":              autorest.Encode("path", name),
27282		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27283		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27284	}
27285
27286	const APIVersion = "2018-02-01"
27287	queryParameters := map[string]interface{}{
27288		"api-version": APIVersion,
27289	}
27290
27291	preparer := autorest.CreatePreparer(
27292		autorest.AsContentType("application/json; charset=utf-8"),
27293		autorest.AsPost(),
27294		autorest.WithBaseURL(client.BaseURI),
27295		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql", pathParameters),
27296		autorest.WithJSON(migrationRequestEnvelope),
27297		autorest.WithQueryParameters(queryParameters))
27298	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27299}
27300
27301// MigrateMySQLSender sends the MigrateMySQL request. The method will close the
27302// http.Response Body if it receives an error.
27303func (client AppsClient) MigrateMySQLSender(req *http.Request) (future AppsMigrateMySQLFuture, err error) {
27304	var resp *http.Response
27305	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
27306	if err != nil {
27307		return
27308	}
27309	var azf azure.Future
27310	azf, err = azure.NewFutureFromResponse(resp)
27311	future.FutureAPI = &azf
27312	future.Result = future.result
27313	return
27314}
27315
27316// MigrateMySQLResponder handles the response to the MigrateMySQL request. The method always
27317// closes the http.Response Body.
27318func (client AppsClient) MigrateMySQLResponder(resp *http.Response) (result Operation, err error) {
27319	err = autorest.Respond(
27320		resp,
27321		azure.WithErrorUnlessStatusCode(http.StatusOK),
27322		autorest.ByUnmarshallingJSON(&result),
27323		autorest.ByClosing())
27324	result.Response = autorest.Response{Response: resp}
27325	return
27326}
27327
27328// MigrateStorage restores a web app.
27329// Parameters:
27330// subscriptionName - azure subscription.
27331// resourceGroupName - name of the resource group to which the resource belongs.
27332// name - name of web app.
27333// migrationOptions - migration migrationOptions.
27334func (client AppsClient) MigrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions) (result AppsMigrateStorageFuture, err error) {
27335	if tracing.IsEnabled() {
27336		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.MigrateStorage")
27337		defer func() {
27338			sc := -1
27339			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
27340				sc = result.FutureAPI.Response().StatusCode
27341			}
27342			tracing.EndSpan(ctx, sc, err)
27343		}()
27344	}
27345	if err := validation.Validate([]validation.Validation{
27346		{TargetValue: resourceGroupName,
27347			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27348				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27349				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
27350		{TargetValue: migrationOptions,
27351			Constraints: []validation.Constraint{{Target: "migrationOptions.StorageMigrationOptionsProperties", Name: validation.Null, Rule: false,
27352				Chain: []validation.Constraint{{Target: "migrationOptions.StorageMigrationOptionsProperties.AzurefilesConnectionString", Name: validation.Null, Rule: true, Chain: nil},
27353					{Target: "migrationOptions.StorageMigrationOptionsProperties.AzurefilesShare", Name: validation.Null, Rule: true, Chain: nil},
27354				}}}}}); err != nil {
27355		return result, validation.NewError("web.AppsClient", "MigrateStorage", err.Error())
27356	}
27357
27358	req, err := client.MigrateStoragePreparer(ctx, subscriptionName, resourceGroupName, name, migrationOptions)
27359	if err != nil {
27360		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateStorage", nil, "Failure preparing request")
27361		return
27362	}
27363
27364	result, err = client.MigrateStorageSender(req)
27365	if err != nil {
27366		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateStorage", nil, "Failure sending request")
27367		return
27368	}
27369
27370	return
27371}
27372
27373// MigrateStoragePreparer prepares the MigrateStorage request.
27374func (client AppsClient) MigrateStoragePreparer(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions) (*http.Request, error) {
27375	pathParameters := map[string]interface{}{
27376		"name":              autorest.Encode("path", name),
27377		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27378		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27379	}
27380
27381	const APIVersion = "2018-02-01"
27382	queryParameters := map[string]interface{}{
27383		"api-version":      APIVersion,
27384		"subscriptionName": autorest.Encode("query", subscriptionName),
27385	}
27386
27387	preparer := autorest.CreatePreparer(
27388		autorest.AsContentType("application/json; charset=utf-8"),
27389		autorest.AsPut(),
27390		autorest.WithBaseURL(client.BaseURI),
27391		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate", pathParameters),
27392		autorest.WithJSON(migrationOptions),
27393		autorest.WithQueryParameters(queryParameters))
27394	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27395}
27396
27397// MigrateStorageSender sends the MigrateStorage request. The method will close the
27398// http.Response Body if it receives an error.
27399func (client AppsClient) MigrateStorageSender(req *http.Request) (future AppsMigrateStorageFuture, err error) {
27400	var resp *http.Response
27401	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
27402	if err != nil {
27403		return
27404	}
27405	var azf azure.Future
27406	azf, err = azure.NewFutureFromResponse(resp)
27407	future.FutureAPI = &azf
27408	future.Result = future.result
27409	return
27410}
27411
27412// MigrateStorageResponder handles the response to the MigrateStorage request. The method always
27413// closes the http.Response Body.
27414func (client AppsClient) MigrateStorageResponder(resp *http.Response) (result StorageMigrationResponse, err error) {
27415	err = autorest.Respond(
27416		resp,
27417		azure.WithErrorUnlessStatusCode(http.StatusOK),
27418		autorest.ByUnmarshallingJSON(&result),
27419		autorest.ByClosing())
27420	result.Response = autorest.Response{Response: resp}
27421	return
27422}
27423
27424// PutPrivateAccessVnet sets data around private site access enablement and authorized Virtual Networks that can access
27425// the site.
27426// Parameters:
27427// resourceGroupName - name of the resource group to which the resource belongs.
27428// name - the name of the web app.
27429// access - the information for the private access
27430func (client AppsClient) PutPrivateAccessVnet(ctx context.Context, resourceGroupName string, name string, access PrivateAccess) (result PrivateAccess, err error) {
27431	if tracing.IsEnabled() {
27432		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.PutPrivateAccessVnet")
27433		defer func() {
27434			sc := -1
27435			if result.Response.Response != nil {
27436				sc = result.Response.Response.StatusCode
27437			}
27438			tracing.EndSpan(ctx, sc, err)
27439		}()
27440	}
27441	if err := validation.Validate([]validation.Validation{
27442		{TargetValue: resourceGroupName,
27443			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27444				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27445				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27446		return result, validation.NewError("web.AppsClient", "PutPrivateAccessVnet", err.Error())
27447	}
27448
27449	req, err := client.PutPrivateAccessVnetPreparer(ctx, resourceGroupName, name, access)
27450	if err != nil {
27451		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnet", nil, "Failure preparing request")
27452		return
27453	}
27454
27455	resp, err := client.PutPrivateAccessVnetSender(req)
27456	if err != nil {
27457		result.Response = autorest.Response{Response: resp}
27458		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnet", resp, "Failure sending request")
27459		return
27460	}
27461
27462	result, err = client.PutPrivateAccessVnetResponder(resp)
27463	if err != nil {
27464		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnet", resp, "Failure responding to request")
27465		return
27466	}
27467
27468	return
27469}
27470
27471// PutPrivateAccessVnetPreparer prepares the PutPrivateAccessVnet request.
27472func (client AppsClient) PutPrivateAccessVnetPreparer(ctx context.Context, resourceGroupName string, name string, access PrivateAccess) (*http.Request, error) {
27473	pathParameters := map[string]interface{}{
27474		"name":              autorest.Encode("path", name),
27475		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27476		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27477	}
27478
27479	const APIVersion = "2018-02-01"
27480	queryParameters := map[string]interface{}{
27481		"api-version": APIVersion,
27482	}
27483
27484	preparer := autorest.CreatePreparer(
27485		autorest.AsContentType("application/json; charset=utf-8"),
27486		autorest.AsPut(),
27487		autorest.WithBaseURL(client.BaseURI),
27488		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks", pathParameters),
27489		autorest.WithJSON(access),
27490		autorest.WithQueryParameters(queryParameters))
27491	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27492}
27493
27494// PutPrivateAccessVnetSender sends the PutPrivateAccessVnet request. The method will close the
27495// http.Response Body if it receives an error.
27496func (client AppsClient) PutPrivateAccessVnetSender(req *http.Request) (*http.Response, error) {
27497	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27498}
27499
27500// PutPrivateAccessVnetResponder handles the response to the PutPrivateAccessVnet request. The method always
27501// closes the http.Response Body.
27502func (client AppsClient) PutPrivateAccessVnetResponder(resp *http.Response) (result PrivateAccess, err error) {
27503	err = autorest.Respond(
27504		resp,
27505		azure.WithErrorUnlessStatusCode(http.StatusOK),
27506		autorest.ByUnmarshallingJSON(&result),
27507		autorest.ByClosing())
27508	result.Response = autorest.Response{Response: resp}
27509	return
27510}
27511
27512// PutPrivateAccessVnetSlot sets data around private site access enablement and authorized Virtual Networks that can
27513// access the site.
27514// Parameters:
27515// resourceGroupName - name of the resource group to which the resource belongs.
27516// name - the name of the web app.
27517// access - the information for the private access
27518// slot - the name of the slot for the web app.
27519func (client AppsClient) PutPrivateAccessVnetSlot(ctx context.Context, resourceGroupName string, name string, access PrivateAccess, slot string) (result PrivateAccess, err error) {
27520	if tracing.IsEnabled() {
27521		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.PutPrivateAccessVnetSlot")
27522		defer func() {
27523			sc := -1
27524			if result.Response.Response != nil {
27525				sc = result.Response.Response.StatusCode
27526			}
27527			tracing.EndSpan(ctx, sc, err)
27528		}()
27529	}
27530	if err := validation.Validate([]validation.Validation{
27531		{TargetValue: resourceGroupName,
27532			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27533				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27534				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27535		return result, validation.NewError("web.AppsClient", "PutPrivateAccessVnetSlot", err.Error())
27536	}
27537
27538	req, err := client.PutPrivateAccessVnetSlotPreparer(ctx, resourceGroupName, name, access, slot)
27539	if err != nil {
27540		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnetSlot", nil, "Failure preparing request")
27541		return
27542	}
27543
27544	resp, err := client.PutPrivateAccessVnetSlotSender(req)
27545	if err != nil {
27546		result.Response = autorest.Response{Response: resp}
27547		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnetSlot", resp, "Failure sending request")
27548		return
27549	}
27550
27551	result, err = client.PutPrivateAccessVnetSlotResponder(resp)
27552	if err != nil {
27553		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnetSlot", resp, "Failure responding to request")
27554		return
27555	}
27556
27557	return
27558}
27559
27560// PutPrivateAccessVnetSlotPreparer prepares the PutPrivateAccessVnetSlot request.
27561func (client AppsClient) PutPrivateAccessVnetSlotPreparer(ctx context.Context, resourceGroupName string, name string, access PrivateAccess, slot string) (*http.Request, error) {
27562	pathParameters := map[string]interface{}{
27563		"name":              autorest.Encode("path", name),
27564		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27565		"slot":              autorest.Encode("path", slot),
27566		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27567	}
27568
27569	const APIVersion = "2018-02-01"
27570	queryParameters := map[string]interface{}{
27571		"api-version": APIVersion,
27572	}
27573
27574	preparer := autorest.CreatePreparer(
27575		autorest.AsContentType("application/json; charset=utf-8"),
27576		autorest.AsPut(),
27577		autorest.WithBaseURL(client.BaseURI),
27578		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks", pathParameters),
27579		autorest.WithJSON(access),
27580		autorest.WithQueryParameters(queryParameters))
27581	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27582}
27583
27584// PutPrivateAccessVnetSlotSender sends the PutPrivateAccessVnetSlot request. The method will close the
27585// http.Response Body if it receives an error.
27586func (client AppsClient) PutPrivateAccessVnetSlotSender(req *http.Request) (*http.Response, error) {
27587	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27588}
27589
27590// PutPrivateAccessVnetSlotResponder handles the response to the PutPrivateAccessVnetSlot request. The method always
27591// closes the http.Response Body.
27592func (client AppsClient) PutPrivateAccessVnetSlotResponder(resp *http.Response) (result PrivateAccess, err error) {
27593	err = autorest.Respond(
27594		resp,
27595		azure.WithErrorUnlessStatusCode(http.StatusOK),
27596		autorest.ByUnmarshallingJSON(&result),
27597		autorest.ByClosing())
27598	result.Response = autorest.Response{Response: resp}
27599	return
27600}
27601
27602// RecoverSiteConfigurationSnapshot reverts the configuration of an app to a previous snapshot.
27603// Parameters:
27604// resourceGroupName - name of the resource group to which the resource belongs.
27605// name - name of the app.
27606// snapshotID - the ID of the snapshot to read.
27607func (client AppsClient) RecoverSiteConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string) (result autorest.Response, err error) {
27608	if tracing.IsEnabled() {
27609		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RecoverSiteConfigurationSnapshot")
27610		defer func() {
27611			sc := -1
27612			if result.Response != nil {
27613				sc = result.Response.StatusCode
27614			}
27615			tracing.EndSpan(ctx, sc, err)
27616		}()
27617	}
27618	if err := validation.Validate([]validation.Validation{
27619		{TargetValue: resourceGroupName,
27620			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27621				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27622				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27623		return result, validation.NewError("web.AppsClient", "RecoverSiteConfigurationSnapshot", err.Error())
27624	}
27625
27626	req, err := client.RecoverSiteConfigurationSnapshotPreparer(ctx, resourceGroupName, name, snapshotID)
27627	if err != nil {
27628		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshot", nil, "Failure preparing request")
27629		return
27630	}
27631
27632	resp, err := client.RecoverSiteConfigurationSnapshotSender(req)
27633	if err != nil {
27634		result.Response = resp
27635		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshot", resp, "Failure sending request")
27636		return
27637	}
27638
27639	result, err = client.RecoverSiteConfigurationSnapshotResponder(resp)
27640	if err != nil {
27641		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshot", resp, "Failure responding to request")
27642		return
27643	}
27644
27645	return
27646}
27647
27648// RecoverSiteConfigurationSnapshotPreparer prepares the RecoverSiteConfigurationSnapshot request.
27649func (client AppsClient) RecoverSiteConfigurationSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string) (*http.Request, error) {
27650	pathParameters := map[string]interface{}{
27651		"name":              autorest.Encode("path", name),
27652		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27653		"snapshotId":        autorest.Encode("path", snapshotID),
27654		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27655	}
27656
27657	const APIVersion = "2018-02-01"
27658	queryParameters := map[string]interface{}{
27659		"api-version": APIVersion,
27660	}
27661
27662	preparer := autorest.CreatePreparer(
27663		autorest.AsPost(),
27664		autorest.WithBaseURL(client.BaseURI),
27665		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover", pathParameters),
27666		autorest.WithQueryParameters(queryParameters))
27667	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27668}
27669
27670// RecoverSiteConfigurationSnapshotSender sends the RecoverSiteConfigurationSnapshot request. The method will close the
27671// http.Response Body if it receives an error.
27672func (client AppsClient) RecoverSiteConfigurationSnapshotSender(req *http.Request) (*http.Response, error) {
27673	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27674}
27675
27676// RecoverSiteConfigurationSnapshotResponder handles the response to the RecoverSiteConfigurationSnapshot request. The method always
27677// closes the http.Response Body.
27678func (client AppsClient) RecoverSiteConfigurationSnapshotResponder(resp *http.Response) (result autorest.Response, err error) {
27679	err = autorest.Respond(
27680		resp,
27681		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
27682		autorest.ByClosing())
27683	result.Response = resp
27684	return
27685}
27686
27687// RecoverSiteConfigurationSnapshotSlot reverts the configuration of an app to a previous snapshot.
27688// Parameters:
27689// resourceGroupName - name of the resource group to which the resource belongs.
27690// name - name of the app.
27691// snapshotID - the ID of the snapshot to read.
27692// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
27693// production slot.
27694func (client AppsClient) RecoverSiteConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (result autorest.Response, err error) {
27695	if tracing.IsEnabled() {
27696		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RecoverSiteConfigurationSnapshotSlot")
27697		defer func() {
27698			sc := -1
27699			if result.Response != nil {
27700				sc = result.Response.StatusCode
27701			}
27702			tracing.EndSpan(ctx, sc, err)
27703		}()
27704	}
27705	if err := validation.Validate([]validation.Validation{
27706		{TargetValue: resourceGroupName,
27707			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27708				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27709				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27710		return result, validation.NewError("web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", err.Error())
27711	}
27712
27713	req, err := client.RecoverSiteConfigurationSnapshotSlotPreparer(ctx, resourceGroupName, name, snapshotID, slot)
27714	if err != nil {
27715		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", nil, "Failure preparing request")
27716		return
27717	}
27718
27719	resp, err := client.RecoverSiteConfigurationSnapshotSlotSender(req)
27720	if err != nil {
27721		result.Response = resp
27722		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", resp, "Failure sending request")
27723		return
27724	}
27725
27726	result, err = client.RecoverSiteConfigurationSnapshotSlotResponder(resp)
27727	if err != nil {
27728		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", resp, "Failure responding to request")
27729		return
27730	}
27731
27732	return
27733}
27734
27735// RecoverSiteConfigurationSnapshotSlotPreparer prepares the RecoverSiteConfigurationSnapshotSlot request.
27736func (client AppsClient) RecoverSiteConfigurationSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (*http.Request, error) {
27737	pathParameters := map[string]interface{}{
27738		"name":              autorest.Encode("path", name),
27739		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27740		"slot":              autorest.Encode("path", slot),
27741		"snapshotId":        autorest.Encode("path", snapshotID),
27742		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27743	}
27744
27745	const APIVersion = "2018-02-01"
27746	queryParameters := map[string]interface{}{
27747		"api-version": APIVersion,
27748	}
27749
27750	preparer := autorest.CreatePreparer(
27751		autorest.AsPost(),
27752		autorest.WithBaseURL(client.BaseURI),
27753		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover", pathParameters),
27754		autorest.WithQueryParameters(queryParameters))
27755	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27756}
27757
27758// RecoverSiteConfigurationSnapshotSlotSender sends the RecoverSiteConfigurationSnapshotSlot request. The method will close the
27759// http.Response Body if it receives an error.
27760func (client AppsClient) RecoverSiteConfigurationSnapshotSlotSender(req *http.Request) (*http.Response, error) {
27761	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27762}
27763
27764// RecoverSiteConfigurationSnapshotSlotResponder handles the response to the RecoverSiteConfigurationSnapshotSlot request. The method always
27765// closes the http.Response Body.
27766func (client AppsClient) RecoverSiteConfigurationSnapshotSlotResponder(resp *http.Response) (result autorest.Response, err error) {
27767	err = autorest.Respond(
27768		resp,
27769		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
27770		autorest.ByClosing())
27771	result.Response = resp
27772	return
27773}
27774
27775// ResetProductionSlotConfig resets the configuration settings of the current slot if they were previously modified by
27776// calling the API with POST.
27777// Parameters:
27778// resourceGroupName - name of the resource group to which the resource belongs.
27779// name - name of the app.
27780func (client AppsClient) ResetProductionSlotConfig(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
27781	if tracing.IsEnabled() {
27782		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ResetProductionSlotConfig")
27783		defer func() {
27784			sc := -1
27785			if result.Response != nil {
27786				sc = result.Response.StatusCode
27787			}
27788			tracing.EndSpan(ctx, sc, err)
27789		}()
27790	}
27791	if err := validation.Validate([]validation.Validation{
27792		{TargetValue: resourceGroupName,
27793			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27794				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27795				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27796		return result, validation.NewError("web.AppsClient", "ResetProductionSlotConfig", err.Error())
27797	}
27798
27799	req, err := client.ResetProductionSlotConfigPreparer(ctx, resourceGroupName, name)
27800	if err != nil {
27801		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetProductionSlotConfig", nil, "Failure preparing request")
27802		return
27803	}
27804
27805	resp, err := client.ResetProductionSlotConfigSender(req)
27806	if err != nil {
27807		result.Response = resp
27808		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetProductionSlotConfig", resp, "Failure sending request")
27809		return
27810	}
27811
27812	result, err = client.ResetProductionSlotConfigResponder(resp)
27813	if err != nil {
27814		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetProductionSlotConfig", resp, "Failure responding to request")
27815		return
27816	}
27817
27818	return
27819}
27820
27821// ResetProductionSlotConfigPreparer prepares the ResetProductionSlotConfig request.
27822func (client AppsClient) ResetProductionSlotConfigPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
27823	pathParameters := map[string]interface{}{
27824		"name":              autorest.Encode("path", name),
27825		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27826		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27827	}
27828
27829	const APIVersion = "2018-02-01"
27830	queryParameters := map[string]interface{}{
27831		"api-version": APIVersion,
27832	}
27833
27834	preparer := autorest.CreatePreparer(
27835		autorest.AsPost(),
27836		autorest.WithBaseURL(client.BaseURI),
27837		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig", pathParameters),
27838		autorest.WithQueryParameters(queryParameters))
27839	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27840}
27841
27842// ResetProductionSlotConfigSender sends the ResetProductionSlotConfig request. The method will close the
27843// http.Response Body if it receives an error.
27844func (client AppsClient) ResetProductionSlotConfigSender(req *http.Request) (*http.Response, error) {
27845	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27846}
27847
27848// ResetProductionSlotConfigResponder handles the response to the ResetProductionSlotConfig request. The method always
27849// closes the http.Response Body.
27850func (client AppsClient) ResetProductionSlotConfigResponder(resp *http.Response) (result autorest.Response, err error) {
27851	err = autorest.Respond(
27852		resp,
27853		azure.WithErrorUnlessStatusCode(http.StatusOK),
27854		autorest.ByClosing())
27855	result.Response = resp
27856	return
27857}
27858
27859// ResetSlotConfigurationSlot resets the configuration settings of the current slot if they were previously modified by
27860// calling the API with POST.
27861// Parameters:
27862// resourceGroupName - name of the resource group to which the resource belongs.
27863// name - name of the app.
27864// slot - name of the deployment slot. If a slot is not specified, the API resets configuration settings for
27865// the production slot.
27866func (client AppsClient) ResetSlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
27867	if tracing.IsEnabled() {
27868		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ResetSlotConfigurationSlot")
27869		defer func() {
27870			sc := -1
27871			if result.Response != nil {
27872				sc = result.Response.StatusCode
27873			}
27874			tracing.EndSpan(ctx, sc, err)
27875		}()
27876	}
27877	if err := validation.Validate([]validation.Validation{
27878		{TargetValue: resourceGroupName,
27879			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27880				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27881				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27882		return result, validation.NewError("web.AppsClient", "ResetSlotConfigurationSlot", err.Error())
27883	}
27884
27885	req, err := client.ResetSlotConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
27886	if err != nil {
27887		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetSlotConfigurationSlot", nil, "Failure preparing request")
27888		return
27889	}
27890
27891	resp, err := client.ResetSlotConfigurationSlotSender(req)
27892	if err != nil {
27893		result.Response = resp
27894		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetSlotConfigurationSlot", resp, "Failure sending request")
27895		return
27896	}
27897
27898	result, err = client.ResetSlotConfigurationSlotResponder(resp)
27899	if err != nil {
27900		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetSlotConfigurationSlot", resp, "Failure responding to request")
27901		return
27902	}
27903
27904	return
27905}
27906
27907// ResetSlotConfigurationSlotPreparer prepares the ResetSlotConfigurationSlot request.
27908func (client AppsClient) ResetSlotConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
27909	pathParameters := map[string]interface{}{
27910		"name":              autorest.Encode("path", name),
27911		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27912		"slot":              autorest.Encode("path", slot),
27913		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27914	}
27915
27916	const APIVersion = "2018-02-01"
27917	queryParameters := map[string]interface{}{
27918		"api-version": APIVersion,
27919	}
27920
27921	preparer := autorest.CreatePreparer(
27922		autorest.AsPost(),
27923		autorest.WithBaseURL(client.BaseURI),
27924		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig", pathParameters),
27925		autorest.WithQueryParameters(queryParameters))
27926	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27927}
27928
27929// ResetSlotConfigurationSlotSender sends the ResetSlotConfigurationSlot request. The method will close the
27930// http.Response Body if it receives an error.
27931func (client AppsClient) ResetSlotConfigurationSlotSender(req *http.Request) (*http.Response, error) {
27932	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27933}
27934
27935// ResetSlotConfigurationSlotResponder handles the response to the ResetSlotConfigurationSlot request. The method always
27936// closes the http.Response Body.
27937func (client AppsClient) ResetSlotConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) {
27938	err = autorest.Respond(
27939		resp,
27940		azure.WithErrorUnlessStatusCode(http.StatusOK),
27941		autorest.ByClosing())
27942	result.Response = resp
27943	return
27944}
27945
27946// Restart restarts an app (or deployment slot, if specified).
27947// Parameters:
27948// resourceGroupName - name of the resource group to which the resource belongs.
27949// name - name of the app.
27950// softRestart - specify true to apply the configuration settings and restarts the app only if necessary. By
27951// default, the API always restarts and reprovisions the app.
27952// synchronous - specify true to block until the app is restarted. By default, it is set to false, and the API
27953// responds immediately (asynchronous).
27954func (client AppsClient) Restart(ctx context.Context, resourceGroupName string, name string, softRestart *bool, synchronous *bool) (result autorest.Response, err error) {
27955	if tracing.IsEnabled() {
27956		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Restart")
27957		defer func() {
27958			sc := -1
27959			if result.Response != nil {
27960				sc = result.Response.StatusCode
27961			}
27962			tracing.EndSpan(ctx, sc, err)
27963		}()
27964	}
27965	if err := validation.Validate([]validation.Validation{
27966		{TargetValue: resourceGroupName,
27967			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27968				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27969				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27970		return result, validation.NewError("web.AppsClient", "Restart", err.Error())
27971	}
27972
27973	req, err := client.RestartPreparer(ctx, resourceGroupName, name, softRestart, synchronous)
27974	if err != nil {
27975		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restart", nil, "Failure preparing request")
27976		return
27977	}
27978
27979	resp, err := client.RestartSender(req)
27980	if err != nil {
27981		result.Response = resp
27982		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restart", resp, "Failure sending request")
27983		return
27984	}
27985
27986	result, err = client.RestartResponder(resp)
27987	if err != nil {
27988		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restart", resp, "Failure responding to request")
27989		return
27990	}
27991
27992	return
27993}
27994
27995// RestartPreparer prepares the Restart request.
27996func (client AppsClient) RestartPreparer(ctx context.Context, resourceGroupName string, name string, softRestart *bool, synchronous *bool) (*http.Request, error) {
27997	pathParameters := map[string]interface{}{
27998		"name":              autorest.Encode("path", name),
27999		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28000		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28001	}
28002
28003	const APIVersion = "2018-02-01"
28004	queryParameters := map[string]interface{}{
28005		"api-version": APIVersion,
28006	}
28007	if softRestart != nil {
28008		queryParameters["softRestart"] = autorest.Encode("query", *softRestart)
28009	}
28010	if synchronous != nil {
28011		queryParameters["synchronous"] = autorest.Encode("query", *synchronous)
28012	}
28013
28014	preparer := autorest.CreatePreparer(
28015		autorest.AsPost(),
28016		autorest.WithBaseURL(client.BaseURI),
28017		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart", pathParameters),
28018		autorest.WithQueryParameters(queryParameters))
28019	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28020}
28021
28022// RestartSender sends the Restart request. The method will close the
28023// http.Response Body if it receives an error.
28024func (client AppsClient) RestartSender(req *http.Request) (*http.Response, error) {
28025	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28026}
28027
28028// RestartResponder handles the response to the Restart request. The method always
28029// closes the http.Response Body.
28030func (client AppsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
28031	err = autorest.Respond(
28032		resp,
28033		azure.WithErrorUnlessStatusCode(http.StatusOK),
28034		autorest.ByClosing())
28035	result.Response = resp
28036	return
28037}
28038
28039// RestartSlot restarts an app (or deployment slot, if specified).
28040// Parameters:
28041// resourceGroupName - name of the resource group to which the resource belongs.
28042// name - name of the app.
28043// slot - name of the deployment slot. If a slot is not specified, the API will restart the production slot.
28044// softRestart - specify true to apply the configuration settings and restarts the app only if necessary. By
28045// default, the API always restarts and reprovisions the app.
28046// synchronous - specify true to block until the app is restarted. By default, it is set to false, and the API
28047// responds immediately (asynchronous).
28048func (client AppsClient) RestartSlot(ctx context.Context, resourceGroupName string, name string, slot string, softRestart *bool, synchronous *bool) (result autorest.Response, err error) {
28049	if tracing.IsEnabled() {
28050		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestartSlot")
28051		defer func() {
28052			sc := -1
28053			if result.Response != nil {
28054				sc = result.Response.StatusCode
28055			}
28056			tracing.EndSpan(ctx, sc, err)
28057		}()
28058	}
28059	if err := validation.Validate([]validation.Validation{
28060		{TargetValue: resourceGroupName,
28061			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28062				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28063				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28064		return result, validation.NewError("web.AppsClient", "RestartSlot", err.Error())
28065	}
28066
28067	req, err := client.RestartSlotPreparer(ctx, resourceGroupName, name, slot, softRestart, synchronous)
28068	if err != nil {
28069		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestartSlot", nil, "Failure preparing request")
28070		return
28071	}
28072
28073	resp, err := client.RestartSlotSender(req)
28074	if err != nil {
28075		result.Response = resp
28076		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestartSlot", resp, "Failure sending request")
28077		return
28078	}
28079
28080	result, err = client.RestartSlotResponder(resp)
28081	if err != nil {
28082		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestartSlot", resp, "Failure responding to request")
28083		return
28084	}
28085
28086	return
28087}
28088
28089// RestartSlotPreparer prepares the RestartSlot request.
28090func (client AppsClient) RestartSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, softRestart *bool, synchronous *bool) (*http.Request, error) {
28091	pathParameters := map[string]interface{}{
28092		"name":              autorest.Encode("path", name),
28093		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28094		"slot":              autorest.Encode("path", slot),
28095		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28096	}
28097
28098	const APIVersion = "2018-02-01"
28099	queryParameters := map[string]interface{}{
28100		"api-version": APIVersion,
28101	}
28102	if softRestart != nil {
28103		queryParameters["softRestart"] = autorest.Encode("query", *softRestart)
28104	}
28105	if synchronous != nil {
28106		queryParameters["synchronous"] = autorest.Encode("query", *synchronous)
28107	}
28108
28109	preparer := autorest.CreatePreparer(
28110		autorest.AsPost(),
28111		autorest.WithBaseURL(client.BaseURI),
28112		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart", pathParameters),
28113		autorest.WithQueryParameters(queryParameters))
28114	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28115}
28116
28117// RestartSlotSender sends the RestartSlot request. The method will close the
28118// http.Response Body if it receives an error.
28119func (client AppsClient) RestartSlotSender(req *http.Request) (*http.Response, error) {
28120	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28121}
28122
28123// RestartSlotResponder handles the response to the RestartSlot request. The method always
28124// closes the http.Response Body.
28125func (client AppsClient) RestartSlotResponder(resp *http.Response) (result autorest.Response, err error) {
28126	err = autorest.Respond(
28127		resp,
28128		azure.WithErrorUnlessStatusCode(http.StatusOK),
28129		autorest.ByClosing())
28130	result.Response = resp
28131	return
28132}
28133
28134// Restore restores a specific backup to another app (or deployment slot, if specified).
28135// Parameters:
28136// resourceGroupName - name of the resource group to which the resource belongs.
28137// name - name of the app.
28138// backupID - ID of the backup.
28139// request - information on restore request .
28140func (client AppsClient) Restore(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest) (result AppsRestoreFuture, err error) {
28141	if tracing.IsEnabled() {
28142		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Restore")
28143		defer func() {
28144			sc := -1
28145			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
28146				sc = result.FutureAPI.Response().StatusCode
28147			}
28148			tracing.EndSpan(ctx, sc, err)
28149		}()
28150	}
28151	if err := validation.Validate([]validation.Validation{
28152		{TargetValue: resourceGroupName,
28153			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28154				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28155				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
28156		{TargetValue: request,
28157			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
28158				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
28159					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
28160				}}}}}); err != nil {
28161		return result, validation.NewError("web.AppsClient", "Restore", err.Error())
28162	}
28163
28164	req, err := client.RestorePreparer(ctx, resourceGroupName, name, backupID, request)
28165	if err != nil {
28166		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restore", nil, "Failure preparing request")
28167		return
28168	}
28169
28170	result, err = client.RestoreSender(req)
28171	if err != nil {
28172		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restore", nil, "Failure sending request")
28173		return
28174	}
28175
28176	return
28177}
28178
28179// RestorePreparer prepares the Restore request.
28180func (client AppsClient) RestorePreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest) (*http.Request, error) {
28181	pathParameters := map[string]interface{}{
28182		"backupId":          autorest.Encode("path", backupID),
28183		"name":              autorest.Encode("path", name),
28184		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28185		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28186	}
28187
28188	const APIVersion = "2018-02-01"
28189	queryParameters := map[string]interface{}{
28190		"api-version": APIVersion,
28191	}
28192
28193	preparer := autorest.CreatePreparer(
28194		autorest.AsContentType("application/json; charset=utf-8"),
28195		autorest.AsPost(),
28196		autorest.WithBaseURL(client.BaseURI),
28197		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore", pathParameters),
28198		autorest.WithJSON(request),
28199		autorest.WithQueryParameters(queryParameters))
28200	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28201}
28202
28203// RestoreSender sends the Restore request. The method will close the
28204// http.Response Body if it receives an error.
28205func (client AppsClient) RestoreSender(req *http.Request) (future AppsRestoreFuture, err error) {
28206	var resp *http.Response
28207	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
28208	if err != nil {
28209		return
28210	}
28211	var azf azure.Future
28212	azf, err = azure.NewFutureFromResponse(resp)
28213	future.FutureAPI = &azf
28214	future.Result = future.result
28215	return
28216}
28217
28218// RestoreResponder handles the response to the Restore request. The method always
28219// closes the http.Response Body.
28220func (client AppsClient) RestoreResponder(resp *http.Response) (result autorest.Response, err error) {
28221	err = autorest.Respond(
28222		resp,
28223		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
28224		autorest.ByClosing())
28225	result.Response = resp
28226	return
28227}
28228
28229// RestoreFromBackupBlob restores an app from a backup blob in Azure Storage.
28230// Parameters:
28231// resourceGroupName - name of the resource group to which the resource belongs.
28232// name - name of the app.
28233// request - information on restore request .
28234func (client AppsClient) RestoreFromBackupBlob(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (result AppsRestoreFromBackupBlobFuture, err error) {
28235	if tracing.IsEnabled() {
28236		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromBackupBlob")
28237		defer func() {
28238			sc := -1
28239			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
28240				sc = result.FutureAPI.Response().StatusCode
28241			}
28242			tracing.EndSpan(ctx, sc, err)
28243		}()
28244	}
28245	if err := validation.Validate([]validation.Validation{
28246		{TargetValue: resourceGroupName,
28247			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28248				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28249				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
28250		{TargetValue: request,
28251			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
28252				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
28253					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
28254				}}}}}); err != nil {
28255		return result, validation.NewError("web.AppsClient", "RestoreFromBackupBlob", err.Error())
28256	}
28257
28258	req, err := client.RestoreFromBackupBlobPreparer(ctx, resourceGroupName, name, request)
28259	if err != nil {
28260		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlob", nil, "Failure preparing request")
28261		return
28262	}
28263
28264	result, err = client.RestoreFromBackupBlobSender(req)
28265	if err != nil {
28266		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlob", nil, "Failure sending request")
28267		return
28268	}
28269
28270	return
28271}
28272
28273// RestoreFromBackupBlobPreparer prepares the RestoreFromBackupBlob request.
28274func (client AppsClient) RestoreFromBackupBlobPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (*http.Request, error) {
28275	pathParameters := map[string]interface{}{
28276		"name":              autorest.Encode("path", name),
28277		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28278		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28279	}
28280
28281	const APIVersion = "2018-02-01"
28282	queryParameters := map[string]interface{}{
28283		"api-version": APIVersion,
28284	}
28285
28286	preparer := autorest.CreatePreparer(
28287		autorest.AsContentType("application/json; charset=utf-8"),
28288		autorest.AsPost(),
28289		autorest.WithBaseURL(client.BaseURI),
28290		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob", pathParameters),
28291		autorest.WithJSON(request),
28292		autorest.WithQueryParameters(queryParameters))
28293	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28294}
28295
28296// RestoreFromBackupBlobSender sends the RestoreFromBackupBlob request. The method will close the
28297// http.Response Body if it receives an error.
28298func (client AppsClient) RestoreFromBackupBlobSender(req *http.Request) (future AppsRestoreFromBackupBlobFuture, err error) {
28299	var resp *http.Response
28300	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
28301	if err != nil {
28302		return
28303	}
28304	var azf azure.Future
28305	azf, err = azure.NewFutureFromResponse(resp)
28306	future.FutureAPI = &azf
28307	future.Result = future.result
28308	return
28309}
28310
28311// RestoreFromBackupBlobResponder handles the response to the RestoreFromBackupBlob request. The method always
28312// closes the http.Response Body.
28313func (client AppsClient) RestoreFromBackupBlobResponder(resp *http.Response) (result autorest.Response, err error) {
28314	err = autorest.Respond(
28315		resp,
28316		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
28317		autorest.ByClosing())
28318	result.Response = resp
28319	return
28320}
28321
28322// RestoreFromBackupBlobSlot restores an app from a backup blob in Azure Storage.
28323// Parameters:
28324// resourceGroupName - name of the resource group to which the resource belongs.
28325// name - name of the app.
28326// request - information on restore request .
28327// slot - name of the deployment slot. If a slot is not specified, the API will restore a backup of the
28328// production slot.
28329func (client AppsClient) RestoreFromBackupBlobSlot(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (result AppsRestoreFromBackupBlobSlotFuture, err error) {
28330	if tracing.IsEnabled() {
28331		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromBackupBlobSlot")
28332		defer func() {
28333			sc := -1
28334			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
28335				sc = result.FutureAPI.Response().StatusCode
28336			}
28337			tracing.EndSpan(ctx, sc, err)
28338		}()
28339	}
28340	if err := validation.Validate([]validation.Validation{
28341		{TargetValue: resourceGroupName,
28342			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28343				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28344				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
28345		{TargetValue: request,
28346			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
28347				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
28348					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
28349				}}}}}); err != nil {
28350		return result, validation.NewError("web.AppsClient", "RestoreFromBackupBlobSlot", err.Error())
28351	}
28352
28353	req, err := client.RestoreFromBackupBlobSlotPreparer(ctx, resourceGroupName, name, request, slot)
28354	if err != nil {
28355		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlobSlot", nil, "Failure preparing request")
28356		return
28357	}
28358
28359	result, err = client.RestoreFromBackupBlobSlotSender(req)
28360	if err != nil {
28361		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlobSlot", nil, "Failure sending request")
28362		return
28363	}
28364
28365	return
28366}
28367
28368// RestoreFromBackupBlobSlotPreparer prepares the RestoreFromBackupBlobSlot request.
28369func (client AppsClient) RestoreFromBackupBlobSlotPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (*http.Request, error) {
28370	pathParameters := map[string]interface{}{
28371		"name":              autorest.Encode("path", name),
28372		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28373		"slot":              autorest.Encode("path", slot),
28374		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28375	}
28376
28377	const APIVersion = "2018-02-01"
28378	queryParameters := map[string]interface{}{
28379		"api-version": APIVersion,
28380	}
28381
28382	preparer := autorest.CreatePreparer(
28383		autorest.AsContentType("application/json; charset=utf-8"),
28384		autorest.AsPost(),
28385		autorest.WithBaseURL(client.BaseURI),
28386		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob", pathParameters),
28387		autorest.WithJSON(request),
28388		autorest.WithQueryParameters(queryParameters))
28389	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28390}
28391
28392// RestoreFromBackupBlobSlotSender sends the RestoreFromBackupBlobSlot request. The method will close the
28393// http.Response Body if it receives an error.
28394func (client AppsClient) RestoreFromBackupBlobSlotSender(req *http.Request) (future AppsRestoreFromBackupBlobSlotFuture, err error) {
28395	var resp *http.Response
28396	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
28397	if err != nil {
28398		return
28399	}
28400	var azf azure.Future
28401	azf, err = azure.NewFutureFromResponse(resp)
28402	future.FutureAPI = &azf
28403	future.Result = future.result
28404	return
28405}
28406
28407// RestoreFromBackupBlobSlotResponder handles the response to the RestoreFromBackupBlobSlot request. The method always
28408// closes the http.Response Body.
28409func (client AppsClient) RestoreFromBackupBlobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
28410	err = autorest.Respond(
28411		resp,
28412		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
28413		autorest.ByClosing())
28414	result.Response = resp
28415	return
28416}
28417
28418// RestoreFromDeletedApp restores a deleted web app to this web app.
28419// Parameters:
28420// resourceGroupName - name of the resource group to which the resource belongs.
28421// name - name of web app.
28422// restoreRequest - deleted web app restore information.
28423func (client AppsClient) RestoreFromDeletedApp(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest) (result AppsRestoreFromDeletedAppFuture, err error) {
28424	if tracing.IsEnabled() {
28425		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromDeletedApp")
28426		defer func() {
28427			sc := -1
28428			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
28429				sc = result.FutureAPI.Response().StatusCode
28430			}
28431			tracing.EndSpan(ctx, sc, err)
28432		}()
28433	}
28434	if err := validation.Validate([]validation.Validation{
28435		{TargetValue: resourceGroupName,
28436			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28437				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28438				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28439		return result, validation.NewError("web.AppsClient", "RestoreFromDeletedApp", err.Error())
28440	}
28441
28442	req, err := client.RestoreFromDeletedAppPreparer(ctx, resourceGroupName, name, restoreRequest)
28443	if err != nil {
28444		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedApp", nil, "Failure preparing request")
28445		return
28446	}
28447
28448	result, err = client.RestoreFromDeletedAppSender(req)
28449	if err != nil {
28450		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedApp", nil, "Failure sending request")
28451		return
28452	}
28453
28454	return
28455}
28456
28457// RestoreFromDeletedAppPreparer prepares the RestoreFromDeletedApp request.
28458func (client AppsClient) RestoreFromDeletedAppPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest) (*http.Request, error) {
28459	pathParameters := map[string]interface{}{
28460		"name":              autorest.Encode("path", name),
28461		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28462		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28463	}
28464
28465	const APIVersion = "2018-02-01"
28466	queryParameters := map[string]interface{}{
28467		"api-version": APIVersion,
28468	}
28469
28470	preparer := autorest.CreatePreparer(
28471		autorest.AsContentType("application/json; charset=utf-8"),
28472		autorest.AsPost(),
28473		autorest.WithBaseURL(client.BaseURI),
28474		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp", pathParameters),
28475		autorest.WithJSON(restoreRequest),
28476		autorest.WithQueryParameters(queryParameters))
28477	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28478}
28479
28480// RestoreFromDeletedAppSender sends the RestoreFromDeletedApp request. The method will close the
28481// http.Response Body if it receives an error.
28482func (client AppsClient) RestoreFromDeletedAppSender(req *http.Request) (future AppsRestoreFromDeletedAppFuture, err error) {
28483	var resp *http.Response
28484	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
28485	if err != nil {
28486		return
28487	}
28488	var azf azure.Future
28489	azf, err = azure.NewFutureFromResponse(resp)
28490	future.FutureAPI = &azf
28491	future.Result = future.result
28492	return
28493}
28494
28495// RestoreFromDeletedAppResponder handles the response to the RestoreFromDeletedApp request. The method always
28496// closes the http.Response Body.
28497func (client AppsClient) RestoreFromDeletedAppResponder(resp *http.Response) (result autorest.Response, err error) {
28498	err = autorest.Respond(
28499		resp,
28500		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
28501		autorest.ByClosing())
28502	result.Response = resp
28503	return
28504}
28505
28506// RestoreFromDeletedAppSlot restores a deleted web app to this web app.
28507// Parameters:
28508// resourceGroupName - name of the resource group to which the resource belongs.
28509// name - name of web app.
28510// restoreRequest - deleted web app restore information.
28511// slot - name of web app slot. If not specified then will default to production slot.
28512func (client AppsClient) RestoreFromDeletedAppSlot(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, slot string) (result AppsRestoreFromDeletedAppSlotFuture, err error) {
28513	if tracing.IsEnabled() {
28514		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromDeletedAppSlot")
28515		defer func() {
28516			sc := -1
28517			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
28518				sc = result.FutureAPI.Response().StatusCode
28519			}
28520			tracing.EndSpan(ctx, sc, err)
28521		}()
28522	}
28523	if err := validation.Validate([]validation.Validation{
28524		{TargetValue: resourceGroupName,
28525			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28526				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28527				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28528		return result, validation.NewError("web.AppsClient", "RestoreFromDeletedAppSlot", err.Error())
28529	}
28530
28531	req, err := client.RestoreFromDeletedAppSlotPreparer(ctx, resourceGroupName, name, restoreRequest, slot)
28532	if err != nil {
28533		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedAppSlot", nil, "Failure preparing request")
28534		return
28535	}
28536
28537	result, err = client.RestoreFromDeletedAppSlotSender(req)
28538	if err != nil {
28539		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedAppSlot", nil, "Failure sending request")
28540		return
28541	}
28542
28543	return
28544}
28545
28546// RestoreFromDeletedAppSlotPreparer prepares the RestoreFromDeletedAppSlot request.
28547func (client AppsClient) RestoreFromDeletedAppSlotPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, slot string) (*http.Request, error) {
28548	pathParameters := map[string]interface{}{
28549		"name":              autorest.Encode("path", name),
28550		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28551		"slot":              autorest.Encode("path", slot),
28552		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28553	}
28554
28555	const APIVersion = "2018-02-01"
28556	queryParameters := map[string]interface{}{
28557		"api-version": APIVersion,
28558	}
28559
28560	preparer := autorest.CreatePreparer(
28561		autorest.AsContentType("application/json; charset=utf-8"),
28562		autorest.AsPost(),
28563		autorest.WithBaseURL(client.BaseURI),
28564		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp", pathParameters),
28565		autorest.WithJSON(restoreRequest),
28566		autorest.WithQueryParameters(queryParameters))
28567	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28568}
28569
28570// RestoreFromDeletedAppSlotSender sends the RestoreFromDeletedAppSlot request. The method will close the
28571// http.Response Body if it receives an error.
28572func (client AppsClient) RestoreFromDeletedAppSlotSender(req *http.Request) (future AppsRestoreFromDeletedAppSlotFuture, err error) {
28573	var resp *http.Response
28574	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
28575	if err != nil {
28576		return
28577	}
28578	var azf azure.Future
28579	azf, err = azure.NewFutureFromResponse(resp)
28580	future.FutureAPI = &azf
28581	future.Result = future.result
28582	return
28583}
28584
28585// RestoreFromDeletedAppSlotResponder handles the response to the RestoreFromDeletedAppSlot request. The method always
28586// closes the http.Response Body.
28587func (client AppsClient) RestoreFromDeletedAppSlotResponder(resp *http.Response) (result autorest.Response, err error) {
28588	err = autorest.Respond(
28589		resp,
28590		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
28591		autorest.ByClosing())
28592	result.Response = resp
28593	return
28594}
28595
28596// RestoreSlot restores a specific backup to another app (or deployment slot, if specified).
28597// Parameters:
28598// resourceGroupName - name of the resource group to which the resource belongs.
28599// name - name of the app.
28600// backupID - ID of the backup.
28601// request - information on restore request .
28602// slot - name of the deployment slot. If a slot is not specified, the API will restore a backup of the
28603// production slot.
28604func (client AppsClient) RestoreSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, slot string) (result AppsRestoreSlotFuture, err error) {
28605	if tracing.IsEnabled() {
28606		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreSlot")
28607		defer func() {
28608			sc := -1
28609			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
28610				sc = result.FutureAPI.Response().StatusCode
28611			}
28612			tracing.EndSpan(ctx, sc, err)
28613		}()
28614	}
28615	if err := validation.Validate([]validation.Validation{
28616		{TargetValue: resourceGroupName,
28617			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28618				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28619				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
28620		{TargetValue: request,
28621			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
28622				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
28623					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
28624				}}}}}); err != nil {
28625		return result, validation.NewError("web.AppsClient", "RestoreSlot", err.Error())
28626	}
28627
28628	req, err := client.RestoreSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot)
28629	if err != nil {
28630		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSlot", nil, "Failure preparing request")
28631		return
28632	}
28633
28634	result, err = client.RestoreSlotSender(req)
28635	if err != nil {
28636		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSlot", nil, "Failure sending request")
28637		return
28638	}
28639
28640	return
28641}
28642
28643// RestoreSlotPreparer prepares the RestoreSlot request.
28644func (client AppsClient) RestoreSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, slot string) (*http.Request, error) {
28645	pathParameters := map[string]interface{}{
28646		"backupId":          autorest.Encode("path", backupID),
28647		"name":              autorest.Encode("path", name),
28648		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28649		"slot":              autorest.Encode("path", slot),
28650		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28651	}
28652
28653	const APIVersion = "2018-02-01"
28654	queryParameters := map[string]interface{}{
28655		"api-version": APIVersion,
28656	}
28657
28658	preparer := autorest.CreatePreparer(
28659		autorest.AsContentType("application/json; charset=utf-8"),
28660		autorest.AsPost(),
28661		autorest.WithBaseURL(client.BaseURI),
28662		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore", pathParameters),
28663		autorest.WithJSON(request),
28664		autorest.WithQueryParameters(queryParameters))
28665	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28666}
28667
28668// RestoreSlotSender sends the RestoreSlot request. The method will close the
28669// http.Response Body if it receives an error.
28670func (client AppsClient) RestoreSlotSender(req *http.Request) (future AppsRestoreSlotFuture, err error) {
28671	var resp *http.Response
28672	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
28673	if err != nil {
28674		return
28675	}
28676	var azf azure.Future
28677	azf, err = azure.NewFutureFromResponse(resp)
28678	future.FutureAPI = &azf
28679	future.Result = future.result
28680	return
28681}
28682
28683// RestoreSlotResponder handles the response to the RestoreSlot request. The method always
28684// closes the http.Response Body.
28685func (client AppsClient) RestoreSlotResponder(resp *http.Response) (result autorest.Response, err error) {
28686	err = autorest.Respond(
28687		resp,
28688		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
28689		autorest.ByClosing())
28690	result.Response = resp
28691	return
28692}
28693
28694// RestoreSnapshot restores a web app from a snapshot.
28695// Parameters:
28696// resourceGroupName - name of the resource group to which the resource belongs.
28697// name - name of web app.
28698// restoreRequest - snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites
28699// or GetSiteSnapshots API.
28700func (client AppsClient) RestoreSnapshot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest) (result AppsRestoreSnapshotFuture, err error) {
28701	if tracing.IsEnabled() {
28702		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreSnapshot")
28703		defer func() {
28704			sc := -1
28705			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
28706				sc = result.FutureAPI.Response().StatusCode
28707			}
28708			tracing.EndSpan(ctx, sc, err)
28709		}()
28710	}
28711	if err := validation.Validate([]validation.Validation{
28712		{TargetValue: resourceGroupName,
28713			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28714				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28715				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
28716		{TargetValue: restoreRequest,
28717			Constraints: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties", Name: validation.Null, Rule: false,
28718				Chain: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
28719		return result, validation.NewError("web.AppsClient", "RestoreSnapshot", err.Error())
28720	}
28721
28722	req, err := client.RestoreSnapshotPreparer(ctx, resourceGroupName, name, restoreRequest)
28723	if err != nil {
28724		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshot", nil, "Failure preparing request")
28725		return
28726	}
28727
28728	result, err = client.RestoreSnapshotSender(req)
28729	if err != nil {
28730		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshot", nil, "Failure sending request")
28731		return
28732	}
28733
28734	return
28735}
28736
28737// RestoreSnapshotPreparer prepares the RestoreSnapshot request.
28738func (client AppsClient) RestoreSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest) (*http.Request, error) {
28739	pathParameters := map[string]interface{}{
28740		"name":              autorest.Encode("path", name),
28741		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28742		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28743	}
28744
28745	const APIVersion = "2018-02-01"
28746	queryParameters := map[string]interface{}{
28747		"api-version": APIVersion,
28748	}
28749
28750	preparer := autorest.CreatePreparer(
28751		autorest.AsContentType("application/json; charset=utf-8"),
28752		autorest.AsPost(),
28753		autorest.WithBaseURL(client.BaseURI),
28754		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot", pathParameters),
28755		autorest.WithJSON(restoreRequest),
28756		autorest.WithQueryParameters(queryParameters))
28757	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28758}
28759
28760// RestoreSnapshotSender sends the RestoreSnapshot request. The method will close the
28761// http.Response Body if it receives an error.
28762func (client AppsClient) RestoreSnapshotSender(req *http.Request) (future AppsRestoreSnapshotFuture, err error) {
28763	var resp *http.Response
28764	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
28765	if err != nil {
28766		return
28767	}
28768	var azf azure.Future
28769	azf, err = azure.NewFutureFromResponse(resp)
28770	future.FutureAPI = &azf
28771	future.Result = future.result
28772	return
28773}
28774
28775// RestoreSnapshotResponder handles the response to the RestoreSnapshot request. The method always
28776// closes the http.Response Body.
28777func (client AppsClient) RestoreSnapshotResponder(resp *http.Response) (result autorest.Response, err error) {
28778	err = autorest.Respond(
28779		resp,
28780		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
28781		autorest.ByClosing())
28782	result.Response = resp
28783	return
28784}
28785
28786// RestoreSnapshotSlot restores a web app from a snapshot.
28787// Parameters:
28788// resourceGroupName - name of the resource group to which the resource belongs.
28789// name - name of web app.
28790// restoreRequest - snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites
28791// or GetSiteSnapshots API.
28792// slot - name of web app slot. If not specified then will default to production slot.
28793func (client AppsClient) RestoreSnapshotSlot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, slot string) (result AppsRestoreSnapshotSlotFuture, err error) {
28794	if tracing.IsEnabled() {
28795		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreSnapshotSlot")
28796		defer func() {
28797			sc := -1
28798			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
28799				sc = result.FutureAPI.Response().StatusCode
28800			}
28801			tracing.EndSpan(ctx, sc, err)
28802		}()
28803	}
28804	if err := validation.Validate([]validation.Validation{
28805		{TargetValue: resourceGroupName,
28806			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28807				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28808				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
28809		{TargetValue: restoreRequest,
28810			Constraints: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties", Name: validation.Null, Rule: false,
28811				Chain: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
28812		return result, validation.NewError("web.AppsClient", "RestoreSnapshotSlot", err.Error())
28813	}
28814
28815	req, err := client.RestoreSnapshotSlotPreparer(ctx, resourceGroupName, name, restoreRequest, slot)
28816	if err != nil {
28817		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshotSlot", nil, "Failure preparing request")
28818		return
28819	}
28820
28821	result, err = client.RestoreSnapshotSlotSender(req)
28822	if err != nil {
28823		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshotSlot", nil, "Failure sending request")
28824		return
28825	}
28826
28827	return
28828}
28829
28830// RestoreSnapshotSlotPreparer prepares the RestoreSnapshotSlot request.
28831func (client AppsClient) RestoreSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, slot string) (*http.Request, error) {
28832	pathParameters := map[string]interface{}{
28833		"name":              autorest.Encode("path", name),
28834		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28835		"slot":              autorest.Encode("path", slot),
28836		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28837	}
28838
28839	const APIVersion = "2018-02-01"
28840	queryParameters := map[string]interface{}{
28841		"api-version": APIVersion,
28842	}
28843
28844	preparer := autorest.CreatePreparer(
28845		autorest.AsContentType("application/json; charset=utf-8"),
28846		autorest.AsPost(),
28847		autorest.WithBaseURL(client.BaseURI),
28848		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot", pathParameters),
28849		autorest.WithJSON(restoreRequest),
28850		autorest.WithQueryParameters(queryParameters))
28851	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28852}
28853
28854// RestoreSnapshotSlotSender sends the RestoreSnapshotSlot request. The method will close the
28855// http.Response Body if it receives an error.
28856func (client AppsClient) RestoreSnapshotSlotSender(req *http.Request) (future AppsRestoreSnapshotSlotFuture, err error) {
28857	var resp *http.Response
28858	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
28859	if err != nil {
28860		return
28861	}
28862	var azf azure.Future
28863	azf, err = azure.NewFutureFromResponse(resp)
28864	future.FutureAPI = &azf
28865	future.Result = future.result
28866	return
28867}
28868
28869// RestoreSnapshotSlotResponder handles the response to the RestoreSnapshotSlot request. The method always
28870// closes the http.Response Body.
28871func (client AppsClient) RestoreSnapshotSlotResponder(resp *http.Response) (result autorest.Response, err error) {
28872	err = autorest.Respond(
28873		resp,
28874		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
28875		autorest.ByClosing())
28876	result.Response = resp
28877	return
28878}
28879
28880// RunTriggeredWebJob run a triggered web job for an app, or a deployment slot.
28881// Parameters:
28882// resourceGroupName - name of the resource group to which the resource belongs.
28883// name - site name.
28884// webJobName - name of Web Job.
28885func (client AppsClient) RunTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
28886	if tracing.IsEnabled() {
28887		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RunTriggeredWebJob")
28888		defer func() {
28889			sc := -1
28890			if result.Response != nil {
28891				sc = result.Response.StatusCode
28892			}
28893			tracing.EndSpan(ctx, sc, err)
28894		}()
28895	}
28896	if err := validation.Validate([]validation.Validation{
28897		{TargetValue: resourceGroupName,
28898			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28899				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28900				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28901		return result, validation.NewError("web.AppsClient", "RunTriggeredWebJob", err.Error())
28902	}
28903
28904	req, err := client.RunTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName)
28905	if err != nil {
28906		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", nil, "Failure preparing request")
28907		return
28908	}
28909
28910	resp, err := client.RunTriggeredWebJobSender(req)
28911	if err != nil {
28912		result.Response = resp
28913		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", resp, "Failure sending request")
28914		return
28915	}
28916
28917	result, err = client.RunTriggeredWebJobResponder(resp)
28918	if err != nil {
28919		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", resp, "Failure responding to request")
28920		return
28921	}
28922
28923	return
28924}
28925
28926// RunTriggeredWebJobPreparer prepares the RunTriggeredWebJob request.
28927func (client AppsClient) RunTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
28928	pathParameters := map[string]interface{}{
28929		"name":              autorest.Encode("path", name),
28930		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28931		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28932		"webJobName":        autorest.Encode("path", webJobName),
28933	}
28934
28935	const APIVersion = "2018-02-01"
28936	queryParameters := map[string]interface{}{
28937		"api-version": APIVersion,
28938	}
28939
28940	preparer := autorest.CreatePreparer(
28941		autorest.AsPost(),
28942		autorest.WithBaseURL(client.BaseURI),
28943		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run", pathParameters),
28944		autorest.WithQueryParameters(queryParameters))
28945	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28946}
28947
28948// RunTriggeredWebJobSender sends the RunTriggeredWebJob request. The method will close the
28949// http.Response Body if it receives an error.
28950func (client AppsClient) RunTriggeredWebJobSender(req *http.Request) (*http.Response, error) {
28951	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28952}
28953
28954// RunTriggeredWebJobResponder handles the response to the RunTriggeredWebJob request. The method always
28955// closes the http.Response Body.
28956func (client AppsClient) RunTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
28957	err = autorest.Respond(
28958		resp,
28959		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
28960		autorest.ByClosing())
28961	result.Response = resp
28962	return
28963}
28964
28965// RunTriggeredWebJobSlot run a triggered web job for an app, or a deployment slot.
28966// Parameters:
28967// resourceGroupName - name of the resource group to which the resource belongs.
28968// name - site name.
28969// webJobName - name of Web Job.
28970// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
28971// production slot.
28972func (client AppsClient) RunTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
28973	if tracing.IsEnabled() {
28974		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RunTriggeredWebJobSlot")
28975		defer func() {
28976			sc := -1
28977			if result.Response != nil {
28978				sc = result.Response.StatusCode
28979			}
28980			tracing.EndSpan(ctx, sc, err)
28981		}()
28982	}
28983	if err := validation.Validate([]validation.Validation{
28984		{TargetValue: resourceGroupName,
28985			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28986				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28987				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28988		return result, validation.NewError("web.AppsClient", "RunTriggeredWebJobSlot", err.Error())
28989	}
28990
28991	req, err := client.RunTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
28992	if err != nil {
28993		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", nil, "Failure preparing request")
28994		return
28995	}
28996
28997	resp, err := client.RunTriggeredWebJobSlotSender(req)
28998	if err != nil {
28999		result.Response = resp
29000		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", resp, "Failure sending request")
29001		return
29002	}
29003
29004	result, err = client.RunTriggeredWebJobSlotResponder(resp)
29005	if err != nil {
29006		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", resp, "Failure responding to request")
29007		return
29008	}
29009
29010	return
29011}
29012
29013// RunTriggeredWebJobSlotPreparer prepares the RunTriggeredWebJobSlot request.
29014func (client AppsClient) RunTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
29015	pathParameters := map[string]interface{}{
29016		"name":              autorest.Encode("path", name),
29017		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29018		"slot":              autorest.Encode("path", slot),
29019		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29020		"webJobName":        autorest.Encode("path", webJobName),
29021	}
29022
29023	const APIVersion = "2018-02-01"
29024	queryParameters := map[string]interface{}{
29025		"api-version": APIVersion,
29026	}
29027
29028	preparer := autorest.CreatePreparer(
29029		autorest.AsPost(),
29030		autorest.WithBaseURL(client.BaseURI),
29031		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run", pathParameters),
29032		autorest.WithQueryParameters(queryParameters))
29033	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29034}
29035
29036// RunTriggeredWebJobSlotSender sends the RunTriggeredWebJobSlot request. The method will close the
29037// http.Response Body if it receives an error.
29038func (client AppsClient) RunTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) {
29039	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29040}
29041
29042// RunTriggeredWebJobSlotResponder handles the response to the RunTriggeredWebJobSlot request. The method always
29043// closes the http.Response Body.
29044func (client AppsClient) RunTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
29045	err = autorest.Respond(
29046		resp,
29047		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
29048		autorest.ByClosing())
29049	result.Response = resp
29050	return
29051}
29052
29053// Start starts an app (or deployment slot, if specified).
29054// Parameters:
29055// resourceGroupName - name of the resource group to which the resource belongs.
29056// name - name of the app.
29057func (client AppsClient) Start(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
29058	if tracing.IsEnabled() {
29059		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Start")
29060		defer func() {
29061			sc := -1
29062			if result.Response != nil {
29063				sc = result.Response.StatusCode
29064			}
29065			tracing.EndSpan(ctx, sc, err)
29066		}()
29067	}
29068	if err := validation.Validate([]validation.Validation{
29069		{TargetValue: resourceGroupName,
29070			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29071				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29072				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29073		return result, validation.NewError("web.AppsClient", "Start", err.Error())
29074	}
29075
29076	req, err := client.StartPreparer(ctx, resourceGroupName, name)
29077	if err != nil {
29078		err = autorest.NewErrorWithError(err, "web.AppsClient", "Start", nil, "Failure preparing request")
29079		return
29080	}
29081
29082	resp, err := client.StartSender(req)
29083	if err != nil {
29084		result.Response = resp
29085		err = autorest.NewErrorWithError(err, "web.AppsClient", "Start", resp, "Failure sending request")
29086		return
29087	}
29088
29089	result, err = client.StartResponder(resp)
29090	if err != nil {
29091		err = autorest.NewErrorWithError(err, "web.AppsClient", "Start", resp, "Failure responding to request")
29092		return
29093	}
29094
29095	return
29096}
29097
29098// StartPreparer prepares the Start request.
29099func (client AppsClient) StartPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
29100	pathParameters := map[string]interface{}{
29101		"name":              autorest.Encode("path", name),
29102		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29103		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29104	}
29105
29106	const APIVersion = "2018-02-01"
29107	queryParameters := map[string]interface{}{
29108		"api-version": APIVersion,
29109	}
29110
29111	preparer := autorest.CreatePreparer(
29112		autorest.AsPost(),
29113		autorest.WithBaseURL(client.BaseURI),
29114		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start", pathParameters),
29115		autorest.WithQueryParameters(queryParameters))
29116	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29117}
29118
29119// StartSender sends the Start request. The method will close the
29120// http.Response Body if it receives an error.
29121func (client AppsClient) StartSender(req *http.Request) (*http.Response, error) {
29122	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29123}
29124
29125// StartResponder handles the response to the Start request. The method always
29126// closes the http.Response Body.
29127func (client AppsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
29128	err = autorest.Respond(
29129		resp,
29130		azure.WithErrorUnlessStatusCode(http.StatusOK),
29131		autorest.ByClosing())
29132	result.Response = resp
29133	return
29134}
29135
29136// StartContinuousWebJob start a continuous web job for an app, or a deployment slot.
29137// Parameters:
29138// resourceGroupName - name of the resource group to which the resource belongs.
29139// name - site name.
29140// webJobName - name of Web Job.
29141func (client AppsClient) StartContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
29142	if tracing.IsEnabled() {
29143		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartContinuousWebJob")
29144		defer func() {
29145			sc := -1
29146			if result.Response != nil {
29147				sc = result.Response.StatusCode
29148			}
29149			tracing.EndSpan(ctx, sc, err)
29150		}()
29151	}
29152	if err := validation.Validate([]validation.Validation{
29153		{TargetValue: resourceGroupName,
29154			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29155				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29156				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29157		return result, validation.NewError("web.AppsClient", "StartContinuousWebJob", err.Error())
29158	}
29159
29160	req, err := client.StartContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
29161	if err != nil {
29162		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", nil, "Failure preparing request")
29163		return
29164	}
29165
29166	resp, err := client.StartContinuousWebJobSender(req)
29167	if err != nil {
29168		result.Response = resp
29169		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", resp, "Failure sending request")
29170		return
29171	}
29172
29173	result, err = client.StartContinuousWebJobResponder(resp)
29174	if err != nil {
29175		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", resp, "Failure responding to request")
29176		return
29177	}
29178
29179	return
29180}
29181
29182// StartContinuousWebJobPreparer prepares the StartContinuousWebJob request.
29183func (client AppsClient) StartContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
29184	pathParameters := map[string]interface{}{
29185		"name":              autorest.Encode("path", name),
29186		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29187		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29188		"webJobName":        autorest.Encode("path", webJobName),
29189	}
29190
29191	const APIVersion = "2018-02-01"
29192	queryParameters := map[string]interface{}{
29193		"api-version": APIVersion,
29194	}
29195
29196	preparer := autorest.CreatePreparer(
29197		autorest.AsPost(),
29198		autorest.WithBaseURL(client.BaseURI),
29199		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start", pathParameters),
29200		autorest.WithQueryParameters(queryParameters))
29201	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29202}
29203
29204// StartContinuousWebJobSender sends the StartContinuousWebJob request. The method will close the
29205// http.Response Body if it receives an error.
29206func (client AppsClient) StartContinuousWebJobSender(req *http.Request) (*http.Response, error) {
29207	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29208}
29209
29210// StartContinuousWebJobResponder handles the response to the StartContinuousWebJob request. The method always
29211// closes the http.Response Body.
29212func (client AppsClient) StartContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
29213	err = autorest.Respond(
29214		resp,
29215		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
29216		autorest.ByClosing())
29217	result.Response = resp
29218	return
29219}
29220
29221// StartContinuousWebJobSlot start a continuous web job for an app, or a deployment slot.
29222// Parameters:
29223// resourceGroupName - name of the resource group to which the resource belongs.
29224// name - site name.
29225// webJobName - name of Web Job.
29226// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
29227// production slot.
29228func (client AppsClient) StartContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
29229	if tracing.IsEnabled() {
29230		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartContinuousWebJobSlot")
29231		defer func() {
29232			sc := -1
29233			if result.Response != nil {
29234				sc = result.Response.StatusCode
29235			}
29236			tracing.EndSpan(ctx, sc, err)
29237		}()
29238	}
29239	if err := validation.Validate([]validation.Validation{
29240		{TargetValue: resourceGroupName,
29241			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29242				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29243				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29244		return result, validation.NewError("web.AppsClient", "StartContinuousWebJobSlot", err.Error())
29245	}
29246
29247	req, err := client.StartContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
29248	if err != nil {
29249		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", nil, "Failure preparing request")
29250		return
29251	}
29252
29253	resp, err := client.StartContinuousWebJobSlotSender(req)
29254	if err != nil {
29255		result.Response = resp
29256		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", resp, "Failure sending request")
29257		return
29258	}
29259
29260	result, err = client.StartContinuousWebJobSlotResponder(resp)
29261	if err != nil {
29262		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", resp, "Failure responding to request")
29263		return
29264	}
29265
29266	return
29267}
29268
29269// StartContinuousWebJobSlotPreparer prepares the StartContinuousWebJobSlot request.
29270func (client AppsClient) StartContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
29271	pathParameters := map[string]interface{}{
29272		"name":              autorest.Encode("path", name),
29273		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29274		"slot":              autorest.Encode("path", slot),
29275		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29276		"webJobName":        autorest.Encode("path", webJobName),
29277	}
29278
29279	const APIVersion = "2018-02-01"
29280	queryParameters := map[string]interface{}{
29281		"api-version": APIVersion,
29282	}
29283
29284	preparer := autorest.CreatePreparer(
29285		autorest.AsPost(),
29286		autorest.WithBaseURL(client.BaseURI),
29287		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start", pathParameters),
29288		autorest.WithQueryParameters(queryParameters))
29289	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29290}
29291
29292// StartContinuousWebJobSlotSender sends the StartContinuousWebJobSlot request. The method will close the
29293// http.Response Body if it receives an error.
29294func (client AppsClient) StartContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
29295	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29296}
29297
29298// StartContinuousWebJobSlotResponder handles the response to the StartContinuousWebJobSlot request. The method always
29299// closes the http.Response Body.
29300func (client AppsClient) StartContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
29301	err = autorest.Respond(
29302		resp,
29303		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
29304		autorest.ByClosing())
29305	result.Response = resp
29306	return
29307}
29308
29309// StartNetworkTrace start capturing network packets for the site.
29310// Parameters:
29311// resourceGroupName - name of the resource group to which the resource belongs.
29312// name - the name of the web app.
29313// durationInSeconds - the duration to keep capturing in seconds.
29314// maxFrameLength - the maximum frame length in bytes (Optional).
29315// sasURL - the Blob URL to store capture file.
29316func (client AppsClient) StartNetworkTrace(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartNetworkTraceFuture, err error) {
29317	if tracing.IsEnabled() {
29318		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartNetworkTrace")
29319		defer func() {
29320			sc := -1
29321			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29322				sc = result.FutureAPI.Response().StatusCode
29323			}
29324			tracing.EndSpan(ctx, sc, err)
29325		}()
29326	}
29327	if err := validation.Validate([]validation.Validation{
29328		{TargetValue: resourceGroupName,
29329			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29330				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29331				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29332		return result, validation.NewError("web.AppsClient", "StartNetworkTrace", err.Error())
29333	}
29334
29335	req, err := client.StartNetworkTracePreparer(ctx, resourceGroupName, name, durationInSeconds, maxFrameLength, sasURL)
29336	if err != nil {
29337		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTrace", nil, "Failure preparing request")
29338		return
29339	}
29340
29341	result, err = client.StartNetworkTraceSender(req)
29342	if err != nil {
29343		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTrace", nil, "Failure sending request")
29344		return
29345	}
29346
29347	return
29348}
29349
29350// StartNetworkTracePreparer prepares the StartNetworkTrace request.
29351func (client AppsClient) StartNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
29352	pathParameters := map[string]interface{}{
29353		"name":              autorest.Encode("path", name),
29354		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29355		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29356	}
29357
29358	const APIVersion = "2018-02-01"
29359	queryParameters := map[string]interface{}{
29360		"api-version": APIVersion,
29361	}
29362	if durationInSeconds != nil {
29363		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
29364	}
29365	if maxFrameLength != nil {
29366		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
29367	}
29368	if len(sasURL) > 0 {
29369		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
29370	}
29371
29372	preparer := autorest.CreatePreparer(
29373		autorest.AsPost(),
29374		autorest.WithBaseURL(client.BaseURI),
29375		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace", pathParameters),
29376		autorest.WithQueryParameters(queryParameters))
29377	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29378}
29379
29380// StartNetworkTraceSender sends the StartNetworkTrace request. The method will close the
29381// http.Response Body if it receives an error.
29382func (client AppsClient) StartNetworkTraceSender(req *http.Request) (future AppsStartNetworkTraceFuture, err error) {
29383	var resp *http.Response
29384	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29385	if err != nil {
29386		return
29387	}
29388	var azf azure.Future
29389	azf, err = azure.NewFutureFromResponse(resp)
29390	future.FutureAPI = &azf
29391	future.Result = future.result
29392	return
29393}
29394
29395// StartNetworkTraceResponder handles the response to the StartNetworkTrace request. The method always
29396// closes the http.Response Body.
29397func (client AppsClient) StartNetworkTraceResponder(resp *http.Response) (result ListNetworkTrace, err error) {
29398	err = autorest.Respond(
29399		resp,
29400		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29401		autorest.ByUnmarshallingJSON(&result),
29402		autorest.ByClosing())
29403	result.Response = autorest.Response{Response: resp}
29404	return
29405}
29406
29407// StartNetworkTraceSlot start capturing network packets for the site.
29408// Parameters:
29409// resourceGroupName - name of the resource group to which the resource belongs.
29410// name - the name of the web app.
29411// slot - the name of the slot for this web app.
29412// durationInSeconds - the duration to keep capturing in seconds.
29413// maxFrameLength - the maximum frame length in bytes (Optional).
29414// sasURL - the Blob URL to store capture file.
29415func (client AppsClient) StartNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartNetworkTraceSlotFuture, err error) {
29416	if tracing.IsEnabled() {
29417		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartNetworkTraceSlot")
29418		defer func() {
29419			sc := -1
29420			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29421				sc = result.FutureAPI.Response().StatusCode
29422			}
29423			tracing.EndSpan(ctx, sc, err)
29424		}()
29425	}
29426	if err := validation.Validate([]validation.Validation{
29427		{TargetValue: resourceGroupName,
29428			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29429				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29430				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29431		return result, validation.NewError("web.AppsClient", "StartNetworkTraceSlot", err.Error())
29432	}
29433
29434	req, err := client.StartNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasURL)
29435	if err != nil {
29436		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTraceSlot", nil, "Failure preparing request")
29437		return
29438	}
29439
29440	result, err = client.StartNetworkTraceSlotSender(req)
29441	if err != nil {
29442		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTraceSlot", nil, "Failure sending request")
29443		return
29444	}
29445
29446	return
29447}
29448
29449// StartNetworkTraceSlotPreparer prepares the StartNetworkTraceSlot request.
29450func (client AppsClient) StartNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
29451	pathParameters := map[string]interface{}{
29452		"name":              autorest.Encode("path", name),
29453		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29454		"slot":              autorest.Encode("path", slot),
29455		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29456	}
29457
29458	const APIVersion = "2018-02-01"
29459	queryParameters := map[string]interface{}{
29460		"api-version": APIVersion,
29461	}
29462	if durationInSeconds != nil {
29463		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
29464	}
29465	if maxFrameLength != nil {
29466		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
29467	}
29468	if len(sasURL) > 0 {
29469		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
29470	}
29471
29472	preparer := autorest.CreatePreparer(
29473		autorest.AsPost(),
29474		autorest.WithBaseURL(client.BaseURI),
29475		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace", pathParameters),
29476		autorest.WithQueryParameters(queryParameters))
29477	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29478}
29479
29480// StartNetworkTraceSlotSender sends the StartNetworkTraceSlot request. The method will close the
29481// http.Response Body if it receives an error.
29482func (client AppsClient) StartNetworkTraceSlotSender(req *http.Request) (future AppsStartNetworkTraceSlotFuture, err error) {
29483	var resp *http.Response
29484	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29485	if err != nil {
29486		return
29487	}
29488	var azf azure.Future
29489	azf, err = azure.NewFutureFromResponse(resp)
29490	future.FutureAPI = &azf
29491	future.Result = future.result
29492	return
29493}
29494
29495// StartNetworkTraceSlotResponder handles the response to the StartNetworkTraceSlot request. The method always
29496// closes the http.Response Body.
29497func (client AppsClient) StartNetworkTraceSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
29498	err = autorest.Respond(
29499		resp,
29500		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29501		autorest.ByUnmarshallingJSON(&result),
29502		autorest.ByClosing())
29503	result.Response = autorest.Response{Response: resp}
29504	return
29505}
29506
29507// StartSlot starts an app (or deployment slot, if specified).
29508// Parameters:
29509// resourceGroupName - name of the resource group to which the resource belongs.
29510// name - name of the app.
29511// slot - name of the deployment slot. If a slot is not specified, the API will start the production slot.
29512func (client AppsClient) StartSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
29513	if tracing.IsEnabled() {
29514		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartSlot")
29515		defer func() {
29516			sc := -1
29517			if result.Response != nil {
29518				sc = result.Response.StatusCode
29519			}
29520			tracing.EndSpan(ctx, sc, err)
29521		}()
29522	}
29523	if err := validation.Validate([]validation.Validation{
29524		{TargetValue: resourceGroupName,
29525			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29526				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29527				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29528		return result, validation.NewError("web.AppsClient", "StartSlot", err.Error())
29529	}
29530
29531	req, err := client.StartSlotPreparer(ctx, resourceGroupName, name, slot)
29532	if err != nil {
29533		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartSlot", nil, "Failure preparing request")
29534		return
29535	}
29536
29537	resp, err := client.StartSlotSender(req)
29538	if err != nil {
29539		result.Response = resp
29540		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartSlot", resp, "Failure sending request")
29541		return
29542	}
29543
29544	result, err = client.StartSlotResponder(resp)
29545	if err != nil {
29546		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartSlot", resp, "Failure responding to request")
29547		return
29548	}
29549
29550	return
29551}
29552
29553// StartSlotPreparer prepares the StartSlot request.
29554func (client AppsClient) StartSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
29555	pathParameters := map[string]interface{}{
29556		"name":              autorest.Encode("path", name),
29557		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29558		"slot":              autorest.Encode("path", slot),
29559		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29560	}
29561
29562	const APIVersion = "2018-02-01"
29563	queryParameters := map[string]interface{}{
29564		"api-version": APIVersion,
29565	}
29566
29567	preparer := autorest.CreatePreparer(
29568		autorest.AsPost(),
29569		autorest.WithBaseURL(client.BaseURI),
29570		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start", pathParameters),
29571		autorest.WithQueryParameters(queryParameters))
29572	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29573}
29574
29575// StartSlotSender sends the StartSlot request. The method will close the
29576// http.Response Body if it receives an error.
29577func (client AppsClient) StartSlotSender(req *http.Request) (*http.Response, error) {
29578	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29579}
29580
29581// StartSlotResponder handles the response to the StartSlot request. The method always
29582// closes the http.Response Body.
29583func (client AppsClient) StartSlotResponder(resp *http.Response) (result autorest.Response, err error) {
29584	err = autorest.Respond(
29585		resp,
29586		azure.WithErrorUnlessStatusCode(http.StatusOK),
29587		autorest.ByClosing())
29588	result.Response = resp
29589	return
29590}
29591
29592// StartWebSiteNetworkTrace start capturing network packets for the site (To be deprecated).
29593// Parameters:
29594// resourceGroupName - name of the resource group to which the resource belongs.
29595// name - the name of the web app.
29596// durationInSeconds - the duration to keep capturing in seconds.
29597// maxFrameLength - the maximum frame length in bytes (Optional).
29598// sasURL - the Blob URL to store capture file.
29599func (client AppsClient) StartWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result String, err error) {
29600	if tracing.IsEnabled() {
29601		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTrace")
29602		defer func() {
29603			sc := -1
29604			if result.Response.Response != nil {
29605				sc = result.Response.Response.StatusCode
29606			}
29607			tracing.EndSpan(ctx, sc, err)
29608		}()
29609	}
29610	if err := validation.Validate([]validation.Validation{
29611		{TargetValue: resourceGroupName,
29612			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29613				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29614				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29615		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTrace", err.Error())
29616	}
29617
29618	req, err := client.StartWebSiteNetworkTracePreparer(ctx, resourceGroupName, name, durationInSeconds, maxFrameLength, sasURL)
29619	if err != nil {
29620		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTrace", nil, "Failure preparing request")
29621		return
29622	}
29623
29624	resp, err := client.StartWebSiteNetworkTraceSender(req)
29625	if err != nil {
29626		result.Response = autorest.Response{Response: resp}
29627		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTrace", resp, "Failure sending request")
29628		return
29629	}
29630
29631	result, err = client.StartWebSiteNetworkTraceResponder(resp)
29632	if err != nil {
29633		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTrace", resp, "Failure responding to request")
29634		return
29635	}
29636
29637	return
29638}
29639
29640// StartWebSiteNetworkTracePreparer prepares the StartWebSiteNetworkTrace request.
29641func (client AppsClient) StartWebSiteNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
29642	pathParameters := map[string]interface{}{
29643		"name":              autorest.Encode("path", name),
29644		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29645		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29646	}
29647
29648	const APIVersion = "2018-02-01"
29649	queryParameters := map[string]interface{}{
29650		"api-version": APIVersion,
29651	}
29652	if durationInSeconds != nil {
29653		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
29654	}
29655	if maxFrameLength != nil {
29656		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
29657	}
29658	if len(sasURL) > 0 {
29659		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
29660	}
29661
29662	preparer := autorest.CreatePreparer(
29663		autorest.AsPost(),
29664		autorest.WithBaseURL(client.BaseURI),
29665		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start", pathParameters),
29666		autorest.WithQueryParameters(queryParameters))
29667	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29668}
29669
29670// StartWebSiteNetworkTraceSender sends the StartWebSiteNetworkTrace request. The method will close the
29671// http.Response Body if it receives an error.
29672func (client AppsClient) StartWebSiteNetworkTraceSender(req *http.Request) (*http.Response, error) {
29673	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29674}
29675
29676// StartWebSiteNetworkTraceResponder handles the response to the StartWebSiteNetworkTrace request. The method always
29677// closes the http.Response Body.
29678func (client AppsClient) StartWebSiteNetworkTraceResponder(resp *http.Response) (result String, err error) {
29679	err = autorest.Respond(
29680		resp,
29681		azure.WithErrorUnlessStatusCode(http.StatusOK),
29682		autorest.ByUnmarshallingJSON(&result.Value),
29683		autorest.ByClosing())
29684	result.Response = autorest.Response{Response: resp}
29685	return
29686}
29687
29688// StartWebSiteNetworkTraceOperation start capturing network packets for the site.
29689// Parameters:
29690// resourceGroupName - name of the resource group to which the resource belongs.
29691// name - the name of the web app.
29692// durationInSeconds - the duration to keep capturing in seconds.
29693// maxFrameLength - the maximum frame length in bytes (Optional).
29694// sasURL - the Blob URL to store capture file.
29695func (client AppsClient) StartWebSiteNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartWebSiteNetworkTraceOperationFuture, err error) {
29696	if tracing.IsEnabled() {
29697		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTraceOperation")
29698		defer func() {
29699			sc := -1
29700			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29701				sc = result.FutureAPI.Response().StatusCode
29702			}
29703			tracing.EndSpan(ctx, sc, err)
29704		}()
29705	}
29706	if err := validation.Validate([]validation.Validation{
29707		{TargetValue: resourceGroupName,
29708			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29709				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29710				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29711		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTraceOperation", err.Error())
29712	}
29713
29714	req, err := client.StartWebSiteNetworkTraceOperationPreparer(ctx, resourceGroupName, name, durationInSeconds, maxFrameLength, sasURL)
29715	if err != nil {
29716		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperation", nil, "Failure preparing request")
29717		return
29718	}
29719
29720	result, err = client.StartWebSiteNetworkTraceOperationSender(req)
29721	if err != nil {
29722		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperation", nil, "Failure sending request")
29723		return
29724	}
29725
29726	return
29727}
29728
29729// StartWebSiteNetworkTraceOperationPreparer prepares the StartWebSiteNetworkTraceOperation request.
29730func (client AppsClient) StartWebSiteNetworkTraceOperationPreparer(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
29731	pathParameters := map[string]interface{}{
29732		"name":              autorest.Encode("path", name),
29733		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29734		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29735	}
29736
29737	const APIVersion = "2018-02-01"
29738	queryParameters := map[string]interface{}{
29739		"api-version": APIVersion,
29740	}
29741	if durationInSeconds != nil {
29742		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
29743	}
29744	if maxFrameLength != nil {
29745		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
29746	}
29747	if len(sasURL) > 0 {
29748		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
29749	}
29750
29751	preparer := autorest.CreatePreparer(
29752		autorest.AsPost(),
29753		autorest.WithBaseURL(client.BaseURI),
29754		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation", pathParameters),
29755		autorest.WithQueryParameters(queryParameters))
29756	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29757}
29758
29759// StartWebSiteNetworkTraceOperationSender sends the StartWebSiteNetworkTraceOperation request. The method will close the
29760// http.Response Body if it receives an error.
29761func (client AppsClient) StartWebSiteNetworkTraceOperationSender(req *http.Request) (future AppsStartWebSiteNetworkTraceOperationFuture, err error) {
29762	var resp *http.Response
29763	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29764	if err != nil {
29765		return
29766	}
29767	var azf azure.Future
29768	azf, err = azure.NewFutureFromResponse(resp)
29769	future.FutureAPI = &azf
29770	future.Result = future.result
29771	return
29772}
29773
29774// StartWebSiteNetworkTraceOperationResponder handles the response to the StartWebSiteNetworkTraceOperation request. The method always
29775// closes the http.Response Body.
29776func (client AppsClient) StartWebSiteNetworkTraceOperationResponder(resp *http.Response) (result ListNetworkTrace, err error) {
29777	err = autorest.Respond(
29778		resp,
29779		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29780		autorest.ByUnmarshallingJSON(&result),
29781		autorest.ByClosing())
29782	result.Response = autorest.Response{Response: resp}
29783	return
29784}
29785
29786// StartWebSiteNetworkTraceOperationSlot start capturing network packets for the site.
29787// Parameters:
29788// resourceGroupName - name of the resource group to which the resource belongs.
29789// name - the name of the web app.
29790// slot - the name of the slot for this web app.
29791// durationInSeconds - the duration to keep capturing in seconds.
29792// maxFrameLength - the maximum frame length in bytes (Optional).
29793// sasURL - the Blob URL to store capture file.
29794func (client AppsClient) StartWebSiteNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartWebSiteNetworkTraceOperationSlotFuture, err error) {
29795	if tracing.IsEnabled() {
29796		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTraceOperationSlot")
29797		defer func() {
29798			sc := -1
29799			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29800				sc = result.FutureAPI.Response().StatusCode
29801			}
29802			tracing.EndSpan(ctx, sc, err)
29803		}()
29804	}
29805	if err := validation.Validate([]validation.Validation{
29806		{TargetValue: resourceGroupName,
29807			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29808				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29809				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29810		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTraceOperationSlot", err.Error())
29811	}
29812
29813	req, err := client.StartWebSiteNetworkTraceOperationSlotPreparer(ctx, resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasURL)
29814	if err != nil {
29815		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperationSlot", nil, "Failure preparing request")
29816		return
29817	}
29818
29819	result, err = client.StartWebSiteNetworkTraceOperationSlotSender(req)
29820	if err != nil {
29821		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperationSlot", nil, "Failure sending request")
29822		return
29823	}
29824
29825	return
29826}
29827
29828// StartWebSiteNetworkTraceOperationSlotPreparer prepares the StartWebSiteNetworkTraceOperationSlot request.
29829func (client AppsClient) StartWebSiteNetworkTraceOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
29830	pathParameters := map[string]interface{}{
29831		"name":              autorest.Encode("path", name),
29832		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29833		"slot":              autorest.Encode("path", slot),
29834		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29835	}
29836
29837	const APIVersion = "2018-02-01"
29838	queryParameters := map[string]interface{}{
29839		"api-version": APIVersion,
29840	}
29841	if durationInSeconds != nil {
29842		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
29843	}
29844	if maxFrameLength != nil {
29845		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
29846	}
29847	if len(sasURL) > 0 {
29848		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
29849	}
29850
29851	preparer := autorest.CreatePreparer(
29852		autorest.AsPost(),
29853		autorest.WithBaseURL(client.BaseURI),
29854		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation", pathParameters),
29855		autorest.WithQueryParameters(queryParameters))
29856	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29857}
29858
29859// StartWebSiteNetworkTraceOperationSlotSender sends the StartWebSiteNetworkTraceOperationSlot request. The method will close the
29860// http.Response Body if it receives an error.
29861func (client AppsClient) StartWebSiteNetworkTraceOperationSlotSender(req *http.Request) (future AppsStartWebSiteNetworkTraceOperationSlotFuture, err error) {
29862	var resp *http.Response
29863	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29864	if err != nil {
29865		return
29866	}
29867	var azf azure.Future
29868	azf, err = azure.NewFutureFromResponse(resp)
29869	future.FutureAPI = &azf
29870	future.Result = future.result
29871	return
29872}
29873
29874// StartWebSiteNetworkTraceOperationSlotResponder handles the response to the StartWebSiteNetworkTraceOperationSlot request. The method always
29875// closes the http.Response Body.
29876func (client AppsClient) StartWebSiteNetworkTraceOperationSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
29877	err = autorest.Respond(
29878		resp,
29879		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29880		autorest.ByUnmarshallingJSON(&result),
29881		autorest.ByClosing())
29882	result.Response = autorest.Response{Response: resp}
29883	return
29884}
29885
29886// StartWebSiteNetworkTraceSlot start capturing network packets for the site (To be deprecated).
29887// Parameters:
29888// resourceGroupName - name of the resource group to which the resource belongs.
29889// name - the name of the web app.
29890// slot - the name of the slot for this web app.
29891// durationInSeconds - the duration to keep capturing in seconds.
29892// maxFrameLength - the maximum frame length in bytes (Optional).
29893// sasURL - the Blob URL to store capture file.
29894func (client AppsClient) StartWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result String, err error) {
29895	if tracing.IsEnabled() {
29896		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTraceSlot")
29897		defer func() {
29898			sc := -1
29899			if result.Response.Response != nil {
29900				sc = result.Response.Response.StatusCode
29901			}
29902			tracing.EndSpan(ctx, sc, err)
29903		}()
29904	}
29905	if err := validation.Validate([]validation.Validation{
29906		{TargetValue: resourceGroupName,
29907			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29908				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29909				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29910		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTraceSlot", err.Error())
29911	}
29912
29913	req, err := client.StartWebSiteNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasURL)
29914	if err != nil {
29915		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceSlot", nil, "Failure preparing request")
29916		return
29917	}
29918
29919	resp, err := client.StartWebSiteNetworkTraceSlotSender(req)
29920	if err != nil {
29921		result.Response = autorest.Response{Response: resp}
29922		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceSlot", resp, "Failure sending request")
29923		return
29924	}
29925
29926	result, err = client.StartWebSiteNetworkTraceSlotResponder(resp)
29927	if err != nil {
29928		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceSlot", resp, "Failure responding to request")
29929		return
29930	}
29931
29932	return
29933}
29934
29935// StartWebSiteNetworkTraceSlotPreparer prepares the StartWebSiteNetworkTraceSlot request.
29936func (client AppsClient) StartWebSiteNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
29937	pathParameters := map[string]interface{}{
29938		"name":              autorest.Encode("path", name),
29939		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29940		"slot":              autorest.Encode("path", slot),
29941		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29942	}
29943
29944	const APIVersion = "2018-02-01"
29945	queryParameters := map[string]interface{}{
29946		"api-version": APIVersion,
29947	}
29948	if durationInSeconds != nil {
29949		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
29950	}
29951	if maxFrameLength != nil {
29952		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
29953	}
29954	if len(sasURL) > 0 {
29955		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
29956	}
29957
29958	preparer := autorest.CreatePreparer(
29959		autorest.AsPost(),
29960		autorest.WithBaseURL(client.BaseURI),
29961		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start", pathParameters),
29962		autorest.WithQueryParameters(queryParameters))
29963	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29964}
29965
29966// StartWebSiteNetworkTraceSlotSender sends the StartWebSiteNetworkTraceSlot request. The method will close the
29967// http.Response Body if it receives an error.
29968func (client AppsClient) StartWebSiteNetworkTraceSlotSender(req *http.Request) (*http.Response, error) {
29969	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29970}
29971
29972// StartWebSiteNetworkTraceSlotResponder handles the response to the StartWebSiteNetworkTraceSlot request. The method always
29973// closes the http.Response Body.
29974func (client AppsClient) StartWebSiteNetworkTraceSlotResponder(resp *http.Response) (result String, err error) {
29975	err = autorest.Respond(
29976		resp,
29977		azure.WithErrorUnlessStatusCode(http.StatusOK),
29978		autorest.ByUnmarshallingJSON(&result.Value),
29979		autorest.ByClosing())
29980	result.Response = autorest.Response{Response: resp}
29981	return
29982}
29983
29984// Stop stops an app (or deployment slot, if specified).
29985// Parameters:
29986// resourceGroupName - name of the resource group to which the resource belongs.
29987// name - name of the app.
29988func (client AppsClient) Stop(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
29989	if tracing.IsEnabled() {
29990		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Stop")
29991		defer func() {
29992			sc := -1
29993			if result.Response != nil {
29994				sc = result.Response.StatusCode
29995			}
29996			tracing.EndSpan(ctx, sc, err)
29997		}()
29998	}
29999	if err := validation.Validate([]validation.Validation{
30000		{TargetValue: resourceGroupName,
30001			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30002				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30003				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30004		return result, validation.NewError("web.AppsClient", "Stop", err.Error())
30005	}
30006
30007	req, err := client.StopPreparer(ctx, resourceGroupName, name)
30008	if err != nil {
30009		err = autorest.NewErrorWithError(err, "web.AppsClient", "Stop", nil, "Failure preparing request")
30010		return
30011	}
30012
30013	resp, err := client.StopSender(req)
30014	if err != nil {
30015		result.Response = resp
30016		err = autorest.NewErrorWithError(err, "web.AppsClient", "Stop", resp, "Failure sending request")
30017		return
30018	}
30019
30020	result, err = client.StopResponder(resp)
30021	if err != nil {
30022		err = autorest.NewErrorWithError(err, "web.AppsClient", "Stop", resp, "Failure responding to request")
30023		return
30024	}
30025
30026	return
30027}
30028
30029// StopPreparer prepares the Stop request.
30030func (client AppsClient) StopPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
30031	pathParameters := map[string]interface{}{
30032		"name":              autorest.Encode("path", name),
30033		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30034		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30035	}
30036
30037	const APIVersion = "2018-02-01"
30038	queryParameters := map[string]interface{}{
30039		"api-version": APIVersion,
30040	}
30041
30042	preparer := autorest.CreatePreparer(
30043		autorest.AsPost(),
30044		autorest.WithBaseURL(client.BaseURI),
30045		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop", pathParameters),
30046		autorest.WithQueryParameters(queryParameters))
30047	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30048}
30049
30050// StopSender sends the Stop request. The method will close the
30051// http.Response Body if it receives an error.
30052func (client AppsClient) StopSender(req *http.Request) (*http.Response, error) {
30053	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30054}
30055
30056// StopResponder handles the response to the Stop request. The method always
30057// closes the http.Response Body.
30058func (client AppsClient) StopResponder(resp *http.Response) (result autorest.Response, err error) {
30059	err = autorest.Respond(
30060		resp,
30061		azure.WithErrorUnlessStatusCode(http.StatusOK),
30062		autorest.ByClosing())
30063	result.Response = resp
30064	return
30065}
30066
30067// StopContinuousWebJob stop a continuous web job for an app, or a deployment slot.
30068// Parameters:
30069// resourceGroupName - name of the resource group to which the resource belongs.
30070// name - site name.
30071// webJobName - name of Web Job.
30072func (client AppsClient) StopContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
30073	if tracing.IsEnabled() {
30074		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopContinuousWebJob")
30075		defer func() {
30076			sc := -1
30077			if result.Response != nil {
30078				sc = result.Response.StatusCode
30079			}
30080			tracing.EndSpan(ctx, sc, err)
30081		}()
30082	}
30083	if err := validation.Validate([]validation.Validation{
30084		{TargetValue: resourceGroupName,
30085			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30086				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30087				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30088		return result, validation.NewError("web.AppsClient", "StopContinuousWebJob", err.Error())
30089	}
30090
30091	req, err := client.StopContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
30092	if err != nil {
30093		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", nil, "Failure preparing request")
30094		return
30095	}
30096
30097	resp, err := client.StopContinuousWebJobSender(req)
30098	if err != nil {
30099		result.Response = resp
30100		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", resp, "Failure sending request")
30101		return
30102	}
30103
30104	result, err = client.StopContinuousWebJobResponder(resp)
30105	if err != nil {
30106		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", resp, "Failure responding to request")
30107		return
30108	}
30109
30110	return
30111}
30112
30113// StopContinuousWebJobPreparer prepares the StopContinuousWebJob request.
30114func (client AppsClient) StopContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
30115	pathParameters := map[string]interface{}{
30116		"name":              autorest.Encode("path", name),
30117		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30118		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30119		"webJobName":        autorest.Encode("path", webJobName),
30120	}
30121
30122	const APIVersion = "2018-02-01"
30123	queryParameters := map[string]interface{}{
30124		"api-version": APIVersion,
30125	}
30126
30127	preparer := autorest.CreatePreparer(
30128		autorest.AsPost(),
30129		autorest.WithBaseURL(client.BaseURI),
30130		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop", pathParameters),
30131		autorest.WithQueryParameters(queryParameters))
30132	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30133}
30134
30135// StopContinuousWebJobSender sends the StopContinuousWebJob request. The method will close the
30136// http.Response Body if it receives an error.
30137func (client AppsClient) StopContinuousWebJobSender(req *http.Request) (*http.Response, error) {
30138	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30139}
30140
30141// StopContinuousWebJobResponder handles the response to the StopContinuousWebJob request. The method always
30142// closes the http.Response Body.
30143func (client AppsClient) StopContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
30144	err = autorest.Respond(
30145		resp,
30146		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
30147		autorest.ByClosing())
30148	result.Response = resp
30149	return
30150}
30151
30152// StopContinuousWebJobSlot stop a continuous web job for an app, or a deployment slot.
30153// Parameters:
30154// resourceGroupName - name of the resource group to which the resource belongs.
30155// name - site name.
30156// webJobName - name of Web Job.
30157// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
30158// production slot.
30159func (client AppsClient) StopContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
30160	if tracing.IsEnabled() {
30161		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopContinuousWebJobSlot")
30162		defer func() {
30163			sc := -1
30164			if result.Response != nil {
30165				sc = result.Response.StatusCode
30166			}
30167			tracing.EndSpan(ctx, sc, err)
30168		}()
30169	}
30170	if err := validation.Validate([]validation.Validation{
30171		{TargetValue: resourceGroupName,
30172			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30173				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30174				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30175		return result, validation.NewError("web.AppsClient", "StopContinuousWebJobSlot", err.Error())
30176	}
30177
30178	req, err := client.StopContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
30179	if err != nil {
30180		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", nil, "Failure preparing request")
30181		return
30182	}
30183
30184	resp, err := client.StopContinuousWebJobSlotSender(req)
30185	if err != nil {
30186		result.Response = resp
30187		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", resp, "Failure sending request")
30188		return
30189	}
30190
30191	result, err = client.StopContinuousWebJobSlotResponder(resp)
30192	if err != nil {
30193		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", resp, "Failure responding to request")
30194		return
30195	}
30196
30197	return
30198}
30199
30200// StopContinuousWebJobSlotPreparer prepares the StopContinuousWebJobSlot request.
30201func (client AppsClient) StopContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
30202	pathParameters := map[string]interface{}{
30203		"name":              autorest.Encode("path", name),
30204		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30205		"slot":              autorest.Encode("path", slot),
30206		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30207		"webJobName":        autorest.Encode("path", webJobName),
30208	}
30209
30210	const APIVersion = "2018-02-01"
30211	queryParameters := map[string]interface{}{
30212		"api-version": APIVersion,
30213	}
30214
30215	preparer := autorest.CreatePreparer(
30216		autorest.AsPost(),
30217		autorest.WithBaseURL(client.BaseURI),
30218		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop", pathParameters),
30219		autorest.WithQueryParameters(queryParameters))
30220	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30221}
30222
30223// StopContinuousWebJobSlotSender sends the StopContinuousWebJobSlot request. The method will close the
30224// http.Response Body if it receives an error.
30225func (client AppsClient) StopContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
30226	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30227}
30228
30229// StopContinuousWebJobSlotResponder handles the response to the StopContinuousWebJobSlot request. The method always
30230// closes the http.Response Body.
30231func (client AppsClient) StopContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30232	err = autorest.Respond(
30233		resp,
30234		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
30235		autorest.ByClosing())
30236	result.Response = resp
30237	return
30238}
30239
30240// StopNetworkTrace stop ongoing capturing network packets for the site.
30241// Parameters:
30242// resourceGroupName - name of the resource group to which the resource belongs.
30243// name - the name of the web app.
30244func (client AppsClient) StopNetworkTrace(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
30245	if tracing.IsEnabled() {
30246		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopNetworkTrace")
30247		defer func() {
30248			sc := -1
30249			if result.Response != nil {
30250				sc = result.Response.StatusCode
30251			}
30252			tracing.EndSpan(ctx, sc, err)
30253		}()
30254	}
30255	if err := validation.Validate([]validation.Validation{
30256		{TargetValue: resourceGroupName,
30257			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30258				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30259				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30260		return result, validation.NewError("web.AppsClient", "StopNetworkTrace", err.Error())
30261	}
30262
30263	req, err := client.StopNetworkTracePreparer(ctx, resourceGroupName, name)
30264	if err != nil {
30265		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTrace", nil, "Failure preparing request")
30266		return
30267	}
30268
30269	resp, err := client.StopNetworkTraceSender(req)
30270	if err != nil {
30271		result.Response = resp
30272		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTrace", resp, "Failure sending request")
30273		return
30274	}
30275
30276	result, err = client.StopNetworkTraceResponder(resp)
30277	if err != nil {
30278		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTrace", resp, "Failure responding to request")
30279		return
30280	}
30281
30282	return
30283}
30284
30285// StopNetworkTracePreparer prepares the StopNetworkTrace request.
30286func (client AppsClient) StopNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
30287	pathParameters := map[string]interface{}{
30288		"name":              autorest.Encode("path", name),
30289		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30290		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30291	}
30292
30293	const APIVersion = "2018-02-01"
30294	queryParameters := map[string]interface{}{
30295		"api-version": APIVersion,
30296	}
30297
30298	preparer := autorest.CreatePreparer(
30299		autorest.AsPost(),
30300		autorest.WithBaseURL(client.BaseURI),
30301		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace", pathParameters),
30302		autorest.WithQueryParameters(queryParameters))
30303	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30304}
30305
30306// StopNetworkTraceSender sends the StopNetworkTrace request. The method will close the
30307// http.Response Body if it receives an error.
30308func (client AppsClient) StopNetworkTraceSender(req *http.Request) (*http.Response, error) {
30309	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30310}
30311
30312// StopNetworkTraceResponder handles the response to the StopNetworkTrace request. The method always
30313// closes the http.Response Body.
30314func (client AppsClient) StopNetworkTraceResponder(resp *http.Response) (result autorest.Response, err error) {
30315	err = autorest.Respond(
30316		resp,
30317		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
30318		autorest.ByClosing())
30319	result.Response = resp
30320	return
30321}
30322
30323// StopNetworkTraceSlot stop ongoing capturing network packets for the site.
30324// Parameters:
30325// resourceGroupName - name of the resource group to which the resource belongs.
30326// name - the name of the web app.
30327// slot - the name of the slot for this web app.
30328func (client AppsClient) StopNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
30329	if tracing.IsEnabled() {
30330		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopNetworkTraceSlot")
30331		defer func() {
30332			sc := -1
30333			if result.Response != nil {
30334				sc = result.Response.StatusCode
30335			}
30336			tracing.EndSpan(ctx, sc, err)
30337		}()
30338	}
30339	if err := validation.Validate([]validation.Validation{
30340		{TargetValue: resourceGroupName,
30341			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30342				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30343				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30344		return result, validation.NewError("web.AppsClient", "StopNetworkTraceSlot", err.Error())
30345	}
30346
30347	req, err := client.StopNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot)
30348	if err != nil {
30349		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTraceSlot", nil, "Failure preparing request")
30350		return
30351	}
30352
30353	resp, err := client.StopNetworkTraceSlotSender(req)
30354	if err != nil {
30355		result.Response = resp
30356		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTraceSlot", resp, "Failure sending request")
30357		return
30358	}
30359
30360	result, err = client.StopNetworkTraceSlotResponder(resp)
30361	if err != nil {
30362		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTraceSlot", resp, "Failure responding to request")
30363		return
30364	}
30365
30366	return
30367}
30368
30369// StopNetworkTraceSlotPreparer prepares the StopNetworkTraceSlot request.
30370func (client AppsClient) StopNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
30371	pathParameters := map[string]interface{}{
30372		"name":              autorest.Encode("path", name),
30373		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30374		"slot":              autorest.Encode("path", slot),
30375		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30376	}
30377
30378	const APIVersion = "2018-02-01"
30379	queryParameters := map[string]interface{}{
30380		"api-version": APIVersion,
30381	}
30382
30383	preparer := autorest.CreatePreparer(
30384		autorest.AsPost(),
30385		autorest.WithBaseURL(client.BaseURI),
30386		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace", pathParameters),
30387		autorest.WithQueryParameters(queryParameters))
30388	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30389}
30390
30391// StopNetworkTraceSlotSender sends the StopNetworkTraceSlot request. The method will close the
30392// http.Response Body if it receives an error.
30393func (client AppsClient) StopNetworkTraceSlotSender(req *http.Request) (*http.Response, error) {
30394	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30395}
30396
30397// StopNetworkTraceSlotResponder handles the response to the StopNetworkTraceSlot request. The method always
30398// closes the http.Response Body.
30399func (client AppsClient) StopNetworkTraceSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30400	err = autorest.Respond(
30401		resp,
30402		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
30403		autorest.ByClosing())
30404	result.Response = resp
30405	return
30406}
30407
30408// StopSlot stops an app (or deployment slot, if specified).
30409// Parameters:
30410// resourceGroupName - name of the resource group to which the resource belongs.
30411// name - name of the app.
30412// slot - name of the deployment slot. If a slot is not specified, the API will stop the production slot.
30413func (client AppsClient) StopSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
30414	if tracing.IsEnabled() {
30415		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopSlot")
30416		defer func() {
30417			sc := -1
30418			if result.Response != nil {
30419				sc = result.Response.StatusCode
30420			}
30421			tracing.EndSpan(ctx, sc, err)
30422		}()
30423	}
30424	if err := validation.Validate([]validation.Validation{
30425		{TargetValue: resourceGroupName,
30426			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30427				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30428				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30429		return result, validation.NewError("web.AppsClient", "StopSlot", err.Error())
30430	}
30431
30432	req, err := client.StopSlotPreparer(ctx, resourceGroupName, name, slot)
30433	if err != nil {
30434		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopSlot", nil, "Failure preparing request")
30435		return
30436	}
30437
30438	resp, err := client.StopSlotSender(req)
30439	if err != nil {
30440		result.Response = resp
30441		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopSlot", resp, "Failure sending request")
30442		return
30443	}
30444
30445	result, err = client.StopSlotResponder(resp)
30446	if err != nil {
30447		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopSlot", resp, "Failure responding to request")
30448		return
30449	}
30450
30451	return
30452}
30453
30454// StopSlotPreparer prepares the StopSlot request.
30455func (client AppsClient) StopSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
30456	pathParameters := map[string]interface{}{
30457		"name":              autorest.Encode("path", name),
30458		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30459		"slot":              autorest.Encode("path", slot),
30460		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30461	}
30462
30463	const APIVersion = "2018-02-01"
30464	queryParameters := map[string]interface{}{
30465		"api-version": APIVersion,
30466	}
30467
30468	preparer := autorest.CreatePreparer(
30469		autorest.AsPost(),
30470		autorest.WithBaseURL(client.BaseURI),
30471		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop", pathParameters),
30472		autorest.WithQueryParameters(queryParameters))
30473	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30474}
30475
30476// StopSlotSender sends the StopSlot request. The method will close the
30477// http.Response Body if it receives an error.
30478func (client AppsClient) StopSlotSender(req *http.Request) (*http.Response, error) {
30479	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30480}
30481
30482// StopSlotResponder handles the response to the StopSlot request. The method always
30483// closes the http.Response Body.
30484func (client AppsClient) StopSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30485	err = autorest.Respond(
30486		resp,
30487		azure.WithErrorUnlessStatusCode(http.StatusOK),
30488		autorest.ByClosing())
30489	result.Response = resp
30490	return
30491}
30492
30493// StopWebSiteNetworkTrace stop ongoing capturing network packets for the site.
30494// Parameters:
30495// resourceGroupName - name of the resource group to which the resource belongs.
30496// name - the name of the web app.
30497func (client AppsClient) StopWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
30498	if tracing.IsEnabled() {
30499		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopWebSiteNetworkTrace")
30500		defer func() {
30501			sc := -1
30502			if result.Response != nil {
30503				sc = result.Response.StatusCode
30504			}
30505			tracing.EndSpan(ctx, sc, err)
30506		}()
30507	}
30508	if err := validation.Validate([]validation.Validation{
30509		{TargetValue: resourceGroupName,
30510			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30511				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30512				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30513		return result, validation.NewError("web.AppsClient", "StopWebSiteNetworkTrace", err.Error())
30514	}
30515
30516	req, err := client.StopWebSiteNetworkTracePreparer(ctx, resourceGroupName, name)
30517	if err != nil {
30518		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTrace", nil, "Failure preparing request")
30519		return
30520	}
30521
30522	resp, err := client.StopWebSiteNetworkTraceSender(req)
30523	if err != nil {
30524		result.Response = resp
30525		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTrace", resp, "Failure sending request")
30526		return
30527	}
30528
30529	result, err = client.StopWebSiteNetworkTraceResponder(resp)
30530	if err != nil {
30531		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTrace", resp, "Failure responding to request")
30532		return
30533	}
30534
30535	return
30536}
30537
30538// StopWebSiteNetworkTracePreparer prepares the StopWebSiteNetworkTrace request.
30539func (client AppsClient) StopWebSiteNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
30540	pathParameters := map[string]interface{}{
30541		"name":              autorest.Encode("path", name),
30542		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30543		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30544	}
30545
30546	const APIVersion = "2018-02-01"
30547	queryParameters := map[string]interface{}{
30548		"api-version": APIVersion,
30549	}
30550
30551	preparer := autorest.CreatePreparer(
30552		autorest.AsPost(),
30553		autorest.WithBaseURL(client.BaseURI),
30554		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop", pathParameters),
30555		autorest.WithQueryParameters(queryParameters))
30556	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30557}
30558
30559// StopWebSiteNetworkTraceSender sends the StopWebSiteNetworkTrace request. The method will close the
30560// http.Response Body if it receives an error.
30561func (client AppsClient) StopWebSiteNetworkTraceSender(req *http.Request) (*http.Response, error) {
30562	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30563}
30564
30565// StopWebSiteNetworkTraceResponder handles the response to the StopWebSiteNetworkTrace request. The method always
30566// closes the http.Response Body.
30567func (client AppsClient) StopWebSiteNetworkTraceResponder(resp *http.Response) (result autorest.Response, err error) {
30568	err = autorest.Respond(
30569		resp,
30570		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
30571		autorest.ByClosing())
30572	result.Response = resp
30573	return
30574}
30575
30576// StopWebSiteNetworkTraceSlot stop ongoing capturing network packets for the site.
30577// Parameters:
30578// resourceGroupName - name of the resource group to which the resource belongs.
30579// name - the name of the web app.
30580// slot - the name of the slot for this web app.
30581func (client AppsClient) StopWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
30582	if tracing.IsEnabled() {
30583		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopWebSiteNetworkTraceSlot")
30584		defer func() {
30585			sc := -1
30586			if result.Response != nil {
30587				sc = result.Response.StatusCode
30588			}
30589			tracing.EndSpan(ctx, sc, err)
30590		}()
30591	}
30592	if err := validation.Validate([]validation.Validation{
30593		{TargetValue: resourceGroupName,
30594			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30595				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30596				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30597		return result, validation.NewError("web.AppsClient", "StopWebSiteNetworkTraceSlot", err.Error())
30598	}
30599
30600	req, err := client.StopWebSiteNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot)
30601	if err != nil {
30602		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTraceSlot", nil, "Failure preparing request")
30603		return
30604	}
30605
30606	resp, err := client.StopWebSiteNetworkTraceSlotSender(req)
30607	if err != nil {
30608		result.Response = resp
30609		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTraceSlot", resp, "Failure sending request")
30610		return
30611	}
30612
30613	result, err = client.StopWebSiteNetworkTraceSlotResponder(resp)
30614	if err != nil {
30615		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTraceSlot", resp, "Failure responding to request")
30616		return
30617	}
30618
30619	return
30620}
30621
30622// StopWebSiteNetworkTraceSlotPreparer prepares the StopWebSiteNetworkTraceSlot request.
30623func (client AppsClient) StopWebSiteNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
30624	pathParameters := map[string]interface{}{
30625		"name":              autorest.Encode("path", name),
30626		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30627		"slot":              autorest.Encode("path", slot),
30628		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30629	}
30630
30631	const APIVersion = "2018-02-01"
30632	queryParameters := map[string]interface{}{
30633		"api-version": APIVersion,
30634	}
30635
30636	preparer := autorest.CreatePreparer(
30637		autorest.AsPost(),
30638		autorest.WithBaseURL(client.BaseURI),
30639		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop", pathParameters),
30640		autorest.WithQueryParameters(queryParameters))
30641	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30642}
30643
30644// StopWebSiteNetworkTraceSlotSender sends the StopWebSiteNetworkTraceSlot request. The method will close the
30645// http.Response Body if it receives an error.
30646func (client AppsClient) StopWebSiteNetworkTraceSlotSender(req *http.Request) (*http.Response, error) {
30647	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30648}
30649
30650// StopWebSiteNetworkTraceSlotResponder handles the response to the StopWebSiteNetworkTraceSlot request. The method always
30651// closes the http.Response Body.
30652func (client AppsClient) StopWebSiteNetworkTraceSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30653	err = autorest.Respond(
30654		resp,
30655		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
30656		autorest.ByClosing())
30657	result.Response = resp
30658	return
30659}
30660
30661// SwapSlotSlot swaps two deployment slots of an app.
30662// Parameters:
30663// resourceGroupName - name of the resource group to which the resource belongs.
30664// name - name of the app.
30665// slotSwapEntity - JSON object that contains the target slot name. See example.
30666// slot - name of the source slot. If a slot is not specified, the production slot is used as the source slot.
30667func (client AppsClient) SwapSlotSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result AppsSwapSlotSlotFuture, err error) {
30668	if tracing.IsEnabled() {
30669		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SwapSlotSlot")
30670		defer func() {
30671			sc := -1
30672			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30673				sc = result.FutureAPI.Response().StatusCode
30674			}
30675			tracing.EndSpan(ctx, sc, err)
30676		}()
30677	}
30678	if err := validation.Validate([]validation.Validation{
30679		{TargetValue: resourceGroupName,
30680			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30681				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30682				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
30683		{TargetValue: slotSwapEntity,
30684			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
30685				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
30686		return result, validation.NewError("web.AppsClient", "SwapSlotSlot", err.Error())
30687	}
30688
30689	req, err := client.SwapSlotSlotPreparer(ctx, resourceGroupName, name, slotSwapEntity, slot)
30690	if err != nil {
30691		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotSlot", nil, "Failure preparing request")
30692		return
30693	}
30694
30695	result, err = client.SwapSlotSlotSender(req)
30696	if err != nil {
30697		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotSlot", nil, "Failure sending request")
30698		return
30699	}
30700
30701	return
30702}
30703
30704// SwapSlotSlotPreparer prepares the SwapSlotSlot request.
30705func (client AppsClient) SwapSlotSlotPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (*http.Request, error) {
30706	pathParameters := map[string]interface{}{
30707		"name":              autorest.Encode("path", name),
30708		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30709		"slot":              autorest.Encode("path", slot),
30710		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30711	}
30712
30713	const APIVersion = "2018-02-01"
30714	queryParameters := map[string]interface{}{
30715		"api-version": APIVersion,
30716	}
30717
30718	preparer := autorest.CreatePreparer(
30719		autorest.AsContentType("application/json; charset=utf-8"),
30720		autorest.AsPost(),
30721		autorest.WithBaseURL(client.BaseURI),
30722		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap", pathParameters),
30723		autorest.WithJSON(slotSwapEntity),
30724		autorest.WithQueryParameters(queryParameters))
30725	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30726}
30727
30728// SwapSlotSlotSender sends the SwapSlotSlot request. The method will close the
30729// http.Response Body if it receives an error.
30730func (client AppsClient) SwapSlotSlotSender(req *http.Request) (future AppsSwapSlotSlotFuture, err error) {
30731	var resp *http.Response
30732	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30733	if err != nil {
30734		return
30735	}
30736	var azf azure.Future
30737	azf, err = azure.NewFutureFromResponse(resp)
30738	future.FutureAPI = &azf
30739	future.Result = future.result
30740	return
30741}
30742
30743// SwapSlotSlotResponder handles the response to the SwapSlotSlot request. The method always
30744// closes the http.Response Body.
30745func (client AppsClient) SwapSlotSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30746	err = autorest.Respond(
30747		resp,
30748		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30749		autorest.ByClosing())
30750	result.Response = resp
30751	return
30752}
30753
30754// SwapSlotWithProduction swaps two deployment slots of an app.
30755// Parameters:
30756// resourceGroupName - name of the resource group to which the resource belongs.
30757// name - name of the app.
30758// slotSwapEntity - JSON object that contains the target slot name. See example.
30759func (client AppsClient) SwapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result AppsSwapSlotWithProductionFuture, err error) {
30760	if tracing.IsEnabled() {
30761		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SwapSlotWithProduction")
30762		defer func() {
30763			sc := -1
30764			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30765				sc = result.FutureAPI.Response().StatusCode
30766			}
30767			tracing.EndSpan(ctx, sc, err)
30768		}()
30769	}
30770	if err := validation.Validate([]validation.Validation{
30771		{TargetValue: resourceGroupName,
30772			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30773				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30774				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
30775		{TargetValue: slotSwapEntity,
30776			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
30777				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
30778		return result, validation.NewError("web.AppsClient", "SwapSlotWithProduction", err.Error())
30779	}
30780
30781	req, err := client.SwapSlotWithProductionPreparer(ctx, resourceGroupName, name, slotSwapEntity)
30782	if err != nil {
30783		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotWithProduction", nil, "Failure preparing request")
30784		return
30785	}
30786
30787	result, err = client.SwapSlotWithProductionSender(req)
30788	if err != nil {
30789		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotWithProduction", nil, "Failure sending request")
30790		return
30791	}
30792
30793	return
30794}
30795
30796// SwapSlotWithProductionPreparer prepares the SwapSlotWithProduction request.
30797func (client AppsClient) SwapSlotWithProductionPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (*http.Request, error) {
30798	pathParameters := map[string]interface{}{
30799		"name":              autorest.Encode("path", name),
30800		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30801		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30802	}
30803
30804	const APIVersion = "2018-02-01"
30805	queryParameters := map[string]interface{}{
30806		"api-version": APIVersion,
30807	}
30808
30809	preparer := autorest.CreatePreparer(
30810		autorest.AsContentType("application/json; charset=utf-8"),
30811		autorest.AsPost(),
30812		autorest.WithBaseURL(client.BaseURI),
30813		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap", pathParameters),
30814		autorest.WithJSON(slotSwapEntity),
30815		autorest.WithQueryParameters(queryParameters))
30816	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30817}
30818
30819// SwapSlotWithProductionSender sends the SwapSlotWithProduction request. The method will close the
30820// http.Response Body if it receives an error.
30821func (client AppsClient) SwapSlotWithProductionSender(req *http.Request) (future AppsSwapSlotWithProductionFuture, err error) {
30822	var resp *http.Response
30823	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30824	if err != nil {
30825		return
30826	}
30827	var azf azure.Future
30828	azf, err = azure.NewFutureFromResponse(resp)
30829	future.FutureAPI = &azf
30830	future.Result = future.result
30831	return
30832}
30833
30834// SwapSlotWithProductionResponder handles the response to the SwapSlotWithProduction request. The method always
30835// closes the http.Response Body.
30836func (client AppsClient) SwapSlotWithProductionResponder(resp *http.Response) (result autorest.Response, err error) {
30837	err = autorest.Respond(
30838		resp,
30839		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30840		autorest.ByClosing())
30841	result.Response = resp
30842	return
30843}
30844
30845// SyncFunctions syncs function trigger metadata to the management database
30846// Parameters:
30847// resourceGroupName - name of the resource group to which the resource belongs.
30848// name - name of the app.
30849func (client AppsClient) SyncFunctions(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
30850	if tracing.IsEnabled() {
30851		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctions")
30852		defer func() {
30853			sc := -1
30854			if result.Response != nil {
30855				sc = result.Response.StatusCode
30856			}
30857			tracing.EndSpan(ctx, sc, err)
30858		}()
30859	}
30860	if err := validation.Validate([]validation.Validation{
30861		{TargetValue: resourceGroupName,
30862			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30863				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30864				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30865		return result, validation.NewError("web.AppsClient", "SyncFunctions", err.Error())
30866	}
30867
30868	req, err := client.SyncFunctionsPreparer(ctx, resourceGroupName, name)
30869	if err != nil {
30870		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", nil, "Failure preparing request")
30871		return
30872	}
30873
30874	resp, err := client.SyncFunctionsSender(req)
30875	if err != nil {
30876		result.Response = resp
30877		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure sending request")
30878		return
30879	}
30880
30881	result, err = client.SyncFunctionsResponder(resp)
30882	if err != nil {
30883		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure responding to request")
30884		return
30885	}
30886
30887	return
30888}
30889
30890// SyncFunctionsPreparer prepares the SyncFunctions request.
30891func (client AppsClient) SyncFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
30892	pathParameters := map[string]interface{}{
30893		"name":              autorest.Encode("path", name),
30894		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30895		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30896	}
30897
30898	const APIVersion = "2018-02-01"
30899	queryParameters := map[string]interface{}{
30900		"api-version": APIVersion,
30901	}
30902
30903	preparer := autorest.CreatePreparer(
30904		autorest.AsPost(),
30905		autorest.WithBaseURL(client.BaseURI),
30906		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync", pathParameters),
30907		autorest.WithQueryParameters(queryParameters))
30908	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30909}
30910
30911// SyncFunctionsSender sends the SyncFunctions request. The method will close the
30912// http.Response Body if it receives an error.
30913func (client AppsClient) SyncFunctionsSender(req *http.Request) (*http.Response, error) {
30914	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30915}
30916
30917// SyncFunctionsResponder handles the response to the SyncFunctions request. The method always
30918// closes the http.Response Body.
30919func (client AppsClient) SyncFunctionsResponder(resp *http.Response) (result autorest.Response, err error) {
30920	err = autorest.Respond(
30921		resp,
30922		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
30923		autorest.ByClosing())
30924	result.Response = resp
30925	return
30926}
30927
30928// SyncFunctionsSlot syncs function trigger metadata to the management database
30929// Parameters:
30930// resourceGroupName - name of the resource group to which the resource belongs.
30931// name - name of the app.
30932// slot - name of the deployment slot.
30933func (client AppsClient) SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
30934	if tracing.IsEnabled() {
30935		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionsSlot")
30936		defer func() {
30937			sc := -1
30938			if result.Response != nil {
30939				sc = result.Response.StatusCode
30940			}
30941			tracing.EndSpan(ctx, sc, err)
30942		}()
30943	}
30944	if err := validation.Validate([]validation.Validation{
30945		{TargetValue: resourceGroupName,
30946			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30947				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30948				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30949		return result, validation.NewError("web.AppsClient", "SyncFunctionsSlot", err.Error())
30950	}
30951
30952	req, err := client.SyncFunctionsSlotPreparer(ctx, resourceGroupName, name, slot)
30953	if err != nil {
30954		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", nil, "Failure preparing request")
30955		return
30956	}
30957
30958	resp, err := client.SyncFunctionsSlotSender(req)
30959	if err != nil {
30960		result.Response = resp
30961		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure sending request")
30962		return
30963	}
30964
30965	result, err = client.SyncFunctionsSlotResponder(resp)
30966	if err != nil {
30967		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure responding to request")
30968		return
30969	}
30970
30971	return
30972}
30973
30974// SyncFunctionsSlotPreparer prepares the SyncFunctionsSlot request.
30975func (client AppsClient) SyncFunctionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
30976	pathParameters := map[string]interface{}{
30977		"name":              autorest.Encode("path", name),
30978		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30979		"slot":              autorest.Encode("path", slot),
30980		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30981	}
30982
30983	const APIVersion = "2018-02-01"
30984	queryParameters := map[string]interface{}{
30985		"api-version": APIVersion,
30986	}
30987
30988	preparer := autorest.CreatePreparer(
30989		autorest.AsPost(),
30990		autorest.WithBaseURL(client.BaseURI),
30991		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync", pathParameters),
30992		autorest.WithQueryParameters(queryParameters))
30993	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30994}
30995
30996// SyncFunctionsSlotSender sends the SyncFunctionsSlot request. The method will close the
30997// http.Response Body if it receives an error.
30998func (client AppsClient) SyncFunctionsSlotSender(req *http.Request) (*http.Response, error) {
30999	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31000}
31001
31002// SyncFunctionsSlotResponder handles the response to the SyncFunctionsSlot request. The method always
31003// closes the http.Response Body.
31004func (client AppsClient) SyncFunctionsSlotResponder(resp *http.Response) (result autorest.Response, err error) {
31005	err = autorest.Respond(
31006		resp,
31007		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
31008		autorest.ByClosing())
31009	result.Response = resp
31010	return
31011}
31012
31013// SyncFunctionTriggers syncs function trigger metadata to the management database
31014// Parameters:
31015// resourceGroupName - name of the resource group to which the resource belongs.
31016// name - name of the app.
31017func (client AppsClient) SyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
31018	if tracing.IsEnabled() {
31019		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionTriggers")
31020		defer func() {
31021			sc := -1
31022			if result.Response != nil {
31023				sc = result.Response.StatusCode
31024			}
31025			tracing.EndSpan(ctx, sc, err)
31026		}()
31027	}
31028	if err := validation.Validate([]validation.Validation{
31029		{TargetValue: resourceGroupName,
31030			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31031				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31032				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31033		return result, validation.NewError("web.AppsClient", "SyncFunctionTriggers", err.Error())
31034	}
31035
31036	req, err := client.SyncFunctionTriggersPreparer(ctx, resourceGroupName, name)
31037	if err != nil {
31038		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", nil, "Failure preparing request")
31039		return
31040	}
31041
31042	resp, err := client.SyncFunctionTriggersSender(req)
31043	if err != nil {
31044		result.Response = resp
31045		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", resp, "Failure sending request")
31046		return
31047	}
31048
31049	result, err = client.SyncFunctionTriggersResponder(resp)
31050	if err != nil {
31051		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", resp, "Failure responding to request")
31052		return
31053	}
31054
31055	return
31056}
31057
31058// SyncFunctionTriggersPreparer prepares the SyncFunctionTriggers request.
31059func (client AppsClient) SyncFunctionTriggersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
31060	pathParameters := map[string]interface{}{
31061		"name":              autorest.Encode("path", name),
31062		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31063		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31064	}
31065
31066	const APIVersion = "2018-02-01"
31067	queryParameters := map[string]interface{}{
31068		"api-version": APIVersion,
31069	}
31070
31071	preparer := autorest.CreatePreparer(
31072		autorest.AsPost(),
31073		autorest.WithBaseURL(client.BaseURI),
31074		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers", pathParameters),
31075		autorest.WithQueryParameters(queryParameters))
31076	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31077}
31078
31079// SyncFunctionTriggersSender sends the SyncFunctionTriggers request. The method will close the
31080// http.Response Body if it receives an error.
31081func (client AppsClient) SyncFunctionTriggersSender(req *http.Request) (*http.Response, error) {
31082	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31083}
31084
31085// SyncFunctionTriggersResponder handles the response to the SyncFunctionTriggers request. The method always
31086// closes the http.Response Body.
31087func (client AppsClient) SyncFunctionTriggersResponder(resp *http.Response) (result autorest.Response, err error) {
31088	err = autorest.Respond(
31089		resp,
31090		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
31091		autorest.ByClosing())
31092	result.Response = resp
31093	return
31094}
31095
31096// SyncFunctionTriggersSlot syncs function trigger metadata to the management database
31097// Parameters:
31098// resourceGroupName - name of the resource group to which the resource belongs.
31099// name - name of the app.
31100// slot - name of the deployment slot.
31101func (client AppsClient) SyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
31102	if tracing.IsEnabled() {
31103		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionTriggersSlot")
31104		defer func() {
31105			sc := -1
31106			if result.Response != nil {
31107				sc = result.Response.StatusCode
31108			}
31109			tracing.EndSpan(ctx, sc, err)
31110		}()
31111	}
31112	if err := validation.Validate([]validation.Validation{
31113		{TargetValue: resourceGroupName,
31114			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31115				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31116				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31117		return result, validation.NewError("web.AppsClient", "SyncFunctionTriggersSlot", err.Error())
31118	}
31119
31120	req, err := client.SyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot)
31121	if err != nil {
31122		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", nil, "Failure preparing request")
31123		return
31124	}
31125
31126	resp, err := client.SyncFunctionTriggersSlotSender(req)
31127	if err != nil {
31128		result.Response = resp
31129		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", resp, "Failure sending request")
31130		return
31131	}
31132
31133	result, err = client.SyncFunctionTriggersSlotResponder(resp)
31134	if err != nil {
31135		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", resp, "Failure responding to request")
31136		return
31137	}
31138
31139	return
31140}
31141
31142// SyncFunctionTriggersSlotPreparer prepares the SyncFunctionTriggersSlot request.
31143func (client AppsClient) SyncFunctionTriggersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
31144	pathParameters := map[string]interface{}{
31145		"name":              autorest.Encode("path", name),
31146		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31147		"slot":              autorest.Encode("path", slot),
31148		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31149	}
31150
31151	const APIVersion = "2018-02-01"
31152	queryParameters := map[string]interface{}{
31153		"api-version": APIVersion,
31154	}
31155
31156	preparer := autorest.CreatePreparer(
31157		autorest.AsPost(),
31158		autorest.WithBaseURL(client.BaseURI),
31159		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers", pathParameters),
31160		autorest.WithQueryParameters(queryParameters))
31161	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31162}
31163
31164// SyncFunctionTriggersSlotSender sends the SyncFunctionTriggersSlot request. The method will close the
31165// http.Response Body if it receives an error.
31166func (client AppsClient) SyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) {
31167	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31168}
31169
31170// SyncFunctionTriggersSlotResponder handles the response to the SyncFunctionTriggersSlot request. The method always
31171// closes the http.Response Body.
31172func (client AppsClient) SyncFunctionTriggersSlotResponder(resp *http.Response) (result autorest.Response, err error) {
31173	err = autorest.Respond(
31174		resp,
31175		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
31176		autorest.ByClosing())
31177	result.Response = resp
31178	return
31179}
31180
31181// SyncRepository sync web app repository.
31182// Parameters:
31183// resourceGroupName - name of the resource group to which the resource belongs.
31184// name - name of web app.
31185func (client AppsClient) SyncRepository(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
31186	if tracing.IsEnabled() {
31187		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncRepository")
31188		defer func() {
31189			sc := -1
31190			if result.Response != nil {
31191				sc = result.Response.StatusCode
31192			}
31193			tracing.EndSpan(ctx, sc, err)
31194		}()
31195	}
31196	if err := validation.Validate([]validation.Validation{
31197		{TargetValue: resourceGroupName,
31198			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31199				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31200				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31201		return result, validation.NewError("web.AppsClient", "SyncRepository", err.Error())
31202	}
31203
31204	req, err := client.SyncRepositoryPreparer(ctx, resourceGroupName, name)
31205	if err != nil {
31206		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepository", nil, "Failure preparing request")
31207		return
31208	}
31209
31210	resp, err := client.SyncRepositorySender(req)
31211	if err != nil {
31212		result.Response = resp
31213		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepository", resp, "Failure sending request")
31214		return
31215	}
31216
31217	result, err = client.SyncRepositoryResponder(resp)
31218	if err != nil {
31219		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepository", resp, "Failure responding to request")
31220		return
31221	}
31222
31223	return
31224}
31225
31226// SyncRepositoryPreparer prepares the SyncRepository request.
31227func (client AppsClient) SyncRepositoryPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
31228	pathParameters := map[string]interface{}{
31229		"name":              autorest.Encode("path", name),
31230		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31231		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31232	}
31233
31234	const APIVersion = "2018-02-01"
31235	queryParameters := map[string]interface{}{
31236		"api-version": APIVersion,
31237	}
31238
31239	preparer := autorest.CreatePreparer(
31240		autorest.AsPost(),
31241		autorest.WithBaseURL(client.BaseURI),
31242		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync", pathParameters),
31243		autorest.WithQueryParameters(queryParameters))
31244	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31245}
31246
31247// SyncRepositorySender sends the SyncRepository request. The method will close the
31248// http.Response Body if it receives an error.
31249func (client AppsClient) SyncRepositorySender(req *http.Request) (*http.Response, error) {
31250	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31251}
31252
31253// SyncRepositoryResponder handles the response to the SyncRepository request. The method always
31254// closes the http.Response Body.
31255func (client AppsClient) SyncRepositoryResponder(resp *http.Response) (result autorest.Response, err error) {
31256	err = autorest.Respond(
31257		resp,
31258		azure.WithErrorUnlessStatusCode(http.StatusOK),
31259		autorest.ByClosing())
31260	result.Response = resp
31261	return
31262}
31263
31264// SyncRepositorySlot sync web app repository.
31265// Parameters:
31266// resourceGroupName - name of the resource group to which the resource belongs.
31267// name - name of web app.
31268// slot - name of web app slot. If not specified then will default to production slot.
31269func (client AppsClient) SyncRepositorySlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
31270	if tracing.IsEnabled() {
31271		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncRepositorySlot")
31272		defer func() {
31273			sc := -1
31274			if result.Response != nil {
31275				sc = result.Response.StatusCode
31276			}
31277			tracing.EndSpan(ctx, sc, err)
31278		}()
31279	}
31280	if err := validation.Validate([]validation.Validation{
31281		{TargetValue: resourceGroupName,
31282			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31283				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31284				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31285		return result, validation.NewError("web.AppsClient", "SyncRepositorySlot", err.Error())
31286	}
31287
31288	req, err := client.SyncRepositorySlotPreparer(ctx, resourceGroupName, name, slot)
31289	if err != nil {
31290		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepositorySlot", nil, "Failure preparing request")
31291		return
31292	}
31293
31294	resp, err := client.SyncRepositorySlotSender(req)
31295	if err != nil {
31296		result.Response = resp
31297		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepositorySlot", resp, "Failure sending request")
31298		return
31299	}
31300
31301	result, err = client.SyncRepositorySlotResponder(resp)
31302	if err != nil {
31303		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepositorySlot", resp, "Failure responding to request")
31304		return
31305	}
31306
31307	return
31308}
31309
31310// SyncRepositorySlotPreparer prepares the SyncRepositorySlot request.
31311func (client AppsClient) SyncRepositorySlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
31312	pathParameters := map[string]interface{}{
31313		"name":              autorest.Encode("path", name),
31314		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31315		"slot":              autorest.Encode("path", slot),
31316		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31317	}
31318
31319	const APIVersion = "2018-02-01"
31320	queryParameters := map[string]interface{}{
31321		"api-version": APIVersion,
31322	}
31323
31324	preparer := autorest.CreatePreparer(
31325		autorest.AsPost(),
31326		autorest.WithBaseURL(client.BaseURI),
31327		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync", pathParameters),
31328		autorest.WithQueryParameters(queryParameters))
31329	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31330}
31331
31332// SyncRepositorySlotSender sends the SyncRepositorySlot request. The method will close the
31333// http.Response Body if it receives an error.
31334func (client AppsClient) SyncRepositorySlotSender(req *http.Request) (*http.Response, error) {
31335	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31336}
31337
31338// SyncRepositorySlotResponder handles the response to the SyncRepositorySlot request. The method always
31339// closes the http.Response Body.
31340func (client AppsClient) SyncRepositorySlotResponder(resp *http.Response) (result autorest.Response, err error) {
31341	err = autorest.Respond(
31342		resp,
31343		azure.WithErrorUnlessStatusCode(http.StatusOK),
31344		autorest.ByClosing())
31345	result.Response = resp
31346	return
31347}
31348
31349// Update creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
31350// Parameters:
31351// resourceGroupName - name of the resource group to which the resource belongs.
31352// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
31353// parameter.
31354// siteEnvelope - a JSON representation of the app properties. See example.
31355func (client AppsClient) Update(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource) (result Site, err error) {
31356	if tracing.IsEnabled() {
31357		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Update")
31358		defer func() {
31359			sc := -1
31360			if result.Response.Response != nil {
31361				sc = result.Response.Response.StatusCode
31362			}
31363			tracing.EndSpan(ctx, sc, err)
31364		}()
31365	}
31366	if err := validation.Validate([]validation.Validation{
31367		{TargetValue: resourceGroupName,
31368			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31369				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31370				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31371		return result, validation.NewError("web.AppsClient", "Update", err.Error())
31372	}
31373
31374	req, err := client.UpdatePreparer(ctx, resourceGroupName, name, siteEnvelope)
31375	if err != nil {
31376		err = autorest.NewErrorWithError(err, "web.AppsClient", "Update", nil, "Failure preparing request")
31377		return
31378	}
31379
31380	resp, err := client.UpdateSender(req)
31381	if err != nil {
31382		result.Response = autorest.Response{Response: resp}
31383		err = autorest.NewErrorWithError(err, "web.AppsClient", "Update", resp, "Failure sending request")
31384		return
31385	}
31386
31387	result, err = client.UpdateResponder(resp)
31388	if err != nil {
31389		err = autorest.NewErrorWithError(err, "web.AppsClient", "Update", resp, "Failure responding to request")
31390		return
31391	}
31392
31393	return
31394}
31395
31396// UpdatePreparer prepares the Update request.
31397func (client AppsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource) (*http.Request, error) {
31398	pathParameters := map[string]interface{}{
31399		"name":              autorest.Encode("path", name),
31400		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31401		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31402	}
31403
31404	const APIVersion = "2018-02-01"
31405	queryParameters := map[string]interface{}{
31406		"api-version": APIVersion,
31407	}
31408
31409	preparer := autorest.CreatePreparer(
31410		autorest.AsContentType("application/json; charset=utf-8"),
31411		autorest.AsPatch(),
31412		autorest.WithBaseURL(client.BaseURI),
31413		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
31414		autorest.WithJSON(siteEnvelope),
31415		autorest.WithQueryParameters(queryParameters))
31416	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31417}
31418
31419// UpdateSender sends the Update request. The method will close the
31420// http.Response Body if it receives an error.
31421func (client AppsClient) UpdateSender(req *http.Request) (*http.Response, error) {
31422	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31423}
31424
31425// UpdateResponder handles the response to the Update request. The method always
31426// closes the http.Response Body.
31427func (client AppsClient) UpdateResponder(resp *http.Response) (result Site, err error) {
31428	err = autorest.Respond(
31429		resp,
31430		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
31431		autorest.ByUnmarshallingJSON(&result),
31432		autorest.ByClosing())
31433	result.Response = autorest.Response{Response: resp}
31434	return
31435}
31436
31437// UpdateApplicationSettings replaces the application settings of an app.
31438// Parameters:
31439// resourceGroupName - name of the resource group to which the resource belongs.
31440// name - name of the app.
31441// appSettings - application settings of the app.
31442func (client AppsClient) UpdateApplicationSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary) (result StringDictionary, err error) {
31443	if tracing.IsEnabled() {
31444		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateApplicationSettings")
31445		defer func() {
31446			sc := -1
31447			if result.Response.Response != nil {
31448				sc = result.Response.Response.StatusCode
31449			}
31450			tracing.EndSpan(ctx, sc, err)
31451		}()
31452	}
31453	if err := validation.Validate([]validation.Validation{
31454		{TargetValue: resourceGroupName,
31455			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31456				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31457				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31458		return result, validation.NewError("web.AppsClient", "UpdateApplicationSettings", err.Error())
31459	}
31460
31461	req, err := client.UpdateApplicationSettingsPreparer(ctx, resourceGroupName, name, appSettings)
31462	if err != nil {
31463		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettings", nil, "Failure preparing request")
31464		return
31465	}
31466
31467	resp, err := client.UpdateApplicationSettingsSender(req)
31468	if err != nil {
31469		result.Response = autorest.Response{Response: resp}
31470		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettings", resp, "Failure sending request")
31471		return
31472	}
31473
31474	result, err = client.UpdateApplicationSettingsResponder(resp)
31475	if err != nil {
31476		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettings", resp, "Failure responding to request")
31477		return
31478	}
31479
31480	return
31481}
31482
31483// UpdateApplicationSettingsPreparer prepares the UpdateApplicationSettings request.
31484func (client AppsClient) UpdateApplicationSettingsPreparer(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary) (*http.Request, error) {
31485	pathParameters := map[string]interface{}{
31486		"name":              autorest.Encode("path", name),
31487		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31488		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31489	}
31490
31491	const APIVersion = "2018-02-01"
31492	queryParameters := map[string]interface{}{
31493		"api-version": APIVersion,
31494	}
31495
31496	preparer := autorest.CreatePreparer(
31497		autorest.AsContentType("application/json; charset=utf-8"),
31498		autorest.AsPut(),
31499		autorest.WithBaseURL(client.BaseURI),
31500		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings", pathParameters),
31501		autorest.WithJSON(appSettings),
31502		autorest.WithQueryParameters(queryParameters))
31503	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31504}
31505
31506// UpdateApplicationSettingsSender sends the UpdateApplicationSettings request. The method will close the
31507// http.Response Body if it receives an error.
31508func (client AppsClient) UpdateApplicationSettingsSender(req *http.Request) (*http.Response, error) {
31509	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31510}
31511
31512// UpdateApplicationSettingsResponder handles the response to the UpdateApplicationSettings request. The method always
31513// closes the http.Response Body.
31514func (client AppsClient) UpdateApplicationSettingsResponder(resp *http.Response) (result StringDictionary, err error) {
31515	err = autorest.Respond(
31516		resp,
31517		azure.WithErrorUnlessStatusCode(http.StatusOK),
31518		autorest.ByUnmarshallingJSON(&result),
31519		autorest.ByClosing())
31520	result.Response = autorest.Response{Response: resp}
31521	return
31522}
31523
31524// UpdateApplicationSettingsSlot replaces the application settings of an app.
31525// Parameters:
31526// resourceGroupName - name of the resource group to which the resource belongs.
31527// name - name of the app.
31528// appSettings - application settings of the app.
31529// slot - name of the deployment slot. If a slot is not specified, the API will update the application settings
31530// for the production slot.
31531func (client AppsClient) UpdateApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, slot string) (result StringDictionary, err error) {
31532	if tracing.IsEnabled() {
31533		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateApplicationSettingsSlot")
31534		defer func() {
31535			sc := -1
31536			if result.Response.Response != nil {
31537				sc = result.Response.Response.StatusCode
31538			}
31539			tracing.EndSpan(ctx, sc, err)
31540		}()
31541	}
31542	if err := validation.Validate([]validation.Validation{
31543		{TargetValue: resourceGroupName,
31544			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31545				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31546				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31547		return result, validation.NewError("web.AppsClient", "UpdateApplicationSettingsSlot", err.Error())
31548	}
31549
31550	req, err := client.UpdateApplicationSettingsSlotPreparer(ctx, resourceGroupName, name, appSettings, slot)
31551	if err != nil {
31552		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettingsSlot", nil, "Failure preparing request")
31553		return
31554	}
31555
31556	resp, err := client.UpdateApplicationSettingsSlotSender(req)
31557	if err != nil {
31558		result.Response = autorest.Response{Response: resp}
31559		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettingsSlot", resp, "Failure sending request")
31560		return
31561	}
31562
31563	result, err = client.UpdateApplicationSettingsSlotResponder(resp)
31564	if err != nil {
31565		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettingsSlot", resp, "Failure responding to request")
31566		return
31567	}
31568
31569	return
31570}
31571
31572// UpdateApplicationSettingsSlotPreparer prepares the UpdateApplicationSettingsSlot request.
31573func (client AppsClient) UpdateApplicationSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, slot string) (*http.Request, error) {
31574	pathParameters := map[string]interface{}{
31575		"name":              autorest.Encode("path", name),
31576		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31577		"slot":              autorest.Encode("path", slot),
31578		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31579	}
31580
31581	const APIVersion = "2018-02-01"
31582	queryParameters := map[string]interface{}{
31583		"api-version": APIVersion,
31584	}
31585
31586	preparer := autorest.CreatePreparer(
31587		autorest.AsContentType("application/json; charset=utf-8"),
31588		autorest.AsPut(),
31589		autorest.WithBaseURL(client.BaseURI),
31590		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings", pathParameters),
31591		autorest.WithJSON(appSettings),
31592		autorest.WithQueryParameters(queryParameters))
31593	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31594}
31595
31596// UpdateApplicationSettingsSlotSender sends the UpdateApplicationSettingsSlot request. The method will close the
31597// http.Response Body if it receives an error.
31598func (client AppsClient) UpdateApplicationSettingsSlotSender(req *http.Request) (*http.Response, error) {
31599	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31600}
31601
31602// UpdateApplicationSettingsSlotResponder handles the response to the UpdateApplicationSettingsSlot request. The method always
31603// closes the http.Response Body.
31604func (client AppsClient) UpdateApplicationSettingsSlotResponder(resp *http.Response) (result StringDictionary, err error) {
31605	err = autorest.Respond(
31606		resp,
31607		azure.WithErrorUnlessStatusCode(http.StatusOK),
31608		autorest.ByUnmarshallingJSON(&result),
31609		autorest.ByClosing())
31610	result.Response = autorest.Response{Response: resp}
31611	return
31612}
31613
31614// UpdateAuthSettings updates the Authentication / Authorization settings associated with web app.
31615// Parameters:
31616// resourceGroupName - name of the resource group to which the resource belongs.
31617// name - name of web app.
31618// siteAuthSettings - auth settings associated with web app.
31619func (client AppsClient) UpdateAuthSettings(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings) (result SiteAuthSettings, err error) {
31620	if tracing.IsEnabled() {
31621		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAuthSettings")
31622		defer func() {
31623			sc := -1
31624			if result.Response.Response != nil {
31625				sc = result.Response.Response.StatusCode
31626			}
31627			tracing.EndSpan(ctx, sc, err)
31628		}()
31629	}
31630	if err := validation.Validate([]validation.Validation{
31631		{TargetValue: resourceGroupName,
31632			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31633				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31634				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31635		return result, validation.NewError("web.AppsClient", "UpdateAuthSettings", err.Error())
31636	}
31637
31638	req, err := client.UpdateAuthSettingsPreparer(ctx, resourceGroupName, name, siteAuthSettings)
31639	if err != nil {
31640		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettings", nil, "Failure preparing request")
31641		return
31642	}
31643
31644	resp, err := client.UpdateAuthSettingsSender(req)
31645	if err != nil {
31646		result.Response = autorest.Response{Response: resp}
31647		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettings", resp, "Failure sending request")
31648		return
31649	}
31650
31651	result, err = client.UpdateAuthSettingsResponder(resp)
31652	if err != nil {
31653		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettings", resp, "Failure responding to request")
31654		return
31655	}
31656
31657	return
31658}
31659
31660// UpdateAuthSettingsPreparer prepares the UpdateAuthSettings request.
31661func (client AppsClient) UpdateAuthSettingsPreparer(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings) (*http.Request, error) {
31662	pathParameters := map[string]interface{}{
31663		"name":              autorest.Encode("path", name),
31664		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31665		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31666	}
31667
31668	const APIVersion = "2018-02-01"
31669	queryParameters := map[string]interface{}{
31670		"api-version": APIVersion,
31671	}
31672
31673	preparer := autorest.CreatePreparer(
31674		autorest.AsContentType("application/json; charset=utf-8"),
31675		autorest.AsPut(),
31676		autorest.WithBaseURL(client.BaseURI),
31677		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings", pathParameters),
31678		autorest.WithJSON(siteAuthSettings),
31679		autorest.WithQueryParameters(queryParameters))
31680	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31681}
31682
31683// UpdateAuthSettingsSender sends the UpdateAuthSettings request. The method will close the
31684// http.Response Body if it receives an error.
31685func (client AppsClient) UpdateAuthSettingsSender(req *http.Request) (*http.Response, error) {
31686	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31687}
31688
31689// UpdateAuthSettingsResponder handles the response to the UpdateAuthSettings request. The method always
31690// closes the http.Response Body.
31691func (client AppsClient) UpdateAuthSettingsResponder(resp *http.Response) (result SiteAuthSettings, err error) {
31692	err = autorest.Respond(
31693		resp,
31694		azure.WithErrorUnlessStatusCode(http.StatusOK),
31695		autorest.ByUnmarshallingJSON(&result),
31696		autorest.ByClosing())
31697	result.Response = autorest.Response{Response: resp}
31698	return
31699}
31700
31701// UpdateAuthSettingsSlot updates the Authentication / Authorization settings associated with web app.
31702// Parameters:
31703// resourceGroupName - name of the resource group to which the resource belongs.
31704// name - name of web app.
31705// siteAuthSettings - auth settings associated with web app.
31706// slot - name of web app slot. If not specified then will default to production slot.
31707func (client AppsClient) UpdateAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, slot string) (result SiteAuthSettings, err error) {
31708	if tracing.IsEnabled() {
31709		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAuthSettingsSlot")
31710		defer func() {
31711			sc := -1
31712			if result.Response.Response != nil {
31713				sc = result.Response.Response.StatusCode
31714			}
31715			tracing.EndSpan(ctx, sc, err)
31716		}()
31717	}
31718	if err := validation.Validate([]validation.Validation{
31719		{TargetValue: resourceGroupName,
31720			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31721				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31722				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31723		return result, validation.NewError("web.AppsClient", "UpdateAuthSettingsSlot", err.Error())
31724	}
31725
31726	req, err := client.UpdateAuthSettingsSlotPreparer(ctx, resourceGroupName, name, siteAuthSettings, slot)
31727	if err != nil {
31728		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsSlot", nil, "Failure preparing request")
31729		return
31730	}
31731
31732	resp, err := client.UpdateAuthSettingsSlotSender(req)
31733	if err != nil {
31734		result.Response = autorest.Response{Response: resp}
31735		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsSlot", resp, "Failure sending request")
31736		return
31737	}
31738
31739	result, err = client.UpdateAuthSettingsSlotResponder(resp)
31740	if err != nil {
31741		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsSlot", resp, "Failure responding to request")
31742		return
31743	}
31744
31745	return
31746}
31747
31748// UpdateAuthSettingsSlotPreparer prepares the UpdateAuthSettingsSlot request.
31749func (client AppsClient) UpdateAuthSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, slot string) (*http.Request, error) {
31750	pathParameters := map[string]interface{}{
31751		"name":              autorest.Encode("path", name),
31752		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31753		"slot":              autorest.Encode("path", slot),
31754		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31755	}
31756
31757	const APIVersion = "2018-02-01"
31758	queryParameters := map[string]interface{}{
31759		"api-version": APIVersion,
31760	}
31761
31762	preparer := autorest.CreatePreparer(
31763		autorest.AsContentType("application/json; charset=utf-8"),
31764		autorest.AsPut(),
31765		autorest.WithBaseURL(client.BaseURI),
31766		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings", pathParameters),
31767		autorest.WithJSON(siteAuthSettings),
31768		autorest.WithQueryParameters(queryParameters))
31769	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31770}
31771
31772// UpdateAuthSettingsSlotSender sends the UpdateAuthSettingsSlot request. The method will close the
31773// http.Response Body if it receives an error.
31774func (client AppsClient) UpdateAuthSettingsSlotSender(req *http.Request) (*http.Response, error) {
31775	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31776}
31777
31778// UpdateAuthSettingsSlotResponder handles the response to the UpdateAuthSettingsSlot request. The method always
31779// closes the http.Response Body.
31780func (client AppsClient) UpdateAuthSettingsSlotResponder(resp *http.Response) (result SiteAuthSettings, err error) {
31781	err = autorest.Respond(
31782		resp,
31783		azure.WithErrorUnlessStatusCode(http.StatusOK),
31784		autorest.ByUnmarshallingJSON(&result),
31785		autorest.ByClosing())
31786	result.Response = autorest.Response{Response: resp}
31787	return
31788}
31789
31790// UpdateAzureStorageAccounts updates the Azure storage account configurations of an app.
31791// Parameters:
31792// resourceGroupName - name of the resource group to which the resource belongs.
31793// name - name of the app.
31794// azureStorageAccounts - azure storage accounts of the app.
31795func (client AppsClient) UpdateAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource) (result AzureStoragePropertyDictionaryResource, err error) {
31796	if tracing.IsEnabled() {
31797		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAzureStorageAccounts")
31798		defer func() {
31799			sc := -1
31800			if result.Response.Response != nil {
31801				sc = result.Response.Response.StatusCode
31802			}
31803			tracing.EndSpan(ctx, sc, err)
31804		}()
31805	}
31806	if err := validation.Validate([]validation.Validation{
31807		{TargetValue: resourceGroupName,
31808			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31809				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31810				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31811		return result, validation.NewError("web.AppsClient", "UpdateAzureStorageAccounts", err.Error())
31812	}
31813
31814	req, err := client.UpdateAzureStorageAccountsPreparer(ctx, resourceGroupName, name, azureStorageAccounts)
31815	if err != nil {
31816		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", nil, "Failure preparing request")
31817		return
31818	}
31819
31820	resp, err := client.UpdateAzureStorageAccountsSender(req)
31821	if err != nil {
31822		result.Response = autorest.Response{Response: resp}
31823		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", resp, "Failure sending request")
31824		return
31825	}
31826
31827	result, err = client.UpdateAzureStorageAccountsResponder(resp)
31828	if err != nil {
31829		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", resp, "Failure responding to request")
31830		return
31831	}
31832
31833	return
31834}
31835
31836// UpdateAzureStorageAccountsPreparer prepares the UpdateAzureStorageAccounts request.
31837func (client AppsClient) UpdateAzureStorageAccountsPreparer(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource) (*http.Request, error) {
31838	pathParameters := map[string]interface{}{
31839		"name":              autorest.Encode("path", name),
31840		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31841		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31842	}
31843
31844	const APIVersion = "2018-02-01"
31845	queryParameters := map[string]interface{}{
31846		"api-version": APIVersion,
31847	}
31848
31849	preparer := autorest.CreatePreparer(
31850		autorest.AsContentType("application/json; charset=utf-8"),
31851		autorest.AsPut(),
31852		autorest.WithBaseURL(client.BaseURI),
31853		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts", pathParameters),
31854		autorest.WithJSON(azureStorageAccounts),
31855		autorest.WithQueryParameters(queryParameters))
31856	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31857}
31858
31859// UpdateAzureStorageAccountsSender sends the UpdateAzureStorageAccounts request. The method will close the
31860// http.Response Body if it receives an error.
31861func (client AppsClient) UpdateAzureStorageAccountsSender(req *http.Request) (*http.Response, error) {
31862	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31863}
31864
31865// UpdateAzureStorageAccountsResponder handles the response to the UpdateAzureStorageAccounts request. The method always
31866// closes the http.Response Body.
31867func (client AppsClient) UpdateAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
31868	err = autorest.Respond(
31869		resp,
31870		azure.WithErrorUnlessStatusCode(http.StatusOK),
31871		autorest.ByUnmarshallingJSON(&result),
31872		autorest.ByClosing())
31873	result.Response = autorest.Response{Response: resp}
31874	return
31875}
31876
31877// UpdateAzureStorageAccountsSlot updates the Azure storage account configurations of an app.
31878// Parameters:
31879// resourceGroupName - name of the resource group to which the resource belongs.
31880// name - name of the app.
31881// azureStorageAccounts - azure storage accounts of the app.
31882// slot - name of the deployment slot. If a slot is not specified, the API will update the Azure storage
31883// account configurations for the production slot.
31884func (client AppsClient) UpdateAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, slot string) (result AzureStoragePropertyDictionaryResource, err error) {
31885	if tracing.IsEnabled() {
31886		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAzureStorageAccountsSlot")
31887		defer func() {
31888			sc := -1
31889			if result.Response.Response != nil {
31890				sc = result.Response.Response.StatusCode
31891			}
31892			tracing.EndSpan(ctx, sc, err)
31893		}()
31894	}
31895	if err := validation.Validate([]validation.Validation{
31896		{TargetValue: resourceGroupName,
31897			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31898				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31899				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31900		return result, validation.NewError("web.AppsClient", "UpdateAzureStorageAccountsSlot", err.Error())
31901	}
31902
31903	req, err := client.UpdateAzureStorageAccountsSlotPreparer(ctx, resourceGroupName, name, azureStorageAccounts, slot)
31904	if err != nil {
31905		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", nil, "Failure preparing request")
31906		return
31907	}
31908
31909	resp, err := client.UpdateAzureStorageAccountsSlotSender(req)
31910	if err != nil {
31911		result.Response = autorest.Response{Response: resp}
31912		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", resp, "Failure sending request")
31913		return
31914	}
31915
31916	result, err = client.UpdateAzureStorageAccountsSlotResponder(resp)
31917	if err != nil {
31918		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", resp, "Failure responding to request")
31919		return
31920	}
31921
31922	return
31923}
31924
31925// UpdateAzureStorageAccountsSlotPreparer prepares the UpdateAzureStorageAccountsSlot request.
31926func (client AppsClient) UpdateAzureStorageAccountsSlotPreparer(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, slot string) (*http.Request, error) {
31927	pathParameters := map[string]interface{}{
31928		"name":              autorest.Encode("path", name),
31929		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31930		"slot":              autorest.Encode("path", slot),
31931		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31932	}
31933
31934	const APIVersion = "2018-02-01"
31935	queryParameters := map[string]interface{}{
31936		"api-version": APIVersion,
31937	}
31938
31939	preparer := autorest.CreatePreparer(
31940		autorest.AsContentType("application/json; charset=utf-8"),
31941		autorest.AsPut(),
31942		autorest.WithBaseURL(client.BaseURI),
31943		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts", pathParameters),
31944		autorest.WithJSON(azureStorageAccounts),
31945		autorest.WithQueryParameters(queryParameters))
31946	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31947}
31948
31949// UpdateAzureStorageAccountsSlotSender sends the UpdateAzureStorageAccountsSlot request. The method will close the
31950// http.Response Body if it receives an error.
31951func (client AppsClient) UpdateAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) {
31952	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31953}
31954
31955// UpdateAzureStorageAccountsSlotResponder handles the response to the UpdateAzureStorageAccountsSlot request. The method always
31956// closes the http.Response Body.
31957func (client AppsClient) UpdateAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
31958	err = autorest.Respond(
31959		resp,
31960		azure.WithErrorUnlessStatusCode(http.StatusOK),
31961		autorest.ByUnmarshallingJSON(&result),
31962		autorest.ByClosing())
31963	result.Response = autorest.Response{Response: resp}
31964	return
31965}
31966
31967// UpdateBackupConfiguration updates the backup configuration of an app.
31968// Parameters:
31969// resourceGroupName - name of the resource group to which the resource belongs.
31970// name - name of the app.
31971// request - edited backup configuration.
31972func (client AppsClient) UpdateBackupConfiguration(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (result BackupRequest, err error) {
31973	if tracing.IsEnabled() {
31974		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateBackupConfiguration")
31975		defer func() {
31976			sc := -1
31977			if result.Response.Response != nil {
31978				sc = result.Response.Response.StatusCode
31979			}
31980			tracing.EndSpan(ctx, sc, err)
31981		}()
31982	}
31983	if err := validation.Validate([]validation.Validation{
31984		{TargetValue: resourceGroupName,
31985			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31986				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31987				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
31988		{TargetValue: request,
31989			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
31990				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
31991					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
31992						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
31993							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
31994							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
31995						}},
31996				}}}}}); err != nil {
31997		return result, validation.NewError("web.AppsClient", "UpdateBackupConfiguration", err.Error())
31998	}
31999
32000	req, err := client.UpdateBackupConfigurationPreparer(ctx, resourceGroupName, name, request)
32001	if err != nil {
32002		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfiguration", nil, "Failure preparing request")
32003		return
32004	}
32005
32006	resp, err := client.UpdateBackupConfigurationSender(req)
32007	if err != nil {
32008		result.Response = autorest.Response{Response: resp}
32009		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfiguration", resp, "Failure sending request")
32010		return
32011	}
32012
32013	result, err = client.UpdateBackupConfigurationResponder(resp)
32014	if err != nil {
32015		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfiguration", resp, "Failure responding to request")
32016		return
32017	}
32018
32019	return
32020}
32021
32022// UpdateBackupConfigurationPreparer prepares the UpdateBackupConfiguration request.
32023func (client AppsClient) UpdateBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (*http.Request, error) {
32024	pathParameters := map[string]interface{}{
32025		"name":              autorest.Encode("path", name),
32026		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32027		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32028	}
32029
32030	const APIVersion = "2018-02-01"
32031	queryParameters := map[string]interface{}{
32032		"api-version": APIVersion,
32033	}
32034
32035	preparer := autorest.CreatePreparer(
32036		autorest.AsContentType("application/json; charset=utf-8"),
32037		autorest.AsPut(),
32038		autorest.WithBaseURL(client.BaseURI),
32039		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup", pathParameters),
32040		autorest.WithJSON(request),
32041		autorest.WithQueryParameters(queryParameters))
32042	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32043}
32044
32045// UpdateBackupConfigurationSender sends the UpdateBackupConfiguration request. The method will close the
32046// http.Response Body if it receives an error.
32047func (client AppsClient) UpdateBackupConfigurationSender(req *http.Request) (*http.Response, error) {
32048	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32049}
32050
32051// UpdateBackupConfigurationResponder handles the response to the UpdateBackupConfiguration request. The method always
32052// closes the http.Response Body.
32053func (client AppsClient) UpdateBackupConfigurationResponder(resp *http.Response) (result BackupRequest, err error) {
32054	err = autorest.Respond(
32055		resp,
32056		azure.WithErrorUnlessStatusCode(http.StatusOK),
32057		autorest.ByUnmarshallingJSON(&result),
32058		autorest.ByClosing())
32059	result.Response = autorest.Response{Response: resp}
32060	return
32061}
32062
32063// UpdateBackupConfigurationSlot updates the backup configuration of an app.
32064// Parameters:
32065// resourceGroupName - name of the resource group to which the resource belongs.
32066// name - name of the app.
32067// request - edited backup configuration.
32068// slot - name of the deployment slot. If a slot is not specified, the API will update the backup configuration
32069// for the production slot.
32070func (client AppsClient) UpdateBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (result BackupRequest, err error) {
32071	if tracing.IsEnabled() {
32072		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateBackupConfigurationSlot")
32073		defer func() {
32074			sc := -1
32075			if result.Response.Response != nil {
32076				sc = result.Response.Response.StatusCode
32077			}
32078			tracing.EndSpan(ctx, sc, err)
32079		}()
32080	}
32081	if err := validation.Validate([]validation.Validation{
32082		{TargetValue: resourceGroupName,
32083			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32084				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32085				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
32086		{TargetValue: request,
32087			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
32088				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
32089					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
32090						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
32091							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
32092							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
32093						}},
32094				}}}}}); err != nil {
32095		return result, validation.NewError("web.AppsClient", "UpdateBackupConfigurationSlot", err.Error())
32096	}
32097
32098	req, err := client.UpdateBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, request, slot)
32099	if err != nil {
32100		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfigurationSlot", nil, "Failure preparing request")
32101		return
32102	}
32103
32104	resp, err := client.UpdateBackupConfigurationSlotSender(req)
32105	if err != nil {
32106		result.Response = autorest.Response{Response: resp}
32107		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfigurationSlot", resp, "Failure sending request")
32108		return
32109	}
32110
32111	result, err = client.UpdateBackupConfigurationSlotResponder(resp)
32112	if err != nil {
32113		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfigurationSlot", resp, "Failure responding to request")
32114		return
32115	}
32116
32117	return
32118}
32119
32120// UpdateBackupConfigurationSlotPreparer prepares the UpdateBackupConfigurationSlot request.
32121func (client AppsClient) UpdateBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (*http.Request, error) {
32122	pathParameters := map[string]interface{}{
32123		"name":              autorest.Encode("path", name),
32124		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32125		"slot":              autorest.Encode("path", slot),
32126		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32127	}
32128
32129	const APIVersion = "2018-02-01"
32130	queryParameters := map[string]interface{}{
32131		"api-version": APIVersion,
32132	}
32133
32134	preparer := autorest.CreatePreparer(
32135		autorest.AsContentType("application/json; charset=utf-8"),
32136		autorest.AsPut(),
32137		autorest.WithBaseURL(client.BaseURI),
32138		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup", pathParameters),
32139		autorest.WithJSON(request),
32140		autorest.WithQueryParameters(queryParameters))
32141	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32142}
32143
32144// UpdateBackupConfigurationSlotSender sends the UpdateBackupConfigurationSlot request. The method will close the
32145// http.Response Body if it receives an error.
32146func (client AppsClient) UpdateBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) {
32147	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32148}
32149
32150// UpdateBackupConfigurationSlotResponder handles the response to the UpdateBackupConfigurationSlot request. The method always
32151// closes the http.Response Body.
32152func (client AppsClient) UpdateBackupConfigurationSlotResponder(resp *http.Response) (result BackupRequest, err error) {
32153	err = autorest.Respond(
32154		resp,
32155		azure.WithErrorUnlessStatusCode(http.StatusOK),
32156		autorest.ByUnmarshallingJSON(&result),
32157		autorest.ByClosing())
32158	result.Response = autorest.Response{Response: resp}
32159	return
32160}
32161
32162// UpdateConfiguration updates the configuration of an app.
32163// Parameters:
32164// resourceGroupName - name of the resource group to which the resource belongs.
32165// name - name of the app.
32166// siteConfig - JSON representation of a SiteConfig object. See example.
32167func (client AppsClient) UpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (result SiteConfigResource, err error) {
32168	if tracing.IsEnabled() {
32169		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConfiguration")
32170		defer func() {
32171			sc := -1
32172			if result.Response.Response != nil {
32173				sc = result.Response.Response.StatusCode
32174			}
32175			tracing.EndSpan(ctx, sc, err)
32176		}()
32177	}
32178	if err := validation.Validate([]validation.Validation{
32179		{TargetValue: resourceGroupName,
32180			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32181				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32182				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32183		return result, validation.NewError("web.AppsClient", "UpdateConfiguration", err.Error())
32184	}
32185
32186	req, err := client.UpdateConfigurationPreparer(ctx, resourceGroupName, name, siteConfig)
32187	if err != nil {
32188		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfiguration", nil, "Failure preparing request")
32189		return
32190	}
32191
32192	resp, err := client.UpdateConfigurationSender(req)
32193	if err != nil {
32194		result.Response = autorest.Response{Response: resp}
32195		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfiguration", resp, "Failure sending request")
32196		return
32197	}
32198
32199	result, err = client.UpdateConfigurationResponder(resp)
32200	if err != nil {
32201		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfiguration", resp, "Failure responding to request")
32202		return
32203	}
32204
32205	return
32206}
32207
32208// UpdateConfigurationPreparer prepares the UpdateConfiguration request.
32209func (client AppsClient) UpdateConfigurationPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (*http.Request, error) {
32210	pathParameters := map[string]interface{}{
32211		"name":              autorest.Encode("path", name),
32212		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32213		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32214	}
32215
32216	const APIVersion = "2018-02-01"
32217	queryParameters := map[string]interface{}{
32218		"api-version": APIVersion,
32219	}
32220
32221	preparer := autorest.CreatePreparer(
32222		autorest.AsContentType("application/json; charset=utf-8"),
32223		autorest.AsPatch(),
32224		autorest.WithBaseURL(client.BaseURI),
32225		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters),
32226		autorest.WithJSON(siteConfig),
32227		autorest.WithQueryParameters(queryParameters))
32228	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32229}
32230
32231// UpdateConfigurationSender sends the UpdateConfiguration request. The method will close the
32232// http.Response Body if it receives an error.
32233func (client AppsClient) UpdateConfigurationSender(req *http.Request) (*http.Response, error) {
32234	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32235}
32236
32237// UpdateConfigurationResponder handles the response to the UpdateConfiguration request. The method always
32238// closes the http.Response Body.
32239func (client AppsClient) UpdateConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) {
32240	err = autorest.Respond(
32241		resp,
32242		azure.WithErrorUnlessStatusCode(http.StatusOK),
32243		autorest.ByUnmarshallingJSON(&result),
32244		autorest.ByClosing())
32245	result.Response = autorest.Response{Response: resp}
32246	return
32247}
32248
32249// UpdateConfigurationSlot updates the configuration of an app.
32250// Parameters:
32251// resourceGroupName - name of the resource group to which the resource belongs.
32252// name - name of the app.
32253// siteConfig - JSON representation of a SiteConfig object. See example.
32254// slot - name of the deployment slot. If a slot is not specified, the API will update configuration for the
32255// production slot.
32256func (client AppsClient) UpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (result SiteConfigResource, err error) {
32257	if tracing.IsEnabled() {
32258		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConfigurationSlot")
32259		defer func() {
32260			sc := -1
32261			if result.Response.Response != nil {
32262				sc = result.Response.Response.StatusCode
32263			}
32264			tracing.EndSpan(ctx, sc, err)
32265		}()
32266	}
32267	if err := validation.Validate([]validation.Validation{
32268		{TargetValue: resourceGroupName,
32269			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32270				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32271				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32272		return result, validation.NewError("web.AppsClient", "UpdateConfigurationSlot", err.Error())
32273	}
32274
32275	req, err := client.UpdateConfigurationSlotPreparer(ctx, resourceGroupName, name, siteConfig, slot)
32276	if err != nil {
32277		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfigurationSlot", nil, "Failure preparing request")
32278		return
32279	}
32280
32281	resp, err := client.UpdateConfigurationSlotSender(req)
32282	if err != nil {
32283		result.Response = autorest.Response{Response: resp}
32284		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfigurationSlot", resp, "Failure sending request")
32285		return
32286	}
32287
32288	result, err = client.UpdateConfigurationSlotResponder(resp)
32289	if err != nil {
32290		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfigurationSlot", resp, "Failure responding to request")
32291		return
32292	}
32293
32294	return
32295}
32296
32297// UpdateConfigurationSlotPreparer prepares the UpdateConfigurationSlot request.
32298func (client AppsClient) UpdateConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (*http.Request, error) {
32299	pathParameters := map[string]interface{}{
32300		"name":              autorest.Encode("path", name),
32301		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32302		"slot":              autorest.Encode("path", slot),
32303		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32304	}
32305
32306	const APIVersion = "2018-02-01"
32307	queryParameters := map[string]interface{}{
32308		"api-version": APIVersion,
32309	}
32310
32311	preparer := autorest.CreatePreparer(
32312		autorest.AsContentType("application/json; charset=utf-8"),
32313		autorest.AsPatch(),
32314		autorest.WithBaseURL(client.BaseURI),
32315		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters),
32316		autorest.WithJSON(siteConfig),
32317		autorest.WithQueryParameters(queryParameters))
32318	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32319}
32320
32321// UpdateConfigurationSlotSender sends the UpdateConfigurationSlot request. The method will close the
32322// http.Response Body if it receives an error.
32323func (client AppsClient) UpdateConfigurationSlotSender(req *http.Request) (*http.Response, error) {
32324	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32325}
32326
32327// UpdateConfigurationSlotResponder handles the response to the UpdateConfigurationSlot request. The method always
32328// closes the http.Response Body.
32329func (client AppsClient) UpdateConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
32330	err = autorest.Respond(
32331		resp,
32332		azure.WithErrorUnlessStatusCode(http.StatusOK),
32333		autorest.ByUnmarshallingJSON(&result),
32334		autorest.ByClosing())
32335	result.Response = autorest.Response{Response: resp}
32336	return
32337}
32338
32339// UpdateConnectionStrings replaces the connection strings of an app.
32340// Parameters:
32341// resourceGroupName - name of the resource group to which the resource belongs.
32342// name - name of the app.
32343// connectionStrings - connection strings of the app or deployment slot. See example.
32344func (client AppsClient) UpdateConnectionStrings(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary) (result ConnectionStringDictionary, err error) {
32345	if tracing.IsEnabled() {
32346		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConnectionStrings")
32347		defer func() {
32348			sc := -1
32349			if result.Response.Response != nil {
32350				sc = result.Response.Response.StatusCode
32351			}
32352			tracing.EndSpan(ctx, sc, err)
32353		}()
32354	}
32355	if err := validation.Validate([]validation.Validation{
32356		{TargetValue: resourceGroupName,
32357			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32358				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32359				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32360		return result, validation.NewError("web.AppsClient", "UpdateConnectionStrings", err.Error())
32361	}
32362
32363	req, err := client.UpdateConnectionStringsPreparer(ctx, resourceGroupName, name, connectionStrings)
32364	if err != nil {
32365		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStrings", nil, "Failure preparing request")
32366		return
32367	}
32368
32369	resp, err := client.UpdateConnectionStringsSender(req)
32370	if err != nil {
32371		result.Response = autorest.Response{Response: resp}
32372		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStrings", resp, "Failure sending request")
32373		return
32374	}
32375
32376	result, err = client.UpdateConnectionStringsResponder(resp)
32377	if err != nil {
32378		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStrings", resp, "Failure responding to request")
32379		return
32380	}
32381
32382	return
32383}
32384
32385// UpdateConnectionStringsPreparer prepares the UpdateConnectionStrings request.
32386func (client AppsClient) UpdateConnectionStringsPreparer(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary) (*http.Request, error) {
32387	pathParameters := map[string]interface{}{
32388		"name":              autorest.Encode("path", name),
32389		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32390		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32391	}
32392
32393	const APIVersion = "2018-02-01"
32394	queryParameters := map[string]interface{}{
32395		"api-version": APIVersion,
32396	}
32397
32398	preparer := autorest.CreatePreparer(
32399		autorest.AsContentType("application/json; charset=utf-8"),
32400		autorest.AsPut(),
32401		autorest.WithBaseURL(client.BaseURI),
32402		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings", pathParameters),
32403		autorest.WithJSON(connectionStrings),
32404		autorest.WithQueryParameters(queryParameters))
32405	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32406}
32407
32408// UpdateConnectionStringsSender sends the UpdateConnectionStrings request. The method will close the
32409// http.Response Body if it receives an error.
32410func (client AppsClient) UpdateConnectionStringsSender(req *http.Request) (*http.Response, error) {
32411	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32412}
32413
32414// UpdateConnectionStringsResponder handles the response to the UpdateConnectionStrings request. The method always
32415// closes the http.Response Body.
32416func (client AppsClient) UpdateConnectionStringsResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
32417	err = autorest.Respond(
32418		resp,
32419		azure.WithErrorUnlessStatusCode(http.StatusOK),
32420		autorest.ByUnmarshallingJSON(&result),
32421		autorest.ByClosing())
32422	result.Response = autorest.Response{Response: resp}
32423	return
32424}
32425
32426// UpdateConnectionStringsSlot replaces the connection strings of an app.
32427// Parameters:
32428// resourceGroupName - name of the resource group to which the resource belongs.
32429// name - name of the app.
32430// connectionStrings - connection strings of the app or deployment slot. See example.
32431// slot - name of the deployment slot. If a slot is not specified, the API will update the connection settings
32432// for the production slot.
32433func (client AppsClient) UpdateConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, slot string) (result ConnectionStringDictionary, err error) {
32434	if tracing.IsEnabled() {
32435		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConnectionStringsSlot")
32436		defer func() {
32437			sc := -1
32438			if result.Response.Response != nil {
32439				sc = result.Response.Response.StatusCode
32440			}
32441			tracing.EndSpan(ctx, sc, err)
32442		}()
32443	}
32444	if err := validation.Validate([]validation.Validation{
32445		{TargetValue: resourceGroupName,
32446			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32447				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32448				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32449		return result, validation.NewError("web.AppsClient", "UpdateConnectionStringsSlot", err.Error())
32450	}
32451
32452	req, err := client.UpdateConnectionStringsSlotPreparer(ctx, resourceGroupName, name, connectionStrings, slot)
32453	if err != nil {
32454		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStringsSlot", nil, "Failure preparing request")
32455		return
32456	}
32457
32458	resp, err := client.UpdateConnectionStringsSlotSender(req)
32459	if err != nil {
32460		result.Response = autorest.Response{Response: resp}
32461		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStringsSlot", resp, "Failure sending request")
32462		return
32463	}
32464
32465	result, err = client.UpdateConnectionStringsSlotResponder(resp)
32466	if err != nil {
32467		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStringsSlot", resp, "Failure responding to request")
32468		return
32469	}
32470
32471	return
32472}
32473
32474// UpdateConnectionStringsSlotPreparer prepares the UpdateConnectionStringsSlot request.
32475func (client AppsClient) UpdateConnectionStringsSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, slot string) (*http.Request, error) {
32476	pathParameters := map[string]interface{}{
32477		"name":              autorest.Encode("path", name),
32478		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32479		"slot":              autorest.Encode("path", slot),
32480		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32481	}
32482
32483	const APIVersion = "2018-02-01"
32484	queryParameters := map[string]interface{}{
32485		"api-version": APIVersion,
32486	}
32487
32488	preparer := autorest.CreatePreparer(
32489		autorest.AsContentType("application/json; charset=utf-8"),
32490		autorest.AsPut(),
32491		autorest.WithBaseURL(client.BaseURI),
32492		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings", pathParameters),
32493		autorest.WithJSON(connectionStrings),
32494		autorest.WithQueryParameters(queryParameters))
32495	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32496}
32497
32498// UpdateConnectionStringsSlotSender sends the UpdateConnectionStringsSlot request. The method will close the
32499// http.Response Body if it receives an error.
32500func (client AppsClient) UpdateConnectionStringsSlotSender(req *http.Request) (*http.Response, error) {
32501	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32502}
32503
32504// UpdateConnectionStringsSlotResponder handles the response to the UpdateConnectionStringsSlot request. The method always
32505// closes the http.Response Body.
32506func (client AppsClient) UpdateConnectionStringsSlotResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
32507	err = autorest.Respond(
32508		resp,
32509		azure.WithErrorUnlessStatusCode(http.StatusOK),
32510		autorest.ByUnmarshallingJSON(&result),
32511		autorest.ByClosing())
32512	result.Response = autorest.Response{Response: resp}
32513	return
32514}
32515
32516// UpdateDiagnosticLogsConfig updates the logging configuration of an app.
32517// Parameters:
32518// resourceGroupName - name of the resource group to which the resource belongs.
32519// name - name of the app.
32520// siteLogsConfig - a SiteLogsConfig JSON object that contains the logging configuration to change in the
32521// "properties" property.
32522func (client AppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig) (result SiteLogsConfig, err error) {
32523	if tracing.IsEnabled() {
32524		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDiagnosticLogsConfig")
32525		defer func() {
32526			sc := -1
32527			if result.Response.Response != nil {
32528				sc = result.Response.Response.StatusCode
32529			}
32530			tracing.EndSpan(ctx, sc, err)
32531		}()
32532	}
32533	if err := validation.Validate([]validation.Validation{
32534		{TargetValue: resourceGroupName,
32535			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32536				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32537				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
32538		{TargetValue: siteLogsConfig,
32539			Constraints: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties", Name: validation.Null, Rule: false,
32540				Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs", Name: validation.Null, Rule: false,
32541					Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage", Name: validation.Null, Rule: false,
32542						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage.SasURL", Name: validation.Null, Rule: true, Chain: nil}}},
32543					}},
32544					{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs", Name: validation.Null, Rule: false,
32545						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false,
32546							Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false,
32547								Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
32548									{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil},
32549								}},
32550							}},
32551						}},
32552				}}}}}); err != nil {
32553		return result, validation.NewError("web.AppsClient", "UpdateDiagnosticLogsConfig", err.Error())
32554	}
32555
32556	req, err := client.UpdateDiagnosticLogsConfigPreparer(ctx, resourceGroupName, name, siteLogsConfig)
32557	if err != nil {
32558		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfig", nil, "Failure preparing request")
32559		return
32560	}
32561
32562	resp, err := client.UpdateDiagnosticLogsConfigSender(req)
32563	if err != nil {
32564		result.Response = autorest.Response{Response: resp}
32565		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfig", resp, "Failure sending request")
32566		return
32567	}
32568
32569	result, err = client.UpdateDiagnosticLogsConfigResponder(resp)
32570	if err != nil {
32571		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfig", resp, "Failure responding to request")
32572		return
32573	}
32574
32575	return
32576}
32577
32578// UpdateDiagnosticLogsConfigPreparer prepares the UpdateDiagnosticLogsConfig request.
32579func (client AppsClient) UpdateDiagnosticLogsConfigPreparer(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig) (*http.Request, error) {
32580	pathParameters := map[string]interface{}{
32581		"name":              autorest.Encode("path", name),
32582		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32583		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32584	}
32585
32586	const APIVersion = "2018-02-01"
32587	queryParameters := map[string]interface{}{
32588		"api-version": APIVersion,
32589	}
32590
32591	preparer := autorest.CreatePreparer(
32592		autorest.AsContentType("application/json; charset=utf-8"),
32593		autorest.AsPut(),
32594		autorest.WithBaseURL(client.BaseURI),
32595		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs", pathParameters),
32596		autorest.WithJSON(siteLogsConfig),
32597		autorest.WithQueryParameters(queryParameters))
32598	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32599}
32600
32601// UpdateDiagnosticLogsConfigSender sends the UpdateDiagnosticLogsConfig request. The method will close the
32602// http.Response Body if it receives an error.
32603func (client AppsClient) UpdateDiagnosticLogsConfigSender(req *http.Request) (*http.Response, error) {
32604	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32605}
32606
32607// UpdateDiagnosticLogsConfigResponder handles the response to the UpdateDiagnosticLogsConfig request. The method always
32608// closes the http.Response Body.
32609func (client AppsClient) UpdateDiagnosticLogsConfigResponder(resp *http.Response) (result SiteLogsConfig, err error) {
32610	err = autorest.Respond(
32611		resp,
32612		azure.WithErrorUnlessStatusCode(http.StatusOK),
32613		autorest.ByUnmarshallingJSON(&result),
32614		autorest.ByClosing())
32615	result.Response = autorest.Response{Response: resp}
32616	return
32617}
32618
32619// UpdateDiagnosticLogsConfigSlot updates the logging configuration of an app.
32620// Parameters:
32621// resourceGroupName - name of the resource group to which the resource belongs.
32622// name - name of the app.
32623// siteLogsConfig - a SiteLogsConfig JSON object that contains the logging configuration to change in the
32624// "properties" property.
32625// slot - name of the deployment slot. If a slot is not specified, the API will update the logging
32626// configuration for the production slot.
32627func (client AppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, slot string) (result SiteLogsConfig, err error) {
32628	if tracing.IsEnabled() {
32629		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDiagnosticLogsConfigSlot")
32630		defer func() {
32631			sc := -1
32632			if result.Response.Response != nil {
32633				sc = result.Response.Response.StatusCode
32634			}
32635			tracing.EndSpan(ctx, sc, err)
32636		}()
32637	}
32638	if err := validation.Validate([]validation.Validation{
32639		{TargetValue: resourceGroupName,
32640			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32641				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32642				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
32643		{TargetValue: siteLogsConfig,
32644			Constraints: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties", Name: validation.Null, Rule: false,
32645				Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs", Name: validation.Null, Rule: false,
32646					Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage", Name: validation.Null, Rule: false,
32647						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage.SasURL", Name: validation.Null, Rule: true, Chain: nil}}},
32648					}},
32649					{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs", Name: validation.Null, Rule: false,
32650						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false,
32651							Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false,
32652								Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
32653									{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil},
32654								}},
32655							}},
32656						}},
32657				}}}}}); err != nil {
32658		return result, validation.NewError("web.AppsClient", "UpdateDiagnosticLogsConfigSlot", err.Error())
32659	}
32660
32661	req, err := client.UpdateDiagnosticLogsConfigSlotPreparer(ctx, resourceGroupName, name, siteLogsConfig, slot)
32662	if err != nil {
32663		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfigSlot", nil, "Failure preparing request")
32664		return
32665	}
32666
32667	resp, err := client.UpdateDiagnosticLogsConfigSlotSender(req)
32668	if err != nil {
32669		result.Response = autorest.Response{Response: resp}
32670		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfigSlot", resp, "Failure sending request")
32671		return
32672	}
32673
32674	result, err = client.UpdateDiagnosticLogsConfigSlotResponder(resp)
32675	if err != nil {
32676		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfigSlot", resp, "Failure responding to request")
32677		return
32678	}
32679
32680	return
32681}
32682
32683// UpdateDiagnosticLogsConfigSlotPreparer prepares the UpdateDiagnosticLogsConfigSlot request.
32684func (client AppsClient) UpdateDiagnosticLogsConfigSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, slot string) (*http.Request, error) {
32685	pathParameters := map[string]interface{}{
32686		"name":              autorest.Encode("path", name),
32687		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32688		"slot":              autorest.Encode("path", slot),
32689		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32690	}
32691
32692	const APIVersion = "2018-02-01"
32693	queryParameters := map[string]interface{}{
32694		"api-version": APIVersion,
32695	}
32696
32697	preparer := autorest.CreatePreparer(
32698		autorest.AsContentType("application/json; charset=utf-8"),
32699		autorest.AsPut(),
32700		autorest.WithBaseURL(client.BaseURI),
32701		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs", pathParameters),
32702		autorest.WithJSON(siteLogsConfig),
32703		autorest.WithQueryParameters(queryParameters))
32704	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32705}
32706
32707// UpdateDiagnosticLogsConfigSlotSender sends the UpdateDiagnosticLogsConfigSlot request. The method will close the
32708// http.Response Body if it receives an error.
32709func (client AppsClient) UpdateDiagnosticLogsConfigSlotSender(req *http.Request) (*http.Response, error) {
32710	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32711}
32712
32713// UpdateDiagnosticLogsConfigSlotResponder handles the response to the UpdateDiagnosticLogsConfigSlot request. The method always
32714// closes the http.Response Body.
32715func (client AppsClient) UpdateDiagnosticLogsConfigSlotResponder(resp *http.Response) (result SiteLogsConfig, err error) {
32716	err = autorest.Respond(
32717		resp,
32718		azure.WithErrorUnlessStatusCode(http.StatusOK),
32719		autorest.ByUnmarshallingJSON(&result),
32720		autorest.ByClosing())
32721	result.Response = autorest.Response{Response: resp}
32722	return
32723}
32724
32725// UpdateDomainOwnershipIdentifier creates a domain ownership identifier for web app, or updates an existing ownership
32726// identifier.
32727// Parameters:
32728// resourceGroupName - name of the resource group to which the resource belongs.
32729// name - name of the app.
32730// domainOwnershipIdentifierName - name of domain ownership identifier.
32731// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
32732func (client AppsClient) UpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (result Identifier, err error) {
32733	if tracing.IsEnabled() {
32734		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDomainOwnershipIdentifier")
32735		defer func() {
32736			sc := -1
32737			if result.Response.Response != nil {
32738				sc = result.Response.Response.StatusCode
32739			}
32740			tracing.EndSpan(ctx, sc, err)
32741		}()
32742	}
32743	if err := validation.Validate([]validation.Validation{
32744		{TargetValue: resourceGroupName,
32745			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32746				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32747				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32748		return result, validation.NewError("web.AppsClient", "UpdateDomainOwnershipIdentifier", err.Error())
32749	}
32750
32751	req, err := client.UpdateDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier)
32752	if err != nil {
32753		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifier", nil, "Failure preparing request")
32754		return
32755	}
32756
32757	resp, err := client.UpdateDomainOwnershipIdentifierSender(req)
32758	if err != nil {
32759		result.Response = autorest.Response{Response: resp}
32760		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifier", resp, "Failure sending request")
32761		return
32762	}
32763
32764	result, err = client.UpdateDomainOwnershipIdentifierResponder(resp)
32765	if err != nil {
32766		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifier", resp, "Failure responding to request")
32767		return
32768	}
32769
32770	return
32771}
32772
32773// UpdateDomainOwnershipIdentifierPreparer prepares the UpdateDomainOwnershipIdentifier request.
32774func (client AppsClient) UpdateDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (*http.Request, error) {
32775	pathParameters := map[string]interface{}{
32776		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
32777		"name":                          autorest.Encode("path", name),
32778		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
32779		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
32780	}
32781
32782	const APIVersion = "2018-02-01"
32783	queryParameters := map[string]interface{}{
32784		"api-version": APIVersion,
32785	}
32786
32787	preparer := autorest.CreatePreparer(
32788		autorest.AsContentType("application/json; charset=utf-8"),
32789		autorest.AsPatch(),
32790		autorest.WithBaseURL(client.BaseURI),
32791		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
32792		autorest.WithJSON(domainOwnershipIdentifier),
32793		autorest.WithQueryParameters(queryParameters))
32794	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32795}
32796
32797// UpdateDomainOwnershipIdentifierSender sends the UpdateDomainOwnershipIdentifier request. The method will close the
32798// http.Response Body if it receives an error.
32799func (client AppsClient) UpdateDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
32800	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32801}
32802
32803// UpdateDomainOwnershipIdentifierResponder handles the response to the UpdateDomainOwnershipIdentifier request. The method always
32804// closes the http.Response Body.
32805func (client AppsClient) UpdateDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) {
32806	err = autorest.Respond(
32807		resp,
32808		azure.WithErrorUnlessStatusCode(http.StatusOK),
32809		autorest.ByUnmarshallingJSON(&result),
32810		autorest.ByClosing())
32811	result.Response = autorest.Response{Response: resp}
32812	return
32813}
32814
32815// UpdateDomainOwnershipIdentifierSlot creates a domain ownership identifier for web app, or updates an existing
32816// ownership identifier.
32817// Parameters:
32818// resourceGroupName - name of the resource group to which the resource belongs.
32819// name - name of the app.
32820// domainOwnershipIdentifierName - name of domain ownership identifier.
32821// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
32822// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
32823// production slot.
32824func (client AppsClient) UpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (result Identifier, err error) {
32825	if tracing.IsEnabled() {
32826		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDomainOwnershipIdentifierSlot")
32827		defer func() {
32828			sc := -1
32829			if result.Response.Response != nil {
32830				sc = result.Response.Response.StatusCode
32831			}
32832			tracing.EndSpan(ctx, sc, err)
32833		}()
32834	}
32835	if err := validation.Validate([]validation.Validation{
32836		{TargetValue: resourceGroupName,
32837			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32838				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32839				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32840		return result, validation.NewError("web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", err.Error())
32841	}
32842
32843	req, err := client.UpdateDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, slot)
32844	if err != nil {
32845		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
32846		return
32847	}
32848
32849	resp, err := client.UpdateDomainOwnershipIdentifierSlotSender(req)
32850	if err != nil {
32851		result.Response = autorest.Response{Response: resp}
32852		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", resp, "Failure sending request")
32853		return
32854	}
32855
32856	result, err = client.UpdateDomainOwnershipIdentifierSlotResponder(resp)
32857	if err != nil {
32858		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
32859		return
32860	}
32861
32862	return
32863}
32864
32865// UpdateDomainOwnershipIdentifierSlotPreparer prepares the UpdateDomainOwnershipIdentifierSlot request.
32866func (client AppsClient) UpdateDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (*http.Request, error) {
32867	pathParameters := map[string]interface{}{
32868		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
32869		"name":                          autorest.Encode("path", name),
32870		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
32871		"slot":                          autorest.Encode("path", slot),
32872		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
32873	}
32874
32875	const APIVersion = "2018-02-01"
32876	queryParameters := map[string]interface{}{
32877		"api-version": APIVersion,
32878	}
32879
32880	preparer := autorest.CreatePreparer(
32881		autorest.AsContentType("application/json; charset=utf-8"),
32882		autorest.AsPatch(),
32883		autorest.WithBaseURL(client.BaseURI),
32884		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
32885		autorest.WithJSON(domainOwnershipIdentifier),
32886		autorest.WithQueryParameters(queryParameters))
32887	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32888}
32889
32890// UpdateDomainOwnershipIdentifierSlotSender sends the UpdateDomainOwnershipIdentifierSlot request. The method will close the
32891// http.Response Body if it receives an error.
32892func (client AppsClient) UpdateDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
32893	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32894}
32895
32896// UpdateDomainOwnershipIdentifierSlotResponder handles the response to the UpdateDomainOwnershipIdentifierSlot request. The method always
32897// closes the http.Response Body.
32898func (client AppsClient) UpdateDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) {
32899	err = autorest.Respond(
32900		resp,
32901		azure.WithErrorUnlessStatusCode(http.StatusOK),
32902		autorest.ByUnmarshallingJSON(&result),
32903		autorest.ByClosing())
32904	result.Response = autorest.Response{Response: resp}
32905	return
32906}
32907
32908// UpdateHybridConnection creates a new Hybrid Connection using a Service Bus relay.
32909// Parameters:
32910// resourceGroupName - name of the resource group to which the resource belongs.
32911// name - the name of the web app.
32912// namespaceName - the namespace for this hybrid connection.
32913// relayName - the relay name for this hybrid connection.
32914// connectionEnvelope - the details of the hybrid connection.
32915func (client AppsClient) UpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) {
32916	if tracing.IsEnabled() {
32917		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateHybridConnection")
32918		defer func() {
32919			sc := -1
32920			if result.Response.Response != nil {
32921				sc = result.Response.Response.StatusCode
32922			}
32923			tracing.EndSpan(ctx, sc, err)
32924		}()
32925	}
32926	if err := validation.Validate([]validation.Validation{
32927		{TargetValue: resourceGroupName,
32928			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32929				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32930				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32931		return result, validation.NewError("web.AppsClient", "UpdateHybridConnection", err.Error())
32932	}
32933
32934	req, err := client.UpdateHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope)
32935	if err != nil {
32936		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnection", nil, "Failure preparing request")
32937		return
32938	}
32939
32940	resp, err := client.UpdateHybridConnectionSender(req)
32941	if err != nil {
32942		result.Response = autorest.Response{Response: resp}
32943		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnection", resp, "Failure sending request")
32944		return
32945	}
32946
32947	result, err = client.UpdateHybridConnectionResponder(resp)
32948	if err != nil {
32949		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnection", resp, "Failure responding to request")
32950		return
32951	}
32952
32953	return
32954}
32955
32956// UpdateHybridConnectionPreparer prepares the UpdateHybridConnection request.
32957func (client AppsClient) UpdateHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (*http.Request, error) {
32958	pathParameters := map[string]interface{}{
32959		"name":              autorest.Encode("path", name),
32960		"namespaceName":     autorest.Encode("path", namespaceName),
32961		"relayName":         autorest.Encode("path", relayName),
32962		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32963		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32964	}
32965
32966	const APIVersion = "2018-02-01"
32967	queryParameters := map[string]interface{}{
32968		"api-version": APIVersion,
32969	}
32970
32971	preparer := autorest.CreatePreparer(
32972		autorest.AsContentType("application/json; charset=utf-8"),
32973		autorest.AsPatch(),
32974		autorest.WithBaseURL(client.BaseURI),
32975		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
32976		autorest.WithJSON(connectionEnvelope),
32977		autorest.WithQueryParameters(queryParameters))
32978	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32979}
32980
32981// UpdateHybridConnectionSender sends the UpdateHybridConnection request. The method will close the
32982// http.Response Body if it receives an error.
32983func (client AppsClient) UpdateHybridConnectionSender(req *http.Request) (*http.Response, error) {
32984	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32985}
32986
32987// UpdateHybridConnectionResponder handles the response to the UpdateHybridConnection request. The method always
32988// closes the http.Response Body.
32989func (client AppsClient) UpdateHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) {
32990	err = autorest.Respond(
32991		resp,
32992		azure.WithErrorUnlessStatusCode(http.StatusOK),
32993		autorest.ByUnmarshallingJSON(&result),
32994		autorest.ByClosing())
32995	result.Response = autorest.Response{Response: resp}
32996	return
32997}
32998
32999// UpdateHybridConnectionSlot creates a new Hybrid Connection using a Service Bus relay.
33000// Parameters:
33001// resourceGroupName - name of the resource group to which the resource belongs.
33002// name - the name of the web app.
33003// namespaceName - the namespace for this hybrid connection.
33004// relayName - the relay name for this hybrid connection.
33005// connectionEnvelope - the details of the hybrid connection.
33006// slot - the name of the slot for the web app.
33007func (client AppsClient) UpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) {
33008	if tracing.IsEnabled() {
33009		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateHybridConnectionSlot")
33010		defer func() {
33011			sc := -1
33012			if result.Response.Response != nil {
33013				sc = result.Response.Response.StatusCode
33014			}
33015			tracing.EndSpan(ctx, sc, err)
33016		}()
33017	}
33018	if err := validation.Validate([]validation.Validation{
33019		{TargetValue: resourceGroupName,
33020			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33021				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33022				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33023		return result, validation.NewError("web.AppsClient", "UpdateHybridConnectionSlot", err.Error())
33024	}
33025
33026	req, err := client.UpdateHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot)
33027	if err != nil {
33028		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnectionSlot", nil, "Failure preparing request")
33029		return
33030	}
33031
33032	resp, err := client.UpdateHybridConnectionSlotSender(req)
33033	if err != nil {
33034		result.Response = autorest.Response{Response: resp}
33035		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnectionSlot", resp, "Failure sending request")
33036		return
33037	}
33038
33039	result, err = client.UpdateHybridConnectionSlotResponder(resp)
33040	if err != nil {
33041		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnectionSlot", resp, "Failure responding to request")
33042		return
33043	}
33044
33045	return
33046}
33047
33048// UpdateHybridConnectionSlotPreparer prepares the UpdateHybridConnectionSlot request.
33049func (client AppsClient) UpdateHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (*http.Request, error) {
33050	pathParameters := map[string]interface{}{
33051		"name":              autorest.Encode("path", name),
33052		"namespaceName":     autorest.Encode("path", namespaceName),
33053		"relayName":         autorest.Encode("path", relayName),
33054		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33055		"slot":              autorest.Encode("path", slot),
33056		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33057	}
33058
33059	const APIVersion = "2018-02-01"
33060	queryParameters := map[string]interface{}{
33061		"api-version": APIVersion,
33062	}
33063
33064	preparer := autorest.CreatePreparer(
33065		autorest.AsContentType("application/json; charset=utf-8"),
33066		autorest.AsPatch(),
33067		autorest.WithBaseURL(client.BaseURI),
33068		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
33069		autorest.WithJSON(connectionEnvelope),
33070		autorest.WithQueryParameters(queryParameters))
33071	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33072}
33073
33074// UpdateHybridConnectionSlotSender sends the UpdateHybridConnectionSlot request. The method will close the
33075// http.Response Body if it receives an error.
33076func (client AppsClient) UpdateHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
33077	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33078}
33079
33080// UpdateHybridConnectionSlotResponder handles the response to the UpdateHybridConnectionSlot request. The method always
33081// closes the http.Response Body.
33082func (client AppsClient) UpdateHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) {
33083	err = autorest.Respond(
33084		resp,
33085		azure.WithErrorUnlessStatusCode(http.StatusOK),
33086		autorest.ByUnmarshallingJSON(&result),
33087		autorest.ByClosing())
33088	result.Response = autorest.Response{Response: resp}
33089	return
33090}
33091
33092// UpdateMetadata replaces the metadata of an app.
33093// Parameters:
33094// resourceGroupName - name of the resource group to which the resource belongs.
33095// name - name of the app.
33096// metadata - edited metadata of the app or deployment slot. See example.
33097func (client AppsClient) UpdateMetadata(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary) (result StringDictionary, err error) {
33098	if tracing.IsEnabled() {
33099		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateMetadata")
33100		defer func() {
33101			sc := -1
33102			if result.Response.Response != nil {
33103				sc = result.Response.Response.StatusCode
33104			}
33105			tracing.EndSpan(ctx, sc, err)
33106		}()
33107	}
33108	if err := validation.Validate([]validation.Validation{
33109		{TargetValue: resourceGroupName,
33110			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33111				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33112				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33113		return result, validation.NewError("web.AppsClient", "UpdateMetadata", err.Error())
33114	}
33115
33116	req, err := client.UpdateMetadataPreparer(ctx, resourceGroupName, name, metadata)
33117	if err != nil {
33118		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadata", nil, "Failure preparing request")
33119		return
33120	}
33121
33122	resp, err := client.UpdateMetadataSender(req)
33123	if err != nil {
33124		result.Response = autorest.Response{Response: resp}
33125		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadata", resp, "Failure sending request")
33126		return
33127	}
33128
33129	result, err = client.UpdateMetadataResponder(resp)
33130	if err != nil {
33131		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadata", resp, "Failure responding to request")
33132		return
33133	}
33134
33135	return
33136}
33137
33138// UpdateMetadataPreparer prepares the UpdateMetadata request.
33139func (client AppsClient) UpdateMetadataPreparer(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary) (*http.Request, error) {
33140	pathParameters := map[string]interface{}{
33141		"name":              autorest.Encode("path", name),
33142		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33143		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33144	}
33145
33146	const APIVersion = "2018-02-01"
33147	queryParameters := map[string]interface{}{
33148		"api-version": APIVersion,
33149	}
33150
33151	preparer := autorest.CreatePreparer(
33152		autorest.AsContentType("application/json; charset=utf-8"),
33153		autorest.AsPut(),
33154		autorest.WithBaseURL(client.BaseURI),
33155		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata", pathParameters),
33156		autorest.WithJSON(metadata),
33157		autorest.WithQueryParameters(queryParameters))
33158	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33159}
33160
33161// UpdateMetadataSender sends the UpdateMetadata request. The method will close the
33162// http.Response Body if it receives an error.
33163func (client AppsClient) UpdateMetadataSender(req *http.Request) (*http.Response, error) {
33164	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33165}
33166
33167// UpdateMetadataResponder handles the response to the UpdateMetadata request. The method always
33168// closes the http.Response Body.
33169func (client AppsClient) UpdateMetadataResponder(resp *http.Response) (result StringDictionary, err error) {
33170	err = autorest.Respond(
33171		resp,
33172		azure.WithErrorUnlessStatusCode(http.StatusOK),
33173		autorest.ByUnmarshallingJSON(&result),
33174		autorest.ByClosing())
33175	result.Response = autorest.Response{Response: resp}
33176	return
33177}
33178
33179// UpdateMetadataSlot replaces the metadata of an app.
33180// Parameters:
33181// resourceGroupName - name of the resource group to which the resource belongs.
33182// name - name of the app.
33183// metadata - edited metadata of the app or deployment slot. See example.
33184// slot - name of the deployment slot. If a slot is not specified, the API will update the metadata for the
33185// production slot.
33186func (client AppsClient) UpdateMetadataSlot(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary, slot string) (result StringDictionary, err error) {
33187	if tracing.IsEnabled() {
33188		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateMetadataSlot")
33189		defer func() {
33190			sc := -1
33191			if result.Response.Response != nil {
33192				sc = result.Response.Response.StatusCode
33193			}
33194			tracing.EndSpan(ctx, sc, err)
33195		}()
33196	}
33197	if err := validation.Validate([]validation.Validation{
33198		{TargetValue: resourceGroupName,
33199			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33200				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33201				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33202		return result, validation.NewError("web.AppsClient", "UpdateMetadataSlot", err.Error())
33203	}
33204
33205	req, err := client.UpdateMetadataSlotPreparer(ctx, resourceGroupName, name, metadata, slot)
33206	if err != nil {
33207		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadataSlot", nil, "Failure preparing request")
33208		return
33209	}
33210
33211	resp, err := client.UpdateMetadataSlotSender(req)
33212	if err != nil {
33213		result.Response = autorest.Response{Response: resp}
33214		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadataSlot", resp, "Failure sending request")
33215		return
33216	}
33217
33218	result, err = client.UpdateMetadataSlotResponder(resp)
33219	if err != nil {
33220		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadataSlot", resp, "Failure responding to request")
33221		return
33222	}
33223
33224	return
33225}
33226
33227// UpdateMetadataSlotPreparer prepares the UpdateMetadataSlot request.
33228func (client AppsClient) UpdateMetadataSlotPreparer(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary, slot string) (*http.Request, error) {
33229	pathParameters := map[string]interface{}{
33230		"name":              autorest.Encode("path", name),
33231		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33232		"slot":              autorest.Encode("path", slot),
33233		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33234	}
33235
33236	const APIVersion = "2018-02-01"
33237	queryParameters := map[string]interface{}{
33238		"api-version": APIVersion,
33239	}
33240
33241	preparer := autorest.CreatePreparer(
33242		autorest.AsContentType("application/json; charset=utf-8"),
33243		autorest.AsPut(),
33244		autorest.WithBaseURL(client.BaseURI),
33245		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata", pathParameters),
33246		autorest.WithJSON(metadata),
33247		autorest.WithQueryParameters(queryParameters))
33248	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33249}
33250
33251// UpdateMetadataSlotSender sends the UpdateMetadataSlot request. The method will close the
33252// http.Response Body if it receives an error.
33253func (client AppsClient) UpdateMetadataSlotSender(req *http.Request) (*http.Response, error) {
33254	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33255}
33256
33257// UpdateMetadataSlotResponder handles the response to the UpdateMetadataSlot request. The method always
33258// closes the http.Response Body.
33259func (client AppsClient) UpdateMetadataSlotResponder(resp *http.Response) (result StringDictionary, err error) {
33260	err = autorest.Respond(
33261		resp,
33262		azure.WithErrorUnlessStatusCode(http.StatusOK),
33263		autorest.ByUnmarshallingJSON(&result),
33264		autorest.ByClosing())
33265	result.Response = autorest.Response{Response: resp}
33266	return
33267}
33268
33269// UpdatePremierAddOn updates a named add-on of an app.
33270// Parameters:
33271// resourceGroupName - name of the resource group to which the resource belongs.
33272// name - name of the app.
33273// premierAddOnName - add-on name.
33274// premierAddOn - a JSON representation of the edited premier add-on.
33275func (client AppsClient) UpdatePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource) (result PremierAddOn, err error) {
33276	if tracing.IsEnabled() {
33277		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdatePremierAddOn")
33278		defer func() {
33279			sc := -1
33280			if result.Response.Response != nil {
33281				sc = result.Response.Response.StatusCode
33282			}
33283			tracing.EndSpan(ctx, sc, err)
33284		}()
33285	}
33286	if err := validation.Validate([]validation.Validation{
33287		{TargetValue: resourceGroupName,
33288			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33289				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33290				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33291		return result, validation.NewError("web.AppsClient", "UpdatePremierAddOn", err.Error())
33292	}
33293
33294	req, err := client.UpdatePremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName, premierAddOn)
33295	if err != nil {
33296		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOn", nil, "Failure preparing request")
33297		return
33298	}
33299
33300	resp, err := client.UpdatePremierAddOnSender(req)
33301	if err != nil {
33302		result.Response = autorest.Response{Response: resp}
33303		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOn", resp, "Failure sending request")
33304		return
33305	}
33306
33307	result, err = client.UpdatePremierAddOnResponder(resp)
33308	if err != nil {
33309		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOn", resp, "Failure responding to request")
33310		return
33311	}
33312
33313	return
33314}
33315
33316// UpdatePremierAddOnPreparer prepares the UpdatePremierAddOn request.
33317func (client AppsClient) UpdatePremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource) (*http.Request, error) {
33318	pathParameters := map[string]interface{}{
33319		"name":              autorest.Encode("path", name),
33320		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
33321		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33322		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33323	}
33324
33325	const APIVersion = "2018-02-01"
33326	queryParameters := map[string]interface{}{
33327		"api-version": APIVersion,
33328	}
33329
33330	preparer := autorest.CreatePreparer(
33331		autorest.AsContentType("application/json; charset=utf-8"),
33332		autorest.AsPatch(),
33333		autorest.WithBaseURL(client.BaseURI),
33334		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters),
33335		autorest.WithJSON(premierAddOn),
33336		autorest.WithQueryParameters(queryParameters))
33337	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33338}
33339
33340// UpdatePremierAddOnSender sends the UpdatePremierAddOn request. The method will close the
33341// http.Response Body if it receives an error.
33342func (client AppsClient) UpdatePremierAddOnSender(req *http.Request) (*http.Response, error) {
33343	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33344}
33345
33346// UpdatePremierAddOnResponder handles the response to the UpdatePremierAddOn request. The method always
33347// closes the http.Response Body.
33348func (client AppsClient) UpdatePremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) {
33349	err = autorest.Respond(
33350		resp,
33351		azure.WithErrorUnlessStatusCode(http.StatusOK),
33352		autorest.ByUnmarshallingJSON(&result),
33353		autorest.ByClosing())
33354	result.Response = autorest.Response{Response: resp}
33355	return
33356}
33357
33358// UpdatePremierAddOnSlot updates a named add-on of an app.
33359// Parameters:
33360// resourceGroupName - name of the resource group to which the resource belongs.
33361// name - name of the app.
33362// premierAddOnName - add-on name.
33363// premierAddOn - a JSON representation of the edited premier add-on.
33364// slot - name of the deployment slot. If a slot is not specified, the API will update the named add-on for the
33365// production slot.
33366func (client AppsClient) UpdatePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource, slot string) (result PremierAddOn, err error) {
33367	if tracing.IsEnabled() {
33368		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdatePremierAddOnSlot")
33369		defer func() {
33370			sc := -1
33371			if result.Response.Response != nil {
33372				sc = result.Response.Response.StatusCode
33373			}
33374			tracing.EndSpan(ctx, sc, err)
33375		}()
33376	}
33377	if err := validation.Validate([]validation.Validation{
33378		{TargetValue: resourceGroupName,
33379			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33380				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33381				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33382		return result, validation.NewError("web.AppsClient", "UpdatePremierAddOnSlot", err.Error())
33383	}
33384
33385	req, err := client.UpdatePremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, premierAddOn, slot)
33386	if err != nil {
33387		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOnSlot", nil, "Failure preparing request")
33388		return
33389	}
33390
33391	resp, err := client.UpdatePremierAddOnSlotSender(req)
33392	if err != nil {
33393		result.Response = autorest.Response{Response: resp}
33394		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOnSlot", resp, "Failure sending request")
33395		return
33396	}
33397
33398	result, err = client.UpdatePremierAddOnSlotResponder(resp)
33399	if err != nil {
33400		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOnSlot", resp, "Failure responding to request")
33401		return
33402	}
33403
33404	return
33405}
33406
33407// UpdatePremierAddOnSlotPreparer prepares the UpdatePremierAddOnSlot request.
33408func (client AppsClient) UpdatePremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource, slot string) (*http.Request, error) {
33409	pathParameters := map[string]interface{}{
33410		"name":              autorest.Encode("path", name),
33411		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
33412		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33413		"slot":              autorest.Encode("path", slot),
33414		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33415	}
33416
33417	const APIVersion = "2018-02-01"
33418	queryParameters := map[string]interface{}{
33419		"api-version": APIVersion,
33420	}
33421
33422	preparer := autorest.CreatePreparer(
33423		autorest.AsContentType("application/json; charset=utf-8"),
33424		autorest.AsPatch(),
33425		autorest.WithBaseURL(client.BaseURI),
33426		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters),
33427		autorest.WithJSON(premierAddOn),
33428		autorest.WithQueryParameters(queryParameters))
33429	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33430}
33431
33432// UpdatePremierAddOnSlotSender sends the UpdatePremierAddOnSlot request. The method will close the
33433// http.Response Body if it receives an error.
33434func (client AppsClient) UpdatePremierAddOnSlotSender(req *http.Request) (*http.Response, error) {
33435	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33436}
33437
33438// UpdatePremierAddOnSlotResponder handles the response to the UpdatePremierAddOnSlot request. The method always
33439// closes the http.Response Body.
33440func (client AppsClient) UpdatePremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) {
33441	err = autorest.Respond(
33442		resp,
33443		azure.WithErrorUnlessStatusCode(http.StatusOK),
33444		autorest.ByUnmarshallingJSON(&result),
33445		autorest.ByClosing())
33446	result.Response = autorest.Response{Response: resp}
33447	return
33448}
33449
33450// UpdateRelayServiceConnection creates a new hybrid connection configuration (PUT), or updates an existing one
33451// (PATCH).
33452// Parameters:
33453// resourceGroupName - name of the resource group to which the resource belongs.
33454// name - name of the app.
33455// entityName - name of the hybrid connection configuration.
33456// connectionEnvelope - details of the hybrid connection configuration.
33457func (client AppsClient) UpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) {
33458	if tracing.IsEnabled() {
33459		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateRelayServiceConnection")
33460		defer func() {
33461			sc := -1
33462			if result.Response.Response != nil {
33463				sc = result.Response.Response.StatusCode
33464			}
33465			tracing.EndSpan(ctx, sc, err)
33466		}()
33467	}
33468	if err := validation.Validate([]validation.Validation{
33469		{TargetValue: resourceGroupName,
33470			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33471				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33472				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33473		return result, validation.NewError("web.AppsClient", "UpdateRelayServiceConnection", err.Error())
33474	}
33475
33476	req, err := client.UpdateRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope)
33477	if err != nil {
33478		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnection", nil, "Failure preparing request")
33479		return
33480	}
33481
33482	resp, err := client.UpdateRelayServiceConnectionSender(req)
33483	if err != nil {
33484		result.Response = autorest.Response{Response: resp}
33485		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnection", resp, "Failure sending request")
33486		return
33487	}
33488
33489	result, err = client.UpdateRelayServiceConnectionResponder(resp)
33490	if err != nil {
33491		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnection", resp, "Failure responding to request")
33492		return
33493	}
33494
33495	return
33496}
33497
33498// UpdateRelayServiceConnectionPreparer prepares the UpdateRelayServiceConnection request.
33499func (client AppsClient) UpdateRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (*http.Request, error) {
33500	pathParameters := map[string]interface{}{
33501		"entityName":        autorest.Encode("path", entityName),
33502		"name":              autorest.Encode("path", name),
33503		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33504		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33505	}
33506
33507	const APIVersion = "2018-02-01"
33508	queryParameters := map[string]interface{}{
33509		"api-version": APIVersion,
33510	}
33511
33512	preparer := autorest.CreatePreparer(
33513		autorest.AsContentType("application/json; charset=utf-8"),
33514		autorest.AsPatch(),
33515		autorest.WithBaseURL(client.BaseURI),
33516		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
33517		autorest.WithJSON(connectionEnvelope),
33518		autorest.WithQueryParameters(queryParameters))
33519	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33520}
33521
33522// UpdateRelayServiceConnectionSender sends the UpdateRelayServiceConnection request. The method will close the
33523// http.Response Body if it receives an error.
33524func (client AppsClient) UpdateRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
33525	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33526}
33527
33528// UpdateRelayServiceConnectionResponder handles the response to the UpdateRelayServiceConnection request. The method always
33529// closes the http.Response Body.
33530func (client AppsClient) UpdateRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
33531	err = autorest.Respond(
33532		resp,
33533		azure.WithErrorUnlessStatusCode(http.StatusOK),
33534		autorest.ByUnmarshallingJSON(&result),
33535		autorest.ByClosing())
33536	result.Response = autorest.Response{Response: resp}
33537	return
33538}
33539
33540// UpdateRelayServiceConnectionSlot creates a new hybrid connection configuration (PUT), or updates an existing one
33541// (PATCH).
33542// Parameters:
33543// resourceGroupName - name of the resource group to which the resource belongs.
33544// name - name of the app.
33545// entityName - name of the hybrid connection configuration.
33546// connectionEnvelope - details of the hybrid connection configuration.
33547// slot - name of the deployment slot. If a slot is not specified, the API will create or update a hybrid
33548// connection for the production slot.
33549func (client AppsClient) UpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) {
33550	if tracing.IsEnabled() {
33551		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateRelayServiceConnectionSlot")
33552		defer func() {
33553			sc := -1
33554			if result.Response.Response != nil {
33555				sc = result.Response.Response.StatusCode
33556			}
33557			tracing.EndSpan(ctx, sc, err)
33558		}()
33559	}
33560	if err := validation.Validate([]validation.Validation{
33561		{TargetValue: resourceGroupName,
33562			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33563				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33564				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33565		return result, validation.NewError("web.AppsClient", "UpdateRelayServiceConnectionSlot", err.Error())
33566	}
33567
33568	req, err := client.UpdateRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope, slot)
33569	if err != nil {
33570		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnectionSlot", nil, "Failure preparing request")
33571		return
33572	}
33573
33574	resp, err := client.UpdateRelayServiceConnectionSlotSender(req)
33575	if err != nil {
33576		result.Response = autorest.Response{Response: resp}
33577		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnectionSlot", resp, "Failure sending request")
33578		return
33579	}
33580
33581	result, err = client.UpdateRelayServiceConnectionSlotResponder(resp)
33582	if err != nil {
33583		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnectionSlot", resp, "Failure responding to request")
33584		return
33585	}
33586
33587	return
33588}
33589
33590// UpdateRelayServiceConnectionSlotPreparer prepares the UpdateRelayServiceConnectionSlot request.
33591func (client AppsClient) UpdateRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (*http.Request, error) {
33592	pathParameters := map[string]interface{}{
33593		"entityName":        autorest.Encode("path", entityName),
33594		"name":              autorest.Encode("path", name),
33595		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33596		"slot":              autorest.Encode("path", slot),
33597		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33598	}
33599
33600	const APIVersion = "2018-02-01"
33601	queryParameters := map[string]interface{}{
33602		"api-version": APIVersion,
33603	}
33604
33605	preparer := autorest.CreatePreparer(
33606		autorest.AsContentType("application/json; charset=utf-8"),
33607		autorest.AsPatch(),
33608		autorest.WithBaseURL(client.BaseURI),
33609		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
33610		autorest.WithJSON(connectionEnvelope),
33611		autorest.WithQueryParameters(queryParameters))
33612	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33613}
33614
33615// UpdateRelayServiceConnectionSlotSender sends the UpdateRelayServiceConnectionSlot request. The method will close the
33616// http.Response Body if it receives an error.
33617func (client AppsClient) UpdateRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
33618	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33619}
33620
33621// UpdateRelayServiceConnectionSlotResponder handles the response to the UpdateRelayServiceConnectionSlot request. The method always
33622// closes the http.Response Body.
33623func (client AppsClient) UpdateRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
33624	err = autorest.Respond(
33625		resp,
33626		azure.WithErrorUnlessStatusCode(http.StatusOK),
33627		autorest.ByUnmarshallingJSON(&result),
33628		autorest.ByClosing())
33629	result.Response = autorest.Response{Response: resp}
33630	return
33631}
33632
33633// UpdateSitePushSettings updates the Push settings associated with web app.
33634// Parameters:
33635// resourceGroupName - name of the resource group to which the resource belongs.
33636// name - name of web app.
33637// pushSettings - push settings associated with web app.
33638func (client AppsClient) UpdateSitePushSettings(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings) (result PushSettings, err error) {
33639	if tracing.IsEnabled() {
33640		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSitePushSettings")
33641		defer func() {
33642			sc := -1
33643			if result.Response.Response != nil {
33644				sc = result.Response.Response.StatusCode
33645			}
33646			tracing.EndSpan(ctx, sc, err)
33647		}()
33648	}
33649	if err := validation.Validate([]validation.Validation{
33650		{TargetValue: resourceGroupName,
33651			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33652				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33653				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
33654		{TargetValue: pushSettings,
33655			Constraints: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties", Name: validation.Null, Rule: false,
33656				Chain: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
33657		return result, validation.NewError("web.AppsClient", "UpdateSitePushSettings", err.Error())
33658	}
33659
33660	req, err := client.UpdateSitePushSettingsPreparer(ctx, resourceGroupName, name, pushSettings)
33661	if err != nil {
33662		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettings", nil, "Failure preparing request")
33663		return
33664	}
33665
33666	resp, err := client.UpdateSitePushSettingsSender(req)
33667	if err != nil {
33668		result.Response = autorest.Response{Response: resp}
33669		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettings", resp, "Failure sending request")
33670		return
33671	}
33672
33673	result, err = client.UpdateSitePushSettingsResponder(resp)
33674	if err != nil {
33675		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettings", resp, "Failure responding to request")
33676		return
33677	}
33678
33679	return
33680}
33681
33682// UpdateSitePushSettingsPreparer prepares the UpdateSitePushSettings request.
33683func (client AppsClient) UpdateSitePushSettingsPreparer(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings) (*http.Request, error) {
33684	pathParameters := map[string]interface{}{
33685		"name":              autorest.Encode("path", name),
33686		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33687		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33688	}
33689
33690	const APIVersion = "2018-02-01"
33691	queryParameters := map[string]interface{}{
33692		"api-version": APIVersion,
33693	}
33694
33695	preparer := autorest.CreatePreparer(
33696		autorest.AsContentType("application/json; charset=utf-8"),
33697		autorest.AsPut(),
33698		autorest.WithBaseURL(client.BaseURI),
33699		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings", pathParameters),
33700		autorest.WithJSON(pushSettings),
33701		autorest.WithQueryParameters(queryParameters))
33702	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33703}
33704
33705// UpdateSitePushSettingsSender sends the UpdateSitePushSettings request. The method will close the
33706// http.Response Body if it receives an error.
33707func (client AppsClient) UpdateSitePushSettingsSender(req *http.Request) (*http.Response, error) {
33708	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33709}
33710
33711// UpdateSitePushSettingsResponder handles the response to the UpdateSitePushSettings request. The method always
33712// closes the http.Response Body.
33713func (client AppsClient) UpdateSitePushSettingsResponder(resp *http.Response) (result PushSettings, err error) {
33714	err = autorest.Respond(
33715		resp,
33716		azure.WithErrorUnlessStatusCode(http.StatusOK),
33717		autorest.ByUnmarshallingJSON(&result),
33718		autorest.ByClosing())
33719	result.Response = autorest.Response{Response: resp}
33720	return
33721}
33722
33723// UpdateSitePushSettingsSlot updates the Push settings associated with web app.
33724// Parameters:
33725// resourceGroupName - name of the resource group to which the resource belongs.
33726// name - name of web app.
33727// pushSettings - push settings associated with web app.
33728// slot - name of web app slot. If not specified then will default to production slot.
33729func (client AppsClient) UpdateSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings, slot string) (result PushSettings, err error) {
33730	if tracing.IsEnabled() {
33731		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSitePushSettingsSlot")
33732		defer func() {
33733			sc := -1
33734			if result.Response.Response != nil {
33735				sc = result.Response.Response.StatusCode
33736			}
33737			tracing.EndSpan(ctx, sc, err)
33738		}()
33739	}
33740	if err := validation.Validate([]validation.Validation{
33741		{TargetValue: resourceGroupName,
33742			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33743				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33744				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
33745		{TargetValue: pushSettings,
33746			Constraints: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties", Name: validation.Null, Rule: false,
33747				Chain: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
33748		return result, validation.NewError("web.AppsClient", "UpdateSitePushSettingsSlot", err.Error())
33749	}
33750
33751	req, err := client.UpdateSitePushSettingsSlotPreparer(ctx, resourceGroupName, name, pushSettings, slot)
33752	if err != nil {
33753		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettingsSlot", nil, "Failure preparing request")
33754		return
33755	}
33756
33757	resp, err := client.UpdateSitePushSettingsSlotSender(req)
33758	if err != nil {
33759		result.Response = autorest.Response{Response: resp}
33760		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettingsSlot", resp, "Failure sending request")
33761		return
33762	}
33763
33764	result, err = client.UpdateSitePushSettingsSlotResponder(resp)
33765	if err != nil {
33766		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettingsSlot", resp, "Failure responding to request")
33767		return
33768	}
33769
33770	return
33771}
33772
33773// UpdateSitePushSettingsSlotPreparer prepares the UpdateSitePushSettingsSlot request.
33774func (client AppsClient) UpdateSitePushSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings, slot string) (*http.Request, error) {
33775	pathParameters := map[string]interface{}{
33776		"name":              autorest.Encode("path", name),
33777		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33778		"slot":              autorest.Encode("path", slot),
33779		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33780	}
33781
33782	const APIVersion = "2018-02-01"
33783	queryParameters := map[string]interface{}{
33784		"api-version": APIVersion,
33785	}
33786
33787	preparer := autorest.CreatePreparer(
33788		autorest.AsContentType("application/json; charset=utf-8"),
33789		autorest.AsPut(),
33790		autorest.WithBaseURL(client.BaseURI),
33791		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings", pathParameters),
33792		autorest.WithJSON(pushSettings),
33793		autorest.WithQueryParameters(queryParameters))
33794	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33795}
33796
33797// UpdateSitePushSettingsSlotSender sends the UpdateSitePushSettingsSlot request. The method will close the
33798// http.Response Body if it receives an error.
33799func (client AppsClient) UpdateSitePushSettingsSlotSender(req *http.Request) (*http.Response, error) {
33800	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33801}
33802
33803// UpdateSitePushSettingsSlotResponder handles the response to the UpdateSitePushSettingsSlot request. The method always
33804// closes the http.Response Body.
33805func (client AppsClient) UpdateSitePushSettingsSlotResponder(resp *http.Response) (result PushSettings, err error) {
33806	err = autorest.Respond(
33807		resp,
33808		azure.WithErrorUnlessStatusCode(http.StatusOK),
33809		autorest.ByUnmarshallingJSON(&result),
33810		autorest.ByClosing())
33811	result.Response = autorest.Response{Response: resp}
33812	return
33813}
33814
33815// UpdateSlot creates a new web, mobile, or API app in an existing resource group, or updates an existing app.
33816// Parameters:
33817// resourceGroupName - name of the resource group to which the resource belongs.
33818// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
33819// parameter.
33820// siteEnvelope - a JSON representation of the app properties. See example.
33821// slot - name of the deployment slot to create or update. By default, this API attempts to create or modify
33822// the production slot.
33823func (client AppsClient) UpdateSlot(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource, slot string) (result Site, err error) {
33824	if tracing.IsEnabled() {
33825		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSlot")
33826		defer func() {
33827			sc := -1
33828			if result.Response.Response != nil {
33829				sc = result.Response.Response.StatusCode
33830			}
33831			tracing.EndSpan(ctx, sc, err)
33832		}()
33833	}
33834	if err := validation.Validate([]validation.Validation{
33835		{TargetValue: resourceGroupName,
33836			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33837				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33838				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33839		return result, validation.NewError("web.AppsClient", "UpdateSlot", err.Error())
33840	}
33841
33842	req, err := client.UpdateSlotPreparer(ctx, resourceGroupName, name, siteEnvelope, slot)
33843	if err != nil {
33844		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlot", nil, "Failure preparing request")
33845		return
33846	}
33847
33848	resp, err := client.UpdateSlotSender(req)
33849	if err != nil {
33850		result.Response = autorest.Response{Response: resp}
33851		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlot", resp, "Failure sending request")
33852		return
33853	}
33854
33855	result, err = client.UpdateSlotResponder(resp)
33856	if err != nil {
33857		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlot", resp, "Failure responding to request")
33858		return
33859	}
33860
33861	return
33862}
33863
33864// UpdateSlotPreparer prepares the UpdateSlot request.
33865func (client AppsClient) UpdateSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource, slot string) (*http.Request, error) {
33866	pathParameters := map[string]interface{}{
33867		"name":              autorest.Encode("path", name),
33868		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33869		"slot":              autorest.Encode("path", slot),
33870		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33871	}
33872
33873	const APIVersion = "2018-02-01"
33874	queryParameters := map[string]interface{}{
33875		"api-version": APIVersion,
33876	}
33877
33878	preparer := autorest.CreatePreparer(
33879		autorest.AsContentType("application/json; charset=utf-8"),
33880		autorest.AsPatch(),
33881		autorest.WithBaseURL(client.BaseURI),
33882		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
33883		autorest.WithJSON(siteEnvelope),
33884		autorest.WithQueryParameters(queryParameters))
33885	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33886}
33887
33888// UpdateSlotSender sends the UpdateSlot request. The method will close the
33889// http.Response Body if it receives an error.
33890func (client AppsClient) UpdateSlotSender(req *http.Request) (*http.Response, error) {
33891	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33892}
33893
33894// UpdateSlotResponder handles the response to the UpdateSlot request. The method always
33895// closes the http.Response Body.
33896func (client AppsClient) UpdateSlotResponder(resp *http.Response) (result Site, err error) {
33897	err = autorest.Respond(
33898		resp,
33899		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
33900		autorest.ByUnmarshallingJSON(&result),
33901		autorest.ByClosing())
33902	result.Response = autorest.Response{Response: resp}
33903	return
33904}
33905
33906// UpdateSlotConfigurationNames updates the names of application settings and connection string that remain with the
33907// slot during swap operation.
33908// Parameters:
33909// resourceGroupName - name of the resource group to which the resource belongs.
33910// name - name of the app.
33911// slotConfigNames - names of application settings and connection strings. See example.
33912func (client AppsClient) UpdateSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource) (result SlotConfigNamesResource, err error) {
33913	if tracing.IsEnabled() {
33914		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSlotConfigurationNames")
33915		defer func() {
33916			sc := -1
33917			if result.Response.Response != nil {
33918				sc = result.Response.Response.StatusCode
33919			}
33920			tracing.EndSpan(ctx, sc, err)
33921		}()
33922	}
33923	if err := validation.Validate([]validation.Validation{
33924		{TargetValue: resourceGroupName,
33925			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33926				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33927				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33928		return result, validation.NewError("web.AppsClient", "UpdateSlotConfigurationNames", err.Error())
33929	}
33930
33931	req, err := client.UpdateSlotConfigurationNamesPreparer(ctx, resourceGroupName, name, slotConfigNames)
33932	if err != nil {
33933		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlotConfigurationNames", nil, "Failure preparing request")
33934		return
33935	}
33936
33937	resp, err := client.UpdateSlotConfigurationNamesSender(req)
33938	if err != nil {
33939		result.Response = autorest.Response{Response: resp}
33940		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlotConfigurationNames", resp, "Failure sending request")
33941		return
33942	}
33943
33944	result, err = client.UpdateSlotConfigurationNamesResponder(resp)
33945	if err != nil {
33946		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlotConfigurationNames", resp, "Failure responding to request")
33947		return
33948	}
33949
33950	return
33951}
33952
33953// UpdateSlotConfigurationNamesPreparer prepares the UpdateSlotConfigurationNames request.
33954func (client AppsClient) UpdateSlotConfigurationNamesPreparer(ctx context.Context, resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource) (*http.Request, error) {
33955	pathParameters := map[string]interface{}{
33956		"name":              autorest.Encode("path", name),
33957		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33958		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33959	}
33960
33961	const APIVersion = "2018-02-01"
33962	queryParameters := map[string]interface{}{
33963		"api-version": APIVersion,
33964	}
33965
33966	preparer := autorest.CreatePreparer(
33967		autorest.AsContentType("application/json; charset=utf-8"),
33968		autorest.AsPut(),
33969		autorest.WithBaseURL(client.BaseURI),
33970		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames", pathParameters),
33971		autorest.WithJSON(slotConfigNames),
33972		autorest.WithQueryParameters(queryParameters))
33973	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33974}
33975
33976// UpdateSlotConfigurationNamesSender sends the UpdateSlotConfigurationNames request. The method will close the
33977// http.Response Body if it receives an error.
33978func (client AppsClient) UpdateSlotConfigurationNamesSender(req *http.Request) (*http.Response, error) {
33979	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33980}
33981
33982// UpdateSlotConfigurationNamesResponder handles the response to the UpdateSlotConfigurationNames request. The method always
33983// closes the http.Response Body.
33984func (client AppsClient) UpdateSlotConfigurationNamesResponder(resp *http.Response) (result SlotConfigNamesResource, err error) {
33985	err = autorest.Respond(
33986		resp,
33987		azure.WithErrorUnlessStatusCode(http.StatusOK),
33988		autorest.ByUnmarshallingJSON(&result),
33989		autorest.ByClosing())
33990	result.Response = autorest.Response{Response: resp}
33991	return
33992}
33993
33994// UpdateSourceControl updates the source control configuration of an app.
33995// Parameters:
33996// resourceGroupName - name of the resource group to which the resource belongs.
33997// name - name of the app.
33998// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
33999func (client AppsClient) UpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (result SiteSourceControl, err error) {
34000	if tracing.IsEnabled() {
34001		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSourceControl")
34002		defer func() {
34003			sc := -1
34004			if result.Response.Response != nil {
34005				sc = result.Response.Response.StatusCode
34006			}
34007			tracing.EndSpan(ctx, sc, err)
34008		}()
34009	}
34010	if err := validation.Validate([]validation.Validation{
34011		{TargetValue: resourceGroupName,
34012			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34013				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34014				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34015		return result, validation.NewError("web.AppsClient", "UpdateSourceControl", err.Error())
34016	}
34017
34018	req, err := client.UpdateSourceControlPreparer(ctx, resourceGroupName, name, siteSourceControl)
34019	if err != nil {
34020		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControl", nil, "Failure preparing request")
34021		return
34022	}
34023
34024	resp, err := client.UpdateSourceControlSender(req)
34025	if err != nil {
34026		result.Response = autorest.Response{Response: resp}
34027		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControl", resp, "Failure sending request")
34028		return
34029	}
34030
34031	result, err = client.UpdateSourceControlResponder(resp)
34032	if err != nil {
34033		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControl", resp, "Failure responding to request")
34034		return
34035	}
34036
34037	return
34038}
34039
34040// UpdateSourceControlPreparer prepares the UpdateSourceControl request.
34041func (client AppsClient) UpdateSourceControlPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (*http.Request, error) {
34042	pathParameters := map[string]interface{}{
34043		"name":              autorest.Encode("path", name),
34044		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34045		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34046	}
34047
34048	const APIVersion = "2018-02-01"
34049	queryParameters := map[string]interface{}{
34050		"api-version": APIVersion,
34051	}
34052
34053	preparer := autorest.CreatePreparer(
34054		autorest.AsContentType("application/json; charset=utf-8"),
34055		autorest.AsPatch(),
34056		autorest.WithBaseURL(client.BaseURI),
34057		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
34058		autorest.WithJSON(siteSourceControl),
34059		autorest.WithQueryParameters(queryParameters))
34060	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34061}
34062
34063// UpdateSourceControlSender sends the UpdateSourceControl request. The method will close the
34064// http.Response Body if it receives an error.
34065func (client AppsClient) UpdateSourceControlSender(req *http.Request) (*http.Response, error) {
34066	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34067}
34068
34069// UpdateSourceControlResponder handles the response to the UpdateSourceControl request. The method always
34070// closes the http.Response Body.
34071func (client AppsClient) UpdateSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) {
34072	err = autorest.Respond(
34073		resp,
34074		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
34075		autorest.ByUnmarshallingJSON(&result),
34076		autorest.ByClosing())
34077	result.Response = autorest.Response{Response: resp}
34078	return
34079}
34080
34081// UpdateSourceControlSlot updates the source control configuration of an app.
34082// Parameters:
34083// resourceGroupName - name of the resource group to which the resource belongs.
34084// name - name of the app.
34085// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
34086// slot - name of the deployment slot. If a slot is not specified, the API will update the source control
34087// configuration for the production slot.
34088func (client AppsClient) UpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (result SiteSourceControl, err error) {
34089	if tracing.IsEnabled() {
34090		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSourceControlSlot")
34091		defer func() {
34092			sc := -1
34093			if result.Response.Response != nil {
34094				sc = result.Response.Response.StatusCode
34095			}
34096			tracing.EndSpan(ctx, sc, err)
34097		}()
34098	}
34099	if err := validation.Validate([]validation.Validation{
34100		{TargetValue: resourceGroupName,
34101			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34102				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34103				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34104		return result, validation.NewError("web.AppsClient", "UpdateSourceControlSlot", err.Error())
34105	}
34106
34107	req, err := client.UpdateSourceControlSlotPreparer(ctx, resourceGroupName, name, siteSourceControl, slot)
34108	if err != nil {
34109		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControlSlot", nil, "Failure preparing request")
34110		return
34111	}
34112
34113	resp, err := client.UpdateSourceControlSlotSender(req)
34114	if err != nil {
34115		result.Response = autorest.Response{Response: resp}
34116		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControlSlot", resp, "Failure sending request")
34117		return
34118	}
34119
34120	result, err = client.UpdateSourceControlSlotResponder(resp)
34121	if err != nil {
34122		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControlSlot", resp, "Failure responding to request")
34123		return
34124	}
34125
34126	return
34127}
34128
34129// UpdateSourceControlSlotPreparer prepares the UpdateSourceControlSlot request.
34130func (client AppsClient) UpdateSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (*http.Request, error) {
34131	pathParameters := map[string]interface{}{
34132		"name":              autorest.Encode("path", name),
34133		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34134		"slot":              autorest.Encode("path", slot),
34135		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34136	}
34137
34138	const APIVersion = "2018-02-01"
34139	queryParameters := map[string]interface{}{
34140		"api-version": APIVersion,
34141	}
34142
34143	preparer := autorest.CreatePreparer(
34144		autorest.AsContentType("application/json; charset=utf-8"),
34145		autorest.AsPatch(),
34146		autorest.WithBaseURL(client.BaseURI),
34147		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
34148		autorest.WithJSON(siteSourceControl),
34149		autorest.WithQueryParameters(queryParameters))
34150	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34151}
34152
34153// UpdateSourceControlSlotSender sends the UpdateSourceControlSlot request. The method will close the
34154// http.Response Body if it receives an error.
34155func (client AppsClient) UpdateSourceControlSlotSender(req *http.Request) (*http.Response, error) {
34156	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34157}
34158
34159// UpdateSourceControlSlotResponder handles the response to the UpdateSourceControlSlot request. The method always
34160// closes the http.Response Body.
34161func (client AppsClient) UpdateSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) {
34162	err = autorest.Respond(
34163		resp,
34164		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
34165		autorest.ByUnmarshallingJSON(&result),
34166		autorest.ByClosing())
34167	result.Response = autorest.Response{Response: resp}
34168	return
34169}
34170
34171// UpdateSwiftVirtualNetworkConnection integrates this Web App with a Virtual Network. This requires that 1)
34172// "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been
34173// delegated, and is not
34174// in use by another App Service Plan other than the one this App is in.
34175// Parameters:
34176// resourceGroupName - name of the resource group to which the resource belongs.
34177// name - name of the app.
34178// connectionEnvelope - properties of the Virtual Network connection. See example.
34179func (client AppsClient) UpdateSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (result SwiftVirtualNetwork, err error) {
34180	if tracing.IsEnabled() {
34181		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSwiftVirtualNetworkConnection")
34182		defer func() {
34183			sc := -1
34184			if result.Response.Response != nil {
34185				sc = result.Response.Response.StatusCode
34186			}
34187			tracing.EndSpan(ctx, sc, err)
34188		}()
34189	}
34190	if err := validation.Validate([]validation.Validation{
34191		{TargetValue: resourceGroupName,
34192			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34193				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34194				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34195		return result, validation.NewError("web.AppsClient", "UpdateSwiftVirtualNetworkConnection", err.Error())
34196	}
34197
34198	req, err := client.UpdateSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name, connectionEnvelope)
34199	if err != nil {
34200		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnection", nil, "Failure preparing request")
34201		return
34202	}
34203
34204	resp, err := client.UpdateSwiftVirtualNetworkConnectionSender(req)
34205	if err != nil {
34206		result.Response = autorest.Response{Response: resp}
34207		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnection", resp, "Failure sending request")
34208		return
34209	}
34210
34211	result, err = client.UpdateSwiftVirtualNetworkConnectionResponder(resp)
34212	if err != nil {
34213		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnection", resp, "Failure responding to request")
34214		return
34215	}
34216
34217	return
34218}
34219
34220// UpdateSwiftVirtualNetworkConnectionPreparer prepares the UpdateSwiftVirtualNetworkConnection request.
34221func (client AppsClient) UpdateSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (*http.Request, error) {
34222	pathParameters := map[string]interface{}{
34223		"name":              autorest.Encode("path", name),
34224		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34225		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34226	}
34227
34228	const APIVersion = "2018-02-01"
34229	queryParameters := map[string]interface{}{
34230		"api-version": APIVersion,
34231	}
34232
34233	preparer := autorest.CreatePreparer(
34234		autorest.AsContentType("application/json; charset=utf-8"),
34235		autorest.AsPatch(),
34236		autorest.WithBaseURL(client.BaseURI),
34237		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
34238		autorest.WithJSON(connectionEnvelope),
34239		autorest.WithQueryParameters(queryParameters))
34240	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34241}
34242
34243// UpdateSwiftVirtualNetworkConnectionSender sends the UpdateSwiftVirtualNetworkConnection request. The method will close the
34244// http.Response Body if it receives an error.
34245func (client AppsClient) UpdateSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) {
34246	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34247}
34248
34249// UpdateSwiftVirtualNetworkConnectionResponder handles the response to the UpdateSwiftVirtualNetworkConnection request. The method always
34250// closes the http.Response Body.
34251func (client AppsClient) UpdateSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
34252	err = autorest.Respond(
34253		resp,
34254		azure.WithErrorUnlessStatusCode(http.StatusOK),
34255		autorest.ByUnmarshallingJSON(&result),
34256		autorest.ByClosing())
34257	result.Response = autorest.Response{Response: resp}
34258	return
34259}
34260
34261// UpdateSwiftVirtualNetworkConnectionSlot integrates this Web App with a Virtual Network. This requires that 1)
34262// "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been
34263// delegated, and is not
34264// in use by another App Service Plan other than the one this App is in.
34265// Parameters:
34266// resourceGroupName - name of the resource group to which the resource belongs.
34267// name - name of the app.
34268// connectionEnvelope - properties of the Virtual Network connection. See example.
34269// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
34270// the production slot.
34271func (client AppsClient) UpdateSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (result SwiftVirtualNetwork, err error) {
34272	if tracing.IsEnabled() {
34273		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSwiftVirtualNetworkConnectionSlot")
34274		defer func() {
34275			sc := -1
34276			if result.Response.Response != nil {
34277				sc = result.Response.Response.StatusCode
34278			}
34279			tracing.EndSpan(ctx, sc, err)
34280		}()
34281	}
34282	if err := validation.Validate([]validation.Validation{
34283		{TargetValue: resourceGroupName,
34284			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34285				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34286				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34287		return result, validation.NewError("web.AppsClient", "UpdateSwiftVirtualNetworkConnectionSlot", err.Error())
34288	}
34289
34290	req, err := client.UpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, connectionEnvelope, slot)
34291	if err != nil {
34292		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request")
34293		return
34294	}
34295
34296	resp, err := client.UpdateSwiftVirtualNetworkConnectionSlotSender(req)
34297	if err != nil {
34298		result.Response = autorest.Response{Response: resp}
34299		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request")
34300		return
34301	}
34302
34303	result, err = client.UpdateSwiftVirtualNetworkConnectionSlotResponder(resp)
34304	if err != nil {
34305		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request")
34306		return
34307	}
34308
34309	return
34310}
34311
34312// UpdateSwiftVirtualNetworkConnectionSlotPreparer prepares the UpdateSwiftVirtualNetworkConnectionSlot request.
34313func (client AppsClient) UpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (*http.Request, error) {
34314	pathParameters := map[string]interface{}{
34315		"name":              autorest.Encode("path", name),
34316		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34317		"slot":              autorest.Encode("path", slot),
34318		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34319	}
34320
34321	const APIVersion = "2018-02-01"
34322	queryParameters := map[string]interface{}{
34323		"api-version": APIVersion,
34324	}
34325
34326	preparer := autorest.CreatePreparer(
34327		autorest.AsContentType("application/json; charset=utf-8"),
34328		autorest.AsPatch(),
34329		autorest.WithBaseURL(client.BaseURI),
34330		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
34331		autorest.WithJSON(connectionEnvelope),
34332		autorest.WithQueryParameters(queryParameters))
34333	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34334}
34335
34336// UpdateSwiftVirtualNetworkConnectionSlotSender sends the UpdateSwiftVirtualNetworkConnectionSlot request. The method will close the
34337// http.Response Body if it receives an error.
34338func (client AppsClient) UpdateSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) {
34339	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34340}
34341
34342// UpdateSwiftVirtualNetworkConnectionSlotResponder handles the response to the UpdateSwiftVirtualNetworkConnectionSlot request. The method always
34343// closes the http.Response Body.
34344func (client AppsClient) UpdateSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
34345	err = autorest.Respond(
34346		resp,
34347		azure.WithErrorUnlessStatusCode(http.StatusOK),
34348		autorest.ByUnmarshallingJSON(&result),
34349		autorest.ByClosing())
34350	result.Response = autorest.Response{Response: resp}
34351	return
34352}
34353
34354// UpdateVnetConnection adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties
34355// (PATCH).
34356// Parameters:
34357// resourceGroupName - name of the resource group to which the resource belongs.
34358// name - name of the app.
34359// vnetName - name of an existing Virtual Network.
34360// connectionEnvelope - properties of the Virtual Network connection. See example.
34361func (client AppsClient) UpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) {
34362	if tracing.IsEnabled() {
34363		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnection")
34364		defer func() {
34365			sc := -1
34366			if result.Response.Response != nil {
34367				sc = result.Response.Response.StatusCode
34368			}
34369			tracing.EndSpan(ctx, sc, err)
34370		}()
34371	}
34372	if err := validation.Validate([]validation.Validation{
34373		{TargetValue: resourceGroupName,
34374			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34375				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34376				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34377		return result, validation.NewError("web.AppsClient", "UpdateVnetConnection", err.Error())
34378	}
34379
34380	req, err := client.UpdateVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope)
34381	if err != nil {
34382		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnection", nil, "Failure preparing request")
34383		return
34384	}
34385
34386	resp, err := client.UpdateVnetConnectionSender(req)
34387	if err != nil {
34388		result.Response = autorest.Response{Response: resp}
34389		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnection", resp, "Failure sending request")
34390		return
34391	}
34392
34393	result, err = client.UpdateVnetConnectionResponder(resp)
34394	if err != nil {
34395		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnection", resp, "Failure responding to request")
34396		return
34397	}
34398
34399	return
34400}
34401
34402// UpdateVnetConnectionPreparer prepares the UpdateVnetConnection request.
34403func (client AppsClient) UpdateVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (*http.Request, error) {
34404	pathParameters := map[string]interface{}{
34405		"name":              autorest.Encode("path", name),
34406		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34407		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34408		"vnetName":          autorest.Encode("path", vnetName),
34409	}
34410
34411	const APIVersion = "2018-02-01"
34412	queryParameters := map[string]interface{}{
34413		"api-version": APIVersion,
34414	}
34415
34416	preparer := autorest.CreatePreparer(
34417		autorest.AsContentType("application/json; charset=utf-8"),
34418		autorest.AsPatch(),
34419		autorest.WithBaseURL(client.BaseURI),
34420		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
34421		autorest.WithJSON(connectionEnvelope),
34422		autorest.WithQueryParameters(queryParameters))
34423	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34424}
34425
34426// UpdateVnetConnectionSender sends the UpdateVnetConnection request. The method will close the
34427// http.Response Body if it receives an error.
34428func (client AppsClient) UpdateVnetConnectionSender(req *http.Request) (*http.Response, error) {
34429	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34430}
34431
34432// UpdateVnetConnectionResponder handles the response to the UpdateVnetConnection request. The method always
34433// closes the http.Response Body.
34434func (client AppsClient) UpdateVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) {
34435	err = autorest.Respond(
34436		resp,
34437		azure.WithErrorUnlessStatusCode(http.StatusOK),
34438		autorest.ByUnmarshallingJSON(&result),
34439		autorest.ByClosing())
34440	result.Response = autorest.Response{Response: resp}
34441	return
34442}
34443
34444// UpdateVnetConnectionGateway adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
34445// Parameters:
34446// resourceGroupName - name of the resource group to which the resource belongs.
34447// name - name of the app.
34448// vnetName - name of the Virtual Network.
34449// gatewayName - name of the gateway. Currently, the only supported string is "primary".
34450// connectionEnvelope - the properties to update this gateway with.
34451func (client AppsClient) UpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) {
34452	if tracing.IsEnabled() {
34453		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnectionGateway")
34454		defer func() {
34455			sc := -1
34456			if result.Response.Response != nil {
34457				sc = result.Response.Response.StatusCode
34458			}
34459			tracing.EndSpan(ctx, sc, err)
34460		}()
34461	}
34462	if err := validation.Validate([]validation.Validation{
34463		{TargetValue: resourceGroupName,
34464			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34465				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34466				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34467		return result, validation.NewError("web.AppsClient", "UpdateVnetConnectionGateway", err.Error())
34468	}
34469
34470	req, err := client.UpdateVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope)
34471	if err != nil {
34472		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGateway", nil, "Failure preparing request")
34473		return
34474	}
34475
34476	resp, err := client.UpdateVnetConnectionGatewaySender(req)
34477	if err != nil {
34478		result.Response = autorest.Response{Response: resp}
34479		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGateway", resp, "Failure sending request")
34480		return
34481	}
34482
34483	result, err = client.UpdateVnetConnectionGatewayResponder(resp)
34484	if err != nil {
34485		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGateway", resp, "Failure responding to request")
34486		return
34487	}
34488
34489	return
34490}
34491
34492// UpdateVnetConnectionGatewayPreparer prepares the UpdateVnetConnectionGateway request.
34493func (client AppsClient) UpdateVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (*http.Request, error) {
34494	pathParameters := map[string]interface{}{
34495		"gatewayName":       autorest.Encode("path", gatewayName),
34496		"name":              autorest.Encode("path", name),
34497		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34498		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34499		"vnetName":          autorest.Encode("path", vnetName),
34500	}
34501
34502	const APIVersion = "2018-02-01"
34503	queryParameters := map[string]interface{}{
34504		"api-version": APIVersion,
34505	}
34506
34507	preparer := autorest.CreatePreparer(
34508		autorest.AsContentType("application/json; charset=utf-8"),
34509		autorest.AsPatch(),
34510		autorest.WithBaseURL(client.BaseURI),
34511		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
34512		autorest.WithJSON(connectionEnvelope),
34513		autorest.WithQueryParameters(queryParameters))
34514	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34515}
34516
34517// UpdateVnetConnectionGatewaySender sends the UpdateVnetConnectionGateway request. The method will close the
34518// http.Response Body if it receives an error.
34519func (client AppsClient) UpdateVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) {
34520	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34521}
34522
34523// UpdateVnetConnectionGatewayResponder handles the response to the UpdateVnetConnectionGateway request. The method always
34524// closes the http.Response Body.
34525func (client AppsClient) UpdateVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) {
34526	err = autorest.Respond(
34527		resp,
34528		azure.WithErrorUnlessStatusCode(http.StatusOK),
34529		autorest.ByUnmarshallingJSON(&result),
34530		autorest.ByClosing())
34531	result.Response = autorest.Response{Response: resp}
34532	return
34533}
34534
34535// UpdateVnetConnectionGatewaySlot adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH).
34536// Parameters:
34537// resourceGroupName - name of the resource group to which the resource belongs.
34538// name - name of the app.
34539// vnetName - name of the Virtual Network.
34540// gatewayName - name of the gateway. Currently, the only supported string is "primary".
34541// connectionEnvelope - the properties to update this gateway with.
34542// slot - name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the
34543// production slot's Virtual Network.
34544func (client AppsClient) UpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) {
34545	if tracing.IsEnabled() {
34546		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnectionGatewaySlot")
34547		defer func() {
34548			sc := -1
34549			if result.Response.Response != nil {
34550				sc = result.Response.Response.StatusCode
34551			}
34552			tracing.EndSpan(ctx, sc, err)
34553		}()
34554	}
34555	if err := validation.Validate([]validation.Validation{
34556		{TargetValue: resourceGroupName,
34557			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34558				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34559				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34560		return result, validation.NewError("web.AppsClient", "UpdateVnetConnectionGatewaySlot", err.Error())
34561	}
34562
34563	req, err := client.UpdateVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot)
34564	if err != nil {
34565		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGatewaySlot", nil, "Failure preparing request")
34566		return
34567	}
34568
34569	resp, err := client.UpdateVnetConnectionGatewaySlotSender(req)
34570	if err != nil {
34571		result.Response = autorest.Response{Response: resp}
34572		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGatewaySlot", resp, "Failure sending request")
34573		return
34574	}
34575
34576	result, err = client.UpdateVnetConnectionGatewaySlotResponder(resp)
34577	if err != nil {
34578		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGatewaySlot", resp, "Failure responding to request")
34579		return
34580	}
34581
34582	return
34583}
34584
34585// UpdateVnetConnectionGatewaySlotPreparer prepares the UpdateVnetConnectionGatewaySlot request.
34586func (client AppsClient) UpdateVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (*http.Request, error) {
34587	pathParameters := map[string]interface{}{
34588		"gatewayName":       autorest.Encode("path", gatewayName),
34589		"name":              autorest.Encode("path", name),
34590		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34591		"slot":              autorest.Encode("path", slot),
34592		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34593		"vnetName":          autorest.Encode("path", vnetName),
34594	}
34595
34596	const APIVersion = "2018-02-01"
34597	queryParameters := map[string]interface{}{
34598		"api-version": APIVersion,
34599	}
34600
34601	preparer := autorest.CreatePreparer(
34602		autorest.AsContentType("application/json; charset=utf-8"),
34603		autorest.AsPatch(),
34604		autorest.WithBaseURL(client.BaseURI),
34605		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
34606		autorest.WithJSON(connectionEnvelope),
34607		autorest.WithQueryParameters(queryParameters))
34608	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34609}
34610
34611// UpdateVnetConnectionGatewaySlotSender sends the UpdateVnetConnectionGatewaySlot request. The method will close the
34612// http.Response Body if it receives an error.
34613func (client AppsClient) UpdateVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) {
34614	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34615}
34616
34617// UpdateVnetConnectionGatewaySlotResponder handles the response to the UpdateVnetConnectionGatewaySlot request. The method always
34618// closes the http.Response Body.
34619func (client AppsClient) UpdateVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) {
34620	err = autorest.Respond(
34621		resp,
34622		azure.WithErrorUnlessStatusCode(http.StatusOK),
34623		autorest.ByUnmarshallingJSON(&result),
34624		autorest.ByClosing())
34625	result.Response = autorest.Response{Response: resp}
34626	return
34627}
34628
34629// UpdateVnetConnectionSlot adds a Virtual Network connection to an app or slot (PUT) or updates the connection
34630// properties (PATCH).
34631// Parameters:
34632// resourceGroupName - name of the resource group to which the resource belongs.
34633// name - name of the app.
34634// vnetName - name of an existing Virtual Network.
34635// connectionEnvelope - properties of the Virtual Network connection. See example.
34636// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
34637// the production slot.
34638func (client AppsClient) UpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) {
34639	if tracing.IsEnabled() {
34640		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnectionSlot")
34641		defer func() {
34642			sc := -1
34643			if result.Response.Response != nil {
34644				sc = result.Response.Response.StatusCode
34645			}
34646			tracing.EndSpan(ctx, sc, err)
34647		}()
34648	}
34649	if err := validation.Validate([]validation.Validation{
34650		{TargetValue: resourceGroupName,
34651			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34652				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34653				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34654		return result, validation.NewError("web.AppsClient", "UpdateVnetConnectionSlot", err.Error())
34655	}
34656
34657	req, err := client.UpdateVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope, slot)
34658	if err != nil {
34659		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionSlot", nil, "Failure preparing request")
34660		return
34661	}
34662
34663	resp, err := client.UpdateVnetConnectionSlotSender(req)
34664	if err != nil {
34665		result.Response = autorest.Response{Response: resp}
34666		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionSlot", resp, "Failure sending request")
34667		return
34668	}
34669
34670	result, err = client.UpdateVnetConnectionSlotResponder(resp)
34671	if err != nil {
34672		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionSlot", resp, "Failure responding to request")
34673		return
34674	}
34675
34676	return
34677}
34678
34679// UpdateVnetConnectionSlotPreparer prepares the UpdateVnetConnectionSlot request.
34680func (client AppsClient) UpdateVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (*http.Request, error) {
34681	pathParameters := map[string]interface{}{
34682		"name":              autorest.Encode("path", name),
34683		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34684		"slot":              autorest.Encode("path", slot),
34685		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34686		"vnetName":          autorest.Encode("path", vnetName),
34687	}
34688
34689	const APIVersion = "2018-02-01"
34690	queryParameters := map[string]interface{}{
34691		"api-version": APIVersion,
34692	}
34693
34694	preparer := autorest.CreatePreparer(
34695		autorest.AsContentType("application/json; charset=utf-8"),
34696		autorest.AsPatch(),
34697		autorest.WithBaseURL(client.BaseURI),
34698		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
34699		autorest.WithJSON(connectionEnvelope),
34700		autorest.WithQueryParameters(queryParameters))
34701	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34702}
34703
34704// UpdateVnetConnectionSlotSender sends the UpdateVnetConnectionSlot request. The method will close the
34705// http.Response Body if it receives an error.
34706func (client AppsClient) UpdateVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
34707	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34708}
34709
34710// UpdateVnetConnectionSlotResponder handles the response to the UpdateVnetConnectionSlot request. The method always
34711// closes the http.Response Body.
34712func (client AppsClient) UpdateVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) {
34713	err = autorest.Respond(
34714		resp,
34715		azure.WithErrorUnlessStatusCode(http.StatusOK),
34716		autorest.ByUnmarshallingJSON(&result),
34717		autorest.ByClosing())
34718	result.Response = autorest.Response{Response: resp}
34719	return
34720}
34721